Error while running voicexml demo

Help
2011-05-18
2013-04-29
  • Madhav Kishore

    Madhav Kishore - 2011-05-18

    when I run  the voicexml demo,I  get the following error,

    java.net.MalformedURLException: no protocol: #JSGF V1.0
    grammar yesno;
    public <yesno> = yes | no {yesyno};

            at java.net.URL.<init>(URL.java:567)
            at java.net.URL.<init>(URL.java:464)
            at java.net.URL.<init>(URL.java:413)
            at org.speechforge.cairo.client.SpeechClientImpl.constructRecogRequest(S
    peechClientImpl.java:609)

    my voicexml

    <?xml version="1.0"?>
    <vxml version="2.1">
       <form id="test">
              <block>
      Welcome to the example.Say yes or no
           </block>
           <field name="yesno">
               <nomatch>
         Please say yes or no.
               </nomatch>
               <noinput>
         Please say something.
               </noinput>
       <prompt>
          Do you like this example?
        </prompt>
        <grammar type='application/jsgf' src="yesno.gram" />
                <filled>
                   <prompt> <value expr="yesno"/> </prompt>
        <if cond="yesno=='yes'">
              I am happy to hear that you like this example.
                   <else/>
              Sorry that you do not like this example.
                   </if>
                 </filled>
              </field>
         </form>
    </vxml>

    and grammar yesno.gram
    #JSGF V1.0
    grammar yesno;
    public <yesno> = yes | no {yesyno};

    Kindly help in resolving it….

     
  • Spencer Lord

    Spencer Lord - 2011-05-18

    I think the issue is here:

    <grammar type='application/jsgf' src="yesno.gram" />
    

    the voicexml interpreter is not handling relative urls.  The workaround is to do something like this

    <grammar type='application/jsgf' src="http://myserver/yesno.gram" />
    

    you could also use a file://   url

    if this does not help, provide more of the stacktrace

     
  • Madhav Kishore

    Madhav Kishore - 2011-05-19

    I tried with both the options

    <grammar src="http://localhost:8080/voicexml/yesno.gram" type="application/jsgf"/>
      <grammar src="file:///D:/apache-tomcat-5.5.15/apache-tomcat-5.5.15/webapps/ROOT/voicexml/yesno.gram" type="application/jsgf"/>
       
       
        still the same problem ….
        here is my trace

    **

    Got an invite request
    Received an unhandled SIP response status code (ignoring it): 183 : Session prog
    ress
    Calling receiver.invite(sdpMessage)
    app name:http://localhost:8080/voicexml/test.vxml
    loading document with URI 'http://localhost:8080/voicexml/test.vxml…
    waiting for end of session…
    start processing application 'Unknown application'…
    entering new scope 'session'…
    entering new scope 'application'…
    entering new scope 'document'…
    interpreter starts with dialog 'test'
    initializing document…
    …done initializing document
    entering new scope 'dialog'…
    initializing FIA for dialog 'test'…
    initialized block form item 'F13006bb285bS000001' with 'org.mozilla.javascript.U
    ndefined@79f5eb'
    initialized input form item 'yesno' with 'org.mozilla.javascript.Undefined@79f5e
    b'
    found 2 form items in dialog 'test'…
    starting main loop for form 'test'…
    selecting next form item in dialog 'test'…
    next form item in form 'test' is 'F13006bb285bS000001'
    entered state WAITING
    collecting 'F13006bb285bS000001'…
    entering new scope 'anonymous'…
    10:59:46.968 INFO SingleFileAudioPlay  Wrote synthesized speech to D:\temp\cairo
    \basePromptDir\13006bae604@speechsynth\1305782986921.au
    Source: file:/D:/temp/cairo/basePromptDir/13006bae604@speechsynth/1305782986921.
    au
    exiting scope 'anonymous'…
    entered state TRANSITIONING
    processing 'F13006bb285bS000001'…
    selecting next form item in dialog 'test'…
    next form item in form 'test' is 'yesno'
    entered state WAITING
    collecting 'yesno'…
    10:59:47.140 INFO SingleFileAudioPlay  Wrote synthesized speech to D:\temp\cairo
    \basePromptDir\13006bae604@speechsynth\1305782987125.au
      :1:1: Content is not allowed in prolog.
    recognizing with grammar: #JSGF V1.0
    grammar yesno;
    public <yesno> = yes | no {yesyno};

    java.net.MalformedURLException: no protocol: #JSGF V1.0
    grammar yesno;
    public <yesno> = yes | no {yesyno};

             at java.net.URL.<init>(URL.java:567)
             at java.net.URL.<init>(URL.java:464)
             at java.net.URL.<init>(URL.java:413)
             at org.speechforge.cairo.client.SpeechClientImpl.constructRecogRequest(S
    peechClientImpl.java:609)
             at org.speechforge.cairo.client.SpeechClientImpl.recognize(SpeechClientI
    mpl.java:466)
             at org.speechforge.zanzibar.jvoicexml.impl.Mrcpv2UserInput.startRecognit
    ion(Mrcpv2UserInput.java:115)
             at org.jvoicexml.interpreter.FormInterpretationAlgorithm.visitFieldFormI
    tem(FormInterpretationAlgorithm.java:1008)
             at org.jvoicexml.interpreter.formitem.FieldFormItem.accept(FieldFormItem
    .java:87)
             at org.jvoicexml.interpreter.FormInterpretationAlgorithm.collect(FormInt
    erpretationAlgorithm.java:556)
             at org.jvoicexml.interpreter.FormInterpretationAlgorithm.mainLoop(FormIn
    terpretationAlgorithm.java:373)
             at org.jvoicexml.interpreter.VoiceXmlInterpreter.process(VoiceXmlInterpr
    eter.java:243)
             at org.jvoicexml.interpreter.VoiceXmlInterpreterContext.interpret(VoiceX
    mlInterpreterContext.java:511)
             at org.jvoicexml.interpreter.VoiceXmlInterpreterContext.process(VoiceXml
    InterpreterContext.java:311)
             at org.jvoicexml.interpreter.JVoiceXmlSession.run(JVoiceXmlSession.java:
    292)
    entered state TRANSITIONING
    processing 'yesno'…
    entered state WAITING
    Source: file:/D:/temp/cairo/basePromptDir/13006bae604@speechsynth/1305782987125.
    **au

     
  • Spencer Lord

    Spencer Lord - 2011-05-19

    Let me try to reproduce the problem. 
    Can you tell me which version are you using and just a little bit about your configuration?

     
  • Madhav Kishore

    Madhav Kishore - 2011-05-23

    latest verison of zanzibar-SNAPSHOT-bin

    my config file:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>

    <bean id="main" class="org.speechforge.zanzibar.server.SpeechletServerMain"
    init-method="startup" destroy-method="shutdown">
    </bean>

        <bean id="CairoLocal" class="org.speechforge.zanzibar.server.CairoLocal"
    init-method="startup" destroy-method="shutdown">
    <property name="cairoConfig">
    <value>file:../../config/cairo-config.xml</value>
    </property>
    <property name="receiverResourceName">
        <value>receiver1</value>
    </property>
    <property name="transmitterResourceName">
        <value>transmitter1</value>
    </property>
    <property name="sipPort">
        <value>5050</value>
    </property>
    <property name="sipTransport">
        <value>UDP</value>
    </property>
    <property name="zanzibarAddress">
        <value>172.16.17.212</value>
    </property>
    </bean>
           
    <bean id="sipService" class="org.speechforge.zanzibar.sip.SipServer"
    init-method="startup" destroy-method="shutdown">
    <property name="dialogService">
    <ref bean="dialogService"/>
    </property>
    <property name="mySipAddress">
    <value>sip:cairogate@speechforge.org</value>
    </property>
    <property name="stackName">
    <value>Agi Sip Stack</value>
    </property>
    <property name="port">
    <value>5090</value>
    </property>
    <property name="transport">
    <value>UDP</value>
    </property>
    <property name="cairoSipAddress">
    <value>sip:cairo@speechforge.org</value>
    </property>
    <property name="zanzibarHostName">
    <value>172.16.17.212</value>
    </property>
    <property name="cairoSipHostName">
        <value>172.16.17.212</value>
    </property>
    <property name="cairoSipPort">
        <value>5050</value>
    </property>

    <property name="mode">
    <value>mrcpv2</value>
    </property>
    <property name="baseReceiverRtpPort">
    <value>42150</value>
    </property>
    <property name="baseXmitRtpPort">
    <value>42050</value>
    </property>
    <property name="maxConnects">
    <value>50</value>
    </property>

    </bean>

    <bean id="dialogService"
          class="org.speechforge.zanzibar.speechlet.ApplicationByNumberService"
      init-method="startup" destroy-method="shutdown">
      <property name="instrumentation">
    <value>false</value>
      </property>
        <property name="cloudUrl">
    <value>http://spokentech.net/speechcloud</value>
      </property>
      <property name="tempDirForPrompts">
       <value>d:/temp/</value>
      </property>
    </bean>

        <bean id="callControl" class="org.speechforge.zanzibar.asterisk.CallControl"
    init-method="startup" destroy-method="shutdown">
    <property name="address">
        <value>172.16.17.212</value>
    </property>
    <property name="name">
        <value>manager</value>
    </property>
    <property name="password">
        <value>cairo</value>
    </property>
    <property name="disabled">
        <value>true</value>
    </property>
    </bean>

        <bean id="_1000"
       class="org.speechforge.apps.demos.Parrot"
       singleton="false">
       <property name="prompt">
        <value>welcome to C-DAAC Automatic speech recognition project .You can start saying digits in maalaayaalaam </value>
    </property>
    <property name="grammar">
            <value>file:../../demo/grammar/digits.gram</value>
    </property>
    </bean>

    <bean id="_2000"
       class="org.speechforge.apps.demos.DTMFDemo"
       singleton="false">
       <property name="prompt">
        <value>You can press any four digit extension on your keypad.  Say goodbye to exit.</value>
    </property>
    <property name="grammar">
            <value>file:../../demo/grammar/demo-dtmf.gram</value>
    </property>
    </bean>

        <bean id="_3000"
       class="org.speechforge.apps.demos.Jukebox"
       singleton="false">
        <property name="firstPrompt">
            <value>Hi.  Welcome to the Demo Jukebox.  What would you like to hear Bob Dylan, Radiohead, Amy Winehouse or Rolling Stones</value>
    </property>
    <property name="laterPrompts">
            <value>Welcome back.  What would you like to hear next, Bob Dylan, Radiohead, Amy Winehouse or Rolling Stones</value>
    </property>
        <property name="greetingGrammar">
            <value>file:../../demo/grammar/jukeboxWelcome.gram</value>
    </property>
        <property name="playGrammar">
            <value>file:../../demo/grammar/jukeboxPlay.gram</value>
    </property>
    <property name="dylan">
            <value>file:../../../audio/jukebox/03RollinandTumblin.au</value>
    </property>
    <property name="amy">
            <value>file:../../../audio/jukebox/11YouKnowImNoGoodRemix.au</value>
    </property>
    <property name="stones">
            <value>file:../../../audio/jukebox/01FancyManBlues.au</value>
    </property>
    <property name="radiohead">
            <value>file:../../../audio/jukebox/08HouseofCards.au</value>
    </property>   
    </bean>

        <bean id="_4000"
       class="org.speechforge.apps.demos.CallXferDemo"
       singleton="false">
        <property name="pbxContext">
            <value>stooges</value>
    </property>
       <property name="prompt">
        <value>Would you like to speak to Larry, Moe or Curly?  You can press any four digit extension on your keypad.  Say goodbye to exit.</value>
    </property>
    <property name="grammar">
            <value>file:../../demo/grammar/callxfer-demo.gram</value>
    </property>

    </bean>

       <bean id="_5000"
          class="org.speechforge.zanzibar.jvoicexml.impl.VoiceXmlSessionProcessor"
          singleton="false">
          <property name="appUrl">
           <value>http://localhost:8080/voicexml/hello.vxml</value>
       </property>
    </bean>

    <bean id="_6000"
       class="org.speechforge.zanzibar.jvoicexml.impl.VoiceXmlSessionProcessor"
       singleton="false">
       <property name="appUrl">
        <value>http://localhost:8080/voicexml/test.vxml</value>
    </property>
    </bean>

        <bean id="_7000"
       class="org.speechforge.zanzibar.jvoicexml.impl.VoiceXmlSessionProcessor"
       singleton="false">
       <property name="appUrl">
        <value>http://localhost:8080/voicexml/test.vxml</value>
    </property>
    </bean>

    <bean id="implementationplatform"
          class="org.speechforge.zanzibar.jvoicexml.impl.MrcpImplementationPlatform"
          singleton="false">
    </bean>

        <bean id="jvoicexmlcore"
              class="org.speechforge.zanzibar.jvoicexml.impl.MrcpJVoiceXMLCore"
              singleton="false">
    </bean>

    <bean id="documentserver"
    class="org.jvoicexml.documentserver.JVoiceXmlDocumentServer">
    <property name="schemeStrategies">
    <list>
    <bean
    class="org.jvoicexml.documentserver.schemestrategy.MappedDocumentStrategy" />
    <bean
    class="org.jvoicexml.documentserver.schemestrategy.FileSchemeStrategy" />
    <bean
    class="org.jvoicexml.documentserver.schemestrategy.HttpSchemeStrategy" />
    </list>
    </property>
    </bean>

    <bean id="grammarprocessor"
    class="org.jvoicexml.interpreter.grammar.JVoiceXmlGrammarProcessor">
    <property name="grammaridentifier">
    <bean
    class="org.jvoicexml.interpreter.grammar.GrammarIdentifierCentral">
    <property name="identifier">
    <list>
    <bean
    class="org.jvoicexml.interpreter.grammar.identifier.SrgsXmlGrammarIdentifier" />
    <bean
    class="org.jvoicexml.interpreter.grammar.identifier.SrgsAbnfGrammarIdentifier" />
    <bean
    class="org.jvoicexml.interpreter.grammar.identifier.JsgfGrammarIdentifier" />
    </list>
    </property>
    </bean>
    </property>
    <property name="grammartransformer">
    <bean
    class="org.jvoicexml.interpreter.grammar.GrammarTransformerCentral">
    <property name="transformer">
    <list>
         <bean
                                 class="org.jvoicexml.interpreter.grammar.transformer.SrgsXml2JsgfGrammarTransformer" />
                             <bean
                                  class="org.jvoicexml.interpreter.grammar.transformer.Jsgf2JsgfGrammarTransformer" />
                             <bean
                                 class="org.jvoicexml.interpreter.grammar.transformer.SrgsXml2SrgsXmlGrammarTransformer" />
    </list>
    </property>
    </bean>
    </property>
    </bean>

    </beans>

     
  • Spencer Lord

    Spencer Lord - 2011-05-23

    Hi,
    I think I found the problem, I will try to check in a fix tomorrow but it may not be till Tuesday.  Version 0.1 should not have this problem (if you want to try that in the mean time).

    Spencer

     
  • Madhav Kishore

    Madhav Kishore - 2011-06-02

    when I tried with version 0.1 ,It is working fine…

    Now ,I face another problem…
    when I run the voice xml with sub dialogs I get the following error…

    processing 'age'…
    entered state WAITING
    Stopping recognition, but nothing to cancel.  Mrcp channel state is RECOGNIZED
    selecting next form item in dialog 'prayyam'…
    next form item in form 'prayyam' is 'ageq'
    collecting 'ageq'…
    visiting of subdialog form items is not implemented!
    entered state TRANSITIONING

    processing 'ageq'…
    entered state WAITING
    Got a dialog terminated event

    I would like to know what this error  mean (visiting of subdialog form items is not implemented!) ?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks