Harveenchadha commited on
Commit
4d927c3
1 Parent(s): 8ec164f

Update ttsv/utils/inference/run_gradio.py

Browse files
Files changed (1) hide show
  1. ttsv/utils/inference/run_gradio.py +4 -4
ttsv/utils/inference/run_gradio.py CHANGED
@@ -28,10 +28,10 @@ def build_gradio(args):
28
  global lang
29
  lang = args.lang
30
  load_all_models(args)
31
- textbox = gr.inputs.Textbox(placeholder="Enter Text to run", default="", label="TTS")
32
  gender = gr.inputs.Radio(choices = ['Female', 'Male'], default='Female', label='Gender')
33
- slider_noise_scale = gr.inputs.Slider(minimum=0, maximum=1.0, step=0.001, default=0.667, label='Enter Noise Scale')
34
- slider_length_sclae = gr.inputs.Slider(minimum=0, maximum=2.0, step=0.1, default=1.0, label='Enter Slider Scale')
35
 
36
  choice_transliteration = gr.inputs.Checkbox(default=True, label="Transliteration")
37
  choice_number_conversion = gr.inputs.Checkbox(default=True, label="Number Conversion")
@@ -44,7 +44,7 @@ def build_gradio(args):
44
  op = gr.outputs.Audio(type="numpy", label=None)
45
 
46
  inputs_to_gradio = [textbox, gender, slider_noise_scale, slider_length_sclae, choice_transliteration, choice_number_conversion, choice_split_sentences]
47
- iface = gr.Interface(fn=hit_tts, examples = examples, inputs=inputs_to_gradio, outputs=op, theme='huggingface', title='Vakyansh Hindi TTS', article = 'Note: Transliteration models may not work well in some scenarios which can hamper the TTS quality, to evaluate the model in better sense it is advisable to provide input in the required langauge and switch off transliteration. Contact @harveenchadha on twitter for any issues.')
48
  iface.launch(enable_queue=True)
49
 
50
  if __name__ == "__main__":
 
28
  global lang
29
  lang = args.lang
30
  load_all_models(args)
31
+ textbox = gr.inputs.Textbox(placeholder="Enter Text to run", default="", label="Enter Input Text")
32
  gender = gr.inputs.Radio(choices = ['Female', 'Male'], default='Female', label='Gender')
33
+ slider_noise_scale = gr.inputs.Slider(minimum=0, maximum=1.0, step=0.001, default=0.667, label='Noise Scale')
34
+ slider_length_sclae = gr.inputs.Slider(minimum=0, maximum=2.0, step=0.1, default=1.0, label='Length Scale')
35
 
36
  choice_transliteration = gr.inputs.Checkbox(default=True, label="Transliteration")
37
  choice_number_conversion = gr.inputs.Checkbox(default=True, label="Number Conversion")
 
44
  op = gr.outputs.Audio(type="numpy", label=None)
45
 
46
  inputs_to_gradio = [textbox, gender, slider_noise_scale, slider_length_sclae, choice_transliteration, choice_number_conversion, choice_split_sentences]
47
+ iface = gr.Interface(fn=hit_tts, examples = examples, inputs=inputs_to_gradio, outputs=op, theme='huggingface', title='Vakyansh Hindi TTS', article = 'Note: Transliteration models may not work well in some scenarios which can hamper the TTS quality, to evaluate the model in better sense it is advisable to provide input in the required language and switch off transliteration. Contact @harveenchadha on twitter for any issues.')
48
  iface.launch(enable_queue=True)
49
 
50
  if __name__ == "__main__":