Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <vxml version="2.1">
- <form id="parrot">
- <block>
- You can start speaking any time.
- </block>
- <field name="main">
- <nomatch>
- Your response was out of grammar. Would you like to hear the weather, get sports news or hear a stock quote? Say quit to exit.
- </nomatch>
- <noinput>
- I could not hear you. Would you like to hear the weather, get sports news or hear a stock quote? Say quit to exit.
- </noinput>
- <prompt>
- Would you like to hear the weather, get sports news or hear a stock quote? Say quit to exit.
- </prompt>
- <grammar src="file:///work/zanzibar/src/main/voicexml/parrot.gram" type="application/x-jsgf"/>
- <filled>
- <prompt> <value expr="main"/> </prompt>
- <if cond="main=='quit'">
- <exit/>
- <else/>
- <clear namelist="main"/>
- <reprompt/>
- </if>
- </filled>
- </field>
- <block>
- Goodbye.
- </block>
- </form>
- </vxml>
- #JSGF V1.0;
- /**
- * JSGF Grammar for demo examples
- */
- grammar example;
- public <main> = ( [ <pre> ] ( <weather> {WEATHER} | <sports> {SPORTS} | <stocks> {STOCKS} ) ) | <quit> {QUIT};
- <pre> = ( I would like [ to hear ] ) | ( hear ) | ( [ please ] get [ me ] ) | ( look up );
- <weather> = [ the ] weather;
- <sports> = sports [ news ];
- <stocks> = ( [ a ] stock ( quote | quotes ) ) | stocks;
- <quit> = exit | goodbye | quit;
Advertisement
Add Comment
Please, Sign In to add comment