Start web demo

You can use our web demo page to get familiar with CosyVoice quickly. We support sft/zero_shot/cross_lingual/instruct inference in web demo.

Please see the demo website for details.

git clone https://github.com/brainiakk/Cosyvoice-WebUI-English.git
# Create & activate your virtual environment 
cd Cosyvoice-WebUI-English/CosyVoice
# Install required packages
pip install -r requirements.txt
# Make model directory
mkdir pretrained_models

Download Models

CosyVoice-300M HF Link: https://huggingface.co/FunAudioLLM/CosyVoice-300M
CosyVoice-300M-SFT HF Link: https://huggingface.co/FunAudioLLM/CosyVoice-300M-SFT
CosyVoice-300M-Instruct HF Link: https://huggingface.co/FunAudioLLM/CosyVoice-300M-Instruct

Make sure you have downloaded the models & copied them to the pretrained_models/Model directory

e.g:
pretrained_models/CosyVoice-300M
pretrained_models/CosyVoice-300M-SFT
pretrained_models/CosyVoice-300M-Instruct

Depending on the model you downloaded

# change iic/CosyVoice-300M-SFT for sft inference, or iic/CosyVoice-300M-Instruct for instruct inference
python -m webui.py --port 50000 --model_dir pretrained_models/CosyVoice-300M