Update voice_processing.py
Browse files- voice_processing.py +3 -9
voice_processing.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import asyncio
|
2 |
import datetime
|
3 |
import logging
|
4 |
import os
|
@@ -29,12 +28,11 @@ logging.getLogger("markdown_it").setLevel(logging.WARNING)
|
|
29 |
logging.getLogger("urllib3").setLevel(logging.WARNING)
|
30 |
logging.getLogger("matplotlib").setLevel(logging.WARNING)
|
31 |
|
32 |
-
limitation =
|
33 |
-
|
34 |
config = Config()
|
35 |
|
36 |
# Edge TTS
|
37 |
-
tts_voice_list =
|
38 |
tts_voices = ["mn-MN-BataaNeural", "mn-MN-YesuiNeural"] # Specific voices
|
39 |
|
40 |
# RVC models
|
@@ -165,8 +163,7 @@ def tts(model_name, tts_text, tts_voice, index_rate, use_uploaded_voice, uploade
|
|
165 |
print(f"Audio duration: {duration}s")
|
166 |
if limitation and duration >= 20:
|
167 |
return (
|
168 |
-
f"Audio should be
|
169 |
-
None,
|
170 |
None,
|
171 |
)
|
172 |
|
@@ -228,6 +225,3 @@ voice_mapping = {
|
|
228 |
|
229 |
hubert_model = load_hubert()
|
230 |
rmvpe_model = RMVPE("rmvpe.pt", config.is_half, config.device)
|
231 |
-
|
232 |
-
|
233 |
-
|
|
|
|
|
1 |
import datetime
|
2 |
import logging
|
3 |
import os
|
|
|
28 |
logging.getLogger("urllib3").setLevel(logging.WARNING)
|
29 |
logging.getLogger("matplotlib").setLevel(logging.WARNING)
|
30 |
|
31 |
+
limitation =
|
|
|
32 |
config = Config()
|
33 |
|
34 |
# Edge TTS
|
35 |
+
tts_voice_list = edge_tts.list_voices()
|
36 |
tts_voices = ["mn-MN-BataaNeural", "mn-MN-YesuiNeural"] # Specific voices
|
37 |
|
38 |
# RVC models
|
|
|
163 |
print(f"Audio duration: {duration}s")
|
164 |
if limitation and duration >= 20:
|
165 |
return (
|
166 |
+
f"Audio should be None,
|
|
|
167 |
None,
|
168 |
)
|
169 |
|
|
|
225 |
|
226 |
hubert_model = load_hubert()
|
227 |
rmvpe_model = RMVPE("rmvpe.pt", config.is_half, config.device)
|
|
|
|
|
|