nuecho / rivr

Rivr is a lightweight open-source dialogue engine enabling Java developers to easily create enterprise-grade VoiceXML applications.
http://rivr.nuecho.com
Other
61 stars 23 forks source link

InterDigitTimeout property for multiple grammar files #30

Open Jayapriya97 opened 2 years ago

Jayapriya97 commented 2 years ago

Hi Team, I am keeping two grammar files to recognize digits in dtmf mode.

  1. GrammarItem 1 - to understand combination of 5 digits (0 to 9).
  2. GrammarItem 2 - to understand "1"

Currently, when I entered "12345", second grammar file recognizing this and proceeding as it starts with "1".Rest of the inputs working fine except starting with "1". Tried setting inter digit timeout as well, but not worked out in this case.

"dtmfRecognition.setInterDigitTimeout(Duration.seconds(2));"

Please help on this!

Jayapriya97 commented 2 years ago

Any solution to fix this?

gawi commented 2 years ago

See VoiceXML 2.0 spec, Appendix D. Timing Properties.

I'm not sur ewhy the engine returns immediately after 1 being pressed. It seems that the state (i.e. can terminate, must terminate) is evaluated on each grammar individually and not on the combination of all grammars.

You can try specifying a termchar (e.g. #) and a termtimeout.