aliyun-qwen-asr
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Use when transcribing non-realtime speech with Alibaba Cloud Model Studio Qwen ASR models (`qwen3-asr-flash`, `qwen-audio-asr`, `qwen3-asr-flash-filetrans`). Use when converting recorded audio files to text, generating transcripts with timestamps, or documenting DashScope/OpenAI-compatible ASR request and response fields.
5installs
Sourcecinience/alicloud-skills
Added on
NPX Install
npx skill4agent add cinience/alicloud-skills aliyun-qwen-asrTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Category: provider
Model Studio Qwen ASR (Non-Realtime)
Validation
bash
mkdir -p output/aliyun-qwen-asr
python -m py_compile skills/ai/audio/aliyun-qwen-asr/scripts/transcribe_audio.py && echo "py_compile_ok" > output/aliyun-qwen-asr/validate.txtPass criteria: command exits 0 and is generated.
output/aliyun-qwen-asr/validate.txtOutput And Evidence
- Store transcripts and API responses under .
output/aliyun-qwen-asr/ - Keep one command log or sample response per run.
Use Qwen ASR for recorded audio transcription (non-realtime), including short audio sync calls and long audio async jobs.
Critical model names
Use one of these exact model strings:
qwen3-asr-flashqwen3-asr-flash-2026-02-10qwen-audio-asrqwen3-asr-flash-filetransqwen3-asr-flash-filetrans-2025-11-17
Selection guidance:
- Use ,
qwen3-asr-flash, orqwen3-asr-flash-2026-02-10for short/normal recordings (sync).qwen-audio-asr - Use or
qwen3-asr-flash-filetransfor long-file transcription (async task workflow).qwen3-asr-flash-filetrans-2025-11-17
Prerequisites
- Install SDK dependencies (script uses Python stdlib only):
bash
python3 -m venv .venv
. .venv/bin/activate- Set in environment, or add
DASHSCOPE_API_KEYtodashscope_api_key.~/.alibabacloud/credentials
Normalized interface (asr.transcribe)
Request
- (string, required): public URL or local file path.
audio - (string, optional): default
model.qwen3-asr-flash - (array<string>, optional): e.g.
language_hints,zh.en - (number, optional)
sample_rate - (string, optional)
vocabulary_id - (bool, optional)
disfluency_removal_enabled - (array<string>, optional): e.g.
timestamp_granularities.sentence - (bool, optional): default false for sync models, true for
async.qwen3-asr-flash-filetrans
Response
- (string): normalized transcript text.
text - (string, optional): present for async submission.
task_id - (string):
statusor submission status.SUCCEEDED - (object): original API response.
raw
Quick start (official HTTP API)
Sync transcription (OpenAI-compatible protocol):
bash
curl -sS --location 'https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "qwen3-asr-flash",
"messages": [
{
"role": "user",
"content": [
{
"type": "input_audio",
"input_audio": {
"data": "https://dashscope.oss-cn-beijing.aliyuncs.com/audios/welcome.mp3"
}
}
]
}
],
"stream": false,
"asr_options": {
"enable_itn": false
}
}'Async long-file transcription (DashScope protocol):
bash
curl -sS --location 'https://dashscope.aliyuncs.com/api/v1/services/audio/asr/transcription' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'X-DashScope-Async: enable' \
--header 'Content-Type: application/json' \
--data '{
"model": "qwen3-asr-flash-filetrans",
"input": {
"file_url": "https://dashscope.oss-cn-beijing.aliyuncs.com/audios/welcome.mp3"
}
}'Poll task result:
bash
curl -sS --location "https://dashscope.aliyuncs.com/api/v1/tasks/<task_id>" \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"Local helper script
Use the bundled script for URL/local-file input and optional async polling:
bash
python skills/ai/audio/aliyun-qwen-asr/scripts/transcribe_audio.py \
--audio "https://dashscope.oss-cn-beijing.aliyuncs.com/audios/welcome.mp3" \
--model qwen3-asr-flash \
--language-hints zh,en \
--print-responseLong-file mode:
bash
python skills/ai/audio/aliyun-qwen-asr/scripts/transcribe_audio.py \
--audio "https://dashscope.oss-cn-beijing.aliyuncs.com/audios/welcome.mp3" \
--model qwen3-asr-flash-filetrans \
--async \
--waitOperational guidance
- For local files, use (data URI) when direct URL is unavailable.
input_audio.data - Keep minimal to reduce recognition ambiguity.
language_hints - For async tasks, use 5-20s polling interval with max retry guard.
- Save normalized outputs under .
output/aliyun-qwen-asr/transcripts/
Output location
- Default output:
output/aliyun-qwen-asr/transcripts/ - Override base dir with .
OUTPUT_DIR
Workflow
- Confirm user intent, region, identifiers, and whether the operation is read-only or mutating.
- Run one minimal read-only query first to verify connectivity and permissions.
- Execute the target operation with explicit parameters and bounded scope.
- Verify results and save output/evidence files.
References
references/api_reference.mdreferences/sources.md- Realtime synthesis is provided by .
skills/ai/audio/aliyun-qwen-tts-realtime/