Gregniuki commited on
Commit
a842791
·
verified ·
1 Parent(s): be5a593

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -859,12 +859,12 @@ with gr.Blocks() as app_emotional:
859
  )
860
 
861
  with gr.Accordion("Advanced Settings", open=False):
862
- remove_silence_emotional = gr.Checkbox(
863
- label="Remove Silences",
864
- value=True, # Use boolean default
865
- info="Manually remove silences (experimental).", # Optional: Add info consistent with the other tab
866
- )
867
-
868
  # Generate button
869
  generate_emotional_btn = gr.Button("Generate Emotional Speech", variant="primary")
870
 
@@ -883,9 +883,8 @@ with gr.Blocks() as app_emotional:
883
  speech_type_audios_list = args[num_additional_speech_types : 2 * num_additional_speech_types]
884
  speech_type_ref_texts_list = args[2 * num_additional_speech_types : 3 * num_additional_speech_types]
885
  model_choice = args[3 * num_additional_speech_types]
886
- remove_silence = args[3 * num_additional_speech_types + 1] # Get the string value
887
-
888
- # remove_silence = remove_silence_str == "True"
889
 
890
 
891
  # Collect the speech types and their audios into a dict
 
859
  )
860
 
861
  with gr.Accordion("Advanced Settings", open=False):
862
+ remove_silence_emotional = gr.Radio(
863
+ choices=["True", "False"], # Use string choices
864
+ label="Remove Silences",
865
+ value="False", # Use string default
866
+ info="Manually remove silences (experimental).",
867
+ )
868
  # Generate button
869
  generate_emotional_btn = gr.Button("Generate Emotional Speech", variant="primary")
870
 
 
883
  speech_type_audios_list = args[num_additional_speech_types : 2 * num_additional_speech_types]
884
  speech_type_ref_texts_list = args[2 * num_additional_speech_types : 3 * num_additional_speech_types]
885
  model_choice = args[3 * num_additional_speech_types]
886
+ remove_silence_str = args[3 * num_additional_speech_types + 1] # Get the string value ("True" or "False")
887
+ remove_silence = remove_silence_str == "True" # Convert string to boolean
 
888
 
889
 
890
  # Collect the speech types and their audios into a dict