Search code examples
voicexml

How to implement a VoiceXML Grammar Parser


I am trying to build a Standalone VoiceXML parser which accepts the input as the example below

<grammar version="1.0" root="ROOT" mode="dtmf">
  <rule id="ROOT">
    <one-of>
      <item> 1 </item>
      <item> 2 </item>
      <item> 3 </item>
      <item> 4 </item>
      <item> 5 </item>
      </one-of>
  </rule>
</grammar>

It is easy to write a specific parser for that specific grammar specification. However, I want to have a generic solution/algorithm which can parse/interpret all possible DTMF grammar cases.

I appreciate any help.

Thanks, -Toan.


Solution

  • There is a very good open source which implements a VXML interpreter. It is JVoiceXML at http://jvoicexml.sourceforge.net/

    It also includes a VXML grammar validation engine. I think this is what I am looking for.