Spaces:
Running
on
Zero
Running
on
Zero
no message
Browse files- deploy.py +2 -2
- deploy.sh +18 -8
- requirements.txt → requirements_.txt +0 -0
- webui.py +1 -1
deploy.py
CHANGED
@@ -24,7 +24,7 @@ def run_shell_script(script_path):
|
|
24 |
# 使用方法示例
|
25 |
# 假设有一个名为example.sh的脚本文件在当前目录下
|
26 |
run_shell_script('deploy.sh')
|
27 |
-
|
28 |
class Args:
|
29 |
def __init__(self):
|
30 |
self.port = 5000
|
@@ -43,4 +43,4 @@ prompt_sr, target_sr = 16000, 22050
|
|
43 |
default_data = np.zeros(target_sr)
|
44 |
|
45 |
# 调用 main 时传递 args
|
46 |
-
main(args)
|
|
|
24 |
# 使用方法示例
|
25 |
# 假设有一个名为example.sh的脚本文件在当前目录下
|
26 |
run_shell_script('deploy.sh')
|
27 |
+
|
28 |
class Args:
|
29 |
def __init__(self):
|
30 |
self.port = 5000
|
|
|
43 |
default_data = np.zeros(target_sr)
|
44 |
|
45 |
# 调用 main 时传递 args
|
46 |
+
main(args,sft_spk)
|
deploy.sh
CHANGED
@@ -1,23 +1,33 @@
|
|
1 |
#!/bin/bash
|
|
|
|
|
|
|
2 |
|
3 |
-
|
|
|
|
|
4 |
# pynini is required by WeTextProcessing, use conda to install it as it can be executed on all platform.
|
5 |
-
pip install
|
6 |
-
pip install -r requirements.txt
|
7 |
|
8 |
# If you encounter sox compatibility issues
|
9 |
# ubuntu
|
|
|
10 |
apt-get install sox libsox-dev
|
11 |
|
12 |
mkdir -p pretrained_models
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
15 |
#huggingface-cli download FunAudioLLM/CosyVoice-ttsfrd --local-dir pretrained_models/CosyVoice-ttsfrd --token=$hf_token
|
16 |
|
17 |
ls pretrained_models
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
|
23 |
export PYTHONPATH=third_party/Matcha-TTS
|
|
|
1 |
#!/bin/bash
|
2 |
+
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
3 |
+
sh Miniconda3-latest-Linux-x86_64.sh -b
|
4 |
+
source ~/miniconda3/bin/activate
|
5 |
|
6 |
+
conda create -n cosyvoice python=3.8
|
7 |
+
conda activate cosyvoice
|
8 |
+
conda install -y -c conda-forge pynini==2.1.5
|
9 |
# pynini is required by WeTextProcessing, use conda to install it as it can be executed on all platform.
|
10 |
+
pip install -r requirements_.txt
|
|
|
11 |
|
12 |
# If you encounter sox compatibility issues
|
13 |
# ubuntu
|
14 |
+
apt-get -y update
|
15 |
apt-get install sox libsox-dev
|
16 |
|
17 |
mkdir -p pretrained_models
|
18 |
+
git clone https://www.modelscope.cn/iic/CosyVoice-300M.git pretrained_models/CosyVoice-300M
|
19 |
+
#git clone https://www.modelscope.cn/iic/CosyVoice-300M-25Hz.git pretrained_models/CosyVoice-300M-25Hz
|
20 |
+
#git clone https://www.modelscope.cn/iic/CosyVoice-300M-SFT.git pretrained_models/CosyVoice-300M-SFT
|
21 |
+
#git clone https://www.modelscope.cn/iic/CosyVoice-300M-Instruct.git pretrained_models/CosyVoice-300M-Instruct
|
22 |
+
git clone https://www.modelscope.cn/iic/CosyVoice-ttsfrd.git pretrained_models/CosyVoice-ttsfrd
|
23 |
+
#huggingface-cli download model-scope/CosyVoice-300M --local-dir pretrained_models/CosyVoice-300M --token=$hf_token
|
24 |
+
#huggingface-cli download model-scope/CosyVoice-300M-SFT --local-dir pretrained_models/CosyVoice-300M-SFT --token=$hf_token
|
25 |
#huggingface-cli download FunAudioLLM/CosyVoice-ttsfrd --local-dir pretrained_models/CosyVoice-ttsfrd --token=$hf_token
|
26 |
|
27 |
ls pretrained_models
|
28 |
|
29 |
+
cd pretrained_models/CosyVoice-ttsfrd/
|
30 |
+
unzip resource.zip -d .
|
31 |
+
pip install ttsfrd-0.3.6-cp38-cp38-linux_x86_64.whl
|
32 |
|
33 |
export PYTHONPATH=third_party/Matcha-TTS
|
requirements.txt → requirements_.txt
RENAMED
File without changes
|
webui.py
CHANGED
@@ -132,7 +132,7 @@ def generate_audio(tts_text, mode_checkbox_group, sft_dropdown, prompt_text, pro
|
|
132 |
yield (target_sr, i['tts_speech'].numpy().flatten())
|
133 |
|
134 |
|
135 |
-
def main(args):
|
136 |
with gr.Blocks() as demo:
|
137 |
gr.Markdown("### 代码库 [CosyVoice](https://github.com/FunAudioLLM/CosyVoice) \
|
138 |
预训练模型 [CosyVoice-300M](https://www.modelscope.cn/models/iic/CosyVoice-300M) \
|
|
|
132 |
yield (target_sr, i['tts_speech'].numpy().flatten())
|
133 |
|
134 |
|
135 |
+
def main(args,sft_spk):
|
136 |
with gr.Blocks() as demo:
|
137 |
gr.Markdown("### 代码库 [CosyVoice](https://github.com/FunAudioLLM/CosyVoice) \
|
138 |
预训练模型 [CosyVoice-300M](https://www.modelscope.cn/models/iic/CosyVoice-300M) \
|