| VoiceXML 2.1 Development Guide | Home | Frameset Home |
|
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
</vxml>
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >
<form id="MainMenu">
<field name="SouthParkCharacter">
Please say your favorite South Park character's name.
</field>
</form>
<grammar type="text/gsl">
<![CDATA[
;Match one of the enclosed terms
[
;Each line is recognized as a separate term
;Terms are separated by a space
kenny
cartman
stan
kyle
canadians
chef
wendy
timmy
hanky
garrison
pip
ike
mephisto
jimbo
tweak
marvin
;Match either terrance or phillip
;Square brackets are the same as OR
[terrance phillip]
;Parentheses require all of the enclosed terms to be matched
(mister hat)
(big gay al)
(cartmans mom)
(mister mackey)
]
]]>
</grammar>
<grammar type> in your VoiceXML documents. Next, notice that the names inside the brackets are what VoiceXML is attempting to match against what the caller speaks over the phone. Notice that these are all lowercase: this is not by accident. These must be lowercase, otherwise VoiceXML will interpret them as references to other grammar blocks, (or, more precisely grammar Rulenames). What does that mean? It means that "[kenny]" attempts to match speech to the word "kenny" and "[KENNY]" searches for another grammar structure entirely that is called "KENNY".
<filled namelist="SouthParkCharacter">
<if cond="SouthParkCharacter == 'kenny'">
<elseif cond="SouthParkCharacter == 'cartman'"/>
<elseif cond="SouthParkCharacter == 'stan'"/>
<elseif cond="SouthParkCharacter == 'kyle'"/>
<elseif cond="SouthParkCharacter == 'canadians'"/>
<elseif cond="SouthParkCharacter == 'chef'"/>
<elseif cond="SouthParkCharacter == 'mister hat'"/>
<elseif cond="SouthParkCharacter == 'big gay al'"/>
<elseif cond="SouthParkCharacter == 'wendy'"/>
<elseif cond="SouthParkCharacter == 'timmy'"/>
<elseif cond="SouthParkCharacter == 'hanky'"/>
<elseif cond="SouthParkCharacter == 'garrison'"/>
<elseif cond="SouthParkCharacter == 'cartmans mom'"/>
<elseif cond="SouthParkCharacter == 'pip'"/>
<elseif cond="SouthParkCharacter == 'ike'"/>
<elseif cond="SouthParkCharacter == 'mister mackey'"/>
<elseif cond="SouthParkCharacter == 'mephisto'"/>
<elseif cond="SouthParkCharacter == 'jimbo'"/>
<elseif cond="SouthParkCharacter == 'marvin'"/>
<else/>
<!-- This will never be visited -->
<reprompt />
</if>
</filled>
<filled> tag means that our <field> has been filled with a recognized value (retrieved from our grammar). Then we have a long series of <if> and <elseif> statements as we determine which value actually came back from our grammar. Notice that we use a double equal sign (like many languages use) to determine if our <field> variable (called "SouthParkCharacter") is equal to a specific value. This value must be scripted in single quotes (i.e., ' '). That is all there is to it. Of course, we still are not responding to the caller, but that is simple enough to rectify. Let's associate some text-to-speech with each of our possible conditions/matches:
<filled namelist="SouthParkCharacter">
<if cond="SouthParkCharacter == 'kenny'">
<prompt>Kenny has more lives than a cat.</prompt>
<elseif cond="SouthParkCharacter == 'cartman'"/>
<prompt>Cartman is not fat. He is big boned.</prompt>
<elseif cond="SouthParkCharacter == 'stan'"/>
<prompt>Stan likes Wendy.</prompt>
<elseif cond="SouthParkCharacter == 'kyle'"/>
<prompt>Kyle has a gay dog.</prompt>
<elseif cond="SouthParkCharacter == 'canadians'"/>
<prompt>Canada. What is that aboot?</prompt>
<elseif cond="SouthParkCharacter == 'chef'"/>
<prompt>Chef is the coolest man in South Park.</prompt>
<elseif cond="SouthParkCharacter == 'mister hat'"/>
<prompt>Mister Hat is a puppet.</prompt>
<elseif cond="SouthParkCharacter == 'big gay al'"/>
<prompt>Big Gay Al is gay.</prompt>
<elseif cond="SouthParkCharacter == 'wendy'"/>
<prompt>Wendy likes Stan.</prompt>
<elseif cond="SouthParkCharacter == 'timmy'"/>
<prompt>Timmmy! Timmmy tim maugh!</prompt>
<elseif cond="SouthParkCharacter == 'hanky'"/>
<prompt>Mister Hanky, the Christmas poo.</prompt>
<elseif cond="SouthParkCharacter == 'garrison'"/>
<prompt>Mister Garrison is gay.</prompt>
<elseif cond="SouthParkCharacter == 'cartmans mom'"/>
<prompt>Cartman's mom loves the Denver Broncos.</prompt>
<elseif cond="SouthParkCharacter == 'pip'"/>
<prompt>Pip is British.</prompt>
<elseif cond="SouthParkCharacter == 'ike'"/>
<prompt>Ike is also Canadian.</prompt>
<elseif cond="SouthParkCharacter == 'mistermackey'"/>
<prompt>Mister Mackey. Mmmmmmkay.</prompt>
<elseif cond="SouthParkCharacter == 'mephisto'"/>
<prompt>Mephisto enjoys experimenting on animals.</prompt>
<elseif cond="SouthParkCharacter == 'jimbo'"/>
<prompt>Jimbo is a redneck.</prompt>
<elseif cond="SouthParkCharacter == 'marvin'"/>
<prompt>Marvin is really hungry.</prompt>
<else/>
<prompt>
A match has occurred, but no specific if statement
was written for it. Probably just a minor character
like Tweak or Jimbo's gun-toting friend.
</prompt>
</if>
</filled>
<field> tags. <noinput> and <nomatch> will handle scenarios where our caller does not follow the rules set up by our grammar. For example:
<noinput>
<prompt>I did not hear anything. Please try again.</prompt>
<reprompt/>
</noinput>
<nomatch>
<prompt>I did not recognize that character. Please try again.</prompt>
<reprompt/>
</nomatch>
<noinput> tag is fairly self-explanatory: it is triggered if the caller does not say anything. Thus, we now have a nice little extra prompt that informs them to say something. <reprompt> simply repeats the <field> tag from the start. In a similar fashion as <noinput>, <nomatch> is triggered when VoiceXML hears something, but cannot successfully match it to a value in the grammar.
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
<form id="MainMenu">
<field name="SouthParkCharacter">
<!-- Since we are in a field tag, we do not need <prompt> tags surrounding the text-to-speech -->
Please say your favorite South Park character's name.
<!-- Define our grammar -->
<grammar type="text/gsl">
<![CDATA[
;Match one of the enclosed terms
[
kenny cartman stan kyle canadians chef wendy timmy
hanky garrison pip ike mephisto jimbo tweak marvin
[terrance phillip]
(mister hat) (big gay al) (cartmans mom) (mister mackey)
]
]]>
</grammar>
<!-- The user was silent, restart the field -->
<noinput>
I did not hear anything. Please try again.
<reprompt/>
</noinput>
<!-- The user said something that was not defined in our grammar -->
<nomatch>
I did not recognize that character. Please try again.
<reprompt/>
</nomatch>
</field>
<!-- Set the namelist attribute to the name of the corresponding field -->
<!-- This is filled only when one of the values in the grammar is matched -->
<!-- That value is then sent to this section -->
<filled namelist="SouthParkCharacter">
<!-- Check the "SouthParkCharacter" variable against each of the valid values -->
<!-- defined in our grammar -->
<if cond="SouthParkCharacter == 'kenny'">
<prompt>Kenny has more lives than a cat.</prompt>
<elseif cond="SouthParkCharacter == 'cartman'"/>
<prompt>Cartman is not fat. He is big boned.</prompt>
<elseif cond="SouthParkCharacter == 'stan'"/>
<prompt>Stan likes Wendy.</prompt>
<elseif cond="SouthParkCharacter == 'kyle'"/>
<prompt>Kyle has a gay dog.</prompt>
<elseif cond="SouthParkCharacter == 'canadians'"/>
<prompt>Canada. What is that aboot?</prompt>
<elseif cond="SouthParkCharacter == 'chef'"/>
<prompt>Chef is the coolest man in South Park.</prompt>
<elseif cond="SouthParkCharacter == 'mister hat'"/>
<prompt>Mister Hat is a puppet.</prompt>
<elseif cond="SouthParkCharacter == 'big gay al'"/>
<prompt>Big Gay Al is gay.</prompt>
<elseif cond="SouthParkCharacter == 'wendy'"/>
<prompt>Wendy likes Stan.</prompt>
<elseif cond="SouthParkCharacter == 'timmy'"/>
<prompt>Timmmy! Timmmy tim maugh!</prompt>
<elseif cond="SouthParkCharacter == 'hanky'"/>
<prompt>Mister Hanky, the Christmas poo.</prompt>
<elseif cond="SouthParkCharacter == 'garrison'"/>
<prompt>Mister Garrison is gay.</prompt>
<elseif cond="SouthParkCharacter == 'cartmans mom'"/>
<prompt>Cartman's mom loves the Denver Broncos.</prompt>
<elseif cond="SouthParkCharacter == 'pip'"/>
<prompt>Pip is British.</prompt>
<elseif cond="SouthParkCharacter == 'ike'"/>
<prompt>Ike is also Canadian.</prompt>
<elseif cond="SouthParkCharacter == 'mister mackey'"/>
<prompt>Mister Mackey. Mmmmmmkay.</prompt>
<elseif cond="SouthParkCharacter == 'mephisto'"/>
<prompt>Mephisto enjoys experimenting on animals.</prompt>
<elseif cond="SouthParkCharacter == 'jimbo'"/>
<prompt>Jimbo is a redneck.</prompt>
<elseif cond="SouthParkCharacter == 'marvin'"/>
<prompt>Marvin is really hungry.</prompt>
<else/>
<prompt>
A match has occurred, but no specific if statement
was written for it. Probably just a minor character
like Tweak or Jimbo's gun-toting friend.
</prompt>
</if>
</filled>
</form>
</vxml>
| ANNOTATIONS: EXISTING POSTS |
ericj
|
|
| The copy of the source code contained in "Download the Code" is different from what is shown in the tutorial. The "Download the Code" code is missing the <prompt> tag in front of each prompt listed in the if construct.
- ej |
|
ericj
|
|
| The menu choices in the sample code are properly formatted in lower case (kenny cartman hanky et al). However, the matching items in the If construct are incorrectly shown in initial caps.
<elseif cond="SouthParkCharacter == 'Hanky'"/> <prompt>Mister Hanky, the Christmas poo.</prompt> should be <elseif cond="SouthParkCharacter == 'hanky'"/> <prompt>Mister Hanky, the Christmas poo.</prompt> in order to properly match the selection to the prompt. |
|
steve.sax
|
|
| Eric,
Thanks for pointing out this inconsistency; I have corrected this in our internal docs, and you can expect this be reflected in our live docs within the next day or two. Warm Regards, Steve Sax |
|
adrianysk
|
|
| I have tried it but I have an error, the prompt does not finish reading "Please say your favorite South Park character's name." and it stops and starts capturing voice input from user. Say like..."Please say ........" then the recognition starts. This will give the user uncertainty what the question is all about. Why this may happen? | |
MattHenry
|
|
| Hola adrian,
Theres any number of reasons this could happen, but without seeing debug logs containing the call info, I can only guess. A bad connection with static, or a noisy environment would be two likely candidates for this behavior. If you'd like to capture the debug logs, and create an account ticket with them attached, I can certainly take a look and offer my input. ~Matt |
|
adrianysk
|
|
| #5036
I am not sure how to capture the debug notes...as I am still new in the area. And the forum as well. However, the above is the ticket that I have created? Does that reflect anything? Thanks Matt... |
|
adrianysk
|
|
| Greetings Matt,
I have already solved my problem. I added the following line to the <prompt> tag ... bargein="false" <prompt bargein="false"> Then the prompt will be readed completely before the sure can continue with the recognition. Thanks. |
|
rrobertc
|
|
| Why do you have [terrance phillip] inside []? The whole thing is already inside the OR[]. Also I don't see terrance or phillip in the if statments. | |
MattHenry
|
|
| Hiya Robert,
Thaks for catching those typos. I'll see about correcting that just as soon as time permits. ~Matt |
|
jlam
|
|
| Can someone explain to me why some tags close with the / at the front or the end of the < >
ie <repompt/> and </noimput> |
|
MattHenry
|
|
|
Hiya Eric, Some XML tags dont neccessarily hold values, or attributes; therefore, they are self-closing, and have but one directive with no additional parameters. Other elements do hold user-defined values, and even attribute values that specify sub-directives to execute: At it's most basic: <element attributename="att_value"> element_valus </element Versus: <element/> The w3c XML, and even HTML specifications both have oodles of information on this topic, that really dive into this topic, if you are inclined to learn more. Cheers, ~Matt |
|
Khamyl
|
|
| Hallo!
What will be the value of "SouthParkCharacter" variable if I say one of [terrence fillip]? Can I assign to this element one specific valu e.g. "OneOfTerrenceAndFillip"? Thanx |
|
Michael.Book
|
|
| Hello Khamyl,
In this example, the value of 'SouthParkCharacter' would simply be the name of the character you say. If you say "Terrance," the value will be 'terrance'. If you say "Phillip," the value will be 'phillip'. If you want to assign a specific value to the field name, simply use a slot value for your grammar entry. For example, your grammar might look like this: ------------------- <grammar scope="document" type="text/gsl"> <![CDATA[ .MYRULE [ terrance {<mySlot "Terrance of the Terrance and Phillip show">} phillip {<mySlot "Phillip of the Terrance and Phillip show">} ] ]]> </grammar> ------------------- The link below is to a forum posting that has a good explanation on what values are assigned to a recognition field name, and even gives an example of how you could assign a specific slot value to a given grammar entry. I would recommend taking a quick peak... http://community.voxeo.com/bizblog/viewer?&bb-name=masterforum&bb-q=steelers&&bb-cid=10&bb-tid=80638#bb I hope this helps... Have Fun, ~ Michael |
|
mmdoufu
|
|
| hey, howdy!
I really enjoyed playing with VXML. Keep up with your great work! I just copied and pasted the South Park character and tested it, found that if I say 'big gay al' always returns " A match has occurred, but no specific if statement was written for it. Probably just a minor character like Tweak or Jimbo's gun-toting friend." I turned on the debug then realised that the grammar returns 'big gay al', not 'biggayal'. Therefore, the elseif statement should be written like <elseif cond="SouthParkCharacter == 'big gay al'"/> <prompt>Big Gay Al is gay.</prompt> <elseif cond="SouthParkCharacter == 'mister mackey'"/> <prompt>Mister Mackey. Mmmmmmkay.</prompt> Cheers, ay |
|
erik707kire
|
|
| I do not expect a free call to my application from Bulgaria, but what number should I use to call into my app. from there? The country code, plus the same free-phone number but without the 800???
Erik |
|
MattHenry
|
|
|
Hello Erik, Might I suggest a cheaper alternative? You can always connect to your voxeo applications by using a VoIP service such as free world dialup, or skype. Alternatively, you can download a 2 port trail of our IVR platform software, and run it on your local machine: http://www.voxeo.com/prophecy Cheers, ~Matthew Henry |
|
KMadhuka
|
|
| In the above example there is no <prompt> tag before the sentence
"Please say your favorite South Park character's name" How this will interpreted as a <prompt> to voice the sentence. Thanks Madhukar |
|
VoxeoJoe
|
|
| Hello Madhukar,
If your text is within a set of "prompt", "field", or "block" tags, it will get rendered as TTS. Sincerely, Joe Gallina Voxeo Corporation |
|
artybala
|
|
| I am trying to learn VoiceXML and when using the following code, the system says it has an internal error and could not locate the URL. it comes after it reads out the prompt. Can someone help me with what i am missing . Thanks.
<?xml version="1.0" encoding="UTF-8"?> <vxml version="2.0"> <form id ="firstform"> <field name = "CallerKey"> How are you today. Please give me your name </field> </form> </vxml> |
|
voxeojeremy
|
|
| artybala,
You should have a grammar and filled element with this type of script. To view an example of this, please visit our XML Grammars tutorial, located at http://docs.voxeo.com/voicexml/2.0/t_21.htm . Please let us know if you require additional assistance. Thank you very much! Jeremy McCall Voxeo Extreme Support |
|
artybala
|
|
| Thanks a lot Jeremy. I added the Grammer and it works fine now. what should i do if my grammer is in a database table? If i am storing employee names in a database table, how do i use that as grammer with out having to create and XML or the gsl type one.
Thanks for your help. - artybala |
|
voxeojeff
|
|
| Hello Artybala,
Unfortunately, you will need to create a new XML or GSL grammar file in order to accomplish this task. For more information on grammars, you may visit the following links: http://docs.voxeo.com/voicexml/2.0/t_21.htm http://docs.voxeo.com/voicexml/2.0/mot_appendixi.htm http://docs.voxeo.com/voicexml/2.0/mot_appendixj.htm Best regards, Jeff Menkel Voxeo Corporation |
|
hotk
|
|
| hi there.
When I call a number given to me, I can hear "~~~ gate way software." What is problem?? |
|
VoxeoDustin
|
|
| Hey HotK,
It looks like your application is using vxml version="1.0" and a Nuance specific DTD. You'll want to change the version to 2.0 or 2.1, which is what our platform currently uses and remove the reference to the Nuance DTD. Also, in the future, you can open account tickets if you have questions regarding our platform. When you login to Evolution, click Support Tickets and then Open New Account Ticket. Thanks, Dustin |
|
anishjhaveri
|
|
| Hi,
Excellent article! Thanks for the same. I would like to know one thing. Can I have a simple user's voice input which can be converted to text? I mean speech-to-text. Lets say I would like to make an application where I can take user's view on some question which will be inputted as voice. Can I convert that voice input to text? Looking forward to your reply. Thanks, Anish |
|
VoxeoDustin
|
|
| Hey Anish,
Automated speech-to-text is a very difficult task to accomplish. There are some companies and software out there that may suit your needs, and a quick Google search should get you a bevy of information regarding it. You may want to look into manual transcription services, which may be a cheaper and easier route that integrating a speech-to-text API. Let us know if we can be of further assistance. Cheers, Dustin |
|
roni
|
|
| Howdy,
I want to recognize a contact list which includes foreign names with unusual pronunciations. How can I create new words to be recognized with custom pronunciations which I will supply? Thanks, -Roni |
|
VoxeoDustin
|
|
| Hello Roni,
If you wish to recognize foreign names, you'll want to create phonetic utterances in your grammar. <grammar type="application/grammar+xml" xml:lang="en-US" root="CONTACTS"> <rule id="CONTACTS"> <one-of> <item> lor ohn <tag> out.name = "Laurent" </tag> </item> <item> mee shell <tag> out.name = "Michelle" </tag> </item> <item> ghee ohm <tag> out.name = "Guillaume" </tag> </item> </one-of> </rule> </grammar> Obviously, this will take a bit of tweaking, but should certainly do the trick for you. Regards, Dustin Hayre Customer Support Engineer II Voxeo Support |
|
amy2009
|
|
| I have written a grammar file as below:
<grammar type="text/gsl" weight="0"> <![CDATA[ [ (1 7 2 9 8 1) (1 6 9 9 3 0) (1 7 0 0 3 8) (1 6 9 1 9 0) (1 7 3 1 0 7) (one eight two one four six) {<enteredid 182146>} (one eight two one five zero) {<enteredid 182150>} ] ]]> </grammar> When i prompt the voice input as 1 7 0 0 i get the output prompt as 1 7 0 0 3 8 i.e. it auto completes the remaining number. I do not want this feature enabled. I want it to match the entire number before giving the output or play a nomatch prompt. I am using prophecy 8.0 server(free 2 ports) and it is installed on my machine. |
|
voxeoJeffK
|
|
| Hello,
I've done some testing using the grammar you posted, and I am not encountering the same results. I got reliable nomatches when speaking incomplete entries. To help troubleshoot further for you may we ask if you could provide a logfile from an application test where this behavior is demonstrated? Regards, Jeff Kustermann Voxeo Support |
|
mindsick13
|
|
| Im using a variation of you code:
CODE <vxml application="application-root.vxml" version="2.1" xmlns="http://www.w3.org/2001/vxml"> <form id="MainMenu"> <field name="SouthParkCharacter"> <!-- Since we are in a field tag, we do not need <prompt> tags surrounding the text-to-speech --> <prompt bargein="false">Please say your favorite South Park character's name.</prompt> <!-- Define our grammar --> <grammar type="text/gsl"> <![CDATA[ ;Match one of the enclosed terms [ kenny cartman stan kyle ] ]]> </grammar> <!-- The user was silent, restart the field --> <noinput> I did not hear anything. Please try again. <reprompt/> </noinput> <!-- The user said something that was not defined in our grammar --> <nomatch> I did not recognize that character. Please try again. <reprompt/> </nomatch> </field> <!-- Set the namelist attribute to the name of the corresponding field --> <!-- This is filled only when one of the values in the grammar is matched --> <!-- That value is then sent to this section --> <filled namelist="SouthParkCharacter"> <!-- Check the "SouthParkCharacter" variable against each of the valid values --> <!-- defined in our grammar --> <if cond="SouthParkCharacter == 'kenny'"> <prompt>Kenny has more lives than a cat.</prompt> <elseif cond="SouthParkCharacter == 'cartman'"/> <prompt>Cartman is not fat. He is big boned.</prompt> <elseif cond="SouthParkCharacter == 'stan'"/> <prompt>Stan likes Wendy.</prompt> <elseif cond="SouthParkCharacter == 'kyle'"/> <prompt>Kyle has a gay dog.</prompt> <else/> <prompt> A match has occurred, but no specific if statement was written for it. Probably just a minor character like Tweak or Jimbo's gun-toting friend. </prompt> </if> </filled> </form> <form id="DEFAULT_GOTO_ID"> <block> <!-- filled in with link to next element at publish time --> </block> </form> </vxml> But unfortunatly is not working. Could you point any possible mistakes? best regards, Paulo Moura |
|
VoxeoDante
|
|
| Hello Paulo,
I am afraid we don't have much to go on here with out a report of what the issue is, but I am going to guess that you are having issues with the voice recognition part of the application. If that is the case, try replacing the grammar with the following; <grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en-US" root = "MYRULE"> <rule id="MYRULE" scope="public"> <one-of> <item>kenny</item> <item>cartman</item> <item>kyle</item> <item>stan</item> </one-of> </rule> </grammar> This is a GRXML type grammar and is the specification that will be used moving forward as the GSL spec was developed as Nuance specific, and they no longer support that format. If that is not the part that you are having trouble with, let us know what part is giving you the problem and we will take a look. Regards, Dante Vitulano Customer Support Engineer II Voxeo Corporation |
|
JonahKP
|
|
| I have copied this code directly from the page and the program will not recognize 'Terrance' or 'Phillip'. It drops into the else cond. Also will not recognize 'Terrance Phillip' | |
jdyer
|
|
| Hello,
I am sorry to hear you are having issues here, might I ask that you please replicate the behavior with the application debugger open and submit logs? Generally we always request that applications logs accompany any application debugger requests, as this gives us insight into the execution of the application, and grammar, at the platform level, which is often required to resolve these types of issues. We'll be standing by for your update at this time. Regards, John Dyer Customer Engineer Voxeo Support |
|
james.li.hd
|
|
| Hi, Guys,
Don't know if anyone having the same problem with me. I'm calling my app with skype, it's works ok except for that, after the call is answered, I can not hear the first few words. It's sounds like the system already started to prompt for one or two seconds before I can start to hear something. Is this happened only on skype or this could possibly because I'm located in China? Thanks James |
|
VoxeoDante
|
|
| Hello,
This is likely a little bit of both the geographical location and Skype together. VoIP services will buffer the audio that is passed, this happens on both SIP phones and with Skype. Generally the easiest way to work around this is to add a small break to the start of the TTS prompt to allow the buffer to build up before we start the speech. You should be able to add a small tag to the start of the TTS to accomodate. Try adding this <break time="500ms"/> at the beginning of the prompt. I hope this helps. Regards, Dante Vitulano Customer Engineer II Voxeo Corp. Have you seen the newest Voxeo labs creation? http://blog.phono.com/ |
|
Semiliranda
|
|
| Hello!
Thank you for this tutorial! Would you be so kind as to explane me the difference between these two blocks: 1. <nomatch> I did not recognize that character. Please try again. <reprompt/> </nomatch> </field> 2. <else/> <prompt> A match has occurred, but no specific if statement was written for it. Probably just a minor character like Tweak or Jimbo's gun-toting friend. </prompt> When user is taken to (1) and when to (2)? Thank you! |
|
VoxeoDante
|
|
| Hello,
The first block (1) would be visited when someone was to say something that was not an item in the grammar. The grammar in this tutorial is looking for one of a list of characters from the show. If someone was to say something like "internet explorer" that would not match the grammar and the <nomatch> would be visited. The second (2) would be visited when someone was to match the grammar, but none of the conditions in the large <if> / <else> are met. You will notice that characters like "Tweak" are in the grammar, but are not part of the large <if> / <else>, this means that those grammar matches would fall out to the final <else>. I hope that this explains everything. Please let us know if there are any other questions. 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] |
|
pauval08
|
|
| Is there a method to capture keywords in a complex utterance? For instance, if the voice input is something like: "I would like the weather in Texas for next week", my system would recognize the word "weather" and forward the caller to the weather application. Obviously, I could write a grammar with the entire response, but I'm looking for a method to detect keywords in complex utterances. Perhaps the confidence level would be very low, but thats not an issue. Thanks! | |
voxeoJeffK
|
|
| Hello,
You can use the special "GARBAGE" ruleref: http://www.vxml.org/ruleref.htm Regards, Jeff Kustermann Voxeo Corporation |
|
pauval08
|
|
| Jeff,
Thank you. Is there a similar element that will work with the Prophecy ASR? -Paul |
|
VoxeoDustin
|
|
| Hey Paul,
The GARBAGE special should work with Prophecy ASR without issue. Regards, Dustin |
|
steve33773
|
|
| In my prompt I will ask the caller for a 5-digit code they saw on a sign or in an ad. The code is printed in the format 21-354 (a two digit source code and a 3 digit property/product code separated by a dash).
Most callers respond with just the 5-digits but some say "two one DASH three five four". I am looking for responses of only the 5 digits spoken. Is there a simple way I can discard the spoken "dash" if the caller includes it in their response? |
|
VoxeoGarret
|
|
| Hey there,
You certainly can, you just need to work a little magic on the grammar itself. As you can see from one of our example grammars: [code] <?xml version= "1.0"?> <grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en-US" root = "MYRULE"> <rule id="MYRULE" scope="public"> <one-of> <item> <!-- optional utterance prefixes go here --> <!-- <item repeat="0-1">(some utterance)</item> --> <one-of> <item> gimli <tag> <![CDATA[ <F_1 "dwarves"> ]]> </tag> </item> <item> aragorn <tag> <![CDATA[ <F_1 "men"> ]]> </tag> </item> <item> legolas <tag> <![CDATA[ <F_1 "elves"> ]]> </tag> </item> <item> frodo <tag> <![CDATA[ <F_1 "hobbits"> ]]> </tag> </item> <item> rosie <tag> <![CDATA[ <F_1 "cave trolls"> ]]> </tag> </item> </one-of> <!-- optional utterance suffixes go here --> <item repeat="0-1"> baggins </item> <item repeat="0-1"> o donnell </item> </item> </one-of> </rule> </grammar> [/code] You can have an expect 2 digit input then the optional utterance of dash thrown in followed by the 3 final digits. Regards, Garrett King Customer Support Engineer Voxeo Corporation |
| login |
|