Spaces:
Paused
Paused
Update webui.py
Browse files274 unmodified lines27527627727827928028128228328428528628728828929062 unmodified lines35335435535635735828 unmodified lines387388389390391392393394395396397398399400401402403404405406101 unmodified lines508509510511512513274 unmodified linesdef synthesis_function(prompt_audio,target_audio,prompt_metadata,target_metadata,control,auto_shift,pitch_shift,seed,prompt_lyric_lang,target_lyric_lang,prompt_vocal_sep,target_vocal_sep,):"""Single-button: runs transcription first if metadata not provided, then synthesis."""try:62 unmodified linesreturn None, gr.update(), gr.update()def render_interface() -> gr.Blocks:with gr.Blocks(title="SoulX-Singer", theme=gr.themes.Default()) as page:gr.HTML(28 unmodified lineseditable=False,interactive=True,)gr.Examples(examples=["raven.wav"],inputs=[prompt_audio])target_audio = gr.Audio(label="Target audio (melody / lyrics source), max 60s",type="filepath",editable=False,interactive=True,)gr.Examples(examples=["happy_birthday.mp3"],inputs=[target_audio])with gr.Row():control_radio = gr.Radio(choices=["melody", "score"],101 unmodified linestype="filepath",interactive=False,)# ── Event handlers ──transcription_btn.click(274 unmodified lines27527627727827928028128228328428528628728828929062 unmodified lines35335435535635735835928 unmodified lines388389390391392393394395396397398399400101 unmodified lines502503504505506507508509510511512513514515516517518519520521522274 unmodified linesdef synthesis_function(prompt_audio,target_audio,prompt_metadata=None,target_metadata=None,control="score",auto_shift=True,pitch_shift=0,seed=12306,prompt_lyric_lang="English",target_lyric_lang="English",prompt_vocal_sep=True,target_vocal_sep=True,):"""Single-button: runs transcription first if metadata not provided, then synthesis."""try:62 unmodified linesreturn None, gr.update(), gr.update()def render_interface() -> gr.Blocks:with gr.Blocks(title="SoulX-Singer", theme=gr.themes.Default()) as page:gr.HTML(28 unmodified lineseditable=False,interactive=True,)target_audio = gr.Audio(label="Target audio (melody / lyrics source), max 60s",type="filepath",editable=False,interactive=True,)with gr.Row():control_radio = gr.Radio(choices=["melody", "score"],101 unmodified linestype="filepath",interactive=False,)gr.Examples(examples=[["raven.wav", "happy_birthday.mp3"],["anita.wav", "happy_birthday.mp3"],["obama.wav", "happy_birthday.mp3"],["raven.wav", "everybody_loves.wav"],["anita.wav", "everybody_loves.wav"],["obama.wav", "everybody_loves.wav"],],inputs=[prompt_audio, target_audio],outputs=output_audio,fn=synthesis_function,cache_examples=True,cache_mode="lazy")# ── Event handlers ──transcription_btn.click(
webui.py+27-18