Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
cb71acf
1
Parent(s):
b1769de
change snapshot_download source
Browse files- app.py +4 -4
- cosyvoice/cli/cosyvoice.py +1 -1
app.py
CHANGED
@@ -50,9 +50,9 @@ from funasr.utils.postprocess_utils import rich_transcription_postprocess
|
|
50 |
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
51 |
sys.path.append('{}/third_party/Matcha-TTS'.format(ROOT_DIR))
|
52 |
|
53 |
-
from
|
54 |
-
snapshot_download('
|
55 |
-
snapshot_download('
|
56 |
os.system('cd pretrained_models/CosyVoice-ttsfrd/ && pip install ttsfrd_dependency-0.1-py3-none-any.whl && pip install ttsfrd-0.4.2-cp310-cp310-linux_x86_64.whl && tar -xvf resource.tar')
|
57 |
|
58 |
from cosyvoice.cli.cosyvoice import CosyVoice2
|
@@ -227,7 +227,7 @@ if __name__ == '__main__':
|
|
227 |
prompt_sr, target_sr = 16000, 24000
|
228 |
default_data = np.zeros(target_sr)
|
229 |
|
230 |
-
model_dir = "
|
231 |
asr_model = AutoModel(
|
232 |
model=model_dir,
|
233 |
disable_update=True,
|
|
|
50 |
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
51 |
sys.path.append('{}/third_party/Matcha-TTS'.format(ROOT_DIR))
|
52 |
|
53 |
+
from huggingface_hub import snapshot_download
|
54 |
+
snapshot_download('FunAudioLLM/CosyVoice2-0.5B', local_dir='pretrained_models/CosyVoice2-0.5B')
|
55 |
+
snapshot_download('FunAudioLLM/CosyVoice-ttsfrd', local_dir='pretrained_models/CosyVoice-ttsfrd')
|
56 |
os.system('cd pretrained_models/CosyVoice-ttsfrd/ && pip install ttsfrd_dependency-0.1-py3-none-any.whl && pip install ttsfrd-0.4.2-cp310-cp310-linux_x86_64.whl && tar -xvf resource.tar')
|
57 |
|
58 |
from cosyvoice.cli.cosyvoice import CosyVoice2
|
|
|
227 |
prompt_sr, target_sr = 16000, 24000
|
228 |
default_data = np.zeros(target_sr)
|
229 |
|
230 |
+
model_dir = "FunAudioLLM/SenseVoiceSmall"
|
231 |
asr_model = AutoModel(
|
232 |
model=model_dir,
|
233 |
disable_update=True,
|
cosyvoice/cli/cosyvoice.py
CHANGED
@@ -15,7 +15,7 @@ import os
|
|
15 |
import time
|
16 |
from tqdm import tqdm
|
17 |
from hyperpyyaml import load_hyperpyyaml
|
18 |
-
from
|
19 |
import torch
|
20 |
from cosyvoice.cli.frontend import CosyVoiceFrontEnd
|
21 |
from cosyvoice.cli.model import CosyVoiceModel, CosyVoice2Model
|
|
|
15 |
import time
|
16 |
from tqdm import tqdm
|
17 |
from hyperpyyaml import load_hyperpyyaml
|
18 |
+
from huggingface_hub import snapshot_download
|
19 |
import torch
|
20 |
from cosyvoice.cli.frontend import CosyVoiceFrontEnd
|
21 |
from cosyvoice.cli.model import CosyVoiceModel, CosyVoice2Model
|