Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -82,12 +82,14 @@ 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 |
-
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
gr.Interface(
|
| 88 |
fn=tts,
|
| 89 |
inputs=gr.Textbox(label="Geli qoraal Soomaali ah"),
|
| 90 |
outputs=gr.Audio(type="filepath", label="Codka TTS"),
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
).launch()
|
|
|
|
| 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 |
+
|
| 86 |
+
# ✅ Return full public link
|
| 87 |
+
return f"https://HusseinBashir--Somali_tts.hf.space/file={filename}"
|
| 88 |
+
|
| 89 |
|
| 90 |
gr.Interface(
|
| 91 |
fn=tts,
|
| 92 |
inputs=gr.Textbox(label="Geli qoraal Soomaali ah"),
|
| 93 |
outputs=gr.Audio(type="filepath", label="Codka TTS"),
|
| 94 |
+
)
|
| 95 |
+
|
|
|