| VoiceXML 2.1 Development Guide | Home | Frameset Home |
|
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >
</vxml>
<field> tag. But this does not necessarily have to be the case. Beneath our <form> tag, we can also use a <block> structure if we want to give basic menu prompts:
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1">
<form id="MainMenu">
<block>
<prompt bargein="false">
This is the Hello World Main Menu.
</prompt>
</block>
</form>
<block> or the <field> then non-tagged text is read as TTS. Make sense?<prompt> tag about, and why are we telling the VoiceXML server not to allow "barging in"? This tag is indeed familiar, as we have used it in previous tutorials, but so far, we haven't really explained it. Why, you ask? We like building up suspense, that's why. By default, you can always interrupt audio files or text-to-speech, but sometimes you will want your callers/listeners to hear the entire prompt. To veteran users of an application this can be annoying (because they know how to navigate through the menus already), but knowing this attribute gives you greater control over how your prompts will behave.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" xmlns="http://www.w3.org/2001/vxml:voxeo="http://community.voxeo.com/xmlns/vxml">
<meta name="maintainer" content = "YOUREMAILADDRESS@HERE.com"/>
<link next="#MainMenu">
<!-- The XML grammar for the main menu. -->
<grammar xml:lang="en-US" root ="LINKGRAM">
<rule id="LINKGRAM" scope="public">
<one-of>
<item>main</item>
<item>back</item>
<item>begin</item>
</one-of>
</rule>
</grammar>
</link>
<form id="MainMenu">
<block>
<prompt bargein="false">
This is the Hello World Main Menu.
</prompt>
</block>
<field name="MeatOrPlant">
<prompt>
Are you a Carnivore or Vegetarian.
</prompt>
<!-- Grammar for available responses for either "Carnivore" or "Vegetarian".-->
<grammar xml:lang="en-US" root = "MEATPLANT">
<rule id="MEATPLANT" scope="public">
<one-of>
<!-- If the user says any of the following choices, then the grammar assigns "meat" to -->
<!-- the MeatOrPlant variable. -->
<item>
<one-of>
<item>meat</item>
<item>carnivore</item>
<item>flesh</item>
<item>animal</item>
<item>brains</item>
</one-of>
<tag>out.MeatOrPlant ="meat";</tag>
</item>
<!-- If the user says any of the following choices, then the grammar assigns "plant" to -->
<!-- the MeatOrPlant variable. -->
<item>
<one-of>
<item>vegetarian</item>
<item>plant</item>
<item>veggie</item>
<item>hummus</item>
</one-of>
<tag>out.MeatOrPlant ="plant";</tag>
</item>
</one-of>
</rule>
</grammar>
</field>
</form>
<form id="Meat">
<field name="MeatOrPlant">
<prompt>
PETA is coming for you, be afraid.
If you wish to try again, please say Main.
</prompt>
</field>
</form>
<form id="Plant">
<field name="MeatOrPlant">
<prompt>
You must be a person of strong moral convictions, and weak bowel movements.
If you wish to try again, please say Main.
</prompt>
</field>
</form>
</vxml>
<link> tag? The <link> element works like a globally scoped grammar, meaning that the grammars nested within it will be active in any voice reco field in the document. By comparison, the other grammars will only be active within their enclosing voice reco fields. Using a <link> allows an easy way for us to allow for a 'top-level' grammar that contains common commands such as 'go back', 'repeat', etc. You will note that both 'BackToMain' fields below do not have any local grammars within them, right? The reason for this, (in case you haven't figured this out already), is that they will be using our <link> grammars.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml" xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">
<meta name="maintainer" content="YOUREMAILADDRESS@HERE.com"/>
<link next="#MainMenu">
<!-- The XML grammar for the main menu. -->
<grammar xml:lang="en-US" root ="LINKGRAM">
<rule id="LINKGRAM" scope="public">
<one-of>
<item>main</item>
<item>back</item>
<item>begin</item>
</one-of>
</rule>
</grammar>
</link>
<form id="MainMenu">
<block>
<prompt bargein="false">
This is the Hello World Main Menu.
</prompt>
</block>
<field name="MeatOrPlant">
<prompt>
Are you a Carnivore or Vegetarian.
</prompt>
<!-- Grammar for available responses for either "Carnivore" or "Vegetarian".-->
<grammar xml:lang="en-US" root = "MEATPLANT">
<rule id="MEATPLANT" scope="public">
<one-of>
<!-- If the user says any of the following choices, then the grammar assigns "meat" to -->
<!-- the MeatOrPlant variable. -->
<item>
<one-of>
<item>meat</item>
<item>carnivore</item>
<item>flesh</item>
<item>animal</item>
<item>brains</item>
</one-of>
<tag>out.MeatOrPlant ="meat";</tag>
</item>
<!-- If the user says any of the following choices, then the grammar assigns "plant" to -->
<!-- the MeatOrPlant variable. -->
<item>
<one-of>
<item>vegetarian</item>
<item>plant</item>
<item>veggie</item>
<item>hummus</item>
</one-of>
<tag>out.MeatOrPlant ="plant";</tag>
</item>
</one-of>
</rule>
</grammar>
<noinput>
<prompt>
I did not hear anything. Please try again.
</prompt>
<reprompt/>
</noinput>
<nomatch>
<prompt>
I did not recognize that lifestyle choice. Please try again.
</prompt>
<reprompt/>
</nomatch>
</field>
<filled>
<if cond="MeatOrPlant == 'meat'">
<goto next="#Meat"/>
<elseif cond="MeatOrPlant == 'plant'"/>
<goto next="#Plant"/>
</if>
</filled>
</form>
<!-- If the answer was "meat", it prompts the following statement. -->
<form id="Meat">
<field name="BackToMain">
<prompt>
PETA is coming for you, be afraid.
If you wish to try again, please say Main.
</prompt>
</field>
<filled>
<!-- This will never get hit.-->
</filled>
</form>
<!-- If the answer was "plant", it prompts the following statement. -->
<form id="Plant">
<field name="BackToMain">
<prompt>
You must be a person of strong moral convictions, and weak bowel movements.
If you wish to try again, please say Main.
</prompt>
</field>
<filled>
<!-- This will never get hit.-->
</filled>
</form>
</vxml>
<prompt> tags to make menus<link> element. | ANNOTATIONS: EXISTING POSTS |
anujsharma
|
|
| In Step 3, within the first <form> and <field> tags, it should be </prompt> over the inline grammar declaration - Line 19! | |
MattHenry
|
|
| Hi there,
Actually, the order of elements listed within the <field> does not matter at all; <prompt> can precede <grammar>, and can even precede the <filled> if you wanted to code it like this. VoiceXML does not work from the 'top-to-bottom', but rather execution is dictated by the Form Interpretation Algorithm. Check the below w3c link for clarification on this point: http://www.w3.org/TR/voicexml20/#dml2.1.6 ~Matt |
|
anujsharma
|
|
| Where is the ending tag </prompt> for the first <prompt> tag?
Is second <prompt> tag really necessary? What's its significance in this example? |
|
MattHenry
|
|
| I'm sorry, but I dont undersand your question. Can you provide some specific details as to this inquiry? I don't know *which* prompt that you are speaking of.......
~Matt |
|
anujsharma
|
|
| Please clarify the role of both the <prompt> tags in the following:
<field name="MeatOrPlant"> <prompt> Are you a Carnivore or Vegetarian. <prompt> <grammar type="text/gsl"> <![CDATA[[ [vegetarian plant veggie] {<MeatOrPlant "plant">} [meat carnivore flesh animal] {<MeatOrPlant "meat">} ]]]> </grammar> </field> |
|
MattHenry
|
|
| Anuj,
That's a simple typo, which i have rectified on my end. The second instance should be a closing tag, ie: <prompt> Are you a Carnivore or Vegetarian. </prompt> ~ Matt |
|
dgranville
|
|
| <grammar type="text/gsl">
<![CDATA[[ [vegetarian plant veggie] {<MeatOrPlant "plant">} [meat carnivore flesh animal] {<MeatOrPlant "meat">} ]]]> </grammar> Prior to this example in the tutorial, there hasn't been any discussion of what "CDATA" is nor what what the use of braces "{}" and angle brackets "<>" are for. (Sorry, if it's an obvious XML feature--I'm an HTML guy). |
|
voxeoshanesmith
|
|
| dgranville,
CDATA is used to escape XML characters that usually would cause a parse error. It's a good idea to use this when using inline grammars, especially if they are generated from a server-side language dynamically. You can check to make sure your documents parse by opening up the page in your web browser (Internet Explorer) and checking for parse errors. Hope that helps. -Shane Smith -Voxeo Corporation |
|
dgeiregat
|
|
| Hello,
2 questions which are maybe answered later in the tutorial. They have to do with the behaviour to the prompts played in <form id="Meat"> or <form id="Plant">. 1) if one remains silent, a timeout mechanism is triggered although not coded for explicitly; same is true if one says something out-of-grammar. Is there some in-built, default functionality for silence and misrecognitions? 2) saying 'back' or 'begin' is valid since belonging to the 'link' grammar. But why does the condition <if cond="BackToMain == 'main'"> evaluate to true if one says 'back' or 'begin' ? (and it works!) I understand the code if one says 'main'. Regards, Dirk |
|
MattHenry
|
|
| Hiya Dirk,
Allow me to clear this up for you: 1) The platform does supply default handlers for Nomatch/Noinput events if left unspecified by the developer; check the spec at: http://www.w3.org/TR/voicexml20/#dml5.2.5 2) I can understand your confusion; the conditional statements within <form id="Meat/Plant"> are remnants of an older code version, where a form-level grammar was used in favor of a <link>. Note that these conditional statements are NOT hit upon an utterance of 'main'; the link grammars take care of this entirely. In any case, i have removed these conditionals from the docs, which should be reflected within the next day or two. Sorry if this caused any head-scratching. =) ~Matt |
|
DaveMorris
|
|
| I'm confused about when to use block, when to use prompt, and when not to use one or the other. For instance in the Step 4 example, the nomatch and noinput responses are not surrounded by prompt tags. In the Step 5 example they are. I have some scripts that seem to want to hang up on me even though they are supposed to be speaking and transferring to other forms, and I suspect it has something to do with my confusion about the prompt tag and what it implies. Does the prompt tag require a response from the caller, or does it just mean "speak this". And if so, what happens if you just omit the prompt tag and put text in a block tag?
Thanks, Dave |
|
MattHenry
|
|
|
Hiya Dave, It appears as if I am fully "busted" for sloppy coding in the tutorials. =^D Step 4 is in need of some correction, in terms of Best Practices: When nesting TTS output in a form item, (such as a block, or field), any platform will usually err on the side of caution, and will render it to the caller as expected. However, it's always best to be compliant to the spec for portability reasons, as my attention to detail in this case clearly lacks, (ha-ha). So sorry about the confusion, and thanks for pointing out this errata; I'll post a correction shortly. Regards, ~Matthew Henry |
|
bericson
|
|
| Within <form id="Meat/Plant">, I'm a bit confused by the purpose/intent of the <field name="BackToMain">. Could you explain that please?
And is the reason the two <filled> tags will not get hit because there is no grammar specified there? Thanks. |
|
MattHenry
|
|
|
Hi there, This is kind of explained in the paragraph just before step 5. In short, we need to have an active reco field within a form in order to make the global <link> grammars active. And you are correct, those <filled> statements will never be executed, as they have no grammar active within them. ~Matt |
|
gregzh
|
|
| Hi
I tried this, always get failed, say "internal error in the script...", Could someone help to check this? I copied the whole script from this tutorial actually. <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1" > <link next="MainMenu"> <grammar type="text/gsl"> [main back again begin]</grammar> </link> <form id="MainMenu"> <block> <prompt bargein="false"> Hello World. This is greg, the first telephone application. Date is May 7, 2006. </prompt> </block> <field name="MeatOrPlant"> <prompt> Are you a carnivore or Vegetarian. </prompt> <grammar type="text/gsl"> <![CDATA[[ [vegetarian plant veggie number] {<MeatOrPlant "plant">} [meat carnivore flesh animal] {<MeatOrPlant "meat">} ]]]> </grammar> </field> <filled> <if cond="MeatOrPlant == 'meat'"> <goto next="#Meat"/> <elseif cond="MearOrPlant == 'plant'"/> <goto next="#Plant"/> </if> </filled> </form> <form if="Meat"> <field name="BackToMain"> <prompt> Protein is the spawn of the devil. If you wish to try again, please say "Main". </prompt> </field> </form> </vxml> |
|
gregzh
|
|
| Hi Matt,
Here is the output in the debugger, for my problem. There is the red color error, but don't know what is the reason. Thanks. Greg ===== 02525 6a86 06:48:20 AM 06:48:20.540: Fetch thread 13579: Failed fetch of URL: http://webhosting.voxeo.net/17840/www/MainMenu. com.mot.icsd.voxml.core.VoiceException: Failed fetch with code: 404 (Not Found), URL: http://webhosting.voxeo.net/17840/www/MainMenu 02526 6a86 06:48:20 AM 06:48:20.540: <perf type="fetch" value="0ms"> http://webhosting.voxeo.net/17840/www/MainMenu 0 bytes </perf> 02527 6a86 06:48:20 AM 06:48:20.556: ECMAScript pseudo-evaluating: dialog = new Object(); 02528 6a86 06:48:20 AM 06:48:20.556: ==> [object Object] 02529 6a86 06:48:20 AM 06:48:20.556: ECMAScript pseudo-evaluating: application = new Object(); 02530 6a86 06:48:20 AM 06:48:20.556: ==> [object Object] 02531 6a86 06:48:20 AM 06:48:20.556: VEC::getCallingNumber(): Calling Number is [gregzhang] 02532 6a86 06:48:20 AM 06:48:20.556: VEC::getCalledNumber(): Called Number is [9990026293] 02533 6a86 06:48:20 AM 06:48:20.556: =========================== An error occurred while executing the following dialog. Initial URL: file:///c:/nuance/callrouting/motnewcall.vxml Current URL: http://webhosting.voxeo.net/17840/www/hello1.xml [click on link for full URL] Calling Number (ANI): gregzhang Called Number (DNIS): 9990026293 Redirecting Number (RDNIS): "" State: MainMenu VoxGateway Version: Load 129 (30 June 2005) Date/Time: 2006/5/8 6:48:20.556 VoiceException: error.badfetch.http.404 Failed fetch with code: 404 (Not Found), URL: http://webhosting.voxeo.net/17840/www/MainMenu Dialog stack trace: State (Dialog) URL (Document) -------------- ------------------------------ MainMenu http://webhosting.voxeo.net/17840/www/hello1.xml?session.calledid=9990026293&session.connection.local.uri=9990026293&session.parentsessionid=6776ddbe4143e9912c3396e6b8aa6a86&session.sessionid=6776ddbe4143e9912c3396e6b8aa6a86&session.connection.remote.uri=gregzhang&session.callerid=gregzhang 02534 6a86 06:48:20 AM 06:48:20.556: JSCEC::getDefaultLocale(): Returning lang=en-US 02535 6a86 06:48:20 AM 06:48:20.556: JSCEC::stopClip(): stopClip called 02536 6a86 06:48:20 AM 06:48:20.556: Grammar is of type [application/x-builtin] 02537 6a86 06:48:20 AM 06:48:20.556: JSCEC::getDefaultLocale(): Returning lang=en-US 02538 6a86 06:48:20 AM 06:48:20.556: JSCEC::setCurrentGrammarLocale(): Setting locale=en-US 02539 6a86 06:48:20 AM 06:48:20.556: Attempting to install as GSL 02540 6a86 06:48:20 AM 06:48:20.556: Grammar src: builtin://.VMLNull-en-US 02541 6a86 06:48:20 AM 06:48:20.556: Grammar: builtin://.VMLNull-en-US 02542 6a86 06:48:20 AM 06:48:20.556: JSCEC::setCurrentGrammarLocale(): Setting locale=null 02543 6a86 06:48:20 AM 06:48:20.556: behavior.calllog.STATE = MainMenu 02544 6a86 06:48:20 AM 06:48:20.556: behavior.calllog.GRAMMAR = builtin://.VMLNull-en-US 02545 6a86 06:48:20 AM 06:48:20.556: Setting client.InputModes=voice,dtmf 02546 6a86 06:48:20 AM 06:48:20.634: HexString [ 0x0054|0x0068|0x0061|0x0074|0x0020|0x0063|0x006F|0x006E|0x0074|0x0065|0x006E|0x0074| 0x0020|0x0069|0x0073|0x0020|0x006E|0x006F|0x0074|0x0020|0x0061|0x0076|0x0061|0x0069|0x006C| 0x0061|0x0062|0x006C|0x0065|0x0020|0x0061|0x0074|0x0020|0x0074|0x0068|0x0069|0x0073|0x0020| 0x0074|0x0069|0x006D|0x0065|0x002E|0x0020|0x0049|0x0020|0x0063|0x006F|0x0075|0x006C|0x0064| 0x006E|0x0027|0x0074|0x0020|0x0066|0x0069|0x006E|0x0064|0x0020|0x0061|0x0020|0x0077|0x0065| 0x0062|0x0020|0x0070|0x0061|0x0067|0x0065|0x002E| ] 02547 6a86 06:48:20 AM 06:48:20.634: DecString [ 84|104|97|116|32|99|111|110|116|101|110|116|32|105|115|32|110|111|116|32|97|118| 97|105|108|97|98|108|101|32|97|116|32|116|104|105|115|32|116|105|109|101|46|32|73| 32|99|111|117|108|100|110|39|116|32|102|105|110|100|32|97|32|119|101|98|32|112|97| 103|101|46| ] 02548 6a86 06:48:20 AM 06:48:20.634: TEXT:[That content is not available at this time. I couldn't find a web page.] 02549 6a86 06:48:20 AM 06:48:20.634: Listen: entering recognize with to=1 02550 6a86 06:48:20 AM 06:48:20.634: recognize: Entering method with bargein=false and timeout=1 02551 6a86 06:48:20 AM 06:48:20.634: playAndRecognize with [.VMLNull-en-US] bargein [false] timeout [1] 02552 6a86 06:48:27 AM 06:48:27.478: recognize: leaving method with result={ dtype=17 type="NO_SPEECH_TIMEOUT" results=[{ dtype=10 text="<timeout>" probability=1 confidence=100 confidenceWithoutFiller=0 wordConfidences=[] interp=[] }] textRecresult="" numFrames=0 firstPassRecognizerInfo="" secondPassRecognizerInfo="" } 02553 6a86 06:48:27 AM 06:48:27.478: Handling ASR 02554 6a86 06:48:27 AM 06:48:27.478: There were [1] possible results 02555 6a86 06:48:27 AM 06:48:27.478: Caught a VoiceException NOSPEECH 02556 6a86 06:48:27 AM 06:48:27.478: ECMAScript evaluating: __ese=__es.pop(); 02557 6a86 06:48:27 AM 06:48:27.478: ==> [object Object] [0ms/0ms 4516 chars] 02558 6a86 06:48:27 AM 06:48:27.478: VEC::close(): Return Variables are: errorReason=Failed+fetch+with+code%3A+404+%28Not+Found%29%2C%0A++++URL%3A+http%3A%2F%2Fwebhosting.voxeo.net%2F17840%2Fwww%2FMainMenu 02559 6a86 06:48:27 AM 06:48:27.494: __AphroditeMsg__: state: terminated 02560 6a86 06:48:27 AM 06:48:27.494: VEC::close() CALL_END: sessionID=6776ddbe4143e9912c3396e6b8aa6a86 parentSessionID=6776ddbe4143e9912c3396e6b8aa6a86 callStartTime=1147070883712 callEndTime=1147070907494 accountID=17840 appID=39655 callType=0 callerID=gregzhang calledID=9990026293 mainURL=http://webhosting.voxeo.net/17840/www/hello1.xml featureFlags=0 calllength=23782 02561 6a86 06:48:27 AM 06:48:27.494: hanging up... 02562 6a86 06:48:27 AM 06:48:27.509: hung up... 02563 6a86 06:48:27 AM 06:48:27.509: URLFetcher::close(): Close exiting... |
|
mikethompson
|
|
| Hey Greg,
Looking at the logs, this is simply a failed fetch from the browser. And to verify, I attempted pulling the following link up in my browser as well: http://webhosting.voxeo.net/17840/www/MainMenu This directory does not actually exist. You'll want to map your application directly to the document URL. When taking a look at your account I noticed the document you were trying to reach is: http://webhosting.voxeo.net/17840/www/hello1.xml simply replace the current URL with the suggest new URL (your xml document) and all should be well. Regards, Mike Thompson Voxeo Extreme Support |
|
bon_thanh
|
|
| Hello,
The following is taken from tbe paragraph directly above Step 5: "However, we DO need to have these defined as voice recognition <fields>, otherwise, the interpreter wouldn't be listening for any input at all. This is why we don't have "Meat" and "plant" defined as a <block>,..." I don't understand this explanation. Bonnie |
|
MattHenry
|
|
|
Bonnie, Sorry for any confusion. To be totally, clear, let's take a look at two examples: -- EX 1: working example -- <link next="#MainMenu"> <grammar type="text/gsl">[main back begin]</grammar> </link> <form id="MainMenu"> [b]<!-- our link grammar will be active here -->[/b] <field name="MeatOrPlant"> <prompt> Are you a Carnivore or Vegetarian. </prompt> </field> </form> -- EX 2: non-working example -- <link next="#MainMenu"> <grammar type="text/gsl">[main back begin]</grammar> </link> <form id="MainMenu"> [b]<!-- our link grammar will NOT be active here -->[/b] <block> <prompt> Are you a Carnivore or Vegetarian. </prompt> </block> </form> In short, if a document doesn't have a voice reco <field> present, then no <link> grammars that are defined will work, as the interpreter needs to be listening for input in the first place. In the second example, there is only form/block/prompt, which will not listen for input at all. ~Matt |
|
ynkrish
|
|
| Hi,
There is a small spelling mistake in the first para, solme should be changed to some :) cheers krish |
|
ynkrish
|
|
| hi,
One more small correction, the first example vxml present in step3 lacks a </vxml> tag. cheers krish |
|
MattHenry
|
|
|
Good catch! I'll have this corrected shortly. Thanks again for noticing this. ~Matt |
|
subhar
|
|
| Hello,
In Step 3: Creating our initial script I am prompted the following ARE you CARNIVORE or VEGETARIAN ? i am saying Vegetarian here but its not going to MeatorPlant =='Plant' Can you help me |
|
voxeojeff
|
|
| Hi there,
In order for us to diagnose the issue here, we're going to need to see the script you are using. Can you provide us with your vxml code that is not working correctly? Thank you, Jeff Menkel Voxeo Corporation |
|
archie172
|
|
| I'm confused by the behavior of the <link> tag in the script below. I would expect that when I say "info" it jumps to the "cid" block and tells me caller ID information. Instead, it says "Thank you. Now initiating nuclear attack on info" even though "info" is not one of the countries listed.
I understand that it recognizes "info" because of the global <link> tag, but I don't understand why it then fills in the field and executes the <filled> tag instead of jumping immediately out of the field and into the "cid" form tag. This seems contrary to http://www.w3.org/TR/voicexml20/#dml2.1.6.2.3 Thanks. <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1"> <link next="#cid"> <grammar type="text/gsl">[info]</grammar> </link> <form id="norad"> <block> <prompt> Hello, you have reached Norad, the control center for the nuclear arsenal of the United States. </prompt> </block> <field name="country"> Please say the country you wish to bomb. <grammar type="text/gsl"> [(north korea) iran iraq russia antartica canada mexico france [england (great britain)] norway sweden italy lebanon libya] </grammar> </field> <noinput> Don't be shy. Just say the name of the country you want us to nuke back to the stone age. <reprompt/> </noinput> <nomatch> I did not recognize that country. Please try again. <reprompt/> </nomatch> <filled namelist="country"> <prompt> Thank you. Now initiating nuclear attack on <value expr="country"/>. </prompt> <exit/> </filled> </form> <form id="cid"> <block> <prompt> caller i d is: <say-as interpret-as="telephone"> <value expr="session.callerid"/> </say-as> called i d is: <say-as interpret-as="telephone"> <value expr="session.calledid"/> </say-as> </prompt> </block> <exit/> </form> </vxml> |
|
VoxeoDustin
|
|
| Hey Archie,
This is a bug that has been addressed and fixed in Prophecy 8 which is available as a free download at http://www.voxeo.com/prophecy/ . It will also be available on our staging platform in the near future. -Dustin |
|
jpw
|
|
| Why is it in this example, if you don't say anything, it continually acts like you chose carnivore, over and over. Eg, it never hangs up, or times out. | |
voxeojeff
|
|
| Hello jpw,
If the user doesn't say anything, then the <noinput> handler should be executed and then the user should be prompted again: <noinput> <prompt> I did not hear anything. Please try again. </prompt> <reprompt/> </noinput> That being said, if this is not the behavior you are experiencing, then please go ahead and submit a private account ticket, with some debugger logs illustrating this issue, along with the code you're using. Specifically, 1) Open the debugger window, (Account => Application Debugger) 2) Call the application, and reproduce the error 3) Click the 'support' tab in the debugger 4) Note any pertinent line numbers in the output that we should focus our attention on Regards, Jeff |
|
danlamb
|
|
| Is there anyway to have variables persist.
For example, In my first form I set: <assign name="deviceName" expr="F_1"/> But then in my second form, I can't do this: <value expr="deviceName"/> I tried using appplication.deviceName, but that did not seem to work either... is the only workaround to use the submit form functionality, or is there another way to maintain variables? |
|
voxeojeremyr
|
|
| Hi danlamb,
Yes, there is a way to make variables persist. It all has do with variable scoping. The key to this is where you define them. If you define or declare them in a form then they will only be available in that form. If however you declare them above that form, say at the document level, they will be available to the entire document. Here is an example of a document scoped variable: <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1" > <var name="tempVar" expr="15"/> <form> <block> <prompt> Hello World. This is my first telephone application. </prompt> </block> </form> </vxml> You can find more information on variable scope here: http://docs.voxeo.com/voicexml/2.0/ Hope this helps, Jeremy Richmond Voxeo Support |
|
bnguimgo
|
|
| Hello !
Before running with succes the test programme giving in step 5, I was obliged to change the "type" attribut of the grammar from this: <grammar type="text/gsl"> to this: <grammar type="application/x-gsl"> running exactely like in step 5, an error has occur, in some platform. My question is: May one help me to nkow very well the use of that attibut ? Note: the confidence (percentage) of recognition on Voxeo plateform is very important than the oders, and I'm very, proud of that. Thank for all |
|
voxeojeremyr
|
|
| Hi,
I was able to test the application in step 5 with the type attribute in the grammar element left as "text/gsl". Basically, what that attribute does is to tell the browser what format the grammar is in. Because there are several different formats the grammar can have, such as ABNF, GSL, GRXML, etc..., this is needed to let the browser know which one this grammar is. You can find more information about the grammar element and its attributes from our documentation here: http://www.vxml.org/grammar.htm As well, I would be interested in taking a look at your logs where you have just "text/gsl" for that attribute and it failing. If you would like, you can open up a private ticket, through the support tab in the Application Debugger. Thanks, Jeremy Richmond Voxeo Support |
|
punkin
|
|
| In the tutorial of "Voice Recognition," the code mentions that <prompt> tag is unnecessary inside the <field> tag. But I see <prompt> everywhere in this tutorial and others. What is the best practice? Should we use <prompt> inside the <field>? | |
jdyer
|
|
| Hello,
Yes, this is most certainly best practice to use the <prompt> element. This is why we made sure to use it throughout our documentation. While it may not be necessary, it does grant you access to all the various attributes of the prompt element. So it's more of a 'might as well use it, just in case you need it' type of thing. I do hope this helps clear up any confusion on this, and please let us know if there are any other questions as we are certainly standing by to assist! Regards, John Dyer Customer Engineer Voxeo Support |
|
eman.elsawa
|
|
| hello
I just have a questin in vxml.how could i let the user unter a sequence of number for example a phone number and the check if this phone number exists by for example an if stat iin the filled tag.i searched for that alot but i didnt find the result.I am only able to take a sequence of numbers from the user and let the TTs say them again but i couldnt use the if cond Eman |
|
MattHenry
|
|
|
Hello Eman, Unless I am misunderstanding the nature of this request, you'd want to do something like this: <field name="" type="digits?length=10"> <audio src="enterNum.wav"/> <filled> <if cond="myField =='1112223333'"> <log expr="' ** USER PRESSED 1112223333 **'"/> <elseif cond="myField =='2223334444'"/> <log expr="' ** USER PRESSED 2223334444 **'"/> <else> <log expr="' ** USER PRESSED SOMETHING WE DIDN'T EXPECT **'"/> </if> </filled> </field> Please let me know if this helps out, or if you need additional guidance. ~Matthew Henry |
|
eman.elsawa
|
|
| Hello Mattew
thanks fo your help.i tried the following code but the problem was that when i entered a wrong pin code it closed without reprompting <form> <field name="myField" type="digits?length=4"> <prompt>please enter your pin code</prompt> <!-- The user was silent, restart the field --> <noinput> I did not hear anything. Please try again. <reprompt/> </noinput> <!-- The user said something that was not defined in our grammar --> <nomatch> I did not recognize that number. Please try again. </nomatch> <reprompt/> <filled> <if cond="myField =='1234'"> <prompt>hello m</prompt> <elseif cond="myField =='1111'"/> <prompt>hello n</prompt> <else/> <reprompt/> <prompt>sorry wrong pin</prompt> </if> </filled> </field> </form> Eman |
|
voxeoJeffK
|
|
| Hello Eman,
Yes, the <field> has been filled, so the FIA won't revisit it. To do this we need to clear the field's variable (so it can be filled again), and the <goto> back to the <field> : <clear namelist="myField"/> <goto nextitem="myField"/> I'll post your script with the changes made. Regards, Jeff Kustermann Voxeo Support =============== <form> <field name="myField" type="digits?length=4"> <prompt>please enter your pin code</prompt> <!-- The user was silent, restart the field --> <noinput> I did not hear anything. Please try again. <reprompt/> </noinput> <!-- The user said something that was not defined in our grammar --> <nomatch> I did not recognize that number. Please try again. </nomatch> <reprompt/> <filled> <if cond="myField =='1234'"> <prompt>hello m</prompt> <elseif cond="myField =='1111'"/> <prompt>hello n</prompt> <else/> <prompt>sorry wrong pin</prompt> <clear namelist="myField"/> <goto nextitem="myField"/> </if> </filled> </field> </form> |
|
eman.elsawa
|
|
| Hello
I am creating a phone book application.i created the grammar with the names of the people in the phone book but some names have common first name <grammar type="text/gsl"> <![CDATA[[ (Ahmed Fekry?) (sarah adel) (ahmed mohamed?) ]]]> </grammar> if only the name ahmed is said i need to get from the recgnizer all the utterances and display them in a web page and let the user choose one of them by giving them numbers and returning the result back to vxml ..how could i do so Eman |
|
voxeojeremyr
|
|
| Hello Eman,
Do return more than one possible match from a grammar you will need to use "N-Best processing". This is allows for the Speech Recognizer to return a list of possible correct interpretations of the utterance in an array back to the VXML browser. We have a tutorial on programming a N-best scenario here: http://www.vxml.org/t_14_mot.htm Please let us know if you have any questions. Regards, Jeremy Richmond Voxeo Support |
|
theVoiceXMLDeveloper
|
|
| Is it possible to define, if voice mail is set on a callee's phone?
So, if i make a call and voice mail is set, then the application doesn't leave a message (it speaks the message whereas voice mail responder is running). So is it possible to postpone speech until the voice message recorder starts? Could you provide a sample? Thanks. |
|
VoxeoDante
|
|
| Hello theVoiceXMLDeveloper,
I am not sure if you are talking about on a direct outbound call, or in a call transfer. If you are talking about a direct outbound call the answer is yes. You will want to utilize our CPA (Call Progress Analysis) function. This will allow you to detect whether a Human, Answering Machine, Fax, or carrier intercept tone (SIT tone) answered the call. A great tutorial on how to use this can be found here; http://www.vxml.org/ansdetection.htm You can also write a CCXML front end to your VXML application which will enable the same functionality. If you are familiar with CCXML you can find a tutorial on CPA in CCXML here; http://docs.voxeo.com/ccxml/1.0-final/ansdetection_ccxml10.htm I hope this helps. Please let us know if there are any remaining questions. Cheers, Dante Vitulano Voxeo Corporation |
|
bazik
|
|
| hello ,
i have a problem calling my application , in most times with skype the call doesn't work ,it's like i can't reach your servers ? does anyone have an explanation for this ? |
|
voxeoblehn
|
|
| Hello Bazik,
Unfortunately, I was unable to reproduce the experience you are describing with your two applications. I was able to connect to both via Skype and SIP upon multiple tests. Please give your applications another try, this time launch the debugger before the calls, and if you encounter any issues go ahead and open up a new ticket thread and include your test call logs. Best Regards, Brian Lehnen Voxeo Support |
|
bazik
|
|
| hello,
thank you brian for replying .i have found the problem ,its with my ISP i think they are locking the ports anyway i know they do , so i'll continue the tutorial with prophecy i think its better , thank you again and have a nice day . |
|
jdyer
|
|
| Hello Bazik,
Ok, and please don't hesitate to let us know if there are any additional questions as you work your way through this material, as we are most certainly standing by to assist! Regards, John Dyer Customer Engineer Voxeo Support |
|
shikhadhawan
|
|
| Hi,
In the code snippet below: <grammar type="text/gsl"> <![CDATA[[ [vegetarian plant veggie] {<MeatOrPlant "plant">} [meat carnivore flesh animal] {<MeatOrPlant "meat">} ]]]> </grammar> What is the use of braces "{}" and angle brackets "<>" ? |
|
VoxeoDante
|
|
| Hello,
The {} identify the portion of that item which should contain the return for that grammar selection. The <> within the {} identify one particular slot + value pair. This is simply part of the Nuance GSL grammar format defined by Nuance. Note that this is not longer sonsidered a supported format as it was Nuance specific and they no longer officially support it. The Prophecy platform will however continue to offer support for GSL for the time being. You can read more about the GSL format here; http://community.voxeo.com/library/grammar/grammar-gsl.pdf I hope this helps. Regards, Dante Vitulano |
|
shikhadhawan
|
|
| Hello..
Thanks Dante :) .. |
|
tedious7
|
|
| Hi
I'm wondering what makes the program never stops and repeats asking for user's response. How can we make it stop after a single cycle? Thanks |
|
voxeoJeffK
|
|
| Hello,
You can use noinput and nomatch handlers to take different actions based on the count. For example: <nomatch count="1"> <prompt> I did not recognize that lifestyle choice. Please try again. </prompt> <reprompt/> </nomatch> <nomatch count="2"> <prompt> I cannot understand you. Please call later. </prompt> <exit/> </nomatch> The first nomatch will prompt the user to try again. The second nomatch will cause an exit. Regards, Jeff Kustermann Voxeo Support |
|
shridharmishra
|
|
| Hello ,
I am confused with the tag {<MeatOrPlant "meat">} . Here what was there in previous tutorial that in curly braces all the words should match. But here it is quite different. Can you please explain this. |
|
shridharmishra
|
|
| Hello ,
I am confused with the tag {<MeatOrPlant "meat">} . Here what was there in previous tutorial that in curly braces all the words should match. But here it is quite different. Can you please explain this. |
|
voxeoJeffK
|
|
| Hello,
That section is not the tokens to match, but instead the result to return. Here we see the field variable is named "MeatOrPlant" <field name="MeatOrPlant"> Then in the grammar we fill that specific variable with our desired value. [vegetarian plant veggie] {<MeatOrPlant "plant">} [meat carnivore flesh animal] {<MeatOrPlant "meat">} So if the user speaks vegetarian or plant or veggie, then fill the variable named "MeatOrPlant" with the value "plant". This allows you to specify exactly what you want in the variable. This is as opposed to the default of filling the variable with the user's utterance. So for example if the user says "vegetarian" we don't want the variable to fill with "vegetarian", we still want "plant". Regards, Jeff Kustermann Voxeo Corporation |
| login |
|