Qwen3-ASR-Flash-Filetrans

Will be retired on October 10, 2026View announcement
Copy success!
Add to Compare

Overview

The large file transcription version of Qwen3-ASR-Flash. Qwen3-ASR-Flash is a highly accurate, intelligent, and robust multilingual speech recognition model based on a large language model. Leveraging a powerful foundational model, massive amounts of text and multimodal data, and tens of millions of hours of audio data, Qwen3-ASR-Flash achieves high-precision speech recognition. It can automatically determine the language and accurately recognize speech in multiple languages, ensuring precise transcription even in complex audio environments.This version is a snapshot version from November 17, 2025.

Input

Audio

Output

Text

Features

Prefix Completion

Enable Partial Mode when calling the Qwen API to make the model continue strictly from your provided prefix text.View docs

Function Calling

Use function calling to connect large language models with external tools and systems.View docs

Cache

Context Cache stores shared prefixes for long-context requests to reduce repeated computation, improve latency, and lower cost.View docs

Structured Outputs

Structured Outputs help ensure the model returns a JSON string in the expected format.View docs

Batches

Asynchronously process requests in batches to reduce costs.View docs

Web Search

Enable web search so the model can answer with real-time retrieved data.View docs

Fine-tuning

Train models on sample data to better adapt them to specific tasks.View docs

Pricing

  • Audio Duration
    $0.000035Per second

Rate Limits

  • RPMRequests Per Minute
    100

API Reference

Call API
Copy success!
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
import os
import time
import requests
import json


API_URL_SUBMIT = "https://maas.qwencloudapi.com/api/v1/services/audio/asr/transcription"
API_URL_QUERY_BASE = "https://maas.qwencloudapi.com/api/v1/tasks/"


def main():
    # 如未配置环境变量,可将下一行替换为 api_key = "YOUR_API_KEY"。
    api_key = os.getenv("DASHSCOPE_API_KEY")

    submit_headers = {
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
        "X-DashScope-Async": "enable"
    }


    payload = {
        "model": "qwen3-asr-flash-filetrans-2025-11-17",
        "input": {
            "file_url": "https://dashscope.oss-cn-beijing.aliyuncs.com/audios/welcome.mp3"
        },
        "parameters": {
            "channel_id": [0],
            # "language": "zh",
            "enable_itn": False,
            # "corpus": {
            #     "text": ""
            # }
        }
    }


    try:
        submit_resp = requests.post(API_URL_SUBMIT, headers=submit_headers, data=json.dumps(payload))
    except requests.RequestException as e:
        print(f"Failed: {e}")
        return

    if submit_resp.status_code != 200:
        print(f"Failed! HTTP code: {submit_resp.status_code}")
        print(submit_resp.text)
        return

    resp_data = submit_resp.json()
    output = resp_data.get("output")
    if not output or "task_id" not in output:
        print("resp_data:", resp_data)
        return

    task_id = output["task_id"]
    print(f"任务已提交,task_id: {task_id}")


    finished = False
    while not finished:
        time.sleep(2)

        query_url = API_URL_QUERY_BASE + task_id
        try:
            query_resp = requests.get(query_url, headers={"Authorization": f"Bearer {api_key}"})
        except requests.RequestException as e:
            print(f"Failed: {e}")
            return

        if query_resp.status_code != 200:
            print(f"Failed! HTTP code: {query_resp.status_code}")
            print(query_resp.text)
            return

        query_data = query_resp.json()
        output = query_data.get("output")
        if output and "task_status" in output:
            status = output["task_status"]
            print(f"status: {status}")

            if status.upper() in ("SUCCEEDED", "FAILED", "UNKNOWN"):
                finished = True
                print("task finished:")
                print(json.dumps(query_data, indent=2, ensure_ascii=False))
        else:
            print("query data:", query_data)


if __name__ == "__main__":
    main()