Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -33,11 +33,15 @@ def text_to_speech(text: str, speaker_wav, speaker_wav_file, language: str):
|
|
33 |
tts.tts_to_file(text, speaker=tts.speakers[0], language=language, file_path=file_path)
|
34 |
return file_path
|
35 |
|
|
|
|
|
|
|
|
|
36 |
inputs = [gr.Textbox(label="Input the text", value="", max_lines=3),
|
37 |
gr.Audio(label="Voice to clone", source="microphone", type="filepath"),
|
38 |
gr.Audio(label="Voice to clone", type="filepath"),
|
39 |
-
gr.Radio(label="Language", choices=["en", "zh-CN", "fr-fr", "pt-br", "de", "es"], value="en"),
|
40 |
-
gr.
|
41 |
outputs = gr.Audio(label="Output")
|
42 |
|
43 |
demo = gr.Interface(fn=text_to_speech, inputs=inputs, outputs=outputs)
|
|
|
33 |
tts.tts_to_file(text, speaker=tts.speakers[0], language=language, file_path=file_path)
|
34 |
return file_path
|
35 |
|
36 |
+
intro_text = """
|
37 |
+
Please note that Chinese, German, and Spanish are currently not supported for voice cloning.
|
38 |
+
"""
|
39 |
+
|
40 |
inputs = [gr.Textbox(label="Input the text", value="", max_lines=3),
|
41 |
gr.Audio(label="Voice to clone", source="microphone", type="filepath"),
|
42 |
gr.Audio(label="Voice to clone", type="filepath"),
|
43 |
+
gr.Radio(label="Language", choices=["en", "zh-CN", "fr-fr", "pt-br", "de", "es"], value="en"),
|
44 |
+
gr.Text(intro_text, font_size=14)]
|
45 |
outputs = gr.Audio(label="Output")
|
46 |
|
47 |
demo = gr.Interface(fn=text_to_speech, inputs=inputs, outputs=outputs)
|