Views
No views yet
Fun-CosyVoice3-0.5B. The fine-tuned LLM supports nine accents:north, Sichuan, Guangdong, south, Henan, Shanghai, Wuhan,
Tianjin, and singapore.llm.pt. A separate CosyVoice checkout is not required.1git clone https://huggingface.co/walston/cosyvoice3-multiaccent
2cd cosyvoice3-multiaccent
3pip install -r requirements.txt
4python inference.py \
5 --text "今天的天气很好,我们一起去吃饭吧。" \
6 --accent Sichuan \
7 --output sichuan.wav1from huggingface_hub import snapshot_download
2
3model_dir = snapshot_download("walston/cosyvoice3-multiaccent")inference.py from model_dir, or import the bundled CosyVoice code.
CUDA is recommended. CPU inference is possible but slow.handler.py, which implements a custom Endpoint
handler. Request format:1{
2 "inputs": "今天的天气很好,我们一起去吃饭吧。",
3 "parameters": {
4 "accent": "Sichuan",
5 "speed": 1.0
6 }
7}audio_base64, sample_rate, and accent. The bundled
reference voice is used by default. Pass a WAV file as
parameters.prompt_audio_base64 to select another reference voice.| ID | Accent |
|---|---|
| 0 | north |
| 1 | Sichuan |
| 2 | Guangdong |
| 3 | south |
| 4 | Henan |
| 5 | Shanghai |
| 6 | Wuhan |
| 7 | Tianjin |
| 8 | singapore |