VoiceXML 2.1 Development GuideHome  |  Frameset Home


<prompt>  element

The prompt element allows the developer to output synthesized text-to-speech content to the caller.


usage
<prompt bargein="(true|false)" bargeintype="(speech|hotword)" cond="CDATA" count="CDATA" timeout="CDATA" xml:lang="NMTOKEN">


attributes
bargeinData 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.
bargeintypeData 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.
condData Type: CDATADefault: 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.
countData Type: CDATADefault: 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.
timeoutData Type: CDATADefault: 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:langData Type: NMTOKENDefault: 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'.



shadow variables
none


parents
<block> <catch> <error> <field> <filled> <help> <if> <initial> <menu> <nomatch> <record> <transfer>


children
<audio> <break> <emphasis> <enumerate> <foreach> <mark> <paragraph> <phoneme> <prosody> <say-as> <sentence> <value>


code samples
<Prompt bargein> sample
<?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>

<Prompt count-cond> sample
<?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>


<Prompt timeout> sample
<?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>




<Prompt xml:lang> sample
<?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>

<Prompt bargeintype> sample
<?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>



additional links
W3C 2.0 Specification


  ANNOTATIONS: EXISTING POSTS
moshe
6/4/2004 12:21 PM (EDT)
<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
6/4/2004 12:22 PM (EDT)
Other children as also missing, such as <say-as>.
steve.sax
6/4/2004 4:36 PM (EDT)
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
5/26/2005 5:05 AM (EDT)
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
5/26/2005 10:07 AM (EDT)
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
1/28/2006 8:37 PM (EST)
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
1/29/2006 12:28 AM (EST)
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
11/3/2006 11:36 AM (EST)
FYI, you're missing 'form' in the list of valid parents.
MattHenry
11/3/2006 11:44 AM (EST)
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
1/19/2007 4:22 AM (EST)
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
1/19/2007 3:34 PM (EST)


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
4/30/2007 12:53 PM (EDT)
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
4/30/2007 7:04 PM (EDT)


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
6/18/2007 7:59 AM (EDT)
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
6/18/2007 11:24 AM (EDT)
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
8/5/2007 1:05 PM (EDT)
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
8/6/2007 11:22 AM (EDT)
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
8/6/2007 11:44 AM (EDT)
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
8/6/2007 5:22 PM (EDT)


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
9/18/2007 5:40 AM (EDT)
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
9/18/2007 10:12 AM (EDT)
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
9/19/2007 3:37 AM (EDT)
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
9/19/2007 2:20 PM (EDT)


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
3/28/2008 8:12 AM (EDT)
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
3/28/2008 10:18 AM (EDT)
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
jefo12
11/6/2008 8:50 AM (EST)

<form>
<field name="office" >

        <grammar type="application/x-nuance-gsl">
        <![CDATA[([
          ( austin )  { <office austin> }
          ( boston )  { <office boston> }
          ( chicago ) { <office chicago> }
          ( denver )  { <office denver> }
          ( john ) { <office houston> }
        ])]]>
      </grammar>

      <prompt bargeintype="hotword">
      please select an option
      </prompt>

      <filled>
      <value expr="office"/>
      </filled>
      </field>
      </form>
      </vxml>

In the above code i use bargein as hotword means the prompt will interupt only when ever the hotword matches.

suppose if i say 'who is austin' it should match the hotword 'austin' and should go to filled.but this not happening can any one help me out to do this.

i can say 'where is austin', 'i would like to go chicago','my name is john'.then the coresponding hotword should match (austin,chicago,john) and should go to filled.i would b very thank ful if any one help me out.

Thanks,
jefo.
voxeojeremyr
11/6/2008 10:03 AM (EST)
Hi Jefo,

I don't think in this case that setting the barge in type to 'hotword' is what is needed.  I believe we just need to modify your grammar to catch those 'filler' words.  There is a way to do that with a special rule called 'garbage'.

I have modified your grammar to include the garbage rule so you should be able to say, 'ummm, I would like Austin', or 'how about Chicago'.  Also because GSL is proprietary and Nuance is no longer supporting GSL in version 9, I have changed it to GRXML format:

<grammar xml:lang="en-US" root = "OFFICE">
<rule id="OFFICE">
<one-of>
    <item>
      <ruleref special="GARBAGE"/>
      <one-of>
        <item>  austin 
          <tag> out.office="office austin"  </tag>
        </item>
        <item>  boston 
            <tag> out.office="office boston"  </tag>
        </item>
       
        <item>  chicago 
            <tag> out.office="office chicago"  </tag>
        </item>
       
        <item>  denver 
            <tag> out.office="office denver"  </tag>
        </item>
       
        <item>  john
            <tag> out.office="office houston"  </tag>
        </item>

      </one-of>
  </item>
  </one-of>
</rule>
</grammar>


I have done some testing and it seems to work pretty good.

Please let us know how it works for you.

Thanks,
Jeremy Richmond
Voxeo Support
jefo12
11/7/2008 1:46 AM (EST)
hi Richmond thanks for your reply really it was very helpul.but i'm
facing a problem with this grammar when i enabled N-best it is returning the same match two times.

Suppose if i say austin it returns two times austin austin.can u pls tell me why this happen.Is this because of the grammar or some other reasons.pls help me out...

Thanks,
jefo
voxeoJeffK
11/7/2008 2:13 AM (EST)
Hi,

It would be best to see the code you're using, so it's difficult to explain what's occurring blind. I will say that the purpose of NBest is to return an array of matches. If you would like to include the relevant portion of code we would be happy to explore the results you're seeing.

Regards,
Jeff K.
jefo12
11/7/2008 4:26 AM (EST)
Hi jeff here is the code.please let me know why this code is returning same matches twice.but this code works fine if i remove <ruleref special="GARBAGE"/>.can you pls tell me why this happens...Is there any alternative way to do this..


<form>
<field name="office" >
<grammar xml:lang="en-US" root = "OFFICE">
<rule id="OFFICE">
<one-of>
<item>
<ruleref special="GARBAGE"/>
<one-of>
<item>  austin 
<tag> out.office="office austin"  </tag>
</item>
<item>  boston 
<tag> out.office="office boston"  </tag>
</item>
<item>  chicago 
<tag> out.office="office chicago"  </tag>
</item>
<item>  denver 
<tag> out.office="office denver"  </tag>
</item>
<item>  john
<tag> out.office="office houston"  </tag>
</item>
</one-of>
</item>
</one-of>
</rule>
</grammar>

<prompt bargeintype="hotword">
  please select an option
</prompt>

<filled>
<if cond="application.lastresult$.length > 1">
<!-- More than one recognition result was returned. -->
<assign name="myResults" expr="application.lastresult$"/>
<!-- Construct prompt from the recognized utterances. -->
<assign name="choicePrompt" expr="listResults(myResults)"/>
<else/>
<!-- Only one result; skip the "choice" field. -->
<assign name="choice" expr="0"/>
</if>
</filled>
</field>
<field name="choice" type="digits">
<prompt> <value expr="choicePrompt"/> </prompt>
<filled>
<if cond="choice == 0">
<!-- Start over. -->
<clear/>
<elseif cond="choice > myResults.length"/>
<!-- No such utterance; prompt again. -->
<prompt>Unrecognized option.</prompt>
<clear namelist="choice"/>
<else/>
<assign name="office" expr="findResult(myResults, choice)"/>
</if>
</filled>
</field>
<block>
<prompt>Scheduling a visit with the <value expr="office"/>
office</prompt>
</block>
</form>
</vxml> 
jefo12
11/7/2008 4:58 AM (EST)


Also is there any way for better recognition of grammar other than using the property confidencelevel.

Thanks,
jefo.
MattHenry
11/7/2008 10:37 AM (EST)

Jefo,

This is a question whose answer is very broad in scope: If you are having specific recognition issues, then it is likely best to deal with it on a per-case basis by submitting debugger output into a private support ticket, and detailing for us exactly where the recognition problems are occurring so that we can help out.

In the interest of giving our developers some general direction on this topic, I will list out a few suggestions:

1) Enable utterance recording: This will allow you to get an idea for what your callers are trying to match against, and will give you a good idea as to where you might want to tune your utterance definitions.


2) Log lastrestult$ shadow variables for confidence, and utterance: keeping this data stored in a persistent manner allows you to go back and tune grammars based on factual data - if a particular grammar entry consistently receives low confidence matches, then chances are this would b e one that you can target for tuning.

3) Review your VUI design carefully: In some cases, allowing a caller to choose from several hundred choices is not an optimal use of voice recognition. For instance, a dialog that allows someone to enter in any city name in the United States is bound to have mis-recognition problems. In this hypothetical scenario, it's best to narrow down our choices by asking "what state is the city you are looking for", and then loading a grammar that is targeted to receive a more accurate match due to the fact that less entries = less chance for disambiguation problems


4) Employ grammar weighting to tip the odds in your favor: This feature can be used to skew probability results in your favor for commonly-spoken utterance values that sound similar to less-popular matches. Note that weighting should *only* be employed after analyzing call recordings, and confidence scores from real-world callers so that you are basing your weights on factual data.

5) confideneclevel, sensitivity, and speedvsaccuracy properties can be very helpful in squeezing every last drop of wholesome recognition goodness from a grammar. However, it is advised that adjusting the property settings for these items be done in very small increments, followed by thorough testing before deploying in a live production capacity.

Hope this helps,

~Matthew Henry
kunalp25
4/9/2009 3:23 PM (EDT)
Hello,

I am having a tough time figuring this prompt out.

The wording is,
"Please enter your sixteen digit card number and then press "#" or press "*" to
report your card lost or stolen" 

The issue for me is I am trying to use DTMF, how would I add the asterisk and still enforce 0-9 or * min 1 max 16?
voxeo_chris
4/9/2009 4:20 PM (EDT)
Hello Kunal,

In order to have your users enter pound or star, you will need to create a custom DTMF grammar that utilizes the pound and star.  I would recommend that you check out our tutorial on grXML [url=http://www.vxml.org/grxml_dtmf.htm]DTMF grammars[/url] as this has some code examples and information that I believe would be helpful to you.  Also I noticed that your prompt [b]"Please enter your sixteen digit card number and then press "#" or press "*" to report your card lost or stolen"[/b] will not say "#" or "*".  You will need to write them out as "pound" and "star" for them to be played properly in the prompt.  Please let us know if you have any othe rquestions as we would be happy to assist you.

Regards,

Chris Bruckart
Customer Engineer
Voxeo Support
dscotese
5/26/2009 11:03 AM (EDT)
There is apparently an ECMAScript variable, current_count, as used in Moshe's example:

<prompt>This is count number <value expr="current_count"/></prompt>

Where can I find a list of variables like that, or is that the only one, and also not documented anywhere? (!?)
voxeojeremyr
5/26/2009 1:23 PM (EDT)
Hi,

Actually the variable called 'current_count', is a user defined variable.  Moshe does not show his entire code, but to use that variable, he would have had to create it using the <var...> element, like so:
<var name="current_count" expr="0"/>

All the application and session initiated variables can be found here:
http://www.vxml.org/mot_sessionvars.htm

Regards,
Jeremy Richmond
Voxeo Support
punkin
6/12/2009 1:37 AM (EDT)
http://www.example.com <-- TTS skips to read all slashes and the colon (:).

http://www.example.com/video/example1

In this case, TTS will read like this: "http www.example.com video/example1" 

Only the last / is read. 

May I know why?  How can I script it and force TTS to read all characters?

In addition, TTS seems to read / as "flash", instead of "slash."  I may have hearing problem, or maybe voice synthesizer is not clear at my end.

voxeoJeffK
6/12/2009 4:28 AM (EDT)
Hello,

You can use a little ECMAscript to format text to be read to your preference. Here is an example:

  <block>
      <var name="spacedUrl"/>
      <var name="temp"/>
      <var name="urlString" expr="'http://www.example.com/video/example1'"/>
      <assign name="temp" expr="urlString.replace(/:/, ' colon ');"/>
      <assign name="spacedUrl" expr="temp.replace(/\//ig, ' slash ');"/>
      <prompt>Your input was
      <break strength="medium"/>
      <value expr="spacedUrl"/>.
      </prompt>
  </block>

This will create the following string:

  http colon slash slash www.example.com slash video slash example1

Regards,
Jeff Kustermann
Voxeo Support
thakur911
6/25/2009 11:33 AM (EDT)
Hi,

Is there a way to capture digits of say length 7-10 characters and not have prompt speak them as a single numerical number but as individual digits (coz its like an account number)? I have tried type = "digits" / "number" and say-as "number" tags but nothing has worked.. any ideas?
VoxeoDustin
6/25/2009 11:44 AM (EDT)
Hello,

You can use the interpet-as type vxml:digits to achieve this. The types digit and number are only supported by the older Rhetorical and Speechify TTS engines. The vxml: types are W3C spec for VoiceXML and are fully supported by Prophecy TTS:

<say-as interpret-as="vxml:digits">

Regards,
Dustin Hayre
Customer Support Engineer II
Voxeo Support

login



© 2009 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site