ttsteam commited on
Commit
4764ee2
·
1 Parent(s): 8bb56ba
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -81,29 +81,29 @@ with gr.Blocks() as iface:
81
  """
82
  )
83
 
84
- with gr.Row():
85
- with gr.Column():
86
- text_input = gr.Textbox(label="Text to Synthesize", placeholder="Enter the text to convert to speech...", lines=3)
87
- ref_audio_input = gr.Audio(type="numpy", label="Reference Prompt Audio")
88
- ref_text_input = gr.Textbox(label="Text in Reference Prompt Audio", placeholder="Enter the transcript of the reference audio...", lines=2)
89
- submit_btn = gr.Button("🎤 Generate Speech", variant="primary")
90
 
91
- with gr.Column():
92
- output_audio = gr.Audio(label="Generated Speech", type="numpy")
93
 
94
- # Add multiple examples
95
- examples = [
96
- [ex["synth_text"], (ex["sample_rate"], ex["audio_data"]), ex["ref_text"]] for ex in EXAMPLES
97
- ]
98
 
99
- gr.Examples(
100
- examples=examples,
101
- inputs=[text_input, ref_audio_input, ref_text_input],
102
- label="Choose an example:"
103
- )
104
 
105
- submit_btn.click(synthesize_speech, inputs=[text_input, ref_audio_input, ref_text_input], outputs=[output_audio])
106
 
107
  # Launch the app
108
  if __name__ == "__main__":
109
- iface.launch(share=True)
 
81
  """
82
  )
83
 
84
+ # with gr.Row():
85
+ # with gr.Column():
86
+ # text_input = gr.Textbox(label="Text to Synthesize", placeholder="Enter the text to convert to speech...", lines=3)
87
+ # ref_audio_input = gr.Audio(type="numpy", label="Reference Prompt Audio")
88
+ # ref_text_input = gr.Textbox(label="Text in Reference Prompt Audio", placeholder="Enter the transcript of the reference audio...", lines=2)
89
+ # submit_btn = gr.Button("🎤 Generate Speech", variant="primary")
90
 
91
+ # with gr.Column():
92
+ # output_audio = gr.Audio(label="Generated Speech", type="numpy")
93
 
94
+ # # Add multiple examples
95
+ # examples = [
96
+ # [ex["synth_text"], (ex["sample_rate"], ex["audio_data"]), ex["ref_text"]] for ex in EXAMPLES
97
+ # ]
98
 
99
+ # gr.Examples(
100
+ # examples=examples,
101
+ # inputs=[text_input, ref_audio_input, ref_text_input],
102
+ # label="Choose an example:"
103
+ # )
104
 
105
+ # submit_btn.click(synthesize_speech, inputs=[text_input, ref_audio_input, ref_text_input], outputs=[output_audio])
106
 
107
  # Launch the app
108
  if __name__ == "__main__":
109
+ iface.queue(50).launch()