Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -497,33 +497,33 @@ def ui():
|
|
497 |
|
498 |
with gr.Row():
|
499 |
with gr.Column():
|
500 |
-
text = gr.Textbox(label='Enter Text', lines=3)
|
501 |
|
502 |
with gr.Row():
|
503 |
-
language_name = gr.Dropdown(lang_list, label="Select Language", value=lang_list[0])
|
504 |
|
505 |
with gr.Row():
|
506 |
-
voice_name = gr.Dropdown(voice_names, label="Choose VoicePack", value='af_heart')#voice_names[0])
|
507 |
|
508 |
with gr.Row():
|
509 |
-
generate_btn = gr.Button('Generate', variant='primary')
|
510 |
|
511 |
-
with gr.Accordion('Audio Settings', open=False):
|
512 |
speed = gr.Slider(minimum=0.25, maximum=2, value=1, step=0.1, label='⚡️Speed', info='Adjust the speaking speed')
|
513 |
remove_silence = gr.Checkbox(value=False, label='✂️ Remove Silence From TTS')
|
514 |
|
515 |
with gr.Column():
|
516 |
-
audio = gr.Audio(interactive=False, label='Output Audio', autoplay=True)
|
517 |
-
audio_file = gr.File(label='Download Audio')
|
518 |
# word_level_srt_file = gr.File(label='Download Word-Level SRT')
|
519 |
# srt_file = gr.File(label='Download Sentence-Level SRT')
|
520 |
# sentence_duration_file = gr.File(label='Download Sentence Duration JSON')
|
521 |
-
with gr.Accordion('Autoplay, Subtitle, Timestamp', open=False):
|
522 |
-
autoplay = gr.Checkbox(value=True, label='Autoplay')
|
523 |
autoplay.change(toggle_autoplay, inputs=[autoplay], outputs=[audio])
|
524 |
-
word_level_srt_file = gr.File(label='Download Word-Level SRT')
|
525 |
-
srt_file = gr.File(label='Download Sentence-Level SRT')
|
526 |
-
sentence_duration_file = gr.File(label='Download Sentence Duration JSON')
|
527 |
|
528 |
text.submit(subtile_update, inputs=[text, language_name, voice_name, speed, remove_silence], outputs=[audio, audio_file,word_level_srt_file,srt_file,sentence_duration_file])
|
529 |
generate_btn.click(subtile_update, inputs=[text, language_name, voice_name, speed, remove_silence], outputs=[audio, audio_file,word_level_srt_file,srt_file,sentence_duration_file])
|
|
|
497 |
|
498 |
with gr.Row():
|
499 |
with gr.Column():
|
500 |
+
text = gr.Textbox(label='📝 Enter Text', lines=3)
|
501 |
|
502 |
with gr.Row():
|
503 |
+
language_name = gr.Dropdown(lang_list, label="🌍 Select Language", value=lang_list[0])
|
504 |
|
505 |
with gr.Row():
|
506 |
+
voice_name = gr.Dropdown(voice_names, label="🎙️ Choose VoicePack", value='af_heart')#voice_names[0])
|
507 |
|
508 |
with gr.Row():
|
509 |
+
generate_btn = gr.Button('🚀 Generate', variant='primary')
|
510 |
|
511 |
+
with gr.Accordion('🎛️ Audio Settings', open=False):
|
512 |
speed = gr.Slider(minimum=0.25, maximum=2, value=1, step=0.1, label='⚡️Speed', info='Adjust the speaking speed')
|
513 |
remove_silence = gr.Checkbox(value=False, label='✂️ Remove Silence From TTS')
|
514 |
|
515 |
with gr.Column():
|
516 |
+
audio = gr.Audio(interactive=False, label='🔊 Output Audio', autoplay=True)
|
517 |
+
audio_file = gr.File(label='📥 Download Audio')
|
518 |
# word_level_srt_file = gr.File(label='Download Word-Level SRT')
|
519 |
# srt_file = gr.File(label='Download Sentence-Level SRT')
|
520 |
# sentence_duration_file = gr.File(label='Download Sentence Duration JSON')
|
521 |
+
with gr.Accordion('🎬 Autoplay, Subtitle, Timestamp', open=False):
|
522 |
+
autoplay = gr.Checkbox(value=True, label='▶️ Autoplay')
|
523 |
autoplay.change(toggle_autoplay, inputs=[autoplay], outputs=[audio])
|
524 |
+
word_level_srt_file = gr.File(label='📝 Download Word-Level SRT')
|
525 |
+
srt_file = gr.File(label='📜 Download Sentence-Level SRT')
|
526 |
+
sentence_duration_file = gr.File(label='⏳ Download Sentence Duration JSON')
|
527 |
|
528 |
text.submit(subtile_update, inputs=[text, language_name, voice_name, speed, remove_silence], outputs=[audio, audio_file,word_level_srt_file,srt_file,sentence_duration_file])
|
529 |
generate_btn.click(subtile_update, inputs=[text, language_name, voice_name, speed, remove_silence], outputs=[audio, audio_file,word_level_srt_file,srt_file,sentence_duration_file])
|