Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
cinience avatar

Alicloud Ai Audio Tts

  • 314 installs
  • 396 repo stars
  • Updated July 18, 2026
  • cinience/alicloud-skills

alicloud-ai-audio-tts is an agent skill that integrates Alibaba Cloud DashScope Qwen batch text-to-speech APIs for developers who need narrated audio from written scripts in apps, agents, or content pipelines.

About

alicloud-ai-audio-tts is an agent skill from cinience/alicloud-skills for generating speech with Model Studio DashScope Qwen TTS models such as qwen3-tts-flash and qwen3-tts-instruct-flash. It documents a normalized tts.generate interface with text, voice, language_type, optional instruction, and stream flags, returning audio_url or 24 kHz Base64 PCM chunks. Setup uses the dashscope Python SDK, DASHSCOPE_API_KEY or ~/.alibabacloud/credentials, and Beijing or Singapore API base URLs. The skill covers batch narration for short drama or news voice lines, streaming decode guidance, caching by text and voice, and output under output/aliyun-qwen-tts/audio/. Use it when adding server-side TTS to agents, media tools, or automated content pipelines on Alibaba Cloud.

  • AliCloud batch TTS API wiring
  • Voice and language selection
  • Audio file retrieval and storage
  • Agent-callable speech synthesis
  • Script-to-audio pipeline setup

Alicloud Ai Audio Tts by the numbers

  • 314 all-time installs (skills.sh)
  • Ranked #504 of 1,335 Generative Media skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cinience/alicloud-skills --skill alicloud-ai-audio-tts

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs314
repo stars396
Last updatedJuly 18, 2026
Repositorycinience/alicloud-skills

How do you add Alibaba Cloud batch TTS?

Integrate Alibaba Cloud batch text-to-speech APIs into apps, agents, or content pipelines for narrated audio generation from written scripts.

Who is it for?

alicloud-ai-audio-tts suits backend developers building narration, voice lines, or agent speech on Alibaba Cloud DashScope Qwen TTS models.

Skip if: Skip alicloud-ai-audio-tts for realtime websocket TTS, non-Alibaba providers, or browser-only speech synthesis without DashScope credentials.

When should I use this skill?

Trigger alicloud-ai-audio-tts when converting text scripts to speech with qwen3-tts-flash models or documenting DashScope TTS request fields.

What you get

DashScope TTS integration code, generated audio files or URLs, request payloads, and validation logs under output/aliyun-qwen-tts/.

  • TTS integration scripts
  • Generated audio URLs or PCM files

By the numbers

  • Skill version 1.0.0
  • 3 recommended qwen3-tts model names
  • 24000 Hz sample rate for streaming PCM output

Files

SKILL.mdMarkdownGitHub ↗

Category: provider

Model Studio Qwen TTS

Validation

mkdir -p output/alicloud-ai-audio-tts
python -m py_compile skills/ai/audio/alicloud-ai-audio-tts/scripts/generate_tts.py && echo "py_compile_ok" > output/alicloud-ai-audio-tts/validate.txt

Pass criteria: command exits 0 and output/alicloud-ai-audio-tts/validate.txt is generated.

Output And Evidence

  • Save generated audio links, sample audio files, and request payloads to output/alicloud-ai-audio-tts/.
  • Keep one validation log per execution.

Critical model names

Use one of the recommended models:

  • qwen3-tts-flash
  • qwen3-tts-instruct-flash
  • qwen3-tts-instruct-flash-2026-01-26

Prerequisites

  • Install SDK (recommended in a venv to avoid PEP 668 limits):
python3 -m venv .venv
. .venv/bin/activate
python -m pip install dashscope
  • Set DASHSCOPE_API_KEY in your environment, or add dashscope_api_key to ~/.alibabacloud/credentials (env takes precedence).

Normalized interface (tts.generate)

Request

  • text (string, required)
  • voice (string, required)
  • language_type (string, optional; default Auto)
  • instruction (string, optional; recommended for instruct models)
  • stream (bool, optional; default false)

Response

  • audio_url (string, when stream=false)
  • audio_base64_pcm (string, when stream=true)
  • sample_rate (int, 24000)
  • format (string, wav or pcm depending on mode)

Quick start (Python + DashScope SDK)

import os
import dashscope

# Prefer env var for auth: export DASHSCOPE_API_KEY=...
# Or use ~/.alibabacloud/credentials with dashscope_api_key under [default].
# Beijing region; for Singapore use: https://dashscope-intl.aliyuncs.com/api/v1
dashscope.base_http_api_url = "https://dashscope.aliyuncs.com/api/v1"

text = "Hello, this is a short voice line."
response = dashscope.MultiModalConversation.call(
    model="qwen3-tts-instruct-flash",
    api_key=os.getenv("DASHSCOPE_API_KEY"),
    text=text,
    voice="Cherry",
    language_type="English",
    instruction="Warm and calm tone, slightly slower pace.",
    stream=False,
)

audio_url = response.output.audio.url
print(audio_url)

Streaming notes

  • stream=True returns Base64-encoded PCM chunks at 24kHz.
  • Decode chunks and play or concatenate to a pcm buffer.
  • The response contains finish_reason == "stop" when the stream ends.

Operational guidance

  • Keep requests concise; split long text into multiple calls if you hit size or timeout errors.
  • Use language_type consistent with the text to improve pronunciation.
  • Use instruction only when you need explicit style/tone control.
  • Cache by (text, voice, language_type) to avoid repeat costs.

Output location

  • Default output: output/alicloud-ai-audio-tts/audio/
  • Override base dir with OUTPUT_DIR.

Workflow

1) Confirm user intent, region, identifiers, and whether the operation is read-only or mutating. 2) Run one minimal read-only query first to verify connectivity and permissions. 3) Execute the target operation with explicit parameters and bounded scope. 4) Verify results and save output/evidence files.

References

  • references/api_reference.md for parameter mapping and streaming example.
  • Realtime mode is provided by skills/ai/audio/alicloud-ai-audio-tts-realtime/.
  • Voice cloning/design are provided by skills/ai/audio/alicloud-ai-audio-tts-voice-clone/ and skills/ai/audio/alicloud-ai-audio-tts-voice-design/.
  • Source list: references/sources.md

Related skills

How it compares

Pick alicloud-ai-audio-tts over generic TTS guides when batch DashScope Qwen models and Alibaba credential setup are the target stack.

FAQ

Which Qwen TTS models does alicloud-ai-audio-tts support?

alicloud-ai-audio-tts supports qwen3-tts-flash, qwen3-tts-instruct-flash, and qwen3-tts-instruct-flash-2026-01-26 through DashScope MultiModalConversation.call with voice and language_type parameters.

What audio output formats does DashScope TTS return?

alicloud-ai-audio-tts documents non-streaming audio_url responses and streaming Base64 PCM at 24000 Hz sample rate, decodable into WAV or PCM buffers for playback or storage.

Generative Mediallmautomationagents

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.