I don't know if I could get an answer here... The problem I am trying to solve is: The system listens to the user's input,judge if the user's input contains the word "loop".

Does VoiceXML support grammars for this kind of task? It seems that it can only pick up word from words listed. The user can say: using a loop, loop, for loop, looping through the array...... Is there a way for me to only consider if the sentence contains "loop"?

Thanks in advance.

有帮助吗?

解决方案

You can create your own grammer and attach to your field:

<field name="loopField">
    <prompt>What's your way to say loop?</prompt>
    <grammar src="mygrammar.gram" type="application/srgs+xml" />
    <help> Please say your employee number. </help>
</field>

See more on W3C grammar here

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top