Skip to main content
Speech recognition

Non-real-time speech recognition (Qwen-Audio-3.0-ASR-Flash/Fun-ASR-Flash) API reference

This topic describes the parameters and interface details of the Qwen-Audio-3.0-ASR-Flash/Fun-ASR-Flash non-real-time speech recognition HTTP API.

User guide: Non-real-time speech recognition. For input requirements such as supported audio formats, file size limits, and duration limits, see Audio specifications.
This feature does not support SDK calls.

Service endpoints

  • Singapore
  • China (Beijing)
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generationReplace {WorkspaceId} with your actual Workspace ID.
Alibaba Cloud Model Studio has released workspace-specific domains for the China (Beijing) and Singapore regions. The new dedicated domains deliver superior performance and higher stability for inference requests. We recommend migrating to the new domains:
  • China (Beijing): from dashscope.aliyuncs.com to {WorkspaceId}.cn-beijing.maas.aliyuncs.com
  • Singapore: from dashscope-intl.aliyuncs.com to {WorkspaceId}.ap-southeast-1.maas.aliyuncs.com
Replace {WorkspaceId} with your actual Workspace ID. The existing domains remain fully functional.

Request headers

Parameter

Type

Required

Description

Authorization

string

Yes

The authentication token, in the format Bearer <your_api_key>. Replace "<your_api_key>" with your actual API key.

Content-Type

string

Yes

The media type of the request body. Fixed to application/json.

X-DashScope-SSE

string

Yes

Controls whether results are returned as an SSE stream. Set to enable to turn on SSE streaming. The server returns intermediate and final recognition results in multiple messages only for audio that is at least 1 minute long. Set to disable or omit the parameter to return only the final result.

Request body

modelstring(Required)The model name. Qwen-Audio-3.0-ASR-Flash and Fun-ASR-Flash model series are supported. For details, see Supported models and regions.inputobject(Required)The input information.

Properties

messagesarray(object)(Required)The message list. It contains the audio to recognize and, optionally, conversation context that improves recognition accuracy.
The context feature improves the recognition accuracy of domain-specific terms. For usage, see Context enhancement.Constraints: A request can include at most 5 context messages of each type (input_text and text). If you exceed this limit, only the 5 most recent messages are kept. The total context text per turn (the combined length of the text fields in the user and assistant messages) cannot exceed 400 characters, where each character counts as 1. Any excess is truncated from the end.
When you include context, the message order in messages matters: context messages must be arranged by conversation turn. Within each turn, the user message (of type input_text) must come before the corresponding assistant message (of type text). The user message that contains input_audio must be the last item in the messages array.

Properties

rolestring(Required)The message role. Valid values:
  • user (Required): A user message. When type is input_audio, it holds the audio to recognize. When type is input_text, it holds recognition results from previous turns or a domain-specific word list (optional, used as context).
  • assistant (Optional, context): Replies from the large language model in previous turns.
contentarray(object)(Required)The message content list.

Properties

typestring(Required)The content type. Each request needs at least one message of type input_audio. Valid values:
  • input_audio (Required): The audio input to recognize (role is user). You must also pass the input_audio object.
  • input_text (Optional, context): Recognition results of the user's speech from previous turns, or a domain-specific word list (role is user). You must also pass the text field.
  • text (Optional, context): Replies from the large language model in previous turns (role is assistant). You must also pass the text field.
input_audioobject(Conditionally required)Required when type is input_audio.

Properties

datastring(Required)The audio data to recognize. For input requirements such as supported audio formats, file size limits, and duration limits, see Audio specifications. Two methods are supported:
  • Audio file URL: Pass a publicly accessible URL to the audio file.
  • Base64 Data URI: Pass the Base64-encoded audio data as a Data URI. The value is the data:{MIME_TYPE};base64, prefix concatenated with the Base64-encoded audio data. Supported MIME types include audio/wav and audio/mp3.
Example (URL): https://example.com/audio/sample.wavExample (Base64): data:audio/wav;base64,{BASE64_ENCODED_DATA}
textstring(Conditionally required)When type is input_text, enter the recognition results of the user's speech from previous turns or a domain-specific word list. When type is text, enter the large language model's replies from previous turns. Text length is measured in characters, where each character counts as 1. The combined length of the text fields across all messages in a single context turn cannot exceed 400 characters. Any excess is truncated from the end.
parametersobject(Required)The model parameters.
Text Polishing is disabled by default and is not yet available.Text Polishing: While transcribing speech, the model automatically removes meaningless filler words and stuttered repetitions, handles self-corrections made during speech, smooths out colloquial expressions, and standardizes punctuation and text formatting. This results in output that is more concise, fluent, and readable, while preserving the user's original intent and key information as much as possible.

Properties

formatstring(Required)The audio format. Set this to match your actual audio format. Supported values include wav, mp3, and opus. For details, see Audio specifications.sample_ratestring(Optional)The audio sample rate, in Hz. For example, 16000 means a 16 kHz sample rate. For details, see Audio specifications.vocabulary_idstring(Optional)The ID of a precompiled hot word list.Generate this ID in advance by calling the create hot word list API. Pass the ID during recognition to use the hot words in the list.Suitable for scenarios where the vocabulary is known and relatively stable, and where you need to reuse the same word list across requests.For usage details, see Precompiled hotwords.vocabularyobject(Optional)Instant hot words.Passed as key-value pairs, where the key is the hot word text (string) and the value is the hot word weight (integer). No hot word list needs to be created in advance. The weight ranges from [1, 5] or is set to 50: a value in [1, 5] makes the model more likely to output the word as the value increases; a value of 50 designates a super hot word, which greatly improves recall, but the number of super hot words cannot exceed 50.Suitable for temporary, session-level hot word optimization.When instant and precompiled hotwords are configured together, the system merges both sets. If the merged set contains more than 2000 hotwords, the system randomly selects 2000 to use. For usage details, see Instant hotwords.
Only qwen-audio-3.0-asr-flash supports inline hotwords.
language_hints array[string](Optional)The language codes to recognize. If you cannot determine the language in advance, leave this unset and the model detects the language automatically.For Qwen-Audio-3.0-ASR-Flash series models, you can set up to 4 values; if you set more than 4, only the first 4 take effect. For Fun-ASR-Flash series models, you can set only 1 value; if you set more than one, only the first takes effect.
  • qwen-audio-3.0-asr-flash, fun-asr-flash-2026-06-15:
    • zh: Chinese
    • en: English
    • ja: Japanese
    • ko: Korean
    • vi: Vietnamese
    • th: Thai
    • id: Indonesian
    • ms: Malay
    • tl: Filipino
    • hi: Hindi
    • ar: Arabic
    • fr: French
    • de: German
    • es: Spanish
    • pt: Portuguese
    • ru: Russian
    • it: Italian
    • nl: Dutch
    • sv: Swedish
    • da: Danish
    • fi: Finnish
    • no: Norwegian
    • el: Greek
    • pl: Polish
    • cs: Czech
    • hu: Hungarian
    • ro: Romanian
    • bg: Bulgarian
    • hr: Croatian
    • sk: Slovak
The following examples use the configuration for the Singapore region. Replace "{WorkspaceId}" with your actual workspace ID. The configuration differs across regions, and the API key for the Singapore region differs from the one for the Beijing region.
  • Non-streaming
  • Streaming
  • With context - non-streaming
  • With context - streaming
  • Base64
  • Inline hotwords
curl --location --request POST 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \
     --header "Authorization: Bearer $DASHSCOPE_API_KEY" \
     --header "Content-Type: application/json" \
     --header "X-DashScope-SSE: disable" \
     --data '{
    "model": "qwen-audio-3.0-asr-flash",
    "input": {
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "type": "input_audio",
                        "input_audio": {
                            "data": "{YOUR_AUDIO_URL}"
                        }
                    }
                ]
            }
        ]
    },
    "parameters": {
        "format": "wav",
        "sample_rate": "16000"
    }
}'

Response body

request_idstringThe unique identifier of this request.outputobjectThe output result.

Properties

textstringThe full recognized text accumulated so far.sentenceobjectThe details of the current sentence.

Properties

sentence_idintegerThe sentence number, starting from 1.sentence_endbooleanWhether this is the final result for the sentence. true indicates that recognition of the sentence is complete.begin_timeintegerThe start time of the sentence, in milliseconds.end_timeintegerThe end time of the sentence, in milliseconds. Returned only when sentence_end is true.textstringThe recognized text of the current sentence.channel_idintegerThe channel number, starting from 0.wordsarrayThe list of word-level timestamps.
textstringThe word text.begin_timeintegerThe start time of the word, in milliseconds.end_timeintegerThe end time of the word, in milliseconds.punctuationstringThe punctuation mark after the word. An empty string when there is no punctuation.fixedbooleanWhether the word is stabilized. false indicates that the word's timestamp may be adjusted in subsequent events.
usageobjectThe usage information. Returned only when sentence_end is true.
durationintegerThe processed audio duration, in seconds.
  • Non-streaming
  • Streaming
{
    "output": {
        "sentence": {
            "begin_time": 760,
            "channel_id": 0,
            "end_time": 3800,
            "sentence_end": true,
            "sentence_id": 1,
            "text": "Hello World, this is Alibaba Speech Lab.",
            "words": [
                {"begin_time": 760, "end_time": 1040, "fixed": true, "punctuation": "", "text": "Hello"},
                {"begin_time": 1040, "end_time": 1240, "fixed": true, "punctuation": ",", "text": " World"},
                {"begin_time": 1360, "end_time": 1880, "fixed": true, "punctuation": "", "text": "this is"},
                {"begin_time": 1880, "end_time": 2520, "fixed": true, "punctuation": "", "text": "Alibaba"},
                {"begin_time": 2520, "end_time": 2840, "fixed": true, "punctuation": "", "text": "Speech"},
                {"begin_time": 2840, "end_time": 3800, "fixed": true, "punctuation": ".", "text": "Lab"}
            ]
        },
        "text": "Hello World, this is Alibaba Speech Lab."
    },
    "usage": {
        "duration": 4
    },
    "request_id": "40e0734d-096f-9ae3-86c1-a8c013287561"
}

SSE streaming result processing logic

In streaming mode, the client needs to handle the following:
  1. For each SSE event received, parse the JSON in the data field.
  2. Use output.sentence.sentence_end to determine whether the current sentence has ended. When this value is true, recognition of the sentence is complete, the word-level timestamps are stabilized, and the result can be used as final. When this value is false, recognition is still in progress, and the text and timestamps may be updated in subsequent events.
  3. The usage information is returned only in the sentence-end event, and you can use it to meter the processed audio duration.
Text Generation
Image Generation
  • FAQ
Video Generation
Audio
Realtime API
Text Embedding
Model Production