Improve recognition of names, product names, and industry terms with hotwords (instant or precompiled) and contextual biasing.
Choose an optimization method
Names, product names, and industry terms can sound like common words, resulting in homophones or incorrect spellings in transcripts. Hotwords and contextual biasing supply correct spellings or relevant background to help improve recognition.
Choose based on the information your application already has: use hotwords for a known list of terms, or contextual biasing for existing conversations or business descriptions. For hotwords, choose instant or precompiled lists depending on whether the same list needs to be reused across requests. Check Supported models and regions before use.
| Method | When to use | How to use |
|---|---|---|
| Instant hotwords | Names and terms change with each request, or you have a few temporary terms and do not need to store a list. | Include a term-to-weight object in each recognition request. The application supplies the correct spellings and can adjust how strongly the model favors each term through its weight. |
| Precompiled hotwords | You have a business glossary or repeatedly recognize the same set of terms and want to maintain one shared list. | Create a list of terms, weights, and optional languages, then reference its ID during recognition. Update the list when the glossary changes instead of resubmitting all entries in every request. |
| Contextual biasing | Your application already stores recent conversations, business descriptions, or domain text that can help recognition. | Send the relevant text as context messages with the audio. You do not need to extract individual terms or assign weights. Include the correct spellings of target terms. A known term list can also be used as hotwords to address the same type of error. |
Use hotwords
Before running the examples, download the sample audio and prepare an API key from the QwenCloud console. Audio text: “Please send the quarterly project report to Kelyra before Friday.”
Instant hotwords
Instant hotwords suit terms that change with each request. Set parameters.vocabulary to a JSON object whose keys are hotword strings and whose values are integer weights. You do not need to create a list first.
- Recognize the audio without hotwords Without hotwords, the name in this sample is not recognized accurately. The following request returns the unconfigured recognition result.
cURL
- Add instant hotwords to the request Add “Kelyra” to the same request with a weight of 4. Keep the other inputs unchanged. For weight ranges and tuning, see Adjust hotword weights.
cURL
| Configuration | Example transcript |
|---|---|
| Without configuration | Please send the quarterly project report to Kellira before Friday. |
| With configuration | Please send the quarterly project report to Kelyra before Friday. |
Precompiled hotwords
Precompiled hotwords suit business vocabularies that need to be reused across requests. Create a list in advance, then pass vocabulary_id during recognition instead of sending all entries again.
Submit entries as a JSON array when creating a list. Each entry has the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | An actual word in a language supported by the selected model. For length requirements, see Hotword text rules. |
weight | integer | Yes | Use 1–5 for regular hotwords, starting at 4. Some models also support a super hotword weight of 50. See Adjust hotword weights. |
lang | string | No | Language code that determines which language the entry applies to. Omit it if unknown. For its relationship with the recognition parameter language_hints, see Organize and maintain vocabularies. |
Hotword management and speech recognition must use the same account. Otherwise, recognition cannot access the vocabulary.
- HTTP / cURL
- SDK
-
Create a hotword list
This example uses
qwen-audio-3.1-asr-flashand specifies the target model throughtarget_model. Saveoutput.vocabulary_idfrom the response.
cURL
-
Check that the list is ready
Replace
<vocabulary_id>with the ID returned by the create request, then query the list. Proceed with recognition whenoutput.statusisOK.
cURL
-
Reference the list during recognition
Reference the list through
parameters.vocabulary_idin the recognition request. You do not need to send its entries again.
cURL
- Reuse or delete the list Later requests can continue using the same ID. Run the following delete request only when the list is no longer needed, to release its quota.
cURL
Use context enhancement
Contextual biasing can use existing conversation history or domain text directly. Hotwords require terms and weights, whereas context is sent as text messages without first turning business material into individual entries. Both methods can improve recognition of proper names. Choose based on the information available to your application.
Prepare context
For the sample audio, existing messages that spell the recipient’s name as “Kelyra” can provide its correct spelling. Two common sources of context are shown below.
- Business or domain text
- Conversation history
Use relevant text from an existing project description or domain material in a message with
role=user and type=input_text. You do not need to invent a conversation or add a reply. Pass the following array as context:The
assistant message is optional. Order conversation history by turn, placing each user message before its corresponding assistant message. For text-length and retained-turn limits, see Usage limits.Configure and call
Recognize the same audio with the prepared context. Choose a calling example by model family.
- Qwen-Audio-ASR
- Qwen-Audio-ASR-Message / Qwen-Audio-ASR-Streaming
- Qwen-Audio-ASR-Filetrans
This example uses
qwen-audio-3.1-asr-flash. Place context messages in order in input.messages, followed by the current audio message containing input_audio.cURL
| Configuration | Example transcript |
|---|---|
| Without configuration | Please send the quarterly project report to Kellira before Friday. |
| With configuration | Please send the quarterly project report to Kelyra before Friday. |
Tune and troubleshoot recognition
Compare the same audio before and after configuration, then adjust entries, weights, or context. Hotword tuning applies to both instant and precompiled hotwords.
Adjust hotword weights
Regular hotword weights range from 1 to 5. Start at weight=4. A higher weight increases preference for the word, but an excessive weight can replace similar-sounding words incorrectly.
| Weight | Preference | When to use |
|---|---|---|
| 1–2 | Slight | The term sounds like a common word and over-correction must be avoided |
| 3–4 | Moderate | Recommended starting configuration for most scenarios |
| 5 | Strong | Terms that appear frequently and are rarely confused with other words |
weight=50 to improve recall of target terms. Each vocabulary or request can contain at most 50 super hotwords.
Organize and maintain vocabularies
- Group by scenario: Create separate precompiled lists for different business scenarios, such as medical terminology and product names, to reduce unrelated entries.
-
Distinguish entry language from audio language: A precompiled vocabulary can mix languages, identified by
lang. The recognition parameterlanguage_hintsdeclares the audio language. When it is set, only hotwords in the matching language take effect; other languages are ignored. - Maintain regularly: Update entries as business needs change and delete unused lists to release quota.
Allow at least 5 minutes between hotword list updates; otherwise, updated hotwords might not take effect.
Troubleshoot recognition quality
First identify whether the issue is an ineffective configuration, excessive bias toward hotwords, or audio that is difficult to recognize. Then check the relevant items below.
| Symptom | Checks and actions |
|---|---|
| Hotwords are not recognized as expected | Check Supported models and regions first. Instant hotwords belong in parameters.vocabulary. For precompiled hotwords, check the account, vocabulary_id, status=OK, and whether the list’s target_model matches the recognition model.Increase the hotword weight within its supported range and compare results for the same audio to determine whether the weight was too low. |
| Other words are incorrectly replaced with hotwords | Reduce the hotword weight within its supported range and remove terms unrelated to the scenario. Check that lang matches the recognition API’s language_hints so that entries belong to the intended language. |
| Context does not improve target terms | Check the correct spellings, message roles, types, order, and the input field required by the API. Text beyond the length or turn limit can be truncated or discarded. See Usage limits. |
| Many ordinary words are also incorrect | Check that the audio format and sample rate meet the model requirements, and reduce background noise. For single-language audio, declare the language through the recognition API’s language_hints. For model selection and audio requirements, see Speech recognition overview. |
Supported models and regions
- Precompiled hotwords
- Instant hotwords
- Contextual biasing
- Singapore
- China North 2 (Beijing)
Hotwords are supported only in the primary workspace, not in sub-workspaces.
- Qwen-Audio-ASR: qwen-audio-3.1-asr-flash, qwen-audio-3.0-asr-flash
- Qwen-Audio-ASR-Streaming: qwen-audio-3.1-asr-flash-streaming, qwen-audio-3.0-asr-flash-streaming
- Qwen-Audio-ASR-Filetrans: qwen-audio-3.1-asr-flash-filetrans, qwen-audio-3.0-asr-flash-filetrans
- Qwen-Audio-ASR-Message: qwen-audio-3.1-asr-flash-message
- Fun-ASR-Realtime: fun-asr-realtime
- Fun-ASR-Flash: fun-asr-flash-2026-06-15
- Fun-ASR: fun-asr
Usage limits
- Hotword limits
- Hotword text rules
- Context limits
| Limit | Description |
|---|---|
| Number of hotword lists | Up to 50 precompiled vocabularies per account, shared across all models. Each vocabulary has a vocabulary_id. |
| Hotwords | Qwen-Audio-ASR-Message, Qwen-Audio-ASR-Streaming, Qwen-Audio-ASR-Filetrans, and Qwen-Audio-ASR series: up to 2000. Main-version models in the Fun-ASR-Realtime, Fun-ASR-Flash, and Fun-ASR series: up to 2000. Other models in these series and the Paraformer series: up to 500. Counts apply per vocabulary for precompiled hotwords and per request for instant hotwords. |
| Super hotwords | A maximum of 50 entries can have a weight of 50. |
For the Qwen-Audio-ASR-Message, Qwen-Audio-ASR-Streaming, Qwen-Audio-ASR-Filetrans, and Qwen-Audio-ASR series, when both precompiled and instant hotwords are configured, the service merges the two sets. If the merged set exceeds 2000 hotwords, it randomly selects 2000 to use.
Feature billing
Instant and precompiled hotword features are free. For model invocation charges when using hotwords or contextual biasing, see billing rules.
Related APIs
- For creating, querying, updating, and deleting hotword lists, see Hotword management API.
- Hotword management SDKs: Java SDK and Python SDK.
- Model invocation APIs: Qwen-Audio-ASR-Message client events, Qwen-Audio-ASR-Streaming client events, Qwen-Audio-ASR-Filetrans HTTP API, and Qwen-Audio-ASR HTTP API.