o-862-268-o commited on
Commit
67f1cda
·
verified ·
1 Parent(s): 13ecb6d
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -8,6 +8,7 @@
8
 
9
  import os
10
  import torch
 
11
  import gradio as gr
12
  from TTS.api import TTS
13
 
@@ -19,8 +20,7 @@ def func__vcTTS(*ip):
19
  try:
20
  vc_tts = TTS(model_name=ip[0], progress_bar=True).to(gcPU)
21
  op = vc_tts.tts(text=ip[1],speaker_wav=ip[2],language='en')
22
- print(type(op))
23
- return 'vcTTS',gr.Audio()
24
  except Exception as expn:
25
  return expn,gr.Audio()
26
 
@@ -36,7 +36,7 @@ with gr.Blocks() as io:
36
  gr.Markdown("<hr>")
37
  gr.Markdown('<center>[op] :: text-audio</center>')
38
  op0 = gr.Textbox()
39
- op1 = gr.Audio()
40
 
41
  p.click(func__vcTTS, inputs=[ip0,ip1,ip2], outputs=[op0,op1])
42
 
 
8
 
9
  import os
10
  import torch
11
+ import numpy as np
12
  import gradio as gr
13
  from TTS.api import TTS
14
 
 
20
  try:
21
  vc_tts = TTS(model_name=ip[0], progress_bar=True).to(gcPU)
22
  op = vc_tts.tts(text=ip[1],speaker_wav=ip[2],language='en')
23
+ return 'vcTTS',np.asarray(op)
 
24
  except Exception as expn:
25
  return expn,gr.Audio()
26
 
 
36
  gr.Markdown("<hr>")
37
  gr.Markdown('<center>[op] :: text-audio</center>')
38
  op0 = gr.Textbox()
39
+ op1 = gr.Audio(type='numpy')
40
 
41
  p.click(func__vcTTS, inputs=[ip0,ip1,ip2], outputs=[op0,op1])
42