[Bugfix] Support base64 input for --ref-audio in Qwen3-TTS client (#1389)

Signed-off-by: Egor Chernobrovkin <33jasooon33@gmail.com>
This commit is contained in:
Egor Chernobrovkin authored and GitHub committed 2026-03-23 22:36:36 -07:00
1 parent b239bf0b7d
commit d16be833e1
1 file changed
+3 -1
@@ -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",