Removing grammar list resource does not remove in VoCon V3 context
Last reviewed: 11/7/2010
PRB Article ID: P111005
The information in this article applies to:
- SpeechKit 6
Symptoms
Updating a dynamic grammar list of phrases by disabling the grammar, removing the list resource, creating a new list resource, adding new phrases, enabling the gramar, and enabling the new list does not remove the original phrases from context in VoCon V3.
Cause
Disabling the grammar automatically disables the list. However, the grammar name used when disabling the list was incorrect when referencing the context to remove the phrases.
The steps to change the list of values in a dynamic vocabulary are:
- // Disable the vocabulary
ChantSR.DisableResource(CSRGrammarVocab, VocabID) - // Remove list resource
ChantSR.RemoveResource(CSRVocabList, ListID) - // Define list resource
ListID = ChantSR.DefineResource(CSRVocabList, "rulelistname", CRFNone, NULL, NULL, 0, VocabID) -
// Add phrases
ChantSR.AddResource(CSRVocabPhrase, ListID, "Log Call")
ChantSR.AddResource(CSRVocabPhrase, ListID, "Enter Time")
ChantSR.AddResource(CSRVocabPhrase, ListID, "Schedule Meeting") - // Enable the vocabulary
ChantSR.EnableResource(CSRGrammarVocab, VocabID) - // Enable the list
ChantSR.EnableResource(CSRVocabList, ListID)
Status
Fixed in SpeechKit build 6.0.9.0.
Component Formats Impacted
All component formats.