| VoiceXML 2.1 Development Guide | Home | Frameset Home |
| cond | Data Type: CDATA | Default: Optional (true) |
| The cond attribute specifies a Boolean expression, which must equate to ‘true’ in order for the content to be visited and executed. (Additionally, the expr attribute must also be set to ‘undefined’, see below). | ||
| expr | Data Type: CDATA | Default: Optional |
| The expr attribute specifies the initial value of the element; if this value is ‘undefined’, (default), then the element will be visited by the FIA and executed. If this attribute has a value other than ‘undefined’, then the element will not be visited until explicitly set to 'undefined', by use of the clear element. | ||
| modal | Data Type: (true|false) | Default: Optional (false) |
| The modal attribute is a Boolean value that allows fine grained control of active grammars within the field. When the modal attribute is set to false (default), then all higher scoped grammars are enabled, (i.e., form-level document/dialog scoped grammars) while a user is within the field. If the modal attribute is set to true, then only field grammars are enabled and all other grammars are temporarily disabled. | ||
| name | Data Type: NMTOKEN | Default: Optional |
| The name attribute defines the ECMAScript variable name that declares the field-item variable for the dialog. A successful grammar recognition will hold the resultant value in this namespace when executing any filled elements. Each field name within a document must be unique, else a fatal error.badfetch will be thrown. | ||
| slot | Data Type: NMTOKEN | Default: Optional (defaults to <i>field</i> name if unspecified) |
| The slot attribute specifies the name of a grammar slot which is used to populate the field item variable. If no value is specified, then the interpreter will assume it to be the same as the field name. The slot attribute allows the developer to reuse slot/value grammar constructs in multiple fields whose names differ from one another. See the grammar documentation for further information. | ||
| type | Data Type: CDATA | Default: Optional |
| The type attribute can specify any of the platform-defined built-in grammars. The Nuance browser offers support for all built-in grammars defined in the w3c specification. Note that no additional grammar constructs are needed within the field when a built-in type is specified, although any document or dialog scoped grammars will still be considered active. See the documentation for the built in grammars for further information. | ||
| <?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" xmlns="http://www.w3.org/2001/06/grammar"> <meta name="copyright" content="2012 voxeo corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <field name="F_1" expr="'SomeValue'" cond="false"> <grammar xml:lang="en-us" root="myrule"> <rule id="myrule"> <item> garbage </item> </rule> </grammar> <prompt> note that the expression is NOT set to undefined, and the condition is set to false. therefore, this field will never be visited </prompt> </field> <field name="F_2" expr="" cond="false"> <grammar xml:lang="en-us" root="myrule"> <rule id="myrule"> <item> garbage </item> </rule> </grammar> <prompt> since the condition is set to false, this field will never be visited </prompt> </field> <field name="F_3" expr="" cond="true"> <grammar xml:lang="en-us" root="myrule"> <rule id="myrule"> <item> garbage </item> </rule> </grammar> <prompt> note that the expression is set to undefined, and the condition is set to true. Therefore, this field will be visited. You may now say garbage with impunity. </prompt> </field> <filled namelist="F_3"> <prompt> you said garbage, potty mouth </prompt> </filled> </form> </vxml> |
| <?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" xmlns="http://www.w3.org/2001/06/grammar"> <meta name="copyright" content="2012 voxeo corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <grammar xml:lang="en-us" root="myrule"> <rule id="myrule" scope="public"> <item> estrada <tag> out.F_1 = "estrada"</tag></item> </rule> </grammar> <field name="F_1" modal="false"> <grammar xml:lang="en-us" root="myrule"> <rule id="myrule"> <item> garbage </item> </rule> </grammar> <prompt> try saying estrada here. </prompt> <filled> <prompt> very good </prompt> </filled> </field> <field name="F_2" modal="true"> <grammar xml:lang="en-us" root="myrule"> <rule id="myrule"> <item> garbage </item> </rule> </grammar> <prompt> try saying estrada here. when that doesnt work, try saying garbage. </prompt> <filled> <prompt> bravo!</prompt> </filled> </field> </form> </vxml> |
| <?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1"> <meta name="author" content="Matthew Henry"/> <meta name="copyright" content="2005 voxeo corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <!-- ***************************************************************** --> <!-- for purposes of simplicity, we will use the built-in boolean type --> <!-- note that no grammar construct is needed --> <!-- ***************************************************************** --> <field name="F_1" type="boolean"> <prompt> say yes or no here to test the built in boolean grammar </prompt> <filled> <prompt> you said <value expr="F_1"/>. </prompt> </filled> </field> </form> </vxml> |
| <?xml version="1.0"?>
<grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en_us" root="TOPLEVEL"> <rule id="TOPLEVEL" scope="public"> <one-of> <item> Moe </item> <item> Larry </item> <item> Curley </item> </one-of> </rule> </grammar> |
| <?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1"> <meta name="copyright" content="2012 Voxeo Corporation"/> <meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/> <form id="F1"> <field name="F_1" slot="MySlot"> <grammar src="Grammar.xml" type="application/grammar-xml"/> <prompt> who is the coolest of the three stooges? </prompt> <filled> <prompt>you said <value expr="F_1"/> </prompt> </filled> </field> <field name="F_2" slot="MySlot"> <grammar src="Grammar.xml" type="application/grammar-xml"/> <prompt> who is the lamest of the three stooges? </prompt> <filled> <prompt>you said <value expr="F_2"/> </prompt> </filled> </field> </form> </vxml> |
| ANNOTATIONS: EXISTING POSTS |
moshe
|
|
| If you accidentally use
<field id="something> <!-- wrong!!! --> instead of the attribute "name": 1. The compiler won't complain 2. <filled> will never be hit Beware! |
|
grvshr
|
|
| Hi
I have used the above samples, it prompts the sentence within <prompt> tag but then the call hangs up.....i m sending you the last few lines.... Call Terminated on Resource 2. 05/27/05 10:59:29, Resource #2: TranID 9. Returned resource.. 05/27/05 10:59:29, Resource #2: exit_element got "0" 05/27/05 10:59:29, Resource #2: GV_VXML::exit_element() 05/27/05 10:59:29, Resource #2: GV_VXML::executable_element - 15 05/27/05 10:59:29, Resource #2: GV_VXML::execute_content() 05/27/05 10:59:29, Resource #2: GV_VXML::DoEvent(telephone.disconnect.hangup) 05/27/05 10:59:29, Resource #2: GV_VXML::RunInnerLoop - got exception: telephone.disconnect.hangup 05/27/05 10:59:29, Resource #2: TranID 6 completed.. 05/27/05 10:59:24, Resource #2: Playing queued segments. TranID 5. 05/27/05 10:59:24, Resource #2: PromptManager::Play() 05/27/05 10:59:24, Resource #2: GV_VXML::do_recognition() 05/27/05 10:59:24, Resource #2: GrammarManager::EnableGrammar(038C0C78) Pls guide me.... Thanks! |
|
MattHenry
|
|
| Hello grvshr,
As these logs are quite obviously from another platform, I would have no way of deciphering them at all. I can say that the sample code that is listed in our documentaion set does work fine on the Voxeo platform. I suspect that the getVocal platform is likely not a vxml compliance certified platform, which can cause problems when migrating code: http://www.voicexml.org/platform_certification/certified_platforms.html If you'd like to try this code on the Voxeo network, and send us in some specific code details, i would be happy to assist, however. ~Matt |
|
el_oso
|
|
| Well, I am using the voxeo platform and I have a similar problem as grvshr.
My code just hangs up, and the catch or filled sections are ignored. Could someone point me in the right direction? Here is the code: <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1" > <form id="orderNumber"> <field name="ordernum" type="digits?length=5"> <prompt> <audio src="wavs/please_enter.wav"/> <audio src="wavs/5.wav"/> <audio src="wavs/digit.wav"/> <audio src="wavs/refnum.wav"/> </prompt> <catch event="noinput"> <prompt> <audio src="wavs/noinput_msg.wav"/> </prompt> <reprompt/> </catch> <catch event="nomatch"> <prompt> <audio src="wavs/noinput_msg.wav"/> </prompt> <reprompt/> </catch> <filled mode="all"> <prompt> <audio src="wavs/repeat_ref_msg.wav"/> <say-as interpret-as="number" format="digits"><value expr="ordernum" /></say-as>. </prompt> <submit next="playagain.php" method="post" namelist="ordernum"/> </filled> </field> </form> </vxml> Thanks, Jorge |
|
mikethompson
|
|
| Hi Jorge,
At a glance, I can't see anything wrong with your script. However, real time debugger logs would be extremely helpful to troubleshoot this issue. All you need to do is call into your application with the real-time debugger window open. When you are able to reproduce the error and capture the logging for it, please submit the results to us via the "support" tab at the top of the debugger page. With this in hand, we will be able to troubleshoot much more effectively. Best, Mike Thompson Voxeo Corporation |
|
sdriscoll
|
|
| Hey there,
Is there a built in grammer for decimal numbers? e.g I worked 5.4 hours today Well I probably didn't even really work that much, having too much fun with this voicexml thing but hey, don't tell my boss. Thanks, Simon |
|
VoxeoTony
|
|
| Hello Simon,
While we do not have built in grammars for decimals at this time, we do have samples of other grammar types that can be modified to suit your needs. On the evolution site you will see the link to http://evolution.voxeo.com/library/grammar/library.jsp this zip file contains a few sample grammars that will enable you to tweak, or at least give reference in creating your own grammar. We hope this helps. Regards, Tony |
|
8625304
|
|
| Hi,
I am using following script to prompt user input. But its not working. Please guide me. <?xml version="1.0"?> <vxml version = "2.1"> <form id="guessNumber"> <field name="guess"> <prompt> Please Enter a Number. </prompt> <noinput> <prompt> I did not hear you. Please try again. </prompt> <reprompt/> </noinput> <nomatch> <prompt> Is that a number? Please try again. </prompt> <reprompt/> </nomatch> </field> <filled namelist="guess" mode="all"> <prompt> You said <value expr="guess" />. </prompt> <exit /> </filled> </form> </vxml> |
|
8625304
|
|
| Hi,
I need to take dtmf-star and dtmf-pound inputs from user. Can you recommend, which field type i should take? I also need to make a functionality in which during the questionnaire (on different levels), at any time user can press pound key to <reprompt> (on sub level menu) questions again or Press the star key to restart from top level menu. Suggest me a good option. please guide me. Thanks. |
|
jbassett
|
|
| Hello,
The reason that it is not working, is that you would need come type of grammar to accept input from a user. In your case, you have no field type (built in grammars), and no grammar specified by tag. <grammar> To choose the right field types I would reccomend reading the below link. It is a description of each field type and what it does. http://docs.voxeo.com/voicexml/2.0/gslbuiltins.htm#start Also, for jumping around to specific areas of your document, I would recommend getting familiar with the <goto> command. Found here http://docs.voxeo.com/voicexml/2.0/gslbuiltins.htm#start Let me know if you have any questions after reading through these. Thanks Jesse Bassett Voxeo Support |
|
steve.richert
|
|
| How do you test true/false for a boolean type field in its filled tag? Do you compare to 'yes' or to 'true' or what? Neither seem to work for me.
<field name="is_ready" type="boolean"> <prompt>Are you ready?</prompt> <filled> <if cond="is_ready=='yes'"> <prompt>Let's begin.</prompt> <else /> <prompt>Okay. I'll wait.</prompt> </if> </filled> </field> |
|
MattHenry
|
|
|
In oder to test conditionals with the builtin "boolean" grammar, you do indeed test "true/false". However, you do it NOT as a string, (note: usage of the <log> statement for the lastresult$ return allows you to see exactly what any field returns. As such, I suggest the following in this case: <if cond="is_ready== true"> Note the lack of single quotes around the value of "true". ~Matt |
|
danielvinson
|
|
| Hi
With the built in 'digits' grammar you can specify length. Can you do this with letters and words? My aim is to speed up response times. Thanks Regards Daniel |
|
MattHenry
|
|
|
Daniel, In order to do so, you would need to construct your own grammar, and specify that some rules are optional. For instance, assume the rulename "MY_ALPHA" will return one alphabetic character: TOP_LEVEL_RULE [( ; 1-4 alpha characters MY_ALPHA ?MY_ALPHA ?MY_ALPHA ?MY_ALPHA )] Check our subgrammar docs for additional information on this toopic. Regards, ~Matthew henry |
|
danielvinson
|
|
| Hi Matt
Thanks for your prompt reply. I think I went a bit over the top asking about words of various length, I'm more concerned about returning a single character. Does this still require a top level rule or can I do something like so: <field name="F_1" length=1> Examples are much appreciated. Regards Daniel |
|
jbassett
|
|
| Hi,
<field name="F_1" length=1> would not work as length is not an attribute of the field statement. Just so everything is clear, you are trying to make an application that has a grammar that is looking to capture a single user utterance and assign a single letter value to it ? Could you please elaborate the exact logic behind your app ? For instance are you trying to get the user to say a single letter and have it be recognized? Thanks Jesse Bassett Voxeo Support |
|
danielvinson
|
|
| . | |
gotnoname
|
|
| 2 questions
1. How cand I find out how many dtmf entries the user makes in a response. 2. Also I have a situation of the following: <prompt> Enter the stop id followed by the pound key. If you don't know, press # and I'll list all the stops ids for you </prompt> How do I allow the user use the pound key as an input and also allow the user to use it as a term char? |
|
voxeojeff
|
|
| Hi there,
Allow me to address your questions one at a time: Q: How cand I find out how many dtmf entries the user makes in a response. [b]A: Here is a simple VXML script which makes use of the String.length javascript property, which will allow you to count the number of DTMF entries:[/b] <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1" > <form id="Form1"> <field name="F_1" type="digits"> <prompt> Please press some digits, then press pound. </prompt> <catch event="noinput"> <prompt> I'm sorry, I didn't get that. </prompt> <reprompt/> </catch> <catch event="nomatch"> <prompt> Was that a number? </prompt> <reprompt/> </catch> <filled> <prompt> Thank you. <say-as interpret-as="number" format="digits"><value expr="F_1" /></say-as> </prompt> <log expr="'Number of DTMF keypresses: ' + F_1.length"/> </filled> </field> </form> </vxml> Q: Also I have a situation of the following: <prompt> Enter the stop id followed by the pound key. If you don't know, press # and I'll list all the stops ids for you </prompt> How do I allow the user use the pound key as an input and also allow the user to use it as a term char? [b]A: Unfortunately, this is not possible. You simply cannot have the pound key as a DTMF input and the termchar. For this, I would suggest changing the termchar property to something different, or changing the "press # and I'll list all stop ids" to "press * and I'll....".[/b] Best regards, Jeff Menkel Voxeo Corporation |
|
gotnoname
|
|
| can it be achieved by building a special grammar file?
Thanks for the above answer. |
|
MattHenry
|
|
|
You can certainly specify a grammar file that lists dtmf-pound as a valid input, but I don't think you can have it as both an input AND a termcharacter. ~Matt |
|
lambchops7
|
|
| This code is not working for me. It hangs up right from the beginning. It hear the audio when I don't have
<field name="guess"> followed by </field>; but when I insert them in... (and I'm going to need them to receive input from the user) it hangs....Need some assistance <?xml version="1.0" encoding = "UTF-8"?> <vxml version="2.1"> <meta name="author" content="Manuel Lam"/> <meta name="maintainer" content="manuel.lam@gmail.com"/> <form> <block> <field name="guess"> <grammar type="text/gsl"> [one two three four five six seven eight nine] </grammar> <grammar type="text/gsl"> [dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9] </grammar> <prompt> <audio src="audio/1.wav"> </audio> </prompt> </field> </block> </form> </vxml> |
|
MattHenry
|
|
|
Note that your <field> is enclosed within a <block>, which is not legal VXML. The ,field> element should be a child of the <form> element only. Cheers, ~Matthew Henry |
|
crishvi
|
|
| hello,
i need to ask about the time gap for the input.i.e, when the field is executed it waits for a time period before it collects the input.for example if i have a field element which takes in a pin code of type digits and say the length is 8 then after entering the 8 digit number it takes some time to execute the filled element.What i wanted to ask is can I alter this time gap?hope my question is clear.please respond asap!!! Thnx Rishvi |
|
voxeojeff
|
|
| Hello Rishvi,
If you have something like <field name="XXXXX" type="digits?length=8">, theoretically the filled processing time should be very minimal (~.25s). You *can* alter this, if you wish, by manually setting the "completetimeout" property. Per our VXML documentation, [color=blue] "The 'completetimeout' property specifies the length of time after a user utterance where the interpreter will consider the utterance complete. Changing the default value of '.25s' upwards offers more reliability in catching a user's complete utterance, at the cost of sacrificing response time. This property will only be active when set to a lesser value than the incompletetimeout property." [/color] That being said, you may set this property by specifying <property name="completetimeout" value="?"/> where '?' is the value you specify. Hope this helps, Jeff |
|
crishvi
|
|
| Thanx a ton for the quick reply.You guys are doing a gr8 job .
regards, Rishvi. |
|
crishvi
|
|
| Hi, This may sound stupid but where should i change this property?? U mentioned to alter this but where shoudl i do that?
Thanks, Rishvi |
|
voxeojeremyr
|
|
| Hi Rishvi,
You can put in in a couple places depending on the scope of what you would like to change: If you put it under the <vxml> tag and before your first form it will have the effect of being global for all your forms in that document. If you put in under the <form> tag it will only be used inside that form. Once you leave that form, it will go back to the default. Here is an example: <?xml version="1.0" encoding = "UTF-8"?> <vxml version="2.1"> <property name="completetimeout" value=".50s"/> <form> <block> <field name="guess"> <grammar type="text/gsl"> [one two three four five six seven eight nine] </grammar> <grammar type="text/gsl"> [dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9] </grammar> <prompt> <audio src="audio/1.wav"> </audio> </prompt> </field> </block> </form> </vxml> If you have any questions, please let us know. Thanks, Jeremy Richmond Voxeo Support |
|
crishvi
|
|
| Thanks a lot
Regards Rishvi |
|
crishvi
|
|
| Hello,i've tried doing what u said but it didn't work.Below is the code for which I'm trying to use this property.Please tell me if I'm wrong some where.
<?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1" > <form> <property name="completetimeout" value=".5s"/> <var name="string" expr="''"/> <field name="username"> <grammar type="text/gsl"> [dtmf-1] </grammar> <grammar type="text/gsl"> <![CDATA[ [ (dtmf-0) { return (" ") } (dtmf-2) { return ("a") } (dtmf-2 dtmf-2) { return ("b") } (dtmf-2 dtmf-2 dtmf-2) { return ("c") } (dtmf-3) { return ("d")} (dtmf-3 dtmf-3) { return ("e") } (dtmf-3 dtmf-3 dtmf-3) { return ("f") } (dtmf-4) { return ("g")} (dtmf-4 dtmf-4) { return ("h") } (dtmf-4 dtmf-4 dtmf-4) { return ("i") } (dtmf-5) { return ("j")} (dtmf-5 dtmf-5) { return ("k") } (dtmf-5 dtmf-5 dtmf-5) { return ("l") } (dtmf-6) { return ("m")} (dtmf-6 dtmf-6) { return ("n") } (dtmf-6 dtmf-6 dtmf-6) { return ("o") } (dtmf-7) { return ("p")} (dtmf-7 dtmf-7) { return ("q") } (dtmf-7 dtmf-7 dtmf-7) { return ("r") } (dtmf-7 dtmf-7 dtmf-7 dtmf-7) { return ("s") } (dtmf-8) { return ("t")} (dtmf-8 dtmf-8) { return ("u") } (dtmf-8 dtmf-8 dtmf-8) { return ("v") } (dtmf-9) { return ("w")} (dtmf-9 dtmf-9) { return ("x") } (dtmf-9 dtmf-9 dtmf-9) { return ("y") } (dtmf-9 dtmf-9 dtmf-9 dtmf-9) { return ("z")} ] ]]> </grammar> </field> <filled namelist="username"> <if cond="username=='end'||username=='1'"> <goto nextitem="finish"/> <else/> <prompt><value expr="username"/>.<break time="500"/> </prompt> <assign name="string" expr="string + username"/> <clear namelist="username"/> <goto nextitem="username"/> </if> </filled> <block name="finish"> <prompt> You entered <value expr="string"/> <break time="500"/>. </prompt> </block> </form> </vxml> In the above code I'm trying take alphabets' string from the user through keypad.But I'm trying to take the string, alphabet by alphabet.Each time the user types an alphabet, the alphabet is repeated and then only the user can enter the next alphabet. Now, the problem is the time gap between the user typing the alphabet and repeating that alphabet.For alphabets like 'r' ,'s','z' ...it's instant but for others like 'a','d' the time gap is more,the user had to wait for 4 or 5 secs.So How can i cut down that time gap??. Please reply asap.It'll be of great help. Thank You, Rishvi |
|
voxeojeremyr
|
|
| Hi Rishvi,
You can try setting the incompletetimeout property. It looks like this: <property name="incompletetimeout" value=".5s"/> Here are the details for incompletetimeout: Details: The 'incompletetimeout' property allows you to change the setting of when, after a caller pauses in mid-utterance, the interpreter will start to process said utterance. After the period of time specified, (2s default), the interpreter will process the utterance and return either a valid grammar match, or a 'nomatch' condition. You can find more about all the properties at this link: http://docs.voxeo.com/voicexml/2.0/w3cprops.htm#start The one thing that you have to be careful is that if the caller means to enter 'v' and they pause a bit after pressing 8 8, it will be taken as 'u'. So it may take some tuning to dfind out what is too short of a delay versus too long a delay. Another tactic that I have seen people use is to use the pound sign as a terminator. So the caller would press 8 8 # and the '#' would stop the ASR engine from gathering any more information, and the grammar would just return 'u'. If you have any questions, just let us know. Thanks, Jeremy Richmond Voxeo Support |
|
jefo12
|
|
| can we write a vxml inside jsp give some examples...
or giv me a tutorial where should i find it?. |
|
voxeojeremyr
|
|
| Hi,
Sure you can write VXML inside JSP. Here is a link to a tuturial on how you can do that. http://docs.voxeo.com/voicexml/2.0/intro_serverside.htm Please bear in mind that we won't be much help in the matter of coding or debugging your JSP, but if it returns valid VXML it should work. Thanks, Jeremy Richmond Voxeo Support |
|
jefo12
|
|
| <vxml>
<var name="timings" expr="'09:00,10:00'"/> <form id="timeselection"> <field name="appttime" type="time"> <filled> <if cond="appttime=='timings'"> <assign name="appointmetntime"expr="appttime"/> <prompt>you have <value expr="appointmetntime"/></prompt> <else/> <prompt> </prompt> </if> </filled> </field> </form> </vxml> the 'timings' should be dynamic. i have to match the timings with the build in grammar time..Is it possible..? please suggest.. plz give me the related site... |
|
MattHenry
|
|
|
Hi there, I am not totally clear on what it is that you are asking, as your question didn't have much in the way of explicit details. How I am reading this is "how can i make sure that the user utterance matches one of the two values defined in the 'timings' variable?" If this is correct, then I would think that the following actions would be required: 1 - Use client side scripting to break up the string into 2 separate values: I would think that either the 'slice' method, or perhaps the 'split' method would be a good start: http://www.devguru.com/Technologies/ecmascript/quickref/string.html 2 - Use conditional logic within the <filled> section of your code to validate whether or not the user utterance matched one, or both of the values within variable name 'timings' Hope this helps out, ~Matthew Henry |
|
mtatum111
|
|
| Hi, I had a question about modal attribute. It looks like if it is set to 'false' then all grammars at the form/document/root level are active. Where as if it is set to 'true' only the grammar specified in the field is active.
For example, in the following code snippet - if the call sounded like this "Which hospital would you like info on?" Caller says: Dr. John Smith At this point, a no match would be generated since "Dr. John Smith" is not part of the hospital.grxml. Do you think my thoughts are correct on this one? Thanks going one step further, if the caller said "ABC hospital" Then, hears the prompt "What doctor are you interested in?" and says "ABC hospital", then doctor would actually have the value of "ABC hospital" since modal is set to 'false' Hope this isn't too confusing! <form> <field id = "hostpitalname" modal = "false"> <prompt> Which hospital would you like info on? </prompt> <grammar type="application/grammar+xml" src= "hospital.grxml"/> </field> <field id = "doctor" modal = "false"> <prompt> Which doctor are you interested in? </prompt> <grammar type="application/grammar+xml" src= "doctor.grxml"/> </field> </form> |
|
voxeojeremyr
|
|
| Hi,
In the particular code example you gave us, both grammars are in the local field scope and thus will only be available in that field. So in your particular example the modal attribute would have no effect as there are no form/document grammars declared. However if you changed you code to this (hospital.grxml declared at form scope): [code] <form> <grammar type="application/grammar+xml" src= "hospital.grxml"/> <field id = "hostpitalname" modal = "false"> <prompt> Which hospital would you like info on? </prompt> </field> <field id = "doctor" modal = "false"> <prompt> Which doctor are you interested in? </prompt> <grammar type="application/grammar+xml" src= "doctor.grxml"/> </field> </form> [/code] Then if the caller said 'ABC Hospital' at the 'doctor' field it would be matched. Regards, Jeremy Richmond Voxeo Support |
|
mtatum111
|
|
| Hopefully, you can help clarify something for us. My co-workers and I have been presented the following question. I think that D would be the correct answer since we have quantity initalized to 4 and product code initalized to 1455. In this case, these fields would not be prompted for since the field is already populated. However, we have been told the correct answer is B. The only way that I can see this as being true is that quanity is inialized outside of the form. However, I thought that it would still retain the value of 4 in the form element.
Thanks for any clarification. Which of the following dialogs can be produced by this VoiceXML code? <var name = "quantity" expr = "4"/> <form> <var name = "product_code" expr = "1455"/> <block> prompt> Welcome to ajax catalog </prompt> </block> <field name = "product_code" type = "number"> <prompt> Product code? </prompt> </field> <field name = "quantity" type = "number"> <prompt> How many? </prompt> </field> <field name = "price" type = "number"> <prompt> Price per unit? </prompt> </field> </form> A. Computer: Welcome to Ajax catalog. Product code? User: 9899 Computer: How many? User: 5 Computer: Price per unit? User: 300 B. Computer: Welcome to Ajax catalog. How many? User: 5 Computer: Price per unit? User: 300 C. Computer: Welcome to Ajax catalog. Product code? User 9899 Computer: Price per unit? User: 300 D. Computer: Welcome to Ajax catalog. Price per unit? User: 300 |
|
MattHenry
|
|
|
Hi there, In this case, you are correct in the assumption that "D" would be what is executed, as the first two fields would indeed inherit the values of the variable declarations at the vxml and form scope. Note that you can (if you wish) choose to implement even finer-grained control over this execution by leveraging the 'cond' attribute: <field name = "quantity" type = "number" cond="quantity == '3'"> Hope this helps, ~Matt |
|
mtatum111
|
|
| Matt, thanks for the info. I am still a little confused. I put the application on voxeo and I get the following
System :"Welcome to Ajax Catalog" System:"How Many" Caller: 8 System:"Price per unit" Caller:10 Not sure whay it is asking for "How many" since quantity has been set in var element to be 4. Here is the code that is running on voxeo. Thanks for any clarification. <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1" > <var name="quantity" expr="5" /> <form> <var name="product_code" expr="1453" /> <block>Welcome to Ajax catalog. </block> <field name = "product_code" type = "digits"> <prompt> Product code? </prompt> </field> <field name = "quantity" type = "number"> <prompt> how many? </prompt> </field> <field name = "price" type = "number"> <prompt> Price per unit? </prompt> </field> <filled> <if cond = "price > 500"> <clear namelist = "price"/> <prompt> Price is too high </prompt> </if> </filled> </form> </vxml> |
|
VoxeoDante
|
|
| Hello,
I ran a quick test of my own. You are quite close with this example. You will want to move the variable set into the form where the questions exist. Like so; <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1" > <form> <var name="quantity" expr="5" /> <var name="product_code" expr="1453" /> <block>Welcome to Ajax catalog. </block> <field name = "product_code" type = "digits"> <prompt> Product code? </prompt> </field> <field name = "quantity" type = "number"> <prompt> how many? </prompt> </field> <field name = "price" type = "number"> <prompt> Price per unit? </prompt> </field> <filled> <if cond = "price > 500"> <clear namelist = "price"/> <prompt> Price is too high </prompt> </if> </filled> </form> </vxml> That should take care of things. The FIA will not look for variables declared at the document scope when processing a form. I hope this helps. Regards, Dante Vitulano |
|
mtatum111
|
|
| Dante, thanks for the explanation. I am still really confused because I am getting conflicting answers on this. As you can see Matt thought that since quantity was initialized then we would not be prompted for it. I was under the impression that since this variable was initialized at the application level then it would retain that value in the forms. Is that not the case? Or is this clearly an issue with FIA meaning that in order for the field not to be visited that the field must be set at the form level?
Thanks for any clarification. |
|
voxeoJeffK
|
|
| Hi,
Actually the given answer "B" is indeed correct. This is all a matter of variable scoping. Consider that you have a document scoped variable and a dialog scoped variable of the same name: <var name="foo"/> <form> <field name="foo"> ... These are two entirely separate variables even though they share the same name. What happens is that while execution is within the <form> the variable name has been overloaded, and dialog.foo is active. document.foo is only active outside that <form>. So let's look at the original code, and add some comments and a <filled> handler to print to the log: <!-- DOCUMENT SCOPE. THIS IS document.quantity --> <var name = "quantity" expr = "4"/> <!--ENTERING DIALOG SCOPE--> <form> <var name = "product_code" expr = "1455"/> <block> prompt> Welcome to ajax catalog </prompt> </block> <field name = "product_code" type = "number"> <prompt> Product code? </prompt> </field> <!-- THIS IS dialog.quantity --> <field name = "quantity" type = "number"> <prompt> How many? </prompt> </field> <field name = "price" type = "number"> <prompt> Price per unit? </prompt> </field> <filled> <log expr="'LOG******Document.quantity: ' + document.quantity"/> <log expr="'LOG******Dialog.quantity: ' + dialog.quantity"/> </filled> </form> If we run this code, and say "8" when prompted for quantity the log will print: LOG******Document.quantity: 4 LOG******Dialog.quantity: 8 When run product_code is skipped because it is already set to 1455. quantity is not skipped because it is dialog.quantity, not document.quantity. So answer "B" is correct. Regards, Jeff K. |
|
mtatum111
|
|
| Jeff, thanks so much for clarifying this for me. I completely understand now! Thanks for the detailed explanation.
|
|
mtatum111
|
|
| My coworkers and I have been discussing the following problem and would like to know what you think with this particular question.
If we have the following code - I would have thought the answer would be D. However, others have told me it is C. Can you let me know what you think here by giving me your reason for your answer. Thanks for any info. 1. Consider the following <form> object: <form> <field id = "vendor" modal = "false"> <prompt> Who do you want to pay? </prompt> <grammar type="application/grammar+xml" src= "vendor.grxml"/> </field> <field id = "amount" modal = "false"> <prompt> How much do you want to pay? </prompt> <grammar type="application/grammar+xml" src= "amount.grxml"/> </field> </form> What will the VoiceXML browser do as the next step in the following dialog? Computer: Who do you want to pay? User: One hundred twenty-five dollars A) Throw a noresponse event in the vendor field. B) Throw a nomatch event in the vendor field. C) Place 125 into the amount field and present the user with the following prompt: Who do you want to pay? D) Place 125 into the vendor field and present the user with the following prompt: How much do you want to pay? |
|
voxeo_chris
|
|
| Hello,
When you consider that the grammars are separated into their own fields with their corresponding prompts, you can assume that the first grammar will not be curtailed towards any numerical utterances. Also you can take note that despite the modals being set to false, there are no higher level grammars and therefore the field grammars would be applicable. Therefore the response would likely be a nomatch as it can not match "125" with any vendor. So therefore the answer would be 'B'. Hope this helps. Regards, Chris |
|
mtatum111
|
|
| could someone tell me how maxspeechtimeout works.
I understand that it is an event that will be thrown if the caller speaks too long. My question concerns the timeframe of when it start counting the time. For instance, does it start counting the time as soon as the prompt is finished playing and the system is waiting for input. Or, does it start as soon as the caller starts speaking something. Just wanted to get verification on when it actually starts. |
|
VoxeoDustin
|
|
| Hey Melissa,
The maxspeechtimeout begins counting as soon as it receives voice energy, e.g. the caller starts speaking. Let me know if you have any further questions. Cheers, Dustin |
|
mtatum111
|
|
| I wasn't sure where to post this so I posted it under one of the more popular topics. I wanted to thank everyone at voxeo for their support. This website is the best. I took my VXML certification test yesterday and passed with a score of 96. It was a very intense exam and I know having Voxeo's tools in order to test applications that I had questions about made the world of differece. Again, thanks to everyone. Hopefully now I will not have so many questions :) | |
MattHenry
|
|
|
Melissa, Thanks very much for your kind words, and congratulations on your developer certification. Quite an impressive score you got on the test; your hard work has really paid off for you! =) Regards, ~Matthew Henry |
|
jefo12
|
|
| Hi,
<form id="F1"> <field name="number" type="digits"> <property name="interdigittimeout" value="5s"/> <prompt>please enter your card number</prompt> <filled> <if cond="number.length==15"> <prompt>Thank you </prompt> <else/> <prompt>I am sorry,the number you enter is not a valid one</prompt> <goto nextitem="number"/> </if> </filled> </field> </form> In the above code.i can not able to enter the 15 digits at a time.After i enter three to four digits it goes to no match.I tried with all the properties but still no use.. can any one help me out how to face when we need to enter more digits in the range of 15 to 20. Thanks, Jefo. |
|
voxeoJeffK
|
|
| Hi,
I tested the code you included, and I had no problems. I was able to enter 15 numbers to receive "Thank you", and any other count of numbers caused the "I am sorry" prompt. May I suggest including a debugger log of one of your test calls that displays this behavior. We would be happy to review it, and investigate further for you. regards, Jeff K. |
|
jefo12
|
|
| Hi,
Is there any way to recognize the alphabets from the user utterance.I want to take the first and last name from the user is this possible..?If possible wat should be the grammar for that. <form id="name"> <field name="firstname"> <grammar> </grammar> <prompt>enter the first name</prompt> <filled> <prompt><value expr="firstname"/></prompt> </filled> </field> <field name="lastname"> <grammar> </grammar> <prompt>enter the last name</prompt> <filled> <prompt><value expr="lastname"/></prompt> </filled> </field> </form> </vxml> |
|
voxeojeremyr
|
|
| Hi,
Yes, for recognizing alpha characters, like "R I C H M O N D", you will need an alpha grammar. In actuality, alpha characters are one of the hardest to capture because the utterance is so short and so many letters sound the same, i.e. v, p, t, b. I will attach a alpha grammar to this post that you should be able to use. To include it in your code you would use something like this: [code] <form id="name"> <field name="firstname"> <grammar src="alphanum.grxml" type="application/grammar-xml"/> <prompt>enter the first name</prompt> <filled> <prompt><value expr="firstname"/></prompt> </filled> </field> <field name="lastname"> <grammar src="alphanum.grxml" type="application/grammar-xml"/> <prompt>enter the last name</prompt> <filled> <prompt><value expr="lastname"/></prompt> </filled> </field> </form> </vxml> [/code] If I misunderstood your question, please accept my apologies and give us some more details as to what you are trying to accomplish. Thanks, Jeremy Richmond Voxeo Support |
|
sreenivasan
|
|
| Jeremy,
Can you please post the grammar for the alphabets. I am also trying to do a similar thing and am stuck with the recogintion due to very similar sounding alphabets. Thanks, Sreeni. |
|
voxeojeremyr
|
|
| Hi Sreeni,
As well as the grammar that is attached to my previous post here is another grammar that works well. One of our Senior Engineers wrote this. It is written in SRGS and works great. It listens for A-F and requires input of 12 characters. If you would like to change the minimum and maximum words to recognize, you can modify this line here: <rule id="CHAR_STRING"> <item repeat="12"> Changing this to <item repeat="1-"> will require one character, and have no upperlimit on the amount of characters. To expand the amount of utterances to include the whole alphabet, keep adding additional <items> like so: <item> g <tag>V='g'</tag> </item> Where "g" is the utterance, and what is inside the <tag> is the interpretation. Grammar: [code] <grammar xml:lang="en-us" version="1.0" xmlns="grammar"">http://www.w3.org/2001/06/grammar" root="ALPHANUM"> <rule id="ALPHANUM" scope="public"> <item> <ruleref uri="#CHAR_STRING"/> <tag>SLOT_VALUE = CHAR_STRING.V; RESULT = SLOT_VALUE</tag> </item> </rule> <rule id="CHAR_STRING"> <item repeat="12"> <ruleref uri="#ONE_CHAR"/> <tag>V = V ? V + ONE_CHAR.V : ONE_CHAR.V</tag> </item> </rule> <rule id="ONE_CHAR"> <item repeat="0-1"> <ruleref uri="#EXTRAS"/> </item> <one-of> <item> a <tag>V='a'</tag> </item> <item> ayy <tag>V='a'</tag> </item> <item> aye <tag>V='a'</tag> </item> <item> alpha <tag>V='a'</tag> </item> <item> alfa <tag>V='a'</tag> </item> <item> apple <tag>V='a'</tag> </item> <item> b <tag>V='b'</tag> </item> <item> bee <tag>V='b'</tag> </item> <item> be <tag>V='b'</tag> </item> <item> bravo <tag>V='b'</tag> </item> <item> boy <tag>V='b'</tag> </item> <item> c <tag>V='c'</tag> </item> <item> see <tag>V='c'</tag> </item> <item> cee <tag>V='c'</tag> </item> <item> sea <tag>V='c'</tag> </item> <item> charlie <tag>V='c'</tag> </item> <item> charly <tag>V='c'</tag> </item> <item> char lee <tag>V='c'</tag> </item> <item> cat <tag>V='c'</tag> </item> <item> d <tag>V='d'</tag> </item> <item> de <tag>V='d'</tag> </item> <item> delta <tag>V='d'</tag> </item> <item> dog <tag>V='d'</tag> </item> <item> e <tag>V='e'</tag> </item> <item> ee <tag>V='e'</tag> </item> <item> echo <tag>V='e'</tag> </item> <item> elephant <tag>V='e'</tag> </item> <item> elefant <tag>V='e'</tag> </item> <item> f <tag>V='f'</tag> </item> <item> eff <tag>V='f'</tag> </item> <item> fox <tag>V='f'</tag> </item> <item> foxtrot <tag>V='f'</tag> </item> <item> frank <tag>V='f'</tag> </item> </one-of> </rule> <!-- likely extraneous words --> <rule id="EXTRAS"> <item> and <tag>return("")</tag> </item> <item> uh <tag>return("")</tag> </item> <item> um <tag>return("")</tag> </item> <item> er <tag>return("")</tag> </item> <item> ah <tag>return("")</tag> </item> </rule> </grammar> [/code] If you have any questions, please let us know. Thanks, Jeremy Richmond Voxeo Support |
|
sreenivasan
|
|
| Jeremy,
Thanks for the quick response. I will try the SRGS grammar you have specified in the post. Just to let you know, I did not get the alphanum.grxml attachment from the original post dated 11/12/2008. |
|
VoxeoDustin
|
|
| Hey Sreeni,
I have opened up a ticket in your account with the relevant grammar attached. Let me know if we can be of further assistance. Cheers, Dustin |
|
dki123
|
|
| Hi Team,
I have a small problem to identify in my code. Following is my code. ---------------------------------------------------- <?xml version="1.0"?> <vxml version="2.1" xmlns="http://www.w3.org/2001/vxml"> <!--######## Process Pincode ########--> <form id="Pin"> <field name="choice" type="digits?length=6" slot="choice"> <prompt timeout="8s"> Please speak, or key in pincode. </prompt> <noinput> <prompt> I did not get anything.Please try again. </prompt> <reprompt/> </noinput> <nomatch> <prompt> I did not recognize that choice.Please try again. </prompt> <reprompt/> </nomatch> </field> <field name="confirm" slot="confirm"> <grammar src="cnfrm.grammar#YES_NO" type="text/gsl"/> <!--**** Confirm pincode ****--> <prompt> Your pincode is <say-as interpret-as="telephone"><value expr="choice"/> </say-as>. <break time="500"/>Press or say, 1 to confirm, 0 to try again. </prompt> <filled namelist="confirm" mode="all"> <if cond="confirm == 'yes'"> <prompt> Your pincode confirmed. </prompt> <elseif cond="confirm == 'no'" /> <goto next="#Pin"/> </if> </filled> </field> </form> </vxml> ---------------------------------------------------- Here I use built in grammar digits with length 6 to take 6 digits for pincode. Flow works fine for 6 digits. Now when I enter less than 6 digits it throws my <nomatch> event message, 'I did not recognize that choice.Please try again.' and that's fine. But when I enter more than 6 digits it throws its own event for nomatch saying,'I did not understand what you said, please try again' and then it goes to next field 'confirm' and speaks to confirm first 6 digits for pincode. This should not have happened and rather should reprompt the message for pincode to enter. Please have some light on this issue. Thank you. |
|
voxeo_chris
|
|
| Hello,
The problem here is due to the length of digits the system is currently expecting. In your code, you currently have it setup to accept only 6 digits which would explain why it throws a nomatch for anything that you enter that exceeds or is under 6 digits. What I understand is that you would like the reprompt to be enacted if you enter more or less than the intended. If this is the case then I would suggest an if/else statement to help gain a better control of the application flow. An example is, if user enters x digits, goto the next field, else reprompt. Please let us know if there is anything else we can help you with as we are standing by. Regards, Chris Bruckart Customer Engineering Voxeo Support |
|
dki123
|
|
| Thanks Chris,
What I want to know is, if it throws <nomathch> for less than 6 digits and reprompts then why not the same for more than 6 digits. As I use built in grammar 'digits' with length 6, It should throw <nomathch> event for every non matched input. The behavior should be same as one should understand. Please have some more information. Thanks. |
|
voxeojeremyr
|
|
| Hi,
The reason this is happening is because of the way VXML allows for barge through. Because you have your digits set to the exact length of 6, as soon as that condition is met, it tells the FIA (Form Interpretation Algorithm) to go on to the next step. Then when you press more digits, it is taking the DTMF tones as input for the next <field>, which is <field name="confirm" slot="confirm">. To workaround this, I would increase or eliminate that max digits for the field name="choice" type="digits?length=6". Then you would have a condition that would check the size of the input and react appropriately. If you are expecting a pound sign you could also set the min to 6, max to seven and then check the size of the value returned. Thanks, Jeremy Richmond Voxeo Support |
|
dki123
|
|
| Jeremy, Thanks for the Details.
Keep up the good work. |
|
voxeoJason
|
|
| Hey,
Thanks for the praise, we do our best. :p Regards, Jason Voxeo Support |
|
chakri.950
|
|
| <?xml version="1.0" encoding="iso-8859-1"?>
<!-- Use this file to jumpstart the website for OptimTalk --> <vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"> <var name="lang" expr="'en-US'"/> <form id="F1"> <field name="test"> <prompt>welcome to the gaming news phone network.</prompt> <script> var arrayGames = ["duke nukem forever", "half life 2", "doom 3", "shadow warrior 2", "track and field: grecian edition" ]; </script> <prompt> The most anticipated games for this year<break/></prompt> <foreach item="games" array="arrayGames"> <prompt> Select your game <value expr="games"/> <break/></prompt> </foreach> <filled> <prompt> Your selected values is <value expr="games" /> </prompt> </filled> </field> </form> </vxml> I am not able to enter into the filled block .. my requirement is that when every foreach prompts an expression user enters the value and it has to enter into the filled block. I am not able to enter into filled block. |
|
VoxeoDustin
|
|
| Hey Chakri,
It appears you are not specifying a grammar for your field, so the ASR does not know what input to listen for. I've whipped up a quick SRGS grammar for you below to give a try. Just nest this inside your field to allow the caller to choose these options: <grammar type="application/grammar+xml" xml:lang="en-US" mode="voice" root="GAMES"> <rule id="GAMES"> <one-of> <item> duke nukem forever </item> <item> half life two </item> <item> doom three </item> <item> shadow warrior two </item> <item> track and field grecian edition </item> </one-of> </rule> </grammar> Let me know if this is helpful. Cheers, Dustin Hayre Customer Support Engineer 2 Voxeo Support |
|
raja.gutha
|
|
|
Hi, can u please send me the complete alphanum.grxml and vxml ( ) at the earliest which is mentioned in this post . solution for the same problem: Hi, Is there any way to recognize the alphabets from the user utterance.I want to take the first and last name from the user is this possible..?If possible wat should be the grammar for that. |
|
VoxeoDustin
|
|
| Hello Raja,
I'd be happy to send that over to you. I cannot attach files to documentation posts, so I will open a separate ticket in your account with that information. Cheers, Dustin Hayre Customer Support Engineer II Voxeo Support |
|
goqhansari
|
|
| Hi there!!
I have a problem with my VoiceXML.Are there anyone that can help me! <form id="getDateTime"> <field name="date" type="digits"> <prompt> <audio src="../promptFiles/video/6.3gp"/> </prompt> </field> <field name ="time" type="digits"> <prompt> <audio src="../promptFiles/video/7.3gp" /> </prompt> </field> <filled> <prompt> <audio src="../promptFiles/video/9.3gp" /> </prompt> <submit next="../vxmlFiles/Output.vxml" method="post" namelist="date time"/> </filled> </form> And this is my error message??What is the problem? <message>oas_error -964689837 0 semantic server error: ASRRecorderEventImpl : eventId=Record Qualifier = Standard Error = ResourceUnavailable RTCTrigger = null duration = 0 result = null</message> |
|
voxeoJeffK
|
|
| Hello,
That log appears to be from a different platform than Prophecy, so I cannot speculate on the exact nature, but the code is fine. The error seems to imply there is a problem finding a place to record the user's input. Regards, Jeff Kustermann Voxeo Support |
|
goqhansari
|
|
| Hi Jeff;
I'm using HP Open Media Call Platform.And I'm using Windows Vista Home Edition.Could Vista occure an error?About Read Write authentication? Thanks.. |
|
VoxeoDante
|
|
| Hello goqhansari,
We are not familiar with HPs product here as we generally only work with VXML and out own platform. You may be correct that issue is related to Vista as we have seen similar issues in the past when not installing as a System administrator, as well as having all the services running as Administrator. I apologize that we cannot be of more assistance, but we are not familiar with that platform. I recommend you try out Prophecy as that XML looks good and should work on our platform. :) http://www.voxeo.com/prophecy/ Cheers, Dante Vitulano Voxeo Corporation |
|
amit.chennur
|
|
| Hi
How can I read the characters using <field> tag? For example we have to read first 3 letters from user input. <field name="choice"> <prompt> Please enter the first 3 letters of the last name. </prompt> <filled> ... </filled> </field> Thanks. |
|
jdyer
|
|
| Hello,
A field tells the VoiceXML browser that you are in an 'input' state, but it does not tell the browser what type of input to expect; This is were a grammar comes into play. In this case I would suggest that you implement a GrXML grammar. We have a whole section on these in our documentation ( http://tinyurl.com/nurplt ) devoted to these, so please check it out! I also have an example of an alphanumeric grammar..... just in case you need the last name of humans and robots =^P. (http://gist.github.com/180863 ). Now to access the interpretation of a grammar you can use the <value> element, is illustrated below: ---- <form id="Form1"> <grammar src="myGramamr.grxml type="application/grammar-xml" /> <prompt> Say something </prompt> <filled> <prompt> The return was <value expr="Form1"/></prompt> </filled> </form> ----- I do hope this helps, and please let us know if there are any other questions as we are certainly here to help! Regards, John Dyer Customer Engineer Voxeo Support |
|
amit.chennur
|
|
| Hello Jeff,
Thank you for help!!! The implementation of a GrXML grammar worked for me. Thanks. |
|
voxeoJason
|
|
| Hi,
That's great news to hear! If there's anything else we can help with, just let us know and we'd be glad to help. Cheers, Jason Voxeo Support |
|
pppeter
|
|
| Hi,
Is there a way to limit a <field> to _only_ dtmf input, and not allow any speech entry of numbers? In a noisy environment, I often find that background noises will cut off the announcement of a prompt, and I'd like Voxeo to just ignore anything that is not a DTMF tone in some cases. I've tried something like: <field name="four_digit_number" type="digits?length=4"> <grammar type="text/gsl"> [dtmf-0 dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9] </grammar> ... </field> But it still allows, and listens for, voice. Is there any way to limit this? Peter |
|
pppeter
|
|
| Ah, I just found the "barge" attributes on <prompt>. Maybe I answered my own question. | |
jdyer
|
|
| Hello Peter,
You may also want to try <property name="inputmodes" value="dtmf"/> as well. These property's are detailed in our Property Guide (http://www.vxml.org/w3cprops.htm). If we can be of any further help please let us know! Regards, John Dyer Customer Engineer Voxeo Support |
|
bongza
|
|
| Hi All
Inside a field I want to play options to a user and ask them to choose one option say between 1 and 5. Them after they select an option I want them to confirm the option they choose like: Press 1 for apple Press 2 for banana . . Press 5 for pear And if they choose 2 for example I want to play You choose option: 2, press 1 to confirm or press 2 to listen to options again. If a user press 1 I will tell them something interesting about the banana and if they choose 2 I want to play the options again. |
|
jdyer
|
|
| Hello,
Below you will find a quick example that shows you have to implement if/else conditional statements along with the clear element to achieve this type of functionality. I do hope this material helps! If there are any questions on this, or anything else, please let us know as we are certainly here to assist! Regards, John Dyer Customer Engineer Voxeo Support --------- <?xml version="1.0" encoding="UTF-8"?> <vxml version="2.1"> <var name="policyID"/> <form id="Form1"> <field name="policy" type="digits?minlength=3;maxlength=9"> <noinput> <prompt> I am sorry I didnt hear what you said, I need your policy number </prompt> </noinput> <grammar src="builtin:grammar/digits"/> <grammar src="builtin:dtmf/digits"/> <prompt> What is your policy number? </prompt> <filled> <log expr="'**** DIGITS: ' + lastresult$.interpretation"/> <if cond="policy < 666"> <!-- If policy result is less the 666 then they are evil and we ask them again digits clear namelist --> <clear namelist="policy"/> <else/><!-- Else lets validate --> <assign name="policyID" expr="lastresult$.interpretation"/> <log expr="'******PolicyID variable is now filled: ' + policyID"/> <goto next="#validate"/> </if> </filled> </field> </form> <form id="validate"> <field name="confirm" type="boolean"> <log expr="'*****NOW IN FIELD: CONFIRM'"/> <prompt> I think I heard <value expr="policyID"/> is that correct? </prompt> <filled> <if cond="confirm == true"> <prompt> Great glad to hear we got that correct </prompt> <else/> <clear namelist="policy"/> <goto next="#Form1"/> </if> </filled> </field> </form> </vxml> |
|
sambhav
|
|
| Hello every one
I wanted to know if there is a way to collect <field> values from user independent of order of various <fields> tags. |
|
VoxeoDante
|
|
| Hello Sambhav,
I am afraid I am not entirely clear on what you are trying to get here. Are you looking to gather the result from a field that was visited in an earlier part of the application? Please elaborate if you can. Regards, Dante Vitulano Voxeo Support |
|
SSA_telespectrum
|
|
| It seems after reading the Field Tag completely we can either input DTMF or Voice but not both at the same time and this is my requirment expaning below for the solution.
I want to give option to the user to either input the number or say "I dont know" for recognition do we have a way to achieve this? |
|
VoxeoBrian
|
|
| Hello,
This is most certainly possible, if you have an opening <prompt> that asks the user to input something via DTMF or voice, you can simply have two active grammars inside the <field> Sudo example: <field name="something"> <grammar src="voice.xml" mode="voice"/> <grammar src="dtmf.xml" mode="dtmf"/> ... Regards, Brian F. |
|
MrMurphy
|
|
| Hello,
I have this problem. I need to write a vxml form that accepts a choice or an input. Something like "Press one for talk with an operator or insert your credit card number...". Could you help me? Thanks in advance. |
|
VoxeoDustin
|
|
| Hello,
Have a look at our SRGS grammar guide here: http://www.vxml.org/grxml_dtmf.htm If you scroll down to the Mixed Mode Grammars section, it details how to allow both voice and DTMF input in a single input item. Let me know if this is what you're looking for. Regards, Dustin |
|
MrMurphy
|
|
| Hi Dustin,
thanks for your answer, but my problem is not how to recognize dtmf or voice input. This is the scenario: "Please, press one for talk with an operator, two for next menu or insert your credit card number..." The problem is: If the customer press one, not for talk with an operator but because his credit card number begins with "one"..how can I resolve? Regards |
|
voxeoJeffK
|
|
| Hello,
Can you attach the grammar that you are using? To best answer it will help to know the context of the grammar. If you prefer to not post it to a public forum, you could instead open a private Support ticket from your Evolution account, and attach it there. Regards, Jeff Kustermann Voxeo Support |
|
MrMurphy
|
|
| Hello,
the problem is just write the grammar. I would not use "if" in vxml page. I would use a grammar. Can I use "if" in the grxml file? Regards |
|
VoxeoDante
|
|
| Hello,
In order to have a grammar that would allow the user to enter 1 and allow then to enter a 16 digit number that starts with one, you are going to need a grammar that will allow any 16 digit number, then you would want to check the result afterwards with an <if> in the VXML. A better option here might be to allow the user to connect to the operator with the * key. This way you can accept either a number, or the *. Regards, Dante Vitulano |
|
moshe
|
|
| foreach is a valid child of field, but it's not on the list. | |
VoxeoDante
|
|
| Hello,
Thanks Moshe, I'll send this over to the docs team. Regards, Dante Vitulano Hosted Solutions Engineer [url=http://voxeo.com/prophecy]Download Prophecy 10[/url] | [url=http://docs.voxeo.com/prophecy/10.0/home.htm]Prophecy 10 Docs[/url] |
|
Torben
|
|
| Hi
Do not know if it is the right place to ask my question :-) How do I catch if the user press * or # in a field tag? I have a prompt saying "enter yours 8 digits phone number or press the star for recording yours name and adress" and I don't know how to detect the star. I do only use DTMF - Can anyone help me? |
|
VoxeoDustin
|
|
| Hey Torben,
You can capture * and # by adding them to your grammar. For the #, which is the default termination character, you will also need to change the termchar property in order to capture it: <property name="termchar" value="A"/> <grammar xml:lang="en-US" root = "TOPLEVEL_D" mode="dtmf"> <rule id="TOPLEVEL_D" scope="public"> <one-of> <item repeat="8"> <ruleref uri="#DIGIT_D"/> </item> <item> # </item> <item> * </item> </one-of> </rule> <rule id="DIGIT_D"> <one-of> <item> 1 </item> <item> 2 </item> <item> 3 </item> <item> 4 </item> <item> 5 </item> <item> 6 </item> <item> 7 </item> <item> 8 </item> <item> 9 </item> <item> 0 </item> </one-of> </rule> </grammar> Regards, Dustin Hayre Solutions Engineer Voxeo Corporation [url=http://voxeo.com/prophecy]Download Prophecy 10[/url] | [url=http://docs.voxeo.com/prophecy/10.0/home.htm]Prophecy 10 Docs[/url] |
|
vaibhavgarg
|
|
| Hi ,
Can we skip some duration while playing a audio file like suppose I have a audio file of 20 sec and after getting played for 8 sec , I want to skip 5 sec of audio and want the audio to be played from 13th sec. Please suggest . Thanks . |
|
VoxeoErnest
|
|
| Hello,
For information regarding the formatting, playback, and the recording of audio files within your application, please refer to this [link=http://help.voxeo.com/go/help/xml.vxml.audio.overview]LINK[/link]. If you have any additional questions or concerns, we are standing by to assist. Best Regards, Ernest Munoz [b]Customer Support Engineer[/b] |
| login |