Open Source
Explore the latest AI open-source projects from GitHub and HuggingFace.
Explore the latest AI open-source projects from GitHub and HuggingFace.
Text-to-speech synthesis has undergone a paradigm shift in the past three years. Where rule-based concatenative systems once dominated, large language model-based approaches now achieve naturalness that rivals human speech — and in some dimensions, surpasses it. CosyVoice, developed by Alibaba's FunAudioLLM team, stands at the forefront of this transformation as one of the most capable and widely adopted open-source TTS systems available today.
With over 20,000 GitHub stars, CosyVoice has been adopted across enterprise speech products, research labs, and open-source voice assistants worldwide. The project has evolved rapidly through three major versions — CosyVoice 1.0, CosyVoice 2.0, and the recently released Fun-CosyVoice 3.0 — each delivering measurable improvements in naturalness, language coverage, and real-time performance.
The latest release, Fun-CosyVoice 3.0, achieves state-of-the-art performance on standard benchmarks while maintaining a compact 0.5B parameter footprint, making it deployable on consumer-grade hardware and edge devices without the GPU clusters typically associated with frontier speech synthesis.
CosyVoice's architecture combines two complementary neural components:
The core of CosyVoice is an LLM that operates in the speech token space. Text is first normalized by a comprehensive text normalization module that handles numbers, special symbols, abbreviations, and domain-specific formats without requiring a traditional linguistic frontend. The normalized text is then encoded and fed to the LLM, which autoregressively predicts discrete speech tokens representing acoustic content.
This LLM foundation is what enables CosyVoice's zero-shot voice cloning capability: a reference audio segment is encoded into the same token space as the target speaker embedding, allowing the model to adopt a voice from just 3–10 seconds of reference audio — even voices it has never encountered during training.
Discrete speech tokens are decoded to continuous mel-spectrograms using a flow matching model (a generative approach related to diffusion models but with deterministic, efficient sampling). A HiFi-GAN vocoder then converts mel-spectrograms to waveforms.
The flow matching approach provides a key advantage over pure autoregressive decoding: parallelizable generation that maintains prosodic coherence across long utterances without the error accumulation characteristic of token-by-token generation.
Fun-CosyVoice 3.0 supports 9 major languages with high-quality synthesis:
| Language Group | Languages |
|---|---|
| East Asian | Chinese (Mandarin), Japanese, Korean |
| Western European | English, German, Spanish, French, Italian |
| Eastern European | Russian |
| Chinese Dialects | 18+ including Cantonese, Hokkien, Sichuan, Shanghai |
Cross-lingual synthesis — generating speech in a target language while preserving the voice characteristics of a speaker from a different language — is a standout feature. A French speaker's voice can narrate an English text with consistent timbre and speaking style, enabling compelling dubbing and localization applications.
The zero-shot cloning capability requires only a short reference audio clip (3–10 seconds). Performance benchmarks show CosyVoice achieving speaker similarity scores (SS%) comparable to closed-source systems like Seed-TTS and MiniMax-Speech:
| Model | test-zh SS% | test-en SS% | Open-Source |
|---|---|---|---|
| Seed-TTS | 79.6 | 76.2 | No |
| Fun-CosyVoice3-0.5B-RL | 77.4 | 69.5 | Yes |
| CosyVoice2 | 75.7 | 65.9 | Yes |
| F5-TTS | 74.1 | 64.7 | Yes |
The RL-trained variant (Fun-CosyVoice3-0.5B-2512_RL) applies reinforcement learning to further improve content consistency, achieving 0.81% CER on Chinese test sets — outperforming much larger closed-source models.
CosyVoice 2.0 introduced bi-streaming: simultaneous text-in and audio-out streaming with latency as low as 150ms. This makes real-time voice assistants and conversational agents practical without expensive hardware:
The vLLM inference backend integration (added in 2025) further accelerates throughput for high-concurrency server deployments.
For production applications, precise pronunciation control is essential. CosyVoice supports:
The repository provides a complete stack from training to production serving:
git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git
cd CosyVoice
pip install -r requirements.txt
For inference with voice cloning:
from cosyvoice.cli.cosyvoice import CosyVoice2
from cosyvoice.utils.file_utils import load_wav
import torchaudio
cosyvoice = CosyVoice2('FunAudioLLM/CosyVoice2-0.5B')
prompt_speech = load_wav('reference.wav', 16000)
for result in cosyvoice.inference_zero_shot(
'Hello, this is a test of voice cloning.',
'Reference speaker transcript',
prompt_speech
):
torchaudio.save('output.wav', result['tts_speech'], 22050)
A Gradio demo space is available on both Hugging Face and ModelScope for web-based testing without local installation.
CosyVoice is the right choice for:
In the competitive 2026 open-source TTS landscape, CosyVoice distinguishes itself through its combination of multilingual breadth, zero-shot cloning quality, and lightweight architecture. For teams that need more than single-language synthesis, it remains the most capable freely available option.