HusseinBashir commited on
Commit
f56b50f
·
verified ·
1 Parent(s): b61a502

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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
- return filename
 
 
 
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
- title="Somali TTS",
92
- description="Ku qor qoraal Soomaaliyeed si aad u maqasho cod dabiici ah.",
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
+