Create custom voices through natural language descriptions, preview them, and use them for speech synthesis.
Voice design is suitable for scenarios such as rapid prototyping, creative content production, and game character voiceover.
Obtain an API Key in the console, and configure the
Qwen-Audio-TTS and CosyVoice use the same workflow for voice creation, preview, and basic synthesis. The following example uses qwen-audio-3.1-tts-flash.
After you run the sample,
A voice description (
Creating a voice is free of charge.
When using a designed voice to synthesize speech, billing is based on the target speech synthesis model. For specific fees, see Model pricing.
Creating a voice does not require an audio sample. If you need to reproduce a voice from an existing audio sample, use voice cloning.
Preparations
Obtain an API Key in the console, and configure the DASHSCOPE_API_KEY environment variable.
Install the DashScope SDK and requests:
Get Started
Qwen-Audio-TTS and CosyVoice use the same workflow for voice creation, preview, and basic synthesis. 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 the voice ID. - Save the preview audio: Decode the returned
preview_audio.dataand save it as a WAV file for audition. - Synthesize speech: Use the
voice_idreturned during voice creation as thevoice, and synthesize speech with the bound model.
preview.wav is the preview audio, and output.wav is the synthesized audio. Save the printed voice ID, which you can later use to call speech synthesis.
For HTTP request samples, optional parameters, and response fields, see the voice design API reference; for synthesis parameters, see Qwen-Audio-TTS Python SDK.
Voice Description Guidelines
A voice description (voice_prompt) specifies the desired voice characteristics. Clear, specific descriptions help generate a voice that meets your requirements.
Description Tips
- Specific: Use voice characteristics such as "deep", "crisp", or "relatively fast speech rate", and avoid vague evaluations such as "pleasant" or "general".
- Multidimensional: Combine dimensions such as gender, age, pitch, speech rate, and emotion. Writing only "female voice" is not enough to describe a distinctive voice.
- Objective: Describe perceivable voice characteristics, such as "high-pitched and energetic", and avoid subjective expressions such as "my favorite voice".
- Original: Describe voice characteristics without imitating specific people such as celebrities or actors. The model does not support specified imitation, and related requests may also involve copyright risks.
- Concise: Reduce redundant synonyms and meaningless modifiers.
| Dimension | Example description |
|---|---|
| Gender | Male, female, neutral |
| Age | Children (5-12 years old), teenagers (13-18 years old), youth (19-35 years old), middle-aged (36-55 years old), elderly (over 55 years old) |
| Pitch | High, mid, low, relatively high, relatively low |
| Speech rate | Fast, medium, slow, slightly fast, slightly slow |
| Emotion | Cheerful, calm, gentle, serious, lively, composed, soothing |
| Benefit | Magnetic, crisp, raspy, mellow, sweet, deep, powerful |
| Use cases | News broadcasts, advertising voiceovers, audio books, animation characters, voice assistants, documentary narration |
Description examples
- Standard broadcasting style: clear and precise articulation with standard pronunciation
- A young, lively female voice with a fast speech rate and a distinctly rising intonation, suitable for introducing fashion products
- A composed middle-aged male with a slow speech rate and a deep, magnetic voice, suitable for reading news or documentary narration
- A gentle and intellectual female around 30 years old with a mild tone, suitable for audio book narration
- A cute child voice, approximately an 8-year-old girl, speaking with a touch of childishness, suitable for animation character voiceovers
The same description may generate different voices. After creation, listen to the preview audio first; when you need to compare results, generate multiple times and pick the best one.
Voice management
- Query voice list: View existing custom voices.
- Query voice details: View information such as the model bound to a voice and its status.
- Delete voice: Delete voices that are no longer used to release quota.
Supported models
- China (Beijing)
- Qwen-Audio-TTS:qwen-audio-3.1-tts-plus、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 based on the FunAudioGen-VD model capabilities.
Quotas and limits
-
Voice quantity: Each Alibaba Cloud Bailian account can have up to 1000 custom voices in total. Voice cloning and voice design share this quota, which is not counted separately per model.
After the limit is reached, new voice cloning or voice design creation requests will fail. Delete voices that are no longer used to release quota before creating new ones.
-
Voice description:
voice_promptsupports Chinese and English only, with a maximum length of 500 characters. -
Preview text:
preview_textsupports Chinese and English only, with a length of 15 to 200 characters. -
Model binding: A voice is bound to a speech synthesis model via
target_modelat creation, and subsequent synthesis must use the same model.