Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<form id="place_order">
<grammar mode="voice" src="sample.jsgf"/>
<catch event="nomatch noinput">
<audio src="wav/04.wav">sorry, i didn't catch that.</audio>
<reprompt/>
</catch>
<!-- designates the initial state in a mixed initiative dialog -->
<initial name="init">
<prompt>
<audio src="wav/03.wav">
Please place your order.
</audio>
</prompt>
<catch event="nomatch noinput">
<audio src="wav/04.wav">sorry, i didn't catch that.</audio>
<audio src="wav/11.wav">
Please place your order.
</audio>
</catch>
<catch event="nomatch noinput" count="2">
<audio src="wav/04.wav">sorry, i didn't catch that.</audio>
<assign name="init" expr="true"/>
<reprompt/>
</catch>
<help>
<audio>
To place an order your must specify what you would like to eat or drink.
</audio>
<audio>
For example you can say tea or pizza.
</audio>
</help>
</initial>
<!-- retrieve origin in case it didn't happen in initial state -->
<field name="maindish" slot="food">
<prompt>
<audio src="wav/06.wav">What is your main dish.</audio>
</prompt>
</field>
<!-- retrieve destination in case it didn't happen in initial state -->
<field name="beverage" slot="drink">
<prompt>
<audio src="wav/08.wav"> What would you like to drink? </audio>
</prompt>
</field>
<!-- confirm origin and destination -->
<field name="confirm" type="boolean">
<audio src="wav/10.wav">
Okay! Your order was
</audio>
<prompt>
<value expr="maindish"/>
</prompt>
<audio src="wav/05.wav"> and </audio>
<prompt>
<value expr="beverage"/>
</prompt>
<audio>is that correct?</audio>
<catch event="nomatch noinput">
Sorry I didn't get that.
<reprompt/>
</catch>
</form>
</vxml>
Code: Select all
( pizza {food=pizza;} | burger {food=burger;} | wings {food=wings;} ) [ and ( coke {drink=coke;} | tea {drink=tea;} ) ]
Wed 28 Jul 2004 05:41:45 PM EDT (000009;001;1091050784) [log] EVENT: Saved utterance 0 for DNIS 5845 on channel 1
Wed 28 Jul 2004 05:41:45 PM EDT (000009;001;1091050784) [rec] DEBUG: SPEECH/DTMF inputmode, no DTMF input, ASR match: filled
Wed 28 Jul 2004 05:41:45 PM EDT (000009;001;1091050784) [rec] EVENT: Found grammar match
Wed 28 Jul 2004 05:41:45 PM EDT (000009;001;1091050784) [rec] EVENT: hypothesis #1: {food: pizza} and {drink: coke}
Wed 28 Jul 2004 05:41:45 PM EDT (000009;001;1091050784) [vxi] DEBUG: VXI::do_recognition - have an answer
Wed 28 Jul 2004 05:41:45 PM EDT (000009;001;1091050784) [vxi] DEBUG: VXI::ProcessRecognitionResult()
Wed 28 Jul 2004 05:41:45 PM EDT (000009;001;1091050784) [jsi] ERROR: errmsg ReferenceError: food is not defined line 1 linetxt tokentxt
Wed 28 Jul 2004 05:41:45 PM EDT (000009;001;1091050784) [vxi] EVENT: received event: error.semantic.ecmascript