DHEIVER commited on
Commit
5b49376
·
verified ·
1 Parent(s): 0e9d1bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- return fp.name
 
 
 
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: