| VoiceXML 2.1 Development Guide | Home | Frameset Home |
| bargein | Data Type: (true|false) | Default: Optional (true) |
| The bargein attribute specifies whether or not the caller will be able to interrupt the TTS/audio output with a dtmf keypress or voice utterance. A value of 'true' indicates that the user is allowed to interrupt, while a value of 'false' forces the caller to listen to the entire prompt before being allowed to give input to the application. | ||
| bargeintype | Data Type: (speech|hotword) | Default: speech |
| The bargeintype attribute allows the developer to denote whether speech, (including dtmf) input or a user-defined 'hotword' will be considered a valid bargein. For instance, when set to 'speech', any user utterance or dtmf input will interrupt the prompt. But, when set to 'hotword', then the prompt will only be interrupted when a user enters a hotword grammar match. | ||
| 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. Any standard ECMAScript Boolean value is valid for this attribute. | ||
| count | Data Type: CDATA | Default: Optional |
| The count attribute allows the developer to specify different content should a caller repeat certain actions. For instance, a prompt count=2 could play more detailed instructions to the caller should his first utterance prove to be invalid. If unspecified, this attribute defaults to 1. The FIA counter, which governs how many times a particular state is reached, is reset to 1 each time the enclosing form element is reached or a clear element (for that state) is encountered within the application. | ||
| timeout | Data Type: CDATA | Default: 5s |
| The timeout attribute specifies the amount of the time the interpreter should wait for a user response before throwing a noinput event. This attribute is subject to the strict timing policy where ‘s’, or ‘ms’ must be appended to the time value. This attribute will override the timeout property, if set within the application. If left unspecified, then this will default to 5s, (5 seconds). | ||
| xml:lang | Data Type: NMTOKEN | Default: Optional (en-US) |
| The xml:lang attribute specifies the language and locale information of the VoiceXML document. If omitted, it will inherit this value from the document hierarchy, or ultimately from the platform default, which equates to 'en-US'. | ||
| <?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"> <field name="F_1"> <grammar type="text/gsl">[ eye zac]</grammar> <prompt bargein="false"> who was the absolute coolest bartender on the love boat? </prompt> <prompt bargein="false"> i bet right about now you are wondering why you cannot interrupt the prompt. </prompt> <prompt bargein="true"> but now you can. who was the absolute coolest bartender on the love boat? </prompt> <filled> <prompt> correct you are! </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"> <field name="F_1"> <grammar type="text/gsl">[(gavin mac lee odd)]</grammar> <prompt cond="false"> you guessed it. this prompt will not be executed. because the prompt is set to false. </prompt> <prompt cond="true" count="1"> here is the very first prompt. try not to say anything. </prompt> <prompt cond="true" count="2"> who was the actor who played captain stoobing? </prompt> <filled> <prompt> correct you are! </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"> <field name="F_1"> <prompt timeout="20s"> This prompt allows 20 seconds of silence to elapse before a no match is thrown. </prompt> <grammar>[(?great goog lee moog lee)] </grammar> <filled> <prompt> you said <value expr="F_1"/> ! </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"> <block> <prompt xml:lang="en-US"> Here is a prompt set to use the English language. </prompt> </block> </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"> <nomatch> <goto next="#F1"/> </nomatch> <noinput> <goto next="#F1"/> </noinput> <!-- Notice the form level 'hotword' grammar --> <!-- Also notice that a slot *must* be defined --> <grammar type="text/gsl"> <![CDATA[[ [drencrum] {<F_2 "drencrum">} ]]]> </grammar> <field name="F_1"> <prompt bargeintype="hotword"> Viddy well, little droogies. You can try to say drencrum to interrupt me. You could also try saying non grammar matches, such as shouting off Yarblockos, Eggy Weggs, or even Devotchka. But it will only be interrupted when the hotword is matched. </prompt> </field> <field name="F_2"> </field> <filled namelist="F_2"> <prompt> You said <value expr="F_2"/> </prompt> </filled> </form> </vxml> |
| ANNOTATIONS: EXISTING POSTS |
moshe
|
|
| <value> is a child of prompt that lets you insert the value of an ECMA expression as it if were text and have it pronounced.
E.g., <prompt>This is count number <value expr="current_count"/></prompt> |
|
moshe
|
|
| Other children as also missing, such as <say-as>. | |
steve.sax
|
|
| Hi Moshe,
Thanks for the heads-up on this. We have this oversight corrected in our most recent Build of the docs, and will update the live docs over the weekend. Apologies to all for any confusion. -Steve Sax- |
|
mihai.paiu
|
|
| Hi Steve. The problem with the missing children for some tags in this documentation is boring. Can you do something to update ?
If you go to: http://www.w3.org/TR/voicexml20/#dml4.1.1 you will see more children for this tag. Thanks. |
|
MattHenry
|
|
| Hiya Mihai,
Some of the child elements weren't properly flagged in our doc-tool to be included; this has been corrected. However, I am not at sure what this statement means: "The problem with the missing children for some tags in this documentation is boring." If you can clarify for me, I would be glad to help.... ~Matt |
|
DaveMorris
|
|
| Is it common (or even "best") practice to make bargein a variable, to start it out as "true", and to reset it to "false" after one or two abortive attempts (i.e. nomatch), on the assumption that the speaker either has a high background noise level that is barging in, or is trying to barge in unsuccessfully, and that turning off bargein might result in better recognition?
|
|
Michael.Book
|
|
| Hello Dave,
It is actually quite common, and in "best practice," to keep track of the number of times a user encounters a nomatch and take adaptive measures in the application call-flow. Like you said, the user may be where there is allot of background noise, or maybe he/she just talks with an accent, lisp, draw, whatever... Albeit, I am not really convinced that changing the bargein to 'false' would help recognition in a noisy situation. All this does is prevent input while the prompt is being played. Ultimately, the end-user will still have to give an answer when said prompt is finished, and presumably, the back-ground noise will still exist. I would be more inclined to suggest using a bargeintype="hotword" or even just moving to a DTMF/touch-tone entry only model if a user has continued problems with voice reco. Either way you choose to go about it, the bargein and bargintype attributes do not contain ECMAScript expressions. Therefore we cannot specify a variable as a value of either. You would have to navigate to another document, form, field, etc. that contained the needed bargein and/or bargeintype values. I hope this helps... Have Fun, ~ Michael |
|
inntecprod
|
|
| FYI, you're missing 'form' in the list of valid parents. | |
MattHenry
|
|
| Actually, <prompt> needs to be nested within a form-[b]item[/b] in order to execute, and as such, isn't a valid child element of <form>.
~Matt |
|
Jenny
|
|
| Hi,
I want to have the time out value in a variable and try to execute it...I am getting the error message as "line 18, column 25: org.xml.sax.SAXException: time must end with 's' or 'ms'" This is my program <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE vxml PUBLIC "vxml" ""> <vxml version="1.0"> <form id="Pin"> <var name ="time" expr="'180s'"/> <field name="count"> <grammar src="4digits1.grxml"/> <prompt> Enter ur Pin </prompt> <catch event="noinput nomatch"> <prompt > please enter the Pin correctly </prompt> </catch> <filled> <prompt timeout ="time"> U have entered <value expr="count"/> </prompt> </filled> </field> </form> </vxml> How to store a time out value in a variable and use it? |
|
MattHenry
|
|
|
Jenny, Note that we cannot use an ECMAScript expression within the <prompt> "timeout" attribute. By comparision, note in the elemnt tables the "src" and the "srcexpr" attributes of the <grammar> element: One expects a static value, and the other expects an ECMAScript variable name. In short, we can't arbitrarily put an ECMA value within just *any* attribute. In this case, our choices for dynamically specifying such a value are: 1 - Set this on a per-prompt basis in a static manner 2 - Use server side coding, (ASP/JSOP/etc), to poulate this value dynamically Hope this helps to clarify, ~Matt |
|
fliptone
|
|
| First, I also think this is an amazing site. Thanks!
I have a usage question. I want to play a "Please hold while I access your account" prompt before I submit the request, like this: ... <filled> <audio src="PleaseHold.wav" /> <submit next="Index.aspx" method="post" namelist="Question" /> </filled> ... but the prompt does not play until after the POST. Why is that? I've tried several different ways to get this to happen. Is there a way to play the prompt before the submit? |
|
MattHenry
|
|
|
This is due to how the VXML Form Interpretation Algorithm works. You can fake it out by doing something like this: [color=blue] .. <filled> <goto nextitem="Dummy"/> </filled> </field> field name="dummy"> <!-- set the 'noinput' timeout to 1 second --> <property name="timeout" value="1s"/> <prompt> <audio src="PleaseHold.wav" /> </prompt> <!-- create a 'garbage' grammar that will NEVER get a match --> <grammar type="text/gsl"> [poppaoomowmow] </grammar> <filled> <prompt> no way this will ever happen. </prompt> </filled> <noinput> <submit next="Index.aspx" method="post" namelist="Question" /> </noinput> </field> [/color] ~Matt |
|
djj_vj
|
|
| in Xml:lang we are using en:us, can we use our own language there?
if so how can we add our own language? please tell me how?? |
|
VoxeoDante
|
|
| Hello,
The Prophecy platform can support a wide range of languages. What you are referring to is the information regarding which languages are available on our online Evolution development and deployment environment. In addition to American English, we currently have online support for UK English, Spanish, French, Italian, German, Dutch and Arabic in our deployment center, and our development center includes all those languages plus Czech, Danish and Swiss German. However, if you purchase Prophecy for premise use, you can integrate any language available from major ASR vendors using the MRCP standard. You would still need, in addition to Prophecy licenses, to purchase additional ASR and TTS engine licenses, which Voxeo can supply you. The languages listed above are supplied by third party ASR and TTS vendors. Please let us know if you have any further questions. Best regards, Support |
|
Magician
|
|
| I would like to play slightly different prompts when returning to <menu>s and <form>s within the voice application, similarly to the way the count attribute behaves for noinput, nomatch, etc.
Do you have any tricks to set the value of the prompt counter in order to accomplish this? Magician |
|
voxeojeff
|
|
| Hello,
Unfortunately, I am not aware of any way to accomplish such a task. The Form Interpretation Algorithm (FIA) automatically resets the prompt counter to '1' upon exiting a form. Can you clarify a bit on what your application is trying to accomplish here? Regards, Jeff Menkel Voxeo Corporation |
|
Magician
|
|
| Here is an example: A main <menu> is visited repeatedly within the voice application. The first time it should give a more volumous explanation of the situation and the options available. On subsequent visits the explanation doesn't need to be quite as complete.
Of course I am also trying to simulate a real conversation in which each time you ask for the same piece of information the phrasing is somewhat different. Utilizing the count attribute would facilitate the construction of a number of complex prompts, and be useful for is current functionalty. Alternative approaches are to utilize the cond(ition) attribute, or construct the prompts externally to the VoiceXML. Thanks for your help. I was just hoping you had a cool rabbit in your hat to share. Magician |
|
MattHenry
|
|
|
Hi again, Thanks for clarifying what it is that you are looking to do. As the FIA is going to clear the 'count' when revisited, the only real solution would be to keep a user-defined 'count' variable that is incremented manually. Something like what I have below would do the trick, I'd think: [color=blue] <var name="myCount" expr="Number(0);"/> <form id="F1"> <block name="B1"> <assign name="myCount" expr="Number(myCount + 1);"/> <goto next="#F1"/> </block> </form> <menu id="M1"> <prompt cond="myCount== '1'"> ....</prompt> <prompt cond="myCount== '2'"> ....</prompt> <prompt cond="myCount== '3'"> ....</prompt> .. </menu> [/color] Note that when revisiting this menu, you'd want to make sure: A) That you specifically hit the preceding form/block via <goto next="http://myserver.com/myApp.vxml#F1"/>, and that we do NOT re-invoke the document itself, (doing so would reset the form-scoped 'myCount' variable value back to '0') B) That you clear out any form-item variabkes, (if revisiting this from within the same document), via the <clear> element. Cheers! ~Matthew Henry |
|
matejicek
|
|
| Hi,
I have several question for my easy code: 1) In part of my code in form F2, where is <value expr="session.calledid"/>, the TTS is so fast, is possible using some parameter, which spoken number will do so slowly ? 2) In the same form, <say-as interpret-as="telephone" format="digits">. If I changed parameter say-as interpreter-as for telephone or number, the TTS result was the same. It's strange. 3) I wanted to play prompt in form "uvod" only for the first time and my solution introduced under my question, isn't elegant. I traied somtehing as: <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1"> <var name="MyVar" expr="'true'"/> <form id="menu1"> <field name="F_1"> <prompt cond="MayVar"> Hello. What would you like to know? </prompt> <assign name="MyVar" expr="'false'"/> <grammar type="text/gsl"> [one two cancel dtmf-1 dtmf-2 dtmf-3] </grammar> <prompt> For Caller ID, press or say 1. For Called ID, press or say 2. For Finish this application, press 3 or say cancel. </prompt> <noinput> <prompt> I didnt hear you. Please try again. </prompt> <reprompt/> </noinput> <nomatch> <prompt> Is that a number ? Please try again. </prompt> <reprompt/> </nomatch> .... ... but didn't work. It is possible it solve otherwise ? I would like change value cond after first execution to value 'false' so to prompt (Hello..)wasn't be replayed again. Thank you much for Your answer. ------------------------------------------ <?xml version="1.0" encoding="UTF-8"?> <vxml version = "2.1"> <form id="uvod"> <block> <prompt>Hello. What would you like to know? </prompt> <goto next="#menu1"/> </block> </form> <form id="menu1"> <field name="F_1"> <grammar type="text/gsl"> [one two cancel dtmf-1 dtmf-2 dtmf-3] </grammar> <prompt> For Caller ID, press or say 1. For Called ID, press or say 2. For Finish this application, press 3 or say cancel. </prompt> <noinput> <prompt> I didnt hear you. Please try again. </prompt> <reprompt/> </noinput> <nomatch> <prompt> Is that a number ? Please try again. </prompt> <reprompt/> </nomatch> <filled> <if cond="F_1== '1' || F_1=='one'"> <goto next="#F1"/> <elseif cond="F_1=='2' || F_1=='two'"/> <goto next="#F2"/> <elseif cond="F_1=='3'|| F_1=='cancel'"/> <goto next="#F3"/> </if> </filled> </field> </form> <form id="F1"> <block> <prompt> The caller I D number is: <break strenght="weak"/> <say-as interpret-as="number" format="ordinal"> <value expr="session.callerid"/> <break time="2000"/> </say-as> </prompt> <goto next="#menu1"/> </block> </form> <form id="F2"> <block> <prompt> The called I D number is: <break strenght="weak"/> <say-as interpret-as="telephone" format="digits"> <value expr="session.calledid"/> <break time="2000"/> </say-as> </prompt> <goto next="#menu1"/> </block> </form> <form id="F3"> <block> <prompt> Thank you for calling.. </prompt> <disconnect/> </block> </form> </vxml> |
|
voxeojeff
|
|
| Hello,
Allow me to address your questions one by one: 1 - The <prosody> will help you out here, if you'd like to slow TTS down a little. Here's a link to our documentation on this element: http://docs.voxeo.com/voicexml/2.0/prosody.htm 2 - This appears to be a formatting issue. Inserting hyphens allows for proper pausing between digits. Per the docs, the code should be formatted as follows: <prompt>testing interp as type telephone <break strength="medium"/> <say-as interpret-as="telephone">111-222-3333</say-as> </prompt> http://docs.voxeo.com/voicexml/2.0/say-as.htm 3 - Moving the <assign name="MyVar" expr="'false'"/> code block to the inside of your <filled> should do the trick here. To illustrate this, here's a small bit of sample code that I tested with: <?xml version="1.0"?> <vxml version="2.0"> <var name="MyVar" expr="'true'"/> <form id="F1"> <field name="F_1"> <grammar type="text/gsl"> [(one) (two) (three)] </grammar> <prompt> say one two or three </prompt> <filled> <prompt> You said <value expr="F_1"/> </prompt> <assign name="MyVar" expr="'false'"/> <goto next="#F2"/> </filled> </field> </form> <form id="F2"> <block> <log expr="'******* MYVAR = ' + MyVar"/> </block> </form> </vxml> I hope this helps! Please let us know if you have any additional questions. :-) Best regards, Jeff Menkel Voxeo Corporation |
|
matejicek
|
|
| Hello,
Thanks for your answers and tips. Nevertheless I've got inquiry with regard to last point, Your answer wasn't exactly what I expected. Therefore I will try better express my prime question. I have problem to change parameter "cond" within <prompt> during runtime. More precisely,I imagine entry in terms of <prompt cond="MyVar">...</prompt>,where "MyVar" can be changed during runtime. But didn't work. Thank for your answer and with greeting Matejicek |
|
MattHenry
|
|
|
Hi there Matejicek, I think I see what you are getting at, and I have some illustrative sample code here that should do the trick for you, (unless I too, am misunderstanding your intention): [color=blue] <?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"> <var name="myCond" expr="'foo'"/> <form> <block> <!-- this will play --> <prompt cond="myCond == 'foo'"> the prompt condition is foo </prompt> <!-- this will NOT play --> <prompt cond="myCond == 'bar'"> the prompt condition is bar </prompt> </block> <block> <assign name="myCond" expr="'bar'"/> <!-- this will play --> <prompt cond="myCond == 'foo'"> the prompt condition is foo </prompt> <!-- this will NOT play --> <prompt cond="myCond == 'bar'"> the prompt condition is bar </prompt> </block> </form> </vxml> [/color] You may, or may not want to emulate this sort of methodology using application-scoped variable assignments, (I would, at least). =^) Let me know if this doesn't do the trick for you, ~Matthew henry |
|
Jenny
|
|
| Hi,
I am facing a problem while using bargein = false. To be brief, please follow the code <vxml> <form> <block> <prompt> First Prompt </prompt> </block> <block> <prompt bargein="false"> Second Prompt </prompt> </block> <block> <prompt bargein="false"> Third Prompt </prompt> </block> <field name ="collectInput"> .. </field> </form> </vxml> In the above sample code, if the caller is barging in while playing the first prompt, Second and Third prompt are skipping and the given input s taken for the field collect input..How to avoid it? or if caller bargein in first prompt, it need to be stopped and need to play second and third prompt.. How to acheive that? Thanks |
|
VoxeoDante
|
|
| Hello Jenny,
If recognition is triggered in the application, the execution will move to the recognition field/filled, and discontinue playing the prompts. Bargein is is expected to act in this way. You can think of it as a feature for advanced users. If someone is really familiar with the application, they may not want to listen to all of the prompts every-time they call. If you would like to disallow bargein for the entire application, you can do so by setting the bargein property to false. Like so; <property name="bargein" value="false"/> You can also set the bargein type if you would only like to allow DTMF or Voice bargein. Like so; <property name="bargeintype" value="dtmf"/> or <property name="bargeintype" value="voice"/> Please note that property settings should be done just below the VXML tag. Here is a link to out VXML property guide. http://docs.voxeo.com/voicexml/2.0/mot_appendixh.htm You could also just set the bargein to be false for the first prompt, like you have for the second two. I hope this helps. Please let us know if there are any further questions. Regards, Dante Vitulano |
| login |