Problems Loading or Using Grammars

When a grammar fails to load or activate, the logs are the fastest path to the cause. Grammar load failures are written to the Media Server log, each as a negative result code paired with a descriptive error string. If you are not seeing enough detail, raise the log verbosity and reproduce the problem so the full error string is captured. The scale and its direction depend on whether your application uses MRCP or gRPC; see Settings that differ between MRCP and gRPC.

The codes below identify the distinct failure classes you are most likely to encounter. Each entry explains what triggered the error and how to resolve it.

Syntax and compilation

  • -23 LV_GRAMMAR_SYNTAX_WARNING — A non-fatal syntax issue that did not prevent the grammar from compiling. Open the grammar in the Grammar Tester to see the specific warning.
  • -24 LV_GRAMMAR_SYNTAX_ERROR — A syntax error that prevented the grammar from compiling. Use the Grammar Tester to locate and correct it.
  • -25 LV_GRAMMAR_LOADING_ERROR — A generic load failure. Confirm the speech engine is running and that the grammar is valid and reachable.

Licensing and capacity limits

  • -33 LV_ACTIVE_GRAMMAR_VOCAB_SIZE_EXCEEDS_LIMIT — Tier 1 and Tier 2 licenses cap the total number of words allowed across all simultaneously active grammars. Either reduce the active vocabulary or move to a Tier 3 (or higher) license. Contact Technical Support or your account manager for details on licensing limits.
  • -41 LV_LICENSES_EXPIRED — Your software maintenance has expired, so the version of the ASR you are attempting to use is no longer licensed. Renew maintenance to restore access.

Language and acoustic models

  • -35 LV_ACTIVE_GRAMMAR_LANGUAGE_CONFLICT — More than one language is specified across your active grammars. The ASR can only use one language at a time, so ensure all active grammars share a single language.
  • -36 LV_ACTIVE_GRAMMAR_INVALID_LANGUAGE — A grammar specifies a language whose acoustic model is not installed, or for which no acoustic model exists. Install the required language model, or correct the language declared in the grammar.

Load timeouts and activation

  • -37 LV_LOAD_GRAMMAR_TIMEOUT — The grammar load exceeded the timeout configured in client_property.conf (LOAD_GRAMMAR_TIMEOUT, default 200 seconds). Only the largest and most complex grammars should trigger this; if it recurs, consider using precompiled grammars to avoid repeated compilation cost.
  • -44 LV_INVALID_GRAMMAR_LABEL — When activating a grammar, the label you specified does not match any loaded grammar. Verify that the activation label exactly matches the label the grammar was loaded under.

For codes that point to a grammar's contents — syntax warnings and errors in particular — the Grammar Tester in the Deployment Portal is the quickest way to reproduce the failure and pinpoint the offending line. It parses a grammar against the platform's ASR engine and reports warnings and errors directly. See the Portal Help Guide for a walkthrough.

Settings that differ between MRCP and gRPC

A grammar problem is sometimes a settings problem, and the same setting can have a different name, scale, or default depending on whether the request arrives over MRCP or gRPC. Check which interface your application uses before you change a value. The defaults below are the documented ones.

SettingMRCPgRPCWhat to watch
Logging verbosityLOGGING_VERBOSITY in client_property.conf, 1 to 4. 1 logs only errors and critical issues (the default), 3 is maximum, and 4 is diagnostic. A higher number logs more. Override it for one session with the logging-verbosity parameter (Vendor Specific Parameters).logging_verbosity: LOGGING_VERBOSITY_DEBUG (1) through LOGGING_VERBOSITY_CRITICAL (5). The default is LOGGING_VERBOSITY_INFO (2). A lower number logs more.The two scales run in opposite directions. To capture more detail, raise the number over MRCP and lower it over gRPC. More logging increases CPU usage, so return it to its normal value after you reproduce the problem.
Confidence thresholdconfidence_thrsld, 0 to 1, default 0.45 (Streaming Media Properties (MRCP)). The Confidence-Threshold header is 0.0 to 1.0 in MRCPv2; MRCPv1 examples use whole numbers such as 85 (Recognizer SET-PARAMS).confidence_threshold, an integer from 0 to 1000. The default is 0.The scales differ, so do not copy a value from one interface to the other. A result whose confidence is below the threshold is returned as no-match, so a threshold set too high looks like a grammar that never matches.
Decode timeoutDECODE_TIMEOUT in client_property.conf. The documented default is 20,000 ms (20 seconds).decode_timeout, in milliseconds. The documented default is 10,000,000 ms.The documented defaults differ by a factor of 500. If recognitions wait far longer than you expect, set the timeout explicitly instead of relying on the default.
Grammar load timeoutLOAD_GRAMMAR_TIMEOUT, default 200,000 ms (200 seconds).load_grammar_timeout_ms, default 200,000 ms. The range is 1,000 to 2,147,483,647.The same on both interfaces. This is the timeout behind error -37.

In a containerized installation, the services' own logs follow the cluster logging level (information, warning, error, or debug) set in values.yaml, which applies to the whole system. A deployment's level can be overridden in the portal. See Additional Recommended External Components. For every ASR setting and its range, see ASR & Transcription Settings Reference.

Related Articles


Was this article helpful?