Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ tts = TTS(model_name="tts_models/multilingual/multi-dataset/your_tts", progress_
|
|
6 |
zh_tts = TTS(model_name="tts_models/zh-CN/baker/tacotron2-DDC-GST", progress_bar=False, gpu=False)
|
7 |
de_tts = TTS(model_name = "tts_models/de/thorsten/vits", gpu=False)
|
8 |
# de_tts = TTS(model_name = "tts_models/de/thorsten/tacotron2-DCA", gpu=False)
|
9 |
-
es_tts = TTS(model_name = "tts_models/es/mai/tacotron2-DCA", progress_bar=False, gpu=False)
|
10 |
|
11 |
def text_to_speech(text: str, speaker_wav, speaker_wav_file, language: str):
|
12 |
if speaker_wav_file and not speaker_wav:
|
@@ -26,7 +26,7 @@ def text_to_speech(text: str, speaker_wav, speaker_wav_file, language: str):
|
|
26 |
# if speaker_wav is not None:
|
27 |
# es_tts.tts_to_file(text, speaker_wav=speaker_wav, file_path=file_path)
|
28 |
# else:
|
29 |
-
es_tts.tts_to_file(text, file_path=file_path)
|
30 |
else:
|
31 |
if speaker_wav is not None:
|
32 |
tts.tts_to_file(text, speaker_wav=speaker_wav, language=language, file_path=file_path)
|
@@ -37,7 +37,7 @@ def text_to_speech(text: str, speaker_wav, speaker_wav_file, language: str):
|
|
37 |
inputs = [gr.Textbox(label="Input the text", value="", max_lines=3),
|
38 |
gr.Audio(label="Voice to clone", source="microphone", type="filepath"),
|
39 |
gr.Audio(label="Voice to clone", type="filepath"),
|
40 |
-
gr.Radio(label="Language", choices=["en", "zh-CN", "fr-fr", "de"
|
41 |
outputs = gr.Audio(label="Output")
|
42 |
|
43 |
demo = gr.Interface(fn=text_to_speech, inputs=inputs, outputs=outputs)
|
|
|
6 |
zh_tts = TTS(model_name="tts_models/zh-CN/baker/tacotron2-DDC-GST", progress_bar=False, gpu=False)
|
7 |
de_tts = TTS(model_name = "tts_models/de/thorsten/vits", gpu=False)
|
8 |
# de_tts = TTS(model_name = "tts_models/de/thorsten/tacotron2-DCA", gpu=False)
|
9 |
+
# es_tts = TTS(model_name = "tts_models/es/mai/tacotron2-DCA", progress_bar=False, gpu=False)
|
10 |
|
11 |
def text_to_speech(text: str, speaker_wav, speaker_wav_file, language: str):
|
12 |
if speaker_wav_file and not speaker_wav:
|
|
|
26 |
# if speaker_wav is not None:
|
27 |
# es_tts.tts_to_file(text, speaker_wav=speaker_wav, file_path=file_path)
|
28 |
# else:
|
29 |
+
# es_tts.tts_to_file(text, file_path=file_path)
|
30 |
else:
|
31 |
if speaker_wav is not None:
|
32 |
tts.tts_to_file(text, speaker_wav=speaker_wav, language=language, file_path=file_path)
|
|
|
37 |
inputs = [gr.Textbox(label="Input the text", value="", max_lines=3),
|
38 |
gr.Audio(label="Voice to clone", source="microphone", type="filepath"),
|
39 |
gr.Audio(label="Voice to clone", type="filepath"),
|
40 |
+
gr.Radio(label="Language", choices=["en", "zh-CN", "fr-fr", "de"], value="en")]
|
41 |
outputs = gr.Audio(label="Output")
|
42 |
|
43 |
demo = gr.Interface(fn=text_to_speech, inputs=inputs, outputs=outputs)
|