diff --git a/examples/online_serving/qwen3_tts/gradio_demo.py b/examples/online_serving/qwen3_tts/gradio_demo.py index b263cb8a2..8b39b9eab 100644 --- a/examples/online_serving/qwen3_tts/gradio_demo.py +++ b/examples/online_serving/qwen3_tts/gradio_demo.py @@ -125,7 +125,7 @@ PLAYER_HTML = """ def _build_player_js(sample_rate: int) -> str: """Build the JavaScript that powers the AudioWorklet player.""" return f""" -() => {{ + """ @@ -435,10 +435,7 @@ def create_app(api_base: str): ) with gr.Blocks( - css=css, title="Qwen3-TTS Demo", - js=_build_player_js(PCM_SAMPLE_RATE), - theme=theme, ) as demo: gr.HTML(f"""
@@ -773,7 +770,14 @@ def create_app(api_base: str): demo.queue() - return gr.mount_gradio_app(fastapi_app, demo, path="/") + return gr.mount_gradio_app( + fastapi_app, + demo, + path="/", + css=css, + theme=theme, + head=_build_player_js(PCM_SAMPLE_RATE), + ) def parse_args(): diff --git a/examples/online_serving/qwen3_tts/tts_common.py b/examples/online_serving/qwen3_tts/tts_common.py index 20b78517e..44ba7c3ab 100644 --- a/examples/online_serving/qwen3_tts/tts_common.py +++ b/examples/online_serving/qwen3_tts/tts_common.py @@ -103,7 +103,7 @@ def build_payload( if task_type == "CustomVoice": if voice: - payload["speaker"] = voice + payload["voice"] = voice if instructions and instructions.strip(): payload["instructions"] = instructions.strip()