SuperAPIAI Directory

CosyVoice

github.com · AI audio

CosyVoice is a multilingual large speech generation model under the FunAudioLLM series, providing full-stack capabilities for inference, training, and deployment. The latest version, Fun-CosyVoice 3.0, is built on a large language model (LLM) and surpasses the previous generation CosyVoice 2.0 in content consistency, speaker similarity, and prosodic naturalness, and is designed for in-the-wild zero-shot multilingual speech synthesis. It covers 9 common languages (Chinese, English, Japanese, Korean, German, Spanish, French, Italian, Russian) and more than 18 Chinese dialects/accents, and supports multilingual/cross-lingual zero-shot voice cloning. It features pronunciation correction (Chinese pinyin and English CMU phonemes), text normalization, bidirectional streaming (text input stream and audio output stream, with latency as low as 150ms), instruction control (language, dialect, emotion, speaking rate, volume, etc.), and other capabilities. The project is open source, providing pretrained models, training/inference scripts, a web demo, and deployment solutions, and supports vLLM and TensorRT-LLM acceleration.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

CosyVoice is a multilingual large speech generation model that provides full-stack capabilities for inference, training, and deployment, and is part of the FunAudioLLM speech AI toolkit. Its latest version, Fun-CosyVoice 3.0, is an advanced text-to-speech (TTS) system based on a large language model (LLM). Building on the previous generation CosyVoice 2.0, it improves content consistency, speaker similarity, and prosodic naturalness, and targets in-the-wild zero-shot multilingual speech synthesis.

Key capabilities:

  • Language coverage: supports 9 common languages (Chinese, English, Japanese, Korean, German, Spanish, French, Italian, Russian), more than 18 Chinese dialects/accents (Cantonese, Minnan, Sichuan, Northeastern, Shaanxi, Shanxi, Shanghai, Tianjin, Shandong, Ningxia, Gansu, etc.), and supports multilingual/cross-lingual zero-shot voice cloning.
  • Content consistency and naturalness: achieves state-of-the-art levels in content consistency, speaker similarity, and prosodic naturalness.
  • Pronunciation correction: supports pronunciation correction for Chinese pinyin and English CMU phonemes, providing more controllability and suitable for production use.
  • Text normalization: can read numbers, special symbols, and various text formats without traditional front-end modules.
  • Bidirectional streaming: supports text input streaming and audio output streaming, with latency as low as 150ms while maintaining high-quality audio output.
  • Instruction support: supports various instructions such as language, dialect, emotion, speaking rate, and volume.

Usage:

  • Clone the repository: git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git;若子模块克隆失败,进入目录后运行 git submodule update --init --recursive until successful.
  • Install Conda and create an environment: conda create -n cosyvoice -y python=3.10; conda activate cosyvoice; pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com. If you encounter sox compatibility issues, on Ubuntu you can run sudo apt-get install sox libsox-dev, and on CentOS you can run sudo yum install sox sox-devel.
  • It is strongly recommended to download the pretrained models Fun-CosyVoice3-0.5B, CosyVoice2-0.5B, CosyVoice-300M, CosyVoice-300M-SFT, CosyVoice-300M-Instruct, and the CosyVoice-ttsfrd resources. Optionally, extract the ttsfrd resources and install the ttsfrd package to achieve better text normalization performance; if not installed, wetext is used by default.
  • It is recommended to use Fun-CosyVoice3-0.5B for better performance. For detailed usage of each model, see example.py.
  • CosyVoice2/3 supports vLLM 0.11.x+ (V1 engine) and vLLM 0.9.0 (older version); versions below 0.9.0 do not support inference, and intermediate versions such as 0.10.x have not been tested. vLLM has specific requirements; you can create a new environment to prevent hardware incompatibility or damage to the old environment.
  • You can quickly become familiar with CosyVoice through the Web demo page.
  • Advanced users can use the training and inference scripts in examples/libritts.
  • Service deployment: Using TensorRT-LLM to accelerate the CosyVoice2 LLM can achieve a 4x speedup compared with the HuggingFace transformers implementation.

Applicable scenarios: multilingual speech synthesis, zero-shot voice cloning, dialect/accent speech generation, real-time speech applications requiring low-latency streaming output, and production-grade TTS deployment requiring pronunciation control and text normalization.

Limitations: The materials do not provide specific hardware requirements, model license terms, commercial use restrictions, or pricing information, and none are currently provided.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools