Spaces:
Runtime error
Runtime error
use voice
Browse files
app.py
CHANGED
|
@@ -23,9 +23,7 @@ def generate_audio(text):
|
|
| 23 |
# if synthesizer is None:
|
| 24 |
# raise NameError("model not found")
|
| 25 |
tts_engine= TextToSpeech()
|
| 26 |
-
|
| 27 |
-
text2 = text1.decode("utf-8")
|
| 28 |
-
return text2
|
| 29 |
# with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
| 30 |
# synthesizer.save_wav(wav, fp)
|
| 31 |
# return fp.name
|
|
@@ -38,8 +36,8 @@ iface = gr.Interface(
|
|
| 38 |
default="This sentence has been generated by a speech synthesis system.",
|
| 39 |
),
|
| 40 |
],
|
| 41 |
-
|
| 42 |
-
outputs=gr.outputs.Textbox(label="Recognized speech from speechbrain model"),
|
| 43 |
title="Kinyarwanda tts Demo",
|
| 44 |
description="Kinyarwanda tts build with ",
|
| 45 |
allow_flagging=False,
|
|
|
|
| 23 |
# if synthesizer is None:
|
| 24 |
# raise NameError("model not found")
|
| 25 |
tts_engine= TextToSpeech()
|
| 26 |
+
return tts_engine.run_tts(text)
|
|
|
|
|
|
|
| 27 |
# with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
| 28 |
# synthesizer.save_wav(wav, fp)
|
| 29 |
# return fp.name
|
|
|
|
| 36 |
default="This sentence has been generated by a speech synthesis system.",
|
| 37 |
),
|
| 38 |
],
|
| 39 |
+
outputs=gr.outputs.Audio(type="numpy",label="Output"),
|
| 40 |
+
#outputs=gr.outputs.Textbox(label="Recognized speech from speechbrain model"),
|
| 41 |
title="Kinyarwanda tts Demo",
|
| 42 |
description="Kinyarwanda tts build with ",
|
| 43 |
allow_flagging=False,
|