Spaces:
elioonpc
/
Runtime error

Vaibhav Srivastav commited on
Commit
33e0dc8
1 Parent(s): 194fffd
Files changed (2) hide show
  1. app.py +3 -2
  2. requirements.txt +1 -0
app.py CHANGED
@@ -3,12 +3,12 @@ from TTS.api import TTS
3
 
4
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v1", gpu=True)
5
 
6
- def predict(prompt, audio_file_pth):
7
 
8
  tts.tts_to_file(text=prompt,
9
  file_path="output.wav",
10
  speaker_wav=audio_file_pth,
11
- language="en")
12
 
13
  return gr.make_waveform(audio="output.wav",)
14
 
@@ -19,6 +19,7 @@ gr.Interface(
19
  fn=predict,
20
  inputs=[
21
  gr.Textbox(label="Prompt", info = "One or two sentences at a time is better* (max: 10)", placeholder = "It took me quite a long time to develop a voice, and now that I have it I'm not going to be silent.",),
 
22
  gr.Audio(label="Upload Speaker WAV", type="filepath"),
23
  ],
24
  outputs=[
 
3
 
4
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v1", gpu=True)
5
 
6
+ def predict(prompt, language, audio_file_pth):
7
 
8
  tts.tts_to_file(text=prompt,
9
  file_path="output.wav",
10
  speaker_wav=audio_file_pth,
11
+ language=language)
12
 
13
  return gr.make_waveform(audio="output.wav",)
14
 
 
19
  fn=predict,
20
  inputs=[
21
  gr.Textbox(label="Prompt", info = "One or two sentences at a time is better* (max: 10)", placeholder = "It took me quite a long time to develop a voice, and now that I have it I'm not going to be silent.",),
22
+ gr.Dropdown(choices=["en", "es", "fr", "de", "it", "pt", "pl", "tr", "ru", "nl", "cz", "ar", "zh"], max_choices=1),
23
  gr.Audio(label="Upload Speaker WAV", type="filepath"),
24
  ],
25
  outputs=[
requirements.txt CHANGED
@@ -0,0 +1 @@
 
 
1
+ TTS