Gregniuki commited on
Commit
9567049
·
verified ·
1 Parent(s): e4a900b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -545,18 +545,21 @@ def update_speed(new_speed):
545
 
546
  with gr.Blocks() as app_credits:
547
  gr.Markdown("""
548
- # Credits
 
 
 
 
549
 
550
- * [mrfakename](https://github.com/fakerybakery) for the original [online demo](https://huggingface.co/spaces/mrfakename/E2-F5-TTS)
551
- * [RootingInLoad](https://github.com/RootingInLoad) for the podcast generation
552
- * [jpgallegoar](https://github.com/jpgallegoar) for multiple speech-type generation
553
- """)
554
  with gr.Blocks() as app_tts:
555
  gr.Markdown("# Batched TTS")
556
  ref_audio_input = gr.Audio(label="Reference Audio", type="filepath")
557
  gen_text_input = gr.Textbox(label="Text to Generate", lines=10)
558
  model_choice = gr.Radio(
559
- choices=["English","Polish","Deutsch"], label="Choose TTS Model", value="English"
 
 
 
560
  )
561
  generate_btn = gr.Button("Synthesize", variant="primary")
562
  with gr.Accordion("Advanced Settings", open=False):
@@ -574,7 +577,7 @@ with gr.Blocks() as app_tts:
574
  label="Speed",
575
  minimum=0.3,
576
  maximum=2.0,
577
- value=speed,
578
  step=0.1,
579
  info="Adjust the speed of the audio.",
580
  )
@@ -600,11 +603,10 @@ with gr.Blocks() as app_tts:
600
  model_choice,
601
  remove_silence,
602
  cross_fade_duration_slider,
603
- language='en-gb',
604
  ],
605
  outputs=[audio_output, spectrogram_output],
606
  )
607
-
608
 
609
  def parse_emotional_text(gen_text):
610
  # Pattern to find (Emotion)
 
545
 
546
  with gr.Blocks() as app_credits:
547
  gr.Markdown("""
548
+ # Credits
549
+ * [mrfakename](https://github.com/fakerybakery) for the original [online demo](https://huggingface.co/spaces/mrfakename/E2-F5-TTS)
550
+ * [RootingInLoad](https://github.com/RootingInLoad) for the podcast generation
551
+ * [jpgallegoar](https://github.com/jpgallegoar) for multiple speech-type generation
552
+ """)
553
 
 
 
 
 
554
  with gr.Blocks() as app_tts:
555
  gr.Markdown("# Batched TTS")
556
  ref_audio_input = gr.Audio(label="Reference Audio", type="filepath")
557
  gen_text_input = gr.Textbox(label="Text to Generate", lines=10)
558
  model_choice = gr.Radio(
559
+ choices=["English", "Polish", "Deutsch"], label="Choose TTS Model", value="English"
560
+ )
561
+ language_choice = gr.Dropdown(
562
+ choices=["pl", "de", "en-us", "en-gb", "uk", "ru"], label="Choose Language", value="en-gb"
563
  )
564
  generate_btn = gr.Button("Synthesize", variant="primary")
565
  with gr.Accordion("Advanced Settings", open=False):
 
577
  label="Speed",
578
  minimum=0.3,
579
  maximum=2.0,
580
+ value=1.0, # Assuming a default speed value
581
  step=0.1,
582
  info="Adjust the speed of the audio.",
583
  )
 
603
  model_choice,
604
  remove_silence,
605
  cross_fade_duration_slider,
606
+ language_choice,
607
  ],
608
  outputs=[audio_output, spectrogram_output],
609
  )
 
610
 
611
  def parse_emotional_text(gen_text):
612
  # Pattern to find (Emotion)