Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -82,16 +82,18 @@ def tts(text):
|
|
| 82 |
waveform = model(**inputs).waveform.squeeze().cpu().numpy()
|
| 83 |
filename = "output.wav"
|
| 84 |
scipy.io.wavfile.write(filename, rate=model.config.sampling_rate, data=(waveform * 32767).astype(np.int16))
|
| 85 |
-
return
|
|
|
|
| 86 |
|
| 87 |
|
| 88 |
gr.Interface(
|
| 89 |
fn=tts,
|
| 90 |
inputs=gr.Textbox(label="Geli qoraal Soomaali ah"),
|
| 91 |
-
outputs=gr.
|
| 92 |
title="Somali TTS",
|
| 93 |
description="Ku qor qoraal Soomaaliyeed si aad u maqasho cod dabiici ah.",
|
| 94 |
allow_api=True
|
| 95 |
).launch()
|
| 96 |
|
|
|
|
| 97 |
|
|
|
|
| 82 |
waveform = model(**inputs).waveform.squeeze().cpu().numpy()
|
| 83 |
filename = "output.wav"
|
| 84 |
scipy.io.wavfile.write(filename, rate=model.config.sampling_rate, data=(waveform * 32767).astype(np.int16))
|
| 85 |
+
return filename # ✅ waaba string path
|
| 86 |
+
|
| 87 |
|
| 88 |
|
| 89 |
gr.Interface(
|
| 90 |
fn=tts,
|
| 91 |
inputs=gr.Textbox(label="Geli qoraal Soomaali ah"),
|
| 92 |
+
outputs=gr.File(label="Soo dejiso codka"), # ✅ sax
|
| 93 |
title="Somali TTS",
|
| 94 |
description="Ku qor qoraal Soomaaliyeed si aad u maqasho cod dabiici ah.",
|
| 95 |
allow_api=True
|
| 96 |
).launch()
|
| 97 |
|
| 98 |
+
|
| 99 |
|