Non-real-time speech recognition models convert recorded audio into text. They support multilingual recognition, singing recognition, noise rejection, and speaker diarization, which makes them suitable for meeting transcription, call analysis, subtitle generation, and similar scenarios.
Overview
Transcribe recorded audio and video files in batches through asynchronous tasks.
- Context enhancement improves recognition accuracy through configurable context.
- Custom hotwords improve the recognition accuracy of proper nouns through a preset word list.
- Configurable features include speaker diarization, sensitive-word filtering, and sentence-level or word-level timestamps.
- Asynchronous transcription supports a single audio file of up to 12 hours in duration and up to 2 GB in size.
- Any sample rate is supported, along with mainstream audio and video formats such as AAC, WAV, and MP3.
Prerequisites
- You have obtained an API key and set it as an environment variable.
- To call the API through the DashScope SDK, install the latest SDK.
Quick start
The following examples use
qwen-audio-3.1-asr-flash-filetrans and qwen-audio-3.1-asr-flash. The former uses asynchronous calls: set X-DashScope-Async: enable when submitting a request, and then query the task result. The latter uses synchronous calls and supports streaming or non-streaming output.If you call a dedicated deployment of the model service and receive the error current user api does not support asynchronous calls, the deployment supports synchronous calls only. Change the request header to X-DashScope-Async: disable and keep the rest of the call unchanged.- Qwen-Audio-ASR-Filetrans
- Qwen-Audio-ASR
Because audio and video files can be large, the file transcription API uses asynchronous calls: submit a task, poll the query API for its status, and retrieve the recognition result after the task completes.
- cURL
- Python
- Java
When you call the API with cURL, first submit the task to get a
task_id, and then query the task result by using that ID.- Submit a task
- Get the task result
- Download the recognition result
The complete recognition result is printed to the console in JSON format. It contains the transcribed text along with each segment's start and end time in the audio or video file, in milliseconds.
The complete recognition result is printed to the console in JSON format. It contains the transcribed text along with each segment's start and end time in the audio or video file, in milliseconds.
- Recognition result
Advanced features
Process long audio files
Non-real-time speech recognition supports asynchronous transcription of long audio files. This suits scenarios such as meeting minutes, interview transcripts, and call playback.
Limitations:
- Qwen-Audio-ASR-Filetrans/Fun-ASR / Qwen3-ASR-Filetrans / Paraformer: a single audio file can be up to 2 GB in size and 12 hours in duration.
- Qwen-Audio-ASR / Fun-ASR-Flash: a single audio file can be up to 2 GB in size and 5 minutes in duration.
- Qwen3-ASR-Flash: a single audio file can be up to 10 MB in size and 5 minutes in duration. For longer audio, use Qwen-Audio-ASR-Filetrans.
- When speaker diarization is enabled: keep the audio duration within 2 hours. Longer audio may cause recognition failures or timeouts. For more information, see Speaker diarization.
- Submit the transcription task and get a
task_id. - Poll the query API for the task status, or use the SDK's wait method to block until the task completes.
- After the task completes, download the recognition result JSON from the returned URL.
Streaming output
Qwen-Audio-ASR/Fun-ASR-Flash/Qwen3-ASR-Flash support streaming output: they return intermediate results as recognition proceeds. This suits scenarios that need real-time progress feedback. For the HTTP SSE request and response format for Qwen-Audio-ASR and Fun-ASR-Flash, see Qwen-Audio-ASR HTTP API and Fun-ASR-Flash HTTP API.
Asynchronous transcription models such as Qwen-Audio-ASR-Filetrans, Fun-ASR, Qwen3-ASR-Filetrans, and Paraformer do not support streaming output. Get the final result by polling the task (for more information, see Process long audio files).
How to enable:
- DashScope Python SDK: set the
streamparameter toTrue. - DashScope Java SDK: call the
streamCallAPI. - DashScope HTTP: set the
X-DashScope-SSEheader toenable.
Improve accuracy with hotwords
Hotwords improve recognition accuracy for domain-specific proper nouns such as names, place names, and product names. For details on how to create and use hotwords, see Improve recognition accuracy.
Different SDKs use different naming conventions for these parameters, such as dictionary keys, object properties, or methods. For the full field mapping, see the API reference for each SDK.
Improve accuracy with context enhancement
Context enhancement passes the conversation history to the ASR model, which significantly improves transcription accuracy for proper nouns. For details on how to use this feature and for example results, see Context enhancement.
Text polishing and dialect expressions
qwen-audio-3.1-asr-flash applies native text polishing that removes filler words, repetitions, and self-corrections from spoken language to make the transcription more readable.
qwen-audio-3.1-asr-flash and qwen-audio-3.1-asr-flash-filetrans transcribe dialects into Mandarin text by default. To keep dialect-specific expressions, set keep_dialect: true.
Speaker diarization
qwen-audio-3.1-asr-flash enables speaker diarization with speaker_diarization_enabled. For its parameters and response structure, see HTTP API.
Speaker diarization automatically identifies different speakers in the audio and labels each sentence in the transcription result with a speaker tag. This suits scenarios such as multi-party meetings and interview recordings.
The following configuration and example apply to: the Qwen-Audio-ASR-Filetrans, Fun-ASR, and Paraformer series models.
How to enable: set the diarization_enabled parameter to true in the API request. In the result, each sentence includes a speaker_id field that identifies the speaker.
Example return structure (excerpt):
When speaker diarization is enabled, keep the audio duration within 2 hours. Longer audio may cause recognition failures or timeouts. For the audio length limits when diarization is disabled, see Process long audio files. Speaker diarization supports mono audio only. When speaker diarization is enabled for
qwen-audio-3.1-asr-flash, keep_dialect and language_hints have no effect.Sensitive word filtering
Sensitive word filtering replaces or removes sensitive words in the recognition result. This suits scenarios such as customer service quality inspection, content compliance, and subtitle moderation.
Supported models: the Qwen-Audio-ASR-Filetrans, Fun-ASR, and Paraformer series models.
Default behavior: when the special_word_filter parameter is not passed, the system uses its built-in sensitive word list. Matched words are replaced with an equal-length string of *.
Custom configuration: special_word_filter is a JSON string (the rule object serialized) with three subfields:
filter_with_signed.word_list: a string array of sensitive words to replace with an equal-length string of*. For example, with["test"], "Please help me test this" becomes "Please help me **** this".filter_with_empty.word_list: a string array of sensitive words to remove entirely from the result. For example, with["start"], "Is the game about to start now" becomes "Is the game about to now".system_reserved_filter: a boolean value that defaults totrue. It controls whether to also apply the system's built-in sensitive word list, which takes effect together with your custom list.
Get timestamps
For timestamp stability and field paths in Flash streaming responses, see Qwen-Audio-ASR HTTP API and Fun-ASR-Flash HTTP API.
Non-real-time speech recognition can output timestamps in the transcription result, which helps with subtitle generation, keyword highlighting, and audio/video editing. Qwen-Audio-ASR-Filetrans, Qwen-Audio-ASR, Fun-ASR, Fun-ASR-Flash, Qwen3-ASR-Filetrans, and Paraformer all support timestamps, but the default behavior and control method differ by model:
- Qwen-Audio-ASR-Filetrans/Qwen-Audio-ASR/Fun-ASR/Fun-ASR-Flash/Paraformer: timestamps are permanently enabled and cannot be turned off.
- Qwen3-ASR-Filetrans: only the DashScope asynchronous call supports timestamps, and timestamps are permanently enabled. Use the
enable_wordsrequest parameter to control the timestamp level: set it tofalse(default) to return sentence-level timestamps, ortrueto return word-level timestamps. Word-level timestamps support only the following languages: Chinese, English, Japanese, Korean, German, French, Spanish, Italian, Portuguese, and Russian. Accuracy is not guaranteed for other languages.
- Sentence level:
sentences[].begin_timeandsentences[].end_timemark the start and end time of each sentence in the audio. - Word level: the
sentences[].words[]array, where each element containsbegin_time,end_time, andtext(the text of that word).
The in-audio timestamp is a millisecond integer (such as
100). Do not confuse it with the task-level end_time (the task completion time, a string date such as "2024-09-12 15:11:40.903"). These are different fields.Apply in production
When you apply non-real-time speech recognition in production, the following best practices improve recognition quality and system stability.
High-concurrency scenarios: use callbacks instead of polling
For asynchronous transcription tasks (Qwen-Audio-ASR-Filetrans, Fun-ASR, Qwen3-ASR-Filetrans, and Paraformer), you submit the task through POST /api/v1/services/audio/asr/transcription and then usually get the result by periodically calling the query API GET /api/v1/tasks/{task_id}. This query API defaults to 20 QPS and scales up to 100 QPS. In high-concurrency batch scenarios, frequent polling easily triggers throttling.
Configure callback notifications through EventBridge. When a task completes, QwenCloud automatically pushes a dashscope:System:AsyncTaskFinish event to your configured target (an HTTP/HTTPS endpoint or a RocketMQ topic). After the consumer receives the event, it no longer needs to call the query API, which avoids the throttling risk of frequent polling. For more information, see Configure EventBridge callback notifications.
Supported models
- Supported: Qwen-Audio-ASR-Filetrans, Fun-ASR, Qwen3-ASR-Filetrans, and Paraformer (all asynchronous transcription tasks).
- Not supported: Qwen3-ASR-Flash (synchronous or streaming calls, which are not asynchronous tasks).
Callback message content
For all three models, the callback message body has data.contain_result set to true, and data.output_result directly carries transcription_url. After the consumer receives the callback, it can get the recognition result without calling GET /api/v1/tasks/{task_id} again. However, the result field path and structure differ across the three models. See the following table.
When you write the consumer, choose the correct path for the model you use. Do not hardcode a single path. In failure scenarios,
data.output_result.output no longer contains results/result; instead it contains code and message fields. Check data.task_status first, then read the result.| Model | Submission parameter | Result field path (based on the callback body) | usage field |
|---|---|---|---|
| Qwen-Audio-ASR-Filetrans, Fun-ASR | input.file_urls (array; only 1 URL per call) | data.output_result.output.results[ ].transcription_url (array, one entry per file, with subtask_status; also includes task_metrics) | duration |
| Paraformer | input.file_urls (array; only 1 URL per call) | Same as Qwen-Audio-ASR-Filetrans/Fun-ASR: data.output_result.output.results[ ].transcription_url | duration |
| Qwen3-ASR-Filetrans | input.file_url (single object; only 1 URL per call) | data.output_result.output.result.transcription_url (single object, without results[ ] / task_metrics) | seconds |
Usage notes
Security (HTTP/HTTPS delivery): in production, verify the X-Eventbridge-Signature* header fields in the callback request before you consume it. Otherwise, any external IP can forge an AsyncTaskFinish event and inject fake recognition results. Also set a receive timeout of at least 5 seconds on the receiver. The RocketMQ delivery method has no message-level signature; its security is guaranteed by the RocketMQ authentication mechanism.
Delivery latency: from task completion (end_time) to when the delivery target (an HTTP/HTTPS endpoint or a RocketMQ topic) receives the message, the delay is typically about 1 to 90 seconds. The exact latency depends on the real-time load of EventBridge.
Idempotency: the same event may be delivered multiple times due to retries. Implement idempotent processing on the consumer, using the CloudEvents data.id or data.task_id as the deduplication key.
Production recommendations
- File hosting: upload audio files to Alibaba Cloud OSS and call the API by URL. Avoid local file uploads (local file calls are capped at 100 QPS and cannot be scaled up).
- Asynchronous polling: long audio transcription uses an asynchronous model. Set a reasonable polling interval (such as 2 to 5 seconds) to avoid frequent queries that consume your quota. To exceed the 20 to 100 QPS query limit, switch to event callback notifications. For more information, see High-concurrency scenarios: use callbacks instead of polling.
- Error handling: implement a robust retry mechanism. For network timeouts or temporary server-side errors (5xx), retry with an exponential backoff strategy.
- Noise reduction: for noisy audio, preprocess it with a tool such as FFmpeg before you submit it for recognition.
- Model selection: Use Qwen-Audio-ASR for short audio up to 5 minutes long. For longer audio or asynchronous processing, use Qwen-Audio-ASR-Filetrans.
Supported models and regions
- Singapore
- China North 2 (Beijing)
- US (Virginia)
- Qwen-Audio-ASR-Filetrans:
qwen-audio-3.1-asr-flash-filetrans,qwen-audio-3.0-asr-flash-filetrans - Qwen-Audio-ASR:
qwen-audio-3.1-asr-flash,qwen-audio-3.0-asr-flash - Fun-ASR:
fun-asr(stable version) - Fun-ASR-Flash:
fun-asr-flash-2026-06-15 - Qwen3-ASR-Filetrans:
qwen3-asr-flash-filetrans(stable version) - Qwen3-ASR-Flash: qwen3-asr-flash (stable version)
API reference
- Non-real-time speech recognition - Qwen-Audio-ASR-Filetrans API reference
- Non-real-time speech recognition - Fun-ASR API reference
- Non-real-time speech recognition - Qwen-Audio-ASR API reference
- Non-real-time speech recognition - Fun-ASR-Flash API reference
- Non-real-time speech recognition - Qwen-ASR API reference
- Non-real-time speech recognition - Paraformer API reference
FAQ
Q: How do I provide a publicly accessible audio URL to the API?
Use Alibaba Cloud Object Storage Service (OSS). OSS provides highly available and reliable storage, and lets you generate a public access URL.
Verify that the generated URL is accessible over the public network: open the URL in a browser or with the curl command to confirm that the audio file downloads or plays (HTTP status code 200).
Q: How do I check whether the audio format meets the requirements?
Use the open-source tool ffprobe to quickly get detailed audio information:
Q: How do I process audio to meet the model requirements?
Use the open-source tool FFmpeg to trim or convert the audio:
- Trim audio: extract a clip from a long audio file
- Convert the format For example, convert any audio to a 16 kHz, 16-bit, mono WAV file:
Q: How do I improve recognition accuracy?
The following factors affect recognition accuracy. Check each one and optimize accordingly.
Main factors:
- Audio quality: the quality of the recording device, the sample rate, and environmental noise directly affect audio clarity. High-quality audio input is the foundation of accurate recognition.
- Speaker characteristics: pitch, speech rate, accent, and dialect differences (especially rare dialects or strong accents) increase recognition difficulty.
- Language and vocabulary: mixed languages, technical terms, or slang increase recognition difficulty. Configure hotwords to improve accuracy for domain-specific terms.
- Improve audio quality: use a high-performance microphone, record at the recommended sample rate, and minimize environmental noise and echo.
- Adapt to the speaker: for audio with strong accents or noticeable dialects, choose a model that supports the corresponding dialect.
- Configure hotwords: set hotwords for technical terms, proper nouns, and similar words.