[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:
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:
|
||||||
if args.ref_audio.startswith(("http://", "https://")):
|
if args.ref_audio.startswith(("http://", "https://")):
|
||||||
payload["ref_audio"] = args.ref_audio
|
payload["ref_audio"] = args.ref_audio
|
||||||
|
elif args.ref_audio.startswith("data:"):
|
||||||
|
payload["ref_audio"] = args.ref_audio
|
||||||
else:
|
else:
|
||||||
payload["ref_audio"] = encode_audio_to_base64(args.ref_audio)
|
payload["ref_audio"] = encode_audio_to_base64(args.ref_audio)
|
||||||
if args.ref_text:
|
if args.ref_text:
|
||||||
@@ -199,7 +201,7 @@ def parse_args():
|
|||||||
"--ref-audio",
|
"--ref-audio",
|
||||||
type=str,
|
type=str,
|
||||||
default=None,
|
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(
|
parser.add_argument(
|
||||||
"--ref-text",
|
"--ref-text",
|
||||||
|
|||||||
Reference in new issue
Block a user