From d16be833e1c8c310a6383ca88511af1d2e5ecef7 Mon Sep 17 00:00:00 2001 From: Egor Chernobrovkin <101590412+lolyhop@users.noreply.github.com> Date: Tue, 24 Mar 2026 08:36:36 +0300 Subject: [PATCH] [Bugfix] Support base64 input for --ref-audio in Qwen3-TTS client (#1389) Signed-off-by: Egor Chernobrovkin <33jasooon33@gmail.com> --- examples/online_serving/qwen3_tts/openai_speech_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/online_serving/qwen3_tts/openai_speech_client.py b/examples/online_serving/qwen3_tts/openai_speech_client.py index e008eb139..eb5648a25 100644 --- a/examples/online_serving/qwen3_tts/openai_speech_client.py +++ b/examples/online_serving/qwen3_tts/openai_speech_client.py @@ -83,6 +83,8 @@ def run_tts_generation(args) -> None: if args.ref_audio: if args.ref_audio.startswith(("http://", "https://")): payload["ref_audio"] = args.ref_audio + elif args.ref_audio.startswith("data:"): + payload["ref_audio"] = args.ref_audio else: payload["ref_audio"] = encode_audio_to_base64(args.ref_audio) if args.ref_text: @@ -199,7 +201,7 @@ def parse_args(): "--ref-audio", type=str, default=None, - help="Reference audio file path or URL for voice cloning (Base task)", + help="Reference audio file path, URL, or base64 for voice cloning (Base task)", ) parser.add_argument( "--ref-text",