Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ def TTS(text):
|
|
13 |
with torch.no_grad():
|
14 |
output = model(**inputs).waveform
|
15 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
16 |
-
torchaudio.save(fp, output, model.config.sampling_rate)
|
17 |
return fp.name
|
18 |
iface = gr.Interface(fn=TTS, inputs="text", outputs="audio")
|
19 |
iface.launch(share=False)
|
|
|
13 |
with torch.no_grad():
|
14 |
output = model(**inputs).waveform
|
15 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
16 |
+
torchaudio.save(fp, output, model.config.sampling_rate,format="wav")
|
17 |
return fp.name
|
18 |
iface = gr.Interface(fn=TTS, inputs="text", outputs="audio")
|
19 |
iface.launch(share=False)
|