HusseinBashir commited on
Commit
40ccb37
·
verified ·
1 Parent(s): 8bb6795

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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 (filename,) # <-- important
 
86
 
87
 
88
  gr.Interface(
89
  fn=tts,
90
  inputs=gr.Textbox(label="Geli qoraal Soomaali ah"),
91
- outputs=gr.Audio(label="Codka TTS", type="filepath"), # <-- important
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