Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,10 @@ def tts(text: str, speaker_idx: str):
|
|
57 |
# Salvar o áudio em um arquivo temporário
|
58 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
59 |
synthesizer.save_wav(wavs, fp)
|
60 |
-
|
|
|
|
|
|
|
61 |
|
62 |
# Criar a interface Gradio
|
63 |
with gr.Blocks(title=my_title, css=".gradio-container {max-width: 900px; margin: auto;}") as demo:
|
|
|
57 |
# Salvar o áudio em um arquivo temporário
|
58 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
59 |
synthesizer.save_wav(wavs, fp)
|
60 |
+
audio_path = fp.name # Caminho do arquivo gerado
|
61 |
+
|
62 |
+
return audio_path, audio_path # Retorna o caminho como áudio e arquivo
|
63 |
+
|
64 |
|
65 |
# Criar a interface Gradio
|
66 |
with gr.Blocks(title=my_title, css=".gradio-container {max-width: 900px; margin: auto;}") as demo:
|