Harveenchadha commited on
Commit
8ec164f
·
1 Parent(s): 3ff49f5

Update ttsv/utils/inference/run_gradio.py

Browse files
Files changed (1) hide show
  1. ttsv/utils/inference/run_gradio.py +4 -2
ttsv/utils/inference/run_gradio.py CHANGED
@@ -37,12 +37,14 @@ def build_gradio(args):
37
  choice_number_conversion = gr.inputs.Checkbox(default=True, label="Number Conversion")
38
  choice_split_sentences = gr.inputs.Checkbox(default=True, label="Split Sentences")
39
 
40
-
 
 
41
 
42
  op = gr.outputs.Audio(type="numpy", label=None)
43
 
44
  inputs_to_gradio = [textbox, gender, slider_noise_scale, slider_length_sclae, choice_transliteration, choice_number_conversion, choice_split_sentences]
45
- iface = gr.Interface(fn=hit_tts, 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.')
46
  iface.launch(enable_queue=True)
47
 
48
  if __name__ == "__main__":
 
37
  choice_number_conversion = gr.inputs.Checkbox(default=True, label="Number Conversion")
38
  choice_split_sentences = gr.inputs.Checkbox(default=True, label="Split Sentences")
39
 
40
+ examples = [['क्रिप्टो करेंसी दरअसल, वित्तीय लेन-देन का एक जरिया है। बिल्कुल भारतीय रुपये और अमेरिकी डॉलर के समान, अंतर सिर्फ इतना है कि यह आभाषी है और दिखाई नहीं देती, न ही आप इसे छू सकते हैं।', 'Male', 0.667, 1, 0, 1, 1],
41
+ ['mujhe abhi bhi yakeen nai aa raha ki yeh aise bhi chal sakta hai', 'Male', 0.667, 1, 1, 1, 1],
42
+ ['मुझे 26 रुपए दे दो, फिर मेरे पास 50 रुपए हो जाएंगे', 'Female', 0.667, 1, 1, 1, 1]]
43
 
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__":