trysem commited on
Commit
5142e44
·
verified ·
1 Parent(s): 821a89d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -1
app.py CHANGED
@@ -115,4 +115,33 @@ with gr.Blocks(title="PrahaTTS-ML: Malayalam TTS", theme=gr.themes.Soft()) as de
115
  placeholder="നമസ്കാരം, നിങ്ങൾക്കെങ്ങനെയുണ്ട്?"
116
  )
117
  ref_audio_input = gr.Audio(
118
- label="Reference Voice Audio (
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  placeholder="നമസ്കാരം, നിങ്ങൾക്കെങ്ങനെയുണ്ട്?"
116
  )
117
  ref_audio_input = gr.Audio(
118
+ label="Reference Voice Audio (Optional, for Voice Cloning)",
119
+ type="filepath"
120
+ )
121
+
122
+ with gr.Accordion("Advanced Voice Controls", open=False):
123
+ exaggeration_slider = gr.Slider(
124
+ minimum=0.0, maximum=1.0, value=0.5, step=0.05,
125
+ label="Emotion Exaggeration",
126
+ info="Lower for monotone, higher for dramatic/expressive"
127
+ )
128
+ cfg_slider = gr.Slider(
129
+ minimum=0.0, maximum=1.0, value=0.5, step=0.05,
130
+ label="CFG Weight",
131
+ info="Lower if speech is too fast, higher to strictly mimic the reference voice"
132
+ )
133
+
134
+ generate_btn = gr.Button("Synthesize Speech", variant="primary")
135
+
136
+ with gr.Column():
137
+ audio_output = gr.Audio(label="Generated Output", interactive=False)
138
+ status_output = gr.Textbox(label="Status Logging", interactive=False)
139
+
140
+ generate_btn.click(
141
+ fn=synthesize_audio,
142
+ inputs=[text_input, ref_audio_input, exaggeration_slider, cfg_slider],
143
+ outputs=[audio_output, status_output]
144
+ )
145
+
146
+ if __name__ == "__main__":
147
+ demo.launch()