Grammars for recognizing speech input

Mix supports uncompiled (.grxml) and precompiled (.gram) grammar file formats. Unless you have specified one or more base URLs for external grammars in your project configuration, grammar files must be placed in specific directories, relative to the client application, following this pattern:



  • basePath is the path where the client application expects to find all required language-specific material (audio files and grammars); for example, http://webserver:8080/myContent
  • language is a directory named after the appropriate short language code (for example, en-US, fr-CA)
  • The constant name grammars (this allows you to store audio files on the same server)
  • channel is the name of the channel with any non-alphanumeric characters stripped (for example, IVRVoiceVA, not IVR/Voice VA)
  • filename is the name of the external grammar file

The Dialog engine automatically appends the version query parameter, which refers to a specific dialog build deployment. (Mix generates a unique internal version number for each deployment.) Example: http://webserver:8080/myContent/en-US/grammars/IVRVoiceVA/myGrammar.grxml?version=1.0_12345689

In the absence of a new deployment, VoiceXML Connector lets you explicitly specify a resourceVersion parameter with an arbitrary value to make sure your VoiceXML application uses the latest version of a resource—in this case, a grammar—instead of any cached version. For more information, refer to the VoiceXML Connector documentation.