Phrase Lists
The most common accuracy complaint in free-form transcription is rarely about everyday speech. It is about the handful of words that matter most to your business: customer and place names, product names, drug names, and the jargon of your industry. The language model has seldom seen them, or assigns them such low probability that a similar-sounding common word wins. A phrase list is the targeted fix. You give the engine the terms that matter, optionally tell it how strongly to prefer them, and it leans toward them during transcription, with no model retraining.
Phrase lists or grammars? A phrase list biases free-form transcription toward your vocabulary and still returns whatever was said. A grammar restricts recognition to a defined set of utterances and returns a structured result. To combine them, see enhanced transcription in Transcription gRPC Integration. Phrase lists apply to transcription only; they are not used with grammar-based ASR.
When a phrase list helps
- Terms the model does not know or rarely sees. Uncommon proper names, location names, and other entity names often have poor recognition because they are missing from the language model or have very low probability.
- Specialized domains. Pharmaceutical and disease names in medical workflows are typical, because they are often absent from general modeling of a language.
- Choosing between similar words. If the engine consistently picks one of two similar words, but in your domain the other is correct, a phrase list shifts the choice.
A phrase list is a bias, not a guarantee, and it does not restrict what the engine can recognize. It can also add words and phrases that are missing from the engine’s vocabulary.
How phrase lists work
- A list can hold single words and multi-word phrases.
- You can use several lists at once, even in one request. For example, some lists can apply to the whole company and others to a single division. The platform combines them into one list for the interaction, and every unique word has its effect.
- A probability boost adjusts how strongly the engine prefers the listed terms. It affects every phrase in the list, and every list if you use several.
- Phrase lists are inherently language-independent. The language you give when loading a list only tells the platform which language-specific resource should process the load.
Phrase lists with gRPC
Phrase lists are optional on a transcription interaction. You can supply them at three levels, so a list that many requests share is loaded once.
| Level | How | When to use it |
|---|---|---|
| Interaction | List the phrases in the phrases field of interaction_create_transcription. Each entry holds a list of phrases, or a reference to a session or deployment list by label (session_phrase_list or global_phrase_list, each with a phrase_list_label). | Most applications. |
| Session | Load a list once with session_load_phrase_list, giving the phrases, a label, and a language. Every interaction in the session can reference it. | A list that many interactions in the same call reuse. |
| Deployment | Load a list with global_load_phrase_list on the global stream, giving the phrases, a label, a language, and optionally phrase_list_settings. Every session and interaction in the deployment can reference it. | A list that many sessions reuse, such as company-wide terms. |
The label field on the two load messages is named phrase_list_label in the API reference. A load returns a status and the label of the list. Once an interaction has begun processing, its phrase lists cannot be changed, so supply or load them first.
Example: load once, reuse, and boost
First, load a list at the session level:
| { "session_request": { "session_load_phrase_list": { "language": "en-US", "phrase_list_label": "billing-terms", "phrases": ["autopay", "escrow", "amortization"] } } } |
Then create a transcription interaction that uses that list, adds a few phrases of its own, and sets a boost:
| { "interaction_request": { "interaction_create_transcription": { "language": "en-US", "phrases": [ { "session_phrase_list": { "phrase_list_label": "billing-terms" } }, { "phrases": ["Acme Credit Union", "Tom Jones"] } ], "phrase_list_settings": { "probability_boost": 2 } } } } |
Field names are shown as they appear in the API reference. The values are illustrative. The phrase list settings are described in the ASR & Transcription Settings Reference.
Probability boost
The probability boost tells the engine how strongly to prefer the words in your lists. A positive value raises the likelihood that the phrases are recognized, and a negative value lowers it. Typically you want to raise it. The boost applies to all phrases in a list, and to all lists if you use more than one.
| Interface | Setting | Default | Range |
|---|---|---|---|
| gRPC | phrase_list_settings.probability_boost | 1 | Greater than 0, per the API reference |
| MRCP | LM_WORDLIST_PROBABILITY_BOOST (optional meta tag) | 0 | -10 to 5 |
Raise the boost gradually. A larger boost makes your listed terms more likely to appear in the transcript, including in places where a similar-sounding word was actually spoken. Start with the default, then adjust in small steps and test against representative audio. The right value is the one that fixes your misrecognitions without introducing false insertions.
Phrase lists with MRCP
MRCP has traditionally supported only grammar-based recognition, so free-form transcription is activated through a special grammar. This dummy grammar contains no real rules. It carries meta tags that switch the engine to transcription and mark the grammar’s contents as a phrase list.
| Meta tag | Value | Purpose |
|---|---|---|
TRANSCRIPTION_ENGINE | V2 | Activates transcription. |
LM_MODIFICATION_TYPE | WORDLIST | Tells the engine to treat the contents of the dummy grammar as a phrase list. |
LM_WORDLIST_PROBABILITY_BOOST | A number, for example 0 | Optional. Sets the probability boost for the phrase list. |
How the MRCP list is read
All the unique words and phrases in the dummy grammar become the phrase list that feeds the transcription engine. These rules apply:
- There is only one list.
- The order and the count of the phrases are ignored. In a regular grammar, order matters.
- A phrase in double quotes is treated as one item, not several words. If
"John Smith"is in the list,John Smithcan be matched, butJohnalone orSmithalone cannot be matched through the list.
Examples: a regular grammar and phrase-list grammars
The same three words, red, green, and black, can be written as a regular grammar or as a phrase list. A regular grammar needs one one-of item per choice. A phrase list can simply list the words. In each example, only the rule differs, so the document header is shown once at the end.
1. A regular grammar (for comparison, not a phrase list):
| <rule id="root" scope="public"> <one-of> <item>red</item> <item>green</item> <item>black</item> </one-of> </rule> |
2. A phrase list with space-delimited words. Each word is a separate entry:
| <rule id="root" scope="public"> <item>red green black</item> </rule> |
3. A phrase list with space-delimited phrases. The phrase red black is one entry, so it matches as a phrase, but red and black do not match by themselves through the list:
| <rule id="root" scope="public"> <item>"red black" green</item> </rule> |
4. A phrase list with one entry per line (recommended). Without the phrase list feature, this grammar would require the speaker to say every item in order. With it, each entry is matched on its own, so San Diego by itself, or mortgage by itself, can be matched:
| <rule id="root" scope="public"> <item> "San Diego" "New York" James "Tom Jones" mortgage </item> </rule> |
For a phrase list, avoid one-of. It is shown in the first example only for comparison. Put each phrase on its own line, with multi-word phrases in double quotes.
A complete phrase-list grammar
| <?xml version="1.0"?> <grammar xml:lang="en-US" version="1.0" root="root" mode="voice" xmlns="http://www.w3.org/2001/06/grammar" tag-format="semantics/1.0"> <meta name="TRANSCRIPTION_ENGINE" content="V2"/> <meta name="LM_MODIFICATION_TYPE" content="WORDLIST"/> <rule id="root" scope="public"> <item> "San Diego" "New York" James "Tom Jones" mortgage </item> </rule> </grammar> |
To add a probability boost, include the optional LM_WORDLIST_PROBABILITY_BOOST meta tag. Reference the grammar in your MRCP request as you would any other grammar. See Recognizer DEFINE-GRAMMAR and Recognizer RECOGNIZE. For other meta declarations, see Meta Data Within Grammars.
Tips for building a good list
- Keep it focused. Every unique word in every list has an effect, so add the terms that matter to your business and leave out the rest.
- Use one entry per line, and quote multi-word names. This keeps a name such as
Tom Jonestogether as one phrase. - Split lists by audience. With gRPC, keep company-wide terms in a deployment list and team-specific terms in session or interaction lists. The platform combines them for each interaction.
- Test with real audio. Measure the words you care about before and after, and adjust the boost in small steps.
Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| A term is still misrecognized | Raise the probability boost gradually, and confirm the term is in a list that the interaction actually uses. With gRPC, check the list was supplied or loaded before processing began. |
| Listed terms appear where they were not spoken | The boost is too high. Lower it. |
| A phrase list has no effect after the call started | Phrase lists cannot be changed after an interaction begins processing. Supply or load them first. |
| A referenced list is not found | Load the session or deployment list before you reference it, and check that the label matches. Remember that the load messages name the label field phrase_list_label. |
| MRCP: transcription does not start, or the list is ignored | Check that the dummy grammar has TRANSCRIPTION_ENGINE set to V2 and LM_MODIFICATION_TYPE set to WORDLIST. |
| MRCP: a first name alone is not matched | A quoted phrase is one item. Add the first name as a separate entry if you also want it matched by itself. |
| MRCP: only some of my lists are used | MRCP supports a single phrase list per request. Combine your terms into one dummy grammar. |
