ASLP-lab commited on
Commit
52dec16
·
verified ·
1 Parent(s): 59c4895

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +75 -0
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- ![WenetSpeech-Yue](https://huggingface.co/datasets/ASLP-lab/WenetSpeech-Yue/resolve/main/wenetspeech_pipe.svg) -->
2
+
3
+
4
+ ## 👉🏻 WenetSpeech-Yue 👈🏻
5
+ **WenetSpeech-Yue**: [Demos](https://aslp-lab.github.io/WenetSpeech-Yue/); [Paper](https://arxiv.org/abs/2509.03959); [Github](https://github.com/ASLP-lab/WenetSpeech-Yue); [HuggingFace](https://huggingface.co/datasets/ASLP-lab/WenetSpeech-Yue)
6
+
7
+ ## Highlight🔥
8
+
9
+ **WenetSpeech-Yue TTS Models** have been released!
10
+ This repository contains two versions of the TTS models:
11
+ 1. **ASLP-lab/Cosyvoice2-Yue**: The base model for Cantonese TTS.
12
+ 2. **ASLP-lab/Cosyvoice2-Yue-ZoengJyutGaai**: A fine-tuned, higher-quality version for more natural speech generation.
13
+
14
+ ## Install
15
+
16
+ **Clone and install**
17
+
18
+ - Clone the repo
19
+ ``` sh
20
+ git clone https://github.com/ASLP-lab/WenetSpeech-Yue.git
21
+ cd CosyVoice2-Yue
22
+ ```
23
+
24
+ - Create Conda env:
25
+
26
+ ``` sh
27
+ conda create -n cosyvoice python=3.10
28
+ conda activate cosyvoice
29
+ # pynini is required by WeTextProcessing, use conda to install it as it can be executed on all platform.
30
+ conda install -y -c conda-forge pynini==2.1.5
31
+ pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
32
+
33
+ ```
34
+
35
+ **Model download**
36
+
37
+ ``` python
38
+ from huggingface_hub import snapshot_download
39
+ snapshot_download('ASLP-lab/WSYue-TTS', local_dir='pretrained_models')
40
+ ```
41
+
42
+ **Usage**
43
+
44
+
45
+ ``` python
46
+ import sys
47
+ sys.path.append('third_party/Matcha-TTS')
48
+ from cosyvoice.cli.cosyvoice import CosyVoice, CosyVoice2
49
+ from cosyvoice.utils.file_utils import load_wav
50
+ import torchaudio
51
+ ```
52
+
53
+ **CosyVoice2 Usage**
54
+ ```python
55
+ cosyvoice_base = CosyVoice2(
56
+ 'ASLP-lab/Cosyvoice2-Yue',
57
+ load_jit=False, load_trt=False, load_vllm=False, fp16=False
58
+ )
59
+
60
+ cosyvoice_zjg = CosyVoice2(
61
+ 'ASLP-lab/Cosyvoice2-Yue-ZoengJyutGaai',
62
+ load_jit=False, load_trt=False, load_vllm=False, fp16=False
63
+ )
64
+
65
+ prompt_speech_16k = load_wav('asset/sg_017_090.wav', 16000)
66
+
67
+ for i, j in enumerate(cosyvoice_base.inference_instruct2('收到朋友从远方寄嚟嘅生日礼物,嗰份意外嘅惊喜同埋深深嘅祝福令我心入面充满咗甜蜜嘅快乐,笑容好似花咁绽放。', '用粤语说这句话', prompt_speech_16k, stream=False)):
68
+ torchaudio.save('base_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
69
+
70
+ for i, j in enumerate(cosyvoice_zjg.inference_instruct2('收到朋友从远方寄嚟嘅生日礼物,嗰份意外嘅惊喜同埋深深嘅祝福令我心入面充满咗甜蜜嘅快乐,笑容好似花咁绽放。', '用粤语说这句话', prompt_speech_16k, stream=False)):
71
+ torchaudio.save('zjg_{}.wav'.format(i), j['tts_speech'], cosyvoice.sample_rate)
72
+ ```
73
+
74
+ ## Contact
75
+ If you are interested in leaving a message to our research team, feel free to email [email protected] or [email protected].