When a Blueworx Voice Response VoiceXML application accesses speech technologies for voice recognition and text to speech (TTS), the proper set up of grammar fetch / cache is critical to application performance.
The default mechanism for accessing grammars when using Blueworx Voice Response/WebSphere Voice Server and VoiceXMl 2.x is for the Blueworx Voice Response VoiceXML browser to fetch the grammar from either a web server or a file based on the URI referenced in the <grammar> tag, and pass the fetched document in-line within the speech request to WebSphere Voice Server. When WebSphere Voice Server receives the grammar it will compile the grammar as an in-line grammar ready for use for the next recognition request.
This mechanism works well when used for small numbers/sizes of grammars and was intended for use with earlier releases of WebSphere Voice Server, which did not contain the current levels of caching capabilities and caching policies. The problem with the solution is that speech server does not cache the grammars, so the grammars are recompiled for each recognition request. This is not normally a problem when used with smaller grammars, but can cause performance overheads when used with larger, more complex grammars.
This mechanism remains the default to ensure compatibility with earlier speech technologies.
The recommended behavior when using current speech technologies utilizing MRCP V1.0 such as WebSphere Voice Server 5.1.x, Nuance Speech Server version 5.1, or Loquendo Speech Server V7 is to move the grammar fetch responsibility from Blueworx Voice Response to the MRCP speech server. This mechanism improves performance for large grammars because:
wvr.vxml2.grammar.fetch.external =false
Blueworx Voice Response supports the storage of grammar files on a web server ( http:// ) or on the local file system (file:// ) if the content of the grammar files is likely to be static. The preferred mechanism for retrieving grammar files is to use a web server because:
WebSphere Voice Server only supports the use of grammars referenced on a web server ( http:// ). Although it will except and fetch documents with a file:// URI reference, it will log this as a warning that the application has an error, The use of the file:// reference may provide I/O restrictions that can impact a real time system and is therefore viewed as unsupported by WebSphere Voice Server support.
It is also IBM’s recommendation not to use relative URI references, especially when files are retrieved from more than one source as it becomes difficult to resolve the absolute reference for the document to be fetched. A location that is relative to the Blueworx Voice Response VoiceXML browser may well differ from the relative directory used by the WebSphere Voice Server server.