barreloflube
commited on
Commit
•
e073c64
1
Parent(s):
ce81b3b
Refactor config.py to update PYTHONPATH for CosyVoice TTS imports
Browse files
tabs/audios/load_models.py
CHANGED
@@ -24,14 +24,14 @@ def init_sys():
|
|
24 |
os.environ['PYTHONPATH'] = f'{os.path.dirname(__file__)}/modules/CosyVoice/third_party/Matcha-TTS:{os.environ.get("PYTHONPATH", "")}'
|
25 |
|
26 |
# Load CosyVoice SFT
|
27 |
-
cv_sft = CosyVoice('
|
28 |
sft_speakers = cv_sft.list_avaliable_spks()
|
29 |
|
30 |
# Load CosyVoice TTS
|
31 |
-
cv_vc = CosyVoice('
|
32 |
|
33 |
# Load CosyVoice Instruct
|
34 |
-
cv_instruct = CosyVoice('
|
35 |
|
36 |
return device, df_model, df_state, cv_vc, cv_sft, sft_speakers, cv_instruct
|
37 |
|
|
|
24 |
os.environ['PYTHONPATH'] = f'{os.path.dirname(__file__)}/modules/CosyVoice/third_party/Matcha-TTS:{os.environ.get("PYTHONPATH", "")}'
|
25 |
|
26 |
# Load CosyVoice SFT
|
27 |
+
cv_sft = CosyVoice(f'{Config.MODEL_DOWNLOAD_DIR}/audios/CosyVoice-300M-SFT')
|
28 |
sft_speakers = cv_sft.list_avaliable_spks()
|
29 |
|
30 |
# Load CosyVoice TTS
|
31 |
+
cv_vc = CosyVoice(f'{Config.MODEL_DOWNLOAD_DIR}/audios/CosyVoice-300M')
|
32 |
|
33 |
# Load CosyVoice Instruct
|
34 |
+
cv_instruct = CosyVoice(f'{Config.MODEL_DOWNLOAD_DIR}/audios/CosyVoice-300M-Instruct')
|
35 |
|
36 |
return device, df_model, df_state, cv_vc, cv_sft, sft_speakers, cv_instruct
|
37 |
|