Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ def text_to_speech(text):
|
|
| 10 |
mp3_data = io.BytesIO()
|
| 11 |
speech.save(mp3_data)
|
| 12 |
mp3_data.seek(0)
|
| 13 |
-
return mp3_data.getvalue()
|
| 14 |
except Exception as e:
|
| 15 |
return str(e)
|
| 16 |
else:
|
|
@@ -19,7 +19,7 @@ def text_to_speech(text):
|
|
| 19 |
iface = gr.Interface(
|
| 20 |
fn=text_to_speech,
|
| 21 |
inputs=gr.inputs.Textbox(default="Enter text here...", label="Input Text"),
|
| 22 |
-
outputs=gr.outputs.Audio(type="bytes", label="Voice"
|
| 23 |
title="Text to Speech",
|
| 24 |
description="Enter text and click 'Generate' to convert it to speech.",
|
| 25 |
theme="blue",
|
|
|
|
| 10 |
mp3_data = io.BytesIO()
|
| 11 |
speech.save(mp3_data)
|
| 12 |
mp3_data.seek(0)
|
| 13 |
+
return mp3_data.getvalue()
|
| 14 |
except Exception as e:
|
| 15 |
return str(e)
|
| 16 |
else:
|
|
|
|
| 19 |
iface = gr.Interface(
|
| 20 |
fn=text_to_speech,
|
| 21 |
inputs=gr.inputs.Textbox(default="Enter text here...", label="Input Text"),
|
| 22 |
+
outputs=gr.outputs.Audio(type="bytes", label="Voice"), # Removed the mime parameter
|
| 23 |
title="Text to Speech",
|
| 24 |
description="Enter text and click 'Generate' to convert it to speech.",
|
| 25 |
theme="blue",
|