Create custom voices from natural language descriptions, preview them, and use them for speech synthesis.
Overview
Voice design is suited for rapid prototyping, creative content production, and game character voiceovers.
No audio sample is required to create a voice. To reproduce a voice from an existing audio sample, use Voice cloning.
Before you begin
-
Obtain an API key and set it as the environment variable
DASHSCOPE_API_KEY. -
Obtain your workspace ID and replace
YOUR_WORKSPACE_IDin the example with it. For instructions, see Regions, deployment scope, and endpoints. -
Install the DashScope SDK and
requests:
Get started
Qwen-Audio-TTS and CosyVoice share the same voice creation, preview, and basic synthesis workflow. The following example uses qwen-audio-3.1-tts-flash.
- Create a voice: Set the voice description
voice_prompt, preview textpreview_text, and target modeltarget_modelto obtain a voice ID. - Save the preview audio: Decode the returned
preview_audio.dataand save it as a WAV file for listening. - Synthesize speech: Pass the returned
voice_idasvoiceand synthesize speech with the bound model.
preview.wav and the synthesized audio to output.wav. Save the printed voice ID for subsequent speech synthesis calls.
For HTTP request examples, optional parameters, and response fields, see the Voice design API reference. For synthesis parameters, see the Qwen-Audio-TTS client events.
Voice description guide
The voice description (voice_prompt) specifies the desired voice qualities. Clear, specific descriptions help generate voices that meet your needs.
Description guidelines
- Be specific: Use voice qualities such as "deep," "crisp," or "fast-paced." Avoid vague judgments such as "nice" or "normal."
- Combine dimensions: Describe gender, age, pitch, speed, and emotion. "Female voice" alone provides little detail about a distinctive voice.
- Be objective: Describe perceptible qualities, such as "high-pitched and energetic," rather than subjective preferences such as "my favorite voice."
- Be original: Describe voice qualities without requesting imitation of a specific person, such as a celebrity or actor. The model does not support targeted imitation, and such requests may raise copyright concerns.
- Be concise: Remove repeated synonyms and unnecessary modifiers.
| Dimension | Examples |
|---|---|
| Gender | Male, female, neutral |
| Age | Child (5-12), teenager (13-18), young adult (19-35), middle-aged (36-55), senior (55+) |
| Pitch | High, medium, low, slightly high, slightly low |
| Speed | Fast, medium, slow, slightly fast, slightly slow |
| Emotion | Cheerful, calm, gentle, serious, lively, composed, soothing |
| Characteristics | Resonant, crisp, husky, mellow, sweet, deep, powerful |
| Use case | News broadcast, advertising, audiobook, animation character, voice assistant, documentary narration |
Description examples
- Standard broadcast style: clear and precise articulation with perfect enunciation
- Young and lively female voice, fast-paced with a noticeable rising intonation, suited for fashion product presentations
- Calm, slow-paced middle-aged male voice, deep and resonant, suited for news reading or documentary narration
- Gentle and thoughtful female, around 30 years old, even-toned, suited for audio book reading
- Cute child's voice, approximately an 8-year-old girl, slightly childish speech, suited for animation character voiceover
The same description may generate different voices. Listen to the preview audio after creation. To compare results, generate multiple voices and select the best one.
Voice management
- List voices: View existing custom voices.
- Query voice details: View the bound model, voice status, and other information.
- Delete a voice: Delete voices that are no longer needed to free up quota.
Supported models
- China (Beijing)
Use an API key from this region to call the following models:
- Qwen-Audio-TTS: qwen-audio-3.1-tts-flash, qwen-audio-3.0-tts-plus, qwen-audio-3.0-tts-flash
- CosyVoice: cosyvoice-v3.5-plus, cosyvoice-v3.5-flash, cosyvoice-v3-plus, cosyvoice-v3-flash
CosyVoice voice design is powered by the FunAudioGen-VD model.
Quotas and limits
-
Number of voices: Each Alibaba Cloud Model Studio account can have up to 1,000 custom voices. Voice cloning and voice design share this account-wide quota across models.
New voice cloning or voice design creation requests fail when the limit is reached. Delete voices that are no longer needed to free up quota before creating new voices.
-
Voice description:
voice_promptsupports Chinese and English only, with a maximum length of 500 characters. -
Preview text:
preview_textsupports Chinese and English only and must be 15–200 characters long. -
Model binding: A voice is bound to a speech synthesis model through
target_modelat creation. Use the same model for subsequent synthesis.