Spaces:
Running
on
Zero
Running
on
Zero
no message
Browse files
webui.py
CHANGED
@@ -28,6 +28,8 @@ sys.path.append('{}/third_party/Matcha-TTS'.format(ROOT_DIR))
|
|
28 |
from cosyvoice.cli.cosyvoice import CosyVoice
|
29 |
from cosyvoice.utils.file_utils import load_wav, logging
|
30 |
from cosyvoice.utils.common import set_all_random_seed
|
|
|
|
|
31 |
|
32 |
inference_mode_list = ['预训练音色', '3s极速复刻', '跨语种复刻', '自然语言控制']
|
33 |
instruct_dict = {'预训练音色': '1. 选择预训练音色\n2. 点击生成音频按钮',
|
@@ -140,17 +142,21 @@ import threading
|
|
140 |
python_version = platform.python_version()
|
141 |
print("Python version:", python_version)
|
142 |
from huggingface_hub import dump_environment_info
|
143 |
-
|
144 |
dump_environment_info()
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
os.system('apt-get -y update && apt-get -y install sox libsox-dev')
|
149 |
|
150 |
parser = argparse.ArgumentParser()
|
151 |
-
parser.add_argument('--port',
|
152 |
-
type=int,
|
153 |
-
default=8000)
|
154 |
parser.add_argument('--model_dir',
|
155 |
type=str,
|
156 |
default='pretrained_models/CosyVoice-300M',
|
|
|
28 |
from cosyvoice.cli.cosyvoice import CosyVoice
|
29 |
from cosyvoice.utils.file_utils import load_wav, logging
|
30 |
from cosyvoice.utils.common import set_all_random_seed
|
31 |
+
import logging
|
32 |
+
logging.basicConfig(level=logging.INFO)
|
33 |
|
34 |
inference_mode_list = ['预训练音色', '3s极速复刻', '跨语种复刻', '自然语言控制']
|
35 |
instruct_dict = {'预训练音色': '1. 选择预训练音色\n2. 点击生成音频按钮',
|
|
|
142 |
python_version = platform.python_version()
|
143 |
print("Python version:", python_version)
|
144 |
from huggingface_hub import dump_environment_info
|
|
|
145 |
dump_environment_info()
|
146 |
+
|
147 |
+
os.system('mkdir -p pretrained_models')
|
148 |
+
os.system('git clone https://huggingface.co/FunAudioLLM/CosyVoice-300M pretrained_models/CosyVoice-300M')
|
149 |
+
os.system('cd pretrained_models/CosyVoice-300M && git checkout 39c4e13d46bd4dfb840d214547623e5fcd2428e2')
|
150 |
+
|
151 |
+
os.system('git clone https://huggingface.co/FunAudioLLM/CosyVoice-300M-SFT pretrained_models/CosyVoice-300M-SFT')
|
152 |
+
os.system('cd pretrained_models/CosyVoice-300M-SFT && git checkout 096a5cff8d497fabb3dec2756a200f3688457a1b')
|
153 |
+
|
154 |
+
os.system('git clone https://huggingface.co/FunAudioLLM/CosyVoice-300M-Instruct pretrained_models/CosyVoice-300M-Instruct')
|
155 |
+
os.system('cd pretrained_models/CosyVoice-300M-Instruct && git checkout ba5265d9a3169c1fedce145122c9dd4bc24e062c')
|
156 |
|
157 |
os.system('apt-get -y update && apt-get -y install sox libsox-dev')
|
158 |
|
159 |
parser = argparse.ArgumentParser()
|
|
|
|
|
|
|
160 |
parser.add_argument('--model_dir',
|
161 |
type=str,
|
162 |
default='pretrained_models/CosyVoice-300M',
|