Qwen3 tts

From calesthio/generative-media-skills · View interactive version

Qwen3 tts is an AI agent skill from the GitHub repository calesthio/generative-media-skills. Produce text-to-speech with Alibaba/Qwen Qwen3-TTS through DashScope/Model Studio or open-weight Qwen3-TTS checkpoints. Use when an agent must choose Qwen3-TTS models, voices, realtime versus non-realtime synthesis, voice cloning, voice design, instruction/prosody controls, multilingual or dialect s

How to use this skill

Skill file

Qwen3-TTS production guidance

Use this skill to plan, invoke, review, and document Qwen3-TTS speech generation. Treat every model ID, price, region, quota, voice list, and limit below as volatile; the facts marked "verified 2026-07-10" were checked against official Alibaba/Qwen sources on that date.

What Qwen3-TTS is, and which boundary matters

Documented facts:

Production heuristic:

Model and route selection

Select the route by production need, not by the newest model name.

| Need | Prefer | Why |

|---|---|---|

| Short to medium content with built-in voices and simple delivery | qwen3-tts-flash through non-real-time HTTP/SSE | Character-billed hosted model, broad voice list, easy file URL handling. |

| Expressive direction such as "warm but urgent" or "radio-drama villain" | qwen3-tts-instruct-flash or realtime instruct model | Supports natural-language instructions; instruction text supports Chinese and English and has a 1,600-token limit in the API reference. |

| Brand/new character voice from a written description | Qwen-TTS Voice Design, then synthesize with qwen3-tts-vd-* | Voice Design creates custom voices from natural-language descriptions without an audio sample. |

| Consented clone of a speaker from a sample | Qwen-TTS Voice Cloning, then synthesize with qwen3-tts-vc-* | Voice Cloning creates custom voices from a 10- to 20-second sample according to Alibaba's user guide. |

| Conversational app that must start speaking while text is still arriving | Qwen3-TTS realtime WebSocket | Supports streaming input/output, server or client commit modes, incremental audio events, and low-latency playback. |

| Local/open deployment or research | Qwen/Qwen3-TTS-* open checkpoints | Apache-2.0 open-weight path; requires local inference engineering and QA. |

Documented model/region snapshot (verified 2026-07-10):

Invocation patterns and artifact custody

Non-real-time HTTP/SSE

Use this for batches, narration segments, ads, localization lines, and renders where seconds of latency do not matter.

Documented facts:

Production requirements:

  1. Split scripts into semantic units before the documented per-request text limit. The Qwen API reference says maximum input is 512 tokens for Qwen-TTS or 600 characters for other models; treat Qwen3-TTS-Flash as character-limited unless current docs say otherwise.
  2. Download every returned audio URL immediately. Never leave a production asset referenced only by a 24-hour provider URL.
  3. Save a manifest entry for each segment: model ID, region, endpoint, voice ID, language_type, instruction text if used, request_id, provider usage, local file path, source text hash, and generation timestamp.
  4. For long narration, generate paragraph-sized segments with consistent room tone and post-process joins; do not depend on one enormous request.

Example: non-real-time built-in voice narration

curl -X POST "https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3-tts-flash",
    "input": {
      "text": "Today we will turn a dense product update into a story your sales team can remember.",
      "voice": "Cherry",
      "language_type": "English"
    }
  }'

Why this is structured this way: specify language_type because the line is single-language; use the workspace-specific Singapore endpoint when using a Singapore-region key; preserve request_id and download the returned URL immediately. If the line needs emotional or performance direction, switch to the instruct family instead of stuffing direction into the spoken text.

Real-time WebSocket

Use this for assistants, interactive readers, live chat avatars, or applications that stream LLM text into speech.

Documented facts:

Production heuristic:

Open-weight path

Documented facts:

Production heuristic:

Voices, multilingual speech, dialects, and pronunciation

Documented facts:

Production requirements:

  1. For single-language text, set language_type explicitly.
  2. For mixed-language text, use Auto, but expect pronunciation misses. QA every proper noun, acronym, number, and code-switch boundary.
  3. Do not promise dialect output from cloned or designed voices; use dialect-capable built-in voices only where the current voice list confirms support.
  4. Maintain a pronunciation sheet. If Qwen3-TTS misreads a brand, name, URL, or abbreviation, rewrite text phonetically in the script or isolate that token in a retake.

Instruction control, voice design, and voice cloning

Instruction control

Documented facts:

Production heuristic:

Example: expressive ad read with instruction control

{
  "model": "qwen3-tts-instruct-flash",
  "input": {
    "text": "Your first invoice should feel like momentum, not paperwork.",
    "voice": "Ryan",
    "language_type": "English",
    "instructions": "Male young-adult commercial narrator. Confident, rhythmic, lightly amused. Medium-fast pace, crisp consonants, small smile in the voice. Build energy on 'momentum' and land 'not paperwork' with a dry, friendly contrast.",
    "optimize_instructions": true
  }
}

Expected result: a punchy, directed read without polluting the spoken line with bracketed stage directions. Failure modes: overacting, too much pitch movement, clipped consonants, or the model not honoring the contrast. Repair by reducing adjectives and specifying one or two observable delivery changes.

Voice Design

Documented facts:

Production workflow:

  1. Write a voice brief with age range, gender or neutrality, pitch, pace, emotion, timbre, accent if supported, articulation, and production use.
  2. Create 3-5 candidates when budget allows. Voice Design is nondeterministic.
  3. Audition each candidate against the actual script genre, not only the provider preview.
  4. Save selected voice_id, creation request, preview audio, selection notes, and rights/approval record.
  5. Delete unused custom voices after the project if the provider account is near quota or the voice should not persist.

Example: designed voice for a learning app

Voice prompt:

Neutral young-adult educator, approximately 28 years old, clear mid pitch, moderate pace, precise articulation, warm but not childish, calm enthusiasm, low vocal fry, suitable for explaining math and science concepts to high-school students.

Preview text:

Let's slow the problem down and look for the pattern hiding in the numbers.

Why this works: it gives observable vocal features and use context without asking for a named person. Audition it on definitions, equations, and encouragement lines; reject candidates that sound too theatrical, condescending, or breathy.

Voice Cloning

Documented facts:

Production requirements:

Pricing, quota, privacy, and compliance

Documented facts verified 2026-07-10:

Production requirements:

  1. Re-check pricing and free quota before each paid batch. Do not treat the prices above as permanent.
  2. Keep API keys in environment variables. Do not paste keys into scripts, logs, notebooks, prompts, or generated manifests.
  3. Treat input scripts, reference voice samples, cloned voice IDs, preview audio, and generated voice assets as sensitive production data.
  4. If a project involves health, children, legal, financial, employee, celebrity, or biometric voice identity data, escalate for legal/privacy review before synthesis.
  5. Record whether hosted or local inference was used. Hosted Model Studio privacy assurances do not automatically cover local deployments, third-party gateways, or downloaded open weights.

QA checklist before delivery

Run these checks on every final or client-review audio asset:

For long-form productions, audition in context with music and visuals. Qwen3-TTS can sound excellent in isolation while failing timing, lip-sync, or emotional continuity once cut into a video.

Troubleshooting

Source trail

Official and primary sources used for this skill, all verified on 2026-07-10:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.