Browse
 
Tools
Rss Categories

Grammar Cache Folders

Reference Number: AA-02128 Views: 166 0 Rating/ Voters

ASR performance relies heavily on caching compiled grammars. Since this can be a CPU intensive process, caching these grammars, both in memory and also on disk is an important aspect of getting optimal performance.

By default, the caching mechanism is enabled, and we do not recommend disabling it, or changing the default settings unless there is an obvious need to do so.

Whenever a grammar is compiled as part of the grammar loading process, it is stored temporarily in memory and a copy is also stored on disk. There are actually two copies stored on disk, in two different locations, which we call Client Cached Grammars and Cached Grammars


Client Cached Grammars

These cached files are associated with what we call the client-side, which is where the Speech Port is located (often within the LumenVox Media Server). These are stored in order to provide optimal performance for the client application, which can be an application using on of the LumenVox Speech Port APIs, or the LumenVox Media Server (which internally uses the Speech Port APIs).

This client-side cache differs from the ASR cache, since this may not be on the same machine as the ASR, and the internal structure is slightly different to that of the compiled ASR cached grammars. These cached grammars are stored in a location on the Client machine, as described below:

Windows Installations

On Windows installation, the Client Cached Grammars are located in the <LVLANG>\cached_client_grammars folder, where LVLANG is relative to wherever the client is installed on the target Windows machine. Typically, this may be located in the C:\Program Files\LumenVox\Engine\Lang folder unless otherwise specified during the installation process.

Linux Installations

On Linux installations, the Client Cached Grammars are located in the /var/lumenvox/cached_client_grammars folder.


Cached Grammars

As mentioned above, there is an additional level of grammar caching performed by the ASR, which may be on a different machine that the client-side code (API or Media Server), and also contains slightly different content to the client-side cached grammars.

These ASR cached grammars are stored in a location on the ASR machine, as described below:

Windows Installations

On Windows installation, the ASR cached grammars are located in the <LVLANG>\cached_grammars folder, where LVLANG is relative to wherever the ASR is installed on the target Windows machine. Typically, this may be located in the C:\Program Files\LumenVox\Engine\Lang folder unless otherwise specified during the installation process.

Linux Installations

On Linux installations, the ASR cached grammars are located in the /var/lumenvox/grammar_cache folder.


Clearing Cached Grammar Folders

Users may optionally clear these cached grammar folders if desired, which will remove all of the on-disk copies of those grammars.

Note that when clearing grammar folders, this does not clear any in-memory copies of cached grammars that may be written out to disk again the next time they are used, so if the desire is really to clear all cached grammars, both in-memory and on-disk, you should stop the LumenVox services, clear the folders, then restart the services. This will remove all cached grammars and force all grammars to be recompiled whenever they are next encountered.