tags:

views:

87

answers:

2

I'm writing a VoiceXML application where we have a speech grammar and a DTMF grammar. If the caller is calling from a particularly noisy environment, we need to disable the speech grammar. Is there a way to do this which doesn't involve copying the entire form into another form and deleting the speech grammar?

+2  A: 

What you're looking for is probably the inputmodes property:

<property name="inputmodes" value="dtmf"/>

This will enable the DTMF grammar while the voice grammar is disabled.

Ates Goral
A: 

You don't mention which platform(s) you're using, but it's important because this is one of those areas where you have variation between platforms.

Section [3.1.4][1] of the VoiceXMl 2.0 spec says that inputmodes="dtmf" does not de-activate speech grammars, but merely makes it impossible for them to be matched. So, if you turn off the speech recognition grammars, you would hope that the end pointer wouldn't allow speech bargein, but it isn't necessarily forbidden by the spec.

Barring any platform-specific extensions you can use, you might also consider the sensitivity property. Setting that to 0 should make the ASR stop listening for speech.

You could also try setting the bargeintype property to "hotword", if your platform supports it. This won't disable the speech grammars, but it will make it less likely that users won't hear the prompts due to noise-related bargein which is sometimes enough to make the application work.