Non-real-time speech recognition

Updated at:

Learn about non-real-time speech recognition features, audio file calls, and ways to improve recognition results.

Features

Non-real-time speech recognition converts recorded audio and video files into text for meeting transcription, call analysis, and subtitles. Short audio can return results in one request; longer recordings can be processed as asynchronous tasks.

  • Languages and dialects: Automatically detect languages and recognize multiple languages and Chinese dialects. For coverage, see Speech recognition overview.
  • Accuracy: Use hotwords for names, brands, and specialist terms, or provide context from previous conversation turns.
  • Text processing: Polish spoken text, preserve dialect expressions, and filter sensitive words.
  • Speaker diarization: Label speakers in transcripts to organize meetings and interviews.
  • Structured results: Obtain sentences, words, and timestamps for subtitles, keyword highlighting, and audio navigation.
  • Audio input: Use supported audio and video formats, sample rates, and channels.
  • Long recordings: Asynchronously transcribe a single audio or video file of up to 12 hours and 2 GB.

NoteFeature support varies by model. Check the scope of each feature. To send audio continuously and receive results while speaking, see Real-time speech recognition.

Use caseRecommended modelCall method

Audio up to 5 minutes with a direct response

qwen-audio-3.1-asr-flash

Synchronous call with optional SSE streaming output.

Long recordings or asynchronous audio and video processing

qwen-audio-3.1-asr-flash-filetrans

Submit an asynchronous task and download the transcript after completion.

Get started

Get an API key in the console and set the DASHSCOPE_API_KEY environment variable.

The examples use a publicly accessible, English, 16 kHz, mono WAV audio sample.

Qwen-Audio-ASR

This example uses qwen-audio-3.1-asr-flash to submit a complete audio file and receive the final transcript in the same request.

curl \
  "https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-DashScope-SSE: disable" \
  -d '{
  "model": "qwen-audio-3.1-asr-flash",
  "input": {
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "input_audio",
            "input_audio": {
              "data": "https://g-adoc.alcasset.com/media/maas_docs/sfm-cn/en/audios/6a4b3c2d1e0f9092.wav"
            }
          }
        ]
      }
    ]
  },
  "parameters": {
    "format": "wav",
    "sample_rate": "16000"
  }
}'
import json
import os
from urllib.request import Request, urlopen

api_url = "https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1"
body = {
    "model": "qwen-audio-3.1-asr-flash",
    "input": {
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "input_audio",
                        "input_audio": {
                            "data": "https://g-adoc.alcasset.com/media/maas_docs/sfm-cn/en/audios/6a4b3c2d1e0f9092.wav"
                        }
                    }
                ]
            }
        ]
    },
    "parameters": {
        "format": "wav",
        "sample_rate": "16000"
    }
}
request = Request(
    api_url + "/services/aigc/multimodal-generation/generation",
    data=json.dumps(body).encode(),
    headers={
        "Authorization": "Bearer " + os.environ["DASHSCOPE_API_KEY"],
        "Content-Type": "application/json",
    },
)
with urlopen(request) as response:
    result = json.load(response)
print(result["output"]["text"])

Qwen-Audio-ASR-Filetrans

This example uses qwen-audio-3.1-asr-flash-filetrans. Submit a task, query its status, and download the transcript JSON after the task succeeds.

cURL

Submit a task

curl \
  "https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/audio/asr/transcription" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-DashScope-Async: enable" \
  -d '{
  "model": "qwen-audio-3.1-asr-flash-filetrans",
  "input": {
    "file_urls": [
      "https://g-adoc.alcasset.com/media/maas_docs/sfm-cn/en/audios/6a4b3c2d1e0f9092.wav"
    ]
  },
  "parameters": {}
}'

Query a task

Replace {task_id} with output.task_id from the submission response.

  • PENDING, RUNNING: The task is not complete. Wait before querying again.
  • SUCCEEDED: Check each file’s subtask_status in output.results[] and obtain the transcription_url of successful files.
  • FAILED, CANCELED: The task did not complete successfully. Read the returned status and error information.
curl \
  "https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/{task_id}" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Download the result

Replace {transcription_url} with the result file URL from the query response. Download and save the transcript JSON. The URL is valid for 24 hours.

curl "{transcription_url}" -o transcription.json

Python

import json
import os
import time
from urllib.request import Request, urlopen

api_url = "https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1"
headers = {
    "Authorization": "Bearer " + os.environ["DASHSCOPE_API_KEY"],
    "Content-Type": "application/json",
}
body = {
    "model": "qwen-audio-3.1-asr-flash-filetrans",
    "input": {"file_urls": ["https://g-adoc.alcasset.com/media/maas_docs/sfm-cn/en/audios/6a4b3c2d1e0f9092.wav"]},
    "parameters": {},
}
request = Request(
    api_url + "/services/audio/asr/transcription",
    data=json.dumps(body).encode(),
    headers={**headers, "X-DashScope-Async": "enable"},
)
with urlopen(request) as response:
    task_id = json.load(response)["output"]["task_id"]

while True:
    query = Request(api_url + "/tasks/" + task_id, headers=headers)
    with urlopen(query) as response:
        result = json.load(response)
    status = result["output"]["task_status"]
    if status == "SUCCEEDED":
        break
    if status in ("FAILED", "CANCELED"):
        raise RuntimeError(json.dumps(result, ensure_ascii=False))
    time.sleep(3)

for item in result["output"]["results"]:
    if item["subtask_status"] != "SUCCEEDED":
        raise RuntimeError(json.dumps(item, ensure_ascii=False))
    with urlopen(item["transcription_url"]) as response:
        transcript = json.load(response)
    print(json.dumps(transcript, ensure_ascii=False, indent=2))

Asynchronous transcription result

{
  "file_url": "https://g-adoc.alcasset.com/media/maas_docs/sfm-cn/en/audios/6a4b3c2d1e0f9092.wav",
  "properties": {
    "audio_format": "pcm_s16le",
    "channels": [
      0
    ],
    "original_sampling_rate": 16000,
    "original_duration_in_milliseconds": 3782
  },
  "transcripts": [
    {
      "channel_id": 0,
      "content_duration_in_milliseconds": 3640,
      "text": "Please send the quarterly project report to Kellera before Friday. ",
      "sentences": [
        {
          "begin_time": 120,
          "end_time": 3760,
          "text": "Please send the quarterly project report to Kellera before Friday. ",
          "sentence_id": 1,
          "words": [
            {
              "begin_time": 120,
              "end_time": 320,
              "text": "Please",
              "punctuation": "",
              "confidence": 1.0
            },
            {
              "begin_time": 320,
              "end_time": 560,
              "text": " send",
              "punctuation": "",
              "confidence": 1.0
            }
          ]
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 47,
    "output_tokens": 12,
    "total_Tokens": 59
  }
}

Handle recognition results

  • Synchronous recognition: In Qwen-Audio-ASR, output.text contains the complete accumulated text, and output.sentence contains details for the current sentence. Read output.text to save the full transcript.

  • Asynchronous transcription: After the task succeeds, download the result file. Read transcripts[].text for each channel's full transcript, or transcripts[].sentences and its words for subtitles and audio navigation.

  • Timestamps: Sentence and word begin_time and end_time values are positions in the audio, in milliseconds. The task query's end_time is the date and time when the task completed.

    NoteTimestamps are always enabled and cannot be disabled for Qwen-Audio-ASR, Qwen-Audio-ASR-Filetrans, Fun-ASR, Fun-ASR-Flash, and Paraformer. Asynchronous Qwen3-ASR-Filetrans calls also always return timestamps. For these calls, enable_words selects sentence- or word-level timestamps rather than disabling timestamps.

Improve recognition results

Adjust text readability, recognition of specific terms, speaker labels, and how results are returned to meet your needs.

Streaming output

Streaming output returns recognition results in SSE events after a complete audio file is submitted, so that you can show transcription progress before recognition finishes.

qwen-audio-3.1-asr-flash, Fun-ASR-Flash, and Qwen3-ASR-Flash support streaming output. Asynchronous transcription models, including Qwen-Audio-ASR-Filetrans, Fun-ASR, Qwen3-ASR-Filetrans, and Paraformer, provide result files after completion and do not support SSE recognition output.

ImportantWhen receiving SSE with cURL, add --no-buffer so that output buffering does not delay displayed results.

ModelEnable withResult handling and notes

qwen-audio-3.1-asr-flash

X-DashScope-SSE: enable

output.text is accumulated text. Replace the displayed text with each update. Short audio may produce only one result. With diarization disabled, word timestamps become fixed when output.sentence.words[i].fixed is true. With diarization enabled, read current and historical sentences from output.sentences.

Qwen3-ASR-Flash

OpenAI-compatible API: stream: true. Native HTTP API: X-DashScope-SSE: enable.

In OpenAI-compatible responses, choices[].delta.content contains incremental text. Append it in the order received.

Fun-ASR-Flash

X-DashScope-SSE: enable

Fun-ASR-Flash returns results in multiple events for audio that is at least 1 minute long.

Hotwords and context enhancement

Use hotwords to specify the spelling of names, product names, or technical terms that may be confused with similar-sounding words. Use context enhancement to provide previous conversation turns, business background, or related vocabulary. For model support, configuration, and examples, see Improve recognition accuracy.

Text polishing and dialect expressions

qwen-audio-3.1-asr-flash supports native text polishing to improve readability by organizing filler words, repetitions, and self-corrections.

qwen-audio-3.1-asr-flash and qwen-audio-3.1-asr-flash-filetrans transcribe Chinese dialects into Mandarin text by default. Set keep_dialect: true to preserve expressions specific to the dialect.

Speaker diarization

Enable speaker diarization to distinguish speakers in a meeting or interview. The speaker_id in recognition results identifies different speakers.

ModelEnable withResult location

qwen-audio-3.1-asr-flash

speaker_diarization_enabled: true

output.sentences[].speaker_id

Qwen-Audio-ASR-Filetrans, Fun-ASR、Paraformer

diarization_enabled: true

transcripts[].sentences[].speaker_id

NoteSpeaker diarization requires mono audio. For asynchronous transcription with diarization enabled, use audio no longer than 2 hours to reduce the risk of recognition failures or timeouts. With diarization enabled in qwen-audio-3.1-asr-flash, keep_dialect and language_hints have no effect.

Sensitive-word filtering

Use sensitive-word filtering to mask or remove specified words in transcripts. Qwen-Audio-ASR-Filetrans, Fun-ASR, and Paraformer support special_word_filter to configure replacement lists, removal lists, and the built-in word list.

Use in production

Batch transcription requires audio storage, control of submission and query rates, completion notifications, and result persistence. For input preparation, callbacks, throttling, and retries, see Speech recognition best practices.

Supported models and regions

China (Beijing)

  • Qwen-Audio-ASR: qwen-audio-3.1-asr-flash, qwen-audio-3.0-asr-flash
  • Qwen-Audio-ASR-Filetrans: qwen-audio-3.1-asr-flash-filetrans, qwen-audio-3.0-asr-flash-filetrans
  • Qwen3-ASR-Flash: qwen3-asr-flash (stable version)
  • Qwen3-ASR-Filetrans: qwen3-asr-flash-filetrans (stable version)
  • Fun-ASR-Flash: fun-asr-flash-2026-06-15
  • Fun-ASR: fun-asr (stable version)
  • Paraformer: paraformer-v2, paraformer-8k-v2

Singapore

  • Qwen-Audio-ASR: qwen-audio-3.1-asr-flash, qwen-audio-3.0-asr-flash
  • Qwen-Audio-ASR-Filetrans: qwen-audio-3.1-asr-flash-filetrans, qwen-audio-3.0-asr-flash-filetrans
  • Qwen3-ASR-Flash: qwen3-asr-flash (stable version)
  • Qwen3-ASR-Filetrans: qwen3-asr-flash-filetrans (stable version)
  • Fun-ASR-Flash: fun-asr-flash-2026-06-15
  • Fun-ASR: fun-asr (stable version)

US (Virginia)

Qwen3-ASR-Flash: qwen3-asr-flash (stable version)

Usage limits

Choose an input method, audio format, and sample rate supported by the model. Parameters such as format and sample_rate must match the actual file.

NoteWith speaker diarization enabled in Qwen-Audio-ASR-Filetrans, Fun-ASR, or Paraformer, use audio no longer than 2 hours to reduce the risk of recognition failures or timeouts.

ModelInput methodAudio formatsSample rateFile size and duration

qwen-audio-3.1-asr-flash, qwen-audio-3.0-asr-flash

URL or Base64 Data URI; one per request

aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg, opus, wav, webm, wma, wmv

Any

≤2 GB; ≤5 minutes

qwen-audio-3.1-asr-flash-filetrans, qwen-audio-3.0-asr-flash-filetrans

Publicly accessible file URL; one per request

aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg, opus, wav, webm, wma, wmv

Any

≤2 GB; ≤12 hours

qwen3-asr-flash

URL or Base64 Data URI; one per request

aac, amr, avi, aiff, flac, flv, mkv, mp3, mpeg, ogg, opus, wav, webm, wma, wmv

16 kHz for PCM; any rate for other formats, resampled to 16 kHz by the service

≤10 MB; ≤5 minutes

qwen3-asr-flash-filetrans

Publicly accessible file URL; one per request

aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg, opus, wav, webm, wma, wmv

16 kHz for PCM; any rate for other formats, resampled to 16 kHz by the service

≤2 GB; ≤12 hours

fun-asr-flash-2026-06-15

URL or Base64 Data URI; one per request

aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg, opus, wav, webm, wma, wmv

Any

≤2 GB; ≤5 minutes

fun-asr

Publicly accessible file URL; one per request

aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg, opus, wav, webm, wma, wmv

Any

≤2 GB; ≤12 hours

paraformer-v2

Publicly accessible file URL; one per request

aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg, opus, wav, webm, wma, wmv

Any

≤2 GB; ≤12 hours

paraformer-8k-v2

Publicly accessible file URL; one per request

aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg, opus, wav, webm, wma, wmv

8 kHz

≤2 GB; ≤12 hours

Use mono audio for speaker diarization. The Paraformer model paraformer-8k-v2 supports only 8 kHz. Local files for Qwen3-ASR-Flash must be encoded or uploaded by the client; a local path cannot be used directly as an HTTP audio URL.

API reference

Model application listing and filing

For more information, see Application compliance filing.