Abrahamau commited on
Commit
634495d
·
verified ·
1 Parent(s): 356fefd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -28,12 +28,9 @@ def guessanAge(model, image):
28
  #@spaces.GPU(duration=120)
29
  def text2speech(text, sample):
30
  os.environ["COQUI_TOS_AGREED"] = "1"
31
- print(text, sample)
32
- print(TTS().list_models())
33
  if len(text) > 0:
34
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2")
35
  wav = tts.tts_to_file(text=text, file_path="output.wav", speaker_wav=sample, language="en")
36
- print(wav, type(wav))
37
  return wav
38
 
39
  @spaces.GPU
@@ -76,7 +73,7 @@ tab2 = gr.Interface(
76
  textbox = gr.Textbox(value="good morning pineapple! looking very good very nice!")
77
  tab3 = gr.Interface(
78
  fn=text2speech,
79
- inputs=[textbox, gr.Audio(sources=['upload', 'microphone'], type="filepath", format="wav")],
80
  outputs=["audio"],
81
  )
82
 
 
28
  #@spaces.GPU(duration=120)
29
  def text2speech(text, sample):
30
  os.environ["COQUI_TOS_AGREED"] = "1"
 
 
31
  if len(text) > 0:
32
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2")
33
  wav = tts.tts_to_file(text=text, file_path="output.wav", speaker_wav=sample, language="en")
 
34
  return wav
35
 
36
  @spaces.GPU
 
73
  textbox = gr.Textbox(value="good morning pineapple! looking very good very nice!")
74
  tab3 = gr.Interface(
75
  fn=text2speech,
76
+ inputs=[textbox, gr.Audio(sources=['microphone'], type="filepath", format="wav")],
77
  outputs=["audio"],
78
  )
79