CosyVoice

Copied!
Add to Compare
Text-to-Speech

Overview

Text-to-Speech

Cloning capability: CosyVoice-v3-plus is the latest large voice cloning model in the CosyVoice series from Tongyi Lab. It offers superior sound quality and cloning fidelity, ideal for professional scenarios. With just 5-20 seconds of reference audio, it can rapidly generate a highly similar and natural-sounding custom voice. Synthesis capability: CosyVoice-v3-plus is the latest large speech synthesis model in the CosyVoice series from Tongyi Lab. It features enhanced sound quality and expressiveness, ideal for professional scenarios. The model supports real-time, streaming text-to-speech synthesis.

Input

Text

Output

Audio

Features

Prefix Completion

Enable Partial Mode when calling the Qwen API to make the model continue strictly from your provided prefix text.View docs

Function Calling

Use function calling to connect large language models with external tools and systems.View docs

Cache

Context Cache stores shared prefixes for long-context requests to reduce repeated computation, improve latency, and lower cost.View docs

Structured Outputs

Structured Outputs help ensure the model returns a JSON string in the expected format.View docs

Batches

Web Search

Enable web search so the model can answer with real-time retrieved data.View docs

feature.funeTuning

Pricing

  • TTS
    $0.26Per 10,000 characters

Rate Limits

  • RPMRequests Per Minute
    180

API Reference

Get API Key
Copied!
12345678910111213141516
# coding=utf-8

import dashscope
from dashscope.audio.tts_v2 import *

# If the API Key is not configured in the environment variable, your-api-key needs to be replaced with your own API Key
# dashscope.api_key = "your-api-key"

model = "cosyvoice-v3-plus"
voice = "longanyang"

synthesizer = SpeechSynthesizer(model=model, voice=voice)
audio = synthesizer.call("今天天气怎么样?")

with open('output.mp3', 'wb') as f:
    f.write(audio)