Spaces:
Runtime error
Runtime error
Commit
·
f27bc08
1
Parent(s):
25a1b59
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,8 +7,13 @@ import gradio as gr
|
|
| 7 |
from TTS.api import TTS
|
| 8 |
|
| 9 |
model_names = TTS().list_models()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
print(model_names)
|
| 11 |
-
tts = TTS(
|
| 12 |
#tts.to("cuda") # cuda only
|
| 13 |
|
| 14 |
def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree):
|
|
|
|
| 7 |
from TTS.api import TTS
|
| 8 |
|
| 9 |
model_names = TTS().list_models()
|
| 10 |
+
m = model_names[1]
|
| 11 |
+
for model in model_names:
|
| 12 |
+
if model.find("/fr/") != -1:
|
| 13 |
+
m = model
|
| 14 |
+
break
|
| 15 |
print(model_names)
|
| 16 |
+
tts = TTS(m, gpu=False).to("cpu")
|
| 17 |
#tts.to("cuda") # cuda only
|
| 18 |
|
| 19 |
def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree):
|