Model Studio speech recognition offers two ways to improve the recognition accuracy of specialized terms, product names, and other domain-specific vocabulary: custom hotwords and context enhancement. This topic describes the scope and usage of each approach.
Overview
Some business terms, such as product names, proper nouns, and industry jargon, are absent from a model's general vocabulary and are therefore recognized less accurately. Model Studio speech recognition provides three ways to improve the recognition of such terms: precompiled hotwords, instant hotwords, and context enhancement.
Precompiled hotwords vs. instant hotwords vs. context enhancement
Custom hotwords come in two forms: precompiled hotwords and instant hotwords. The following table compares the three approaches, which apply to different models and APIs:
Dimension | Precompiled hotwords | Instant hotwords | Context enhancement |
|---|---|---|---|
How it works | Create a weighted vocabulary in advance. The model raises the match probability of these words during decoding. | Pass weighted hotwords inline with the request. The model raises their match probability during decoding. | Pass conversation history or domain text. The model uses this context to correct recognition results. |
Supported models | |||
When to use | The vocabulary is known and relatively stable, and you need to reuse the same word list across requests (for example, product names or medical terms). | Temporary, session-level hotwords that don't need to be reused across requests (for example, a person's name or an ad hoc term used in a single session). | The vocabulary changes dynamically during a conversation, or you need context to help the model understand proper nouns (for example, attendees in meeting minutes or business terms in customer-service conversations). |
How to configure | Create a hotword list in advance and pass its list ID when you make a call. | Pass | Pass conversation history or domain text with each request. For non-real-time recognition, use |
Prerequisites
- An API key is Obtain an API key and configured as an environment variable.
- To call the service through the DashScope SDK, install the latest SDK.
Precompiled hotwords
Create a hotword list in advance, obtain its list ID, and pass that ID during recognition. This approach suits scenarios where the vocabulary is known and relatively stable and you need to reuse the same word list across requests, such as product names or medical terms. If you need to update a hotword list, wait at least 5 minutes between updates. Otherwise, the updated hotwords may not take effect.
Supported models and regions
- Singapore
- China (Beijing)
-
Real-time speech recognition:
- Qwen-Audio-3.0-ASR-Flash-Streaming: qwen-audio-3.0-asr-flash-streaming
- Fun-ASR-Realtime: fun-asr-realtime, fun-asr-realtime-2025-11-07
-
Non-real-time speech recognition:
- Qwen-Audio-3.0-ASR-Flash-Filetrans: qwen-audio-3.0-asr-flash-filetrans
- Qwen-Audio-3.0-ASR-Flash: qwen-audio-3.0-asr-flash
- Fun-ASR-Flash: fun-asr-flash-2026-06-15
- Fun-ASR: fun-asr, fun-asr-2025-11-07, fun-asr-2025-08-25, fun-asr-mtl, fun-asr-mtl-2025-08-25
Quick start
Workflow
Create a hotword list first, then reference its ID during speech recognition:
- Create a hotword list. Call the create-hotword-list API. You must specify target_model (targetModel in Java) to indicate which speech recognition model the list belongs to. If you already have a hotword list (which you can check through the list-all-hotword-lists API), skip this step.
- Call the speech recognition API and pass the hotword list ID. The model used for recognition must match the target_model (targetModel in Java) specified when the list was created. Otherwise, the hotwords don't take effect.
Sample code
An end-to-end example: create a hotword list, run speech recognition, and delete the list.
Hotword format
Submit hotwords as a JSON array, where each element defines a single hotword and its attributes.
Example: Improve the recognition accuracy of movie titles.
Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The hotword text. It must be an actual word rather than an arbitrary string of characters, and its language must be within the range supported by the selected model. For length limits, see Hotword text rules. |
weight | int | Yes | The hotword weight. Valid values: [1, 5]. Recommended: 4. A higher weight makes the model more likely to output the word. The Qwen-Audio-3.0-ASR-Flash-Streaming, Qwen-Audio-3.0-ASR-Flash-Filetrans, and Qwen-Audio-3.0-ASR-Flash model series also support |
lang | string | No | The language code that limits the language the hotword applies to. You can omit it when the language is unknown. Note: |
Instant hotwords
Instant hotwords are passed as vocabulary key-value pairs directly in the recognition request. They are essentially a set of weighted hotwords, the same as the word list used by precompiled hotwords, except that they are passed inline with the request and require no precreated list. This suits temporary, session-level hotword tuning.
Supported models and regions
- Singapore
- China (Beijing)
-
Real-time speech recognition:
- Qwen-Audio-3.0-ASR-Flash-Streaming: qwen-audio-3.0-asr-flash-streaming
-
Non-real-time speech recognition:
- Qwen-Audio-3.0-ASR-Flash-Filetrans: qwen-audio-3.0-asr-flash-filetrans
- Qwen-Audio-3.0-ASR-Flash: qwen-audio-3.0-asr-flash
Quick start
Pass vocabulary in the parameters of the recognition request. No hotword list is required. For detailed usage of each API, see the API reference under Speech-to-text.
Example (non-real-time speech recognition):
Hotword format
Pass instant hotwords as a JSON object (key-value pairs): the key is the hotword text (string), and the value is the hotword weight (integer). For hotword text rules, see Hotword text rules.
Example:
Hotword tuning and rules
The following hotword text rules and tuning tips apply to both precompiled and instant hotwords.
Hotword text rules
A hotword must be an actual word. The following length limits apply:
-
With non-ASCII characters: The total character count (the sum of non-ASCII characters such as Chinese characters, Japanese kana, Korean hangul, and Cyrillic letters, plus any ASCII characters) must not exceed 15.
Examples:
- ✅
"厄洛替尼盐酸盐"(7 characters) - ✅
"EGFR抑制剂"(7 characters, where EGFR counts as 4 ASCII characters) - ✅
"こんにちは"(5 characters) - ✅
"Фенибут Белфарм"(15 characters, including the space in the middle) - ❌
"Клофелин Белмедпрепараты"(24 characters)
- ✅
-
With ASCII characters only: After splitting on spaces, the number of segments must not exceed 7.
Examples:
- ✅
"Exothermic reaction"→ 2 segments - ✅
"Human immunodeficiency virus type 1"→ 5 segments - ❌
"The effect of temperature variations on enzyme activity in biochemical reactions"→ 11 segments
- ✅
Adjust hotword weights
The weight controls how strongly the model prefers a hotword. Setting it appropriately improves the recognition accuracy of target words while avoiding misrecognition.
Weight | Effect | When to use |
|---|---|---|
1–2 | Slight preference | The hotword sounds similar to a common word, and you need to avoid over-correction. |
3–4 | Clear preference (recommended) | The best starting value for most scenarios. |
5 | Forced preference | The word appears frequently in the audio and is unlikely to be confused with other words. A weight that's too high can cause similar-sounding words to be misrecognized as the hotword. |
weight=4 and adjust based on the results.
Super hotwords (weight=50): Both precompiled and instant hotwords support super hotwords, but only the Qwen-Audio-3.0-ASR-Flash-Streaming, Qwen-Audio-3.0-ASR-Flash-Filetrans, and Qwen-Audio-3.0-ASR-Flash model series do. A weight of 50 greatly improves recall. You can have at most 50 super hotwords.
Design recommendations
- Group by scenario: Organize hotwords separately for different business scenarios (for example, one group for medical terms and another for product names) to simplify maintenance and reuse. For precompiled hotwords, create a separate hotword list for each scenario.
- Mix languages (precompiled hotwords): A single hotword list can mix hotwords in different languages, distinguished by the
langfield. When you specifylanguage_hintsduring recognition, only hotwords in that language take effect. - Clean up regularly (precompiled hotwords): Delete hotword lists you no longer use to free up your quota (up to 10 per account).
Hotword limits and billing
Limit | Description |
|---|---|
Number of hotword lists (precompiled hotwords) | A hotword list is a persistent word list created in advance for precompiled hotwords (each list corresponds to one vocabulary_id). You can have up to 10 lists per account, shared across all models. |
Maximum number of hotwords (precompiled / instant hotwords) | The maximum number of hotwords depends on the model used for recognition:
For precompiled hotwords, the count is per hotword list. For instant hotwords, the count is per request. |
Number of super hotwords (precompiled / instant hotwords) | You can have up to 50 super hotwords (weight 50). |
Billing | Both precompiled and instant hotwords are free. |
Context enhancement
Supported models and regions
- Singapore
- China (Beijing)
-
Real-time speech recognition:
- Qwen-Audio-3.0-ASR-Flash-Streaming: qwen-audio-3.0-asr-flash-streaming
- Fun-ASR-Realtime: fun-asr-realtime, fun-asr-realtime-2025-11-07
-
Non-real-time speech recognition:
- Qwen-Audio-3.0-ASR-Flash-Filetrans: qwen-audio-3.0-asr-flash-filetrans
- Qwen-Audio-3.0-ASR-Flash: qwen-audio-3.0-asr-flash
- Fun-ASR-Flash: fun-asr-flash-2026-06-15
Quick start
Context enhancement requires no precreated resources. Pass the context parameters directly in the recognition request:
- Non-real-time speech recognition: Pass context messages in
input.messagesof the HTTP request, placed before the audio message. - Real-time speech recognition: Pass context messages in
input.contextof the WebSocketrun-taskevent. To update the context while the task runs, send acontinue-taskevent. The DashScope SDK wraps this protocol, so you can pass the context directly through a parameter.
- Non-real-time speech recognition
- Real-time speech recognition
input.messages. The user role with the input_text type passes the recognition results from previous turns or a domain-related word list, and the assistant role passes the model replies from previous turns (optional). Place context messages before the audio message. For details, see Non-real-time speech recognition (Qwen-Audio-3.0-ASR-Flash/Fun-ASR-Flash).Pass the recognition results from previous turns (user / input_text) and the model replies (assistant / text). To pass only domain terms or a word list, omit the conversation history (the assistant messages).Example
The text field of the context accepts a flexible format—a word list, a natural-language paragraph, or a mix of both—and is highly tolerant of irrelevant text.
The correct recognition result for an audio clip should be "How many of the insider jargon terms in the investment banking world do you know? First, the nine major foreign investment banks—Bulge Bracket, BB ...".
Without context enhancement Without context enhancement, some investment-bank names are recognized incorrectly. For example, "Bird Rock" should be "Bulge Bracket". Recognition result: "How many of the insider jargon terms in the investment banking world do you know? First, the nine major foreign investment banks—Bird Rock, BB ..." | With context enhancement With context enhancement, the investment-bank names are recognized correctly. Recognition result: "How many of the insider jargon terms in the investment banking world do you know? First, the nine major foreign investment banks—Bulge Bracket, BB ..." |
text field of the context.
API reference
- Precompiled hotword API reference
- Real-time speech recognition - Qwen-Audio-ASR-Streaming/Fun-ASR-Realtime API reference
- Real-time speech recognition - Qwen-ASR API reference
- Real-time speech recognition - Paraformer API reference
- Non-real-time speech recognition - Qwen-Audio-ASR-Filetrans/Fun-ASR API reference
- Non-real-time speech recognition - Qwen-Audio-ASR/Fun-ASR-Flash API reference
- Non-real-time speech recognition - Qwen-ASR API reference
- Non-real-time speech recognition - Paraformer API reference
FAQ
Q: Recognition doesn't improve after setting hotwords?
Check the following in order:
- Model match (precompiled hotwords): The
target_modelspecified when you created the hotword list must match the model used by the speech recognition API. When the two don't match, the API doesn't return an error and recognition still returns results, but the hotwords don't take effect. When the results miss the expected hotwords, check this first. - Model support
- Weight: Raise the weight from 4 to 5 and observe the effect. If similar-sounding words are misrecognized as the hotword, revert to 4.
- Hotword list status (precompiled hotwords): Use the query API to confirm that
statusisOK.
Q: Are precompiled hotwords used the same way in real-time and non-real-time speech recognition?
They are created the same way but called differently:
- Real-time speech recognition: Pass
vocabulary_idin the Recognition or WebSocket connection parameters. - Audio file transcription: Pass
vocabulary_idin the Transcription request parameters.
target_model must match the speech recognition model you actually call. Instant hotwords require no list and no target_model; just pass vocabulary key-value pairs in the request parameters. For the Qwen-Audio-3.0-ASR-Flash-Streaming, Qwen-Audio-3.0-ASR-Flash-Filetrans, and Qwen-Audio-3.0-ASR-Flash model series, which support instant hotwords, the system merges precompiled and instant hotwords when both are configured. If the merged set contains more than 2,000 hotwords, the system randomly selects 2,000 to use.
Q: Besides hotwords and context enhancement, what other ways can improve recognition accuracy?
You can also optimize in the following ways:
- Audio quality: Match the sample rate to the model's requirement (16 kHz or 8 kHz) and reduce background noise.
- Choose the right model: Different scenarios call for different models. For details, see the Speech-to-text selection guide.
- Specify the language: Declare the audio language through
language_hintsto improve accuracy in single-language scenarios.