This commit is contained in:
Pascal
2026-05-15 00:02:37 +02:00
parent 4bf578ec7b
commit 5523143942
4 changed files with 9 additions and 12 deletions
+1 -2
View File
@@ -125,7 +125,6 @@ def main():
"--model", model_lm,
"--codec", model_cdc,
"--seed", str(args.seed),
"--text", text,
"--lang", args.lang,
"--max-new", str(args.max_new_tokens),
"--dump", DUMP_CPP,
@@ -133,7 +132,7 @@ def main():
"--greedy",
]
print(f"[GGML] Cmd: {' '.join(cmd)}")
r = subprocess.run(cmd)
r = subprocess.run(cmd, input=text, text=True)
if r.returncode != 0:
sys.exit(r.returncode)
+3 -4
View File
@@ -455,8 +455,7 @@ def main():
"--model", model_lm,
"--codec", model_cdc,
"--seed", str(args.seed),
"--text", text,
"--ref-wav", args.ref_wav,
"--ref-wav", args.ref_wav,
"--ref-text", args.ref_text,
"--lang", args.lang,
"--max-new", str(args.max_new_tokens),
@@ -464,8 +463,8 @@ def main():
"-o", args.out_cpp,
"--greedy",
]
print(f"[GGML] Cmd: {' '.join(cmd[:6])} --text [...] --ref-wav {args.ref_wav} --ref-text [...] --lang {args.lang} --max-new {args.max_new_tokens} --dump {DUMP_CPP} -o {args.out_cpp} --greedy")
r = subprocess.run(cmd)
print(f"[GGML] Cmd: {' '.join(cmd)}")
r = subprocess.run(cmd, input=text, text=True)
if r.returncode != 0:
sys.exit(r.returncode)
+1 -2
View File
@@ -151,7 +151,6 @@ def main():
"--model", model_lm,
"--codec", model_cdc,
"--seed", str(args.seed),
"--text", text,
"--speaker", args.speaker,
"--lang", args.lang,
"--max-new", str(args.max_new_tokens),
@@ -162,7 +161,7 @@ def main():
if args.instruct:
cmd[-1:-1] = ["--instruct", args.instruct]
print(f"[GGML] Cmd: {' '.join(cmd)}")
r = subprocess.run(cmd)
r = subprocess.run(cmd, input=text, text=True)
if r.returncode != 0:
sys.exit(r.returncode)
+4 -4
View File
@@ -9,8 +9,9 @@ Default mode is greedy (do_sample=False on both sides). Cote Python the
utterance and the instruction are tokenized separately and passed to
model.generate as input_ids and instruct_ids, mirroring exactly what
qwen_tts.inference.qwen3_tts_model.generate_voice_design does. Cote C++
both strings are passed through --text and --instruct, the prompt builder
wraps and tokenizes them in the same order.
the utterance is piped on stdin and the instruction is passed via
--instruct, the prompt builder wraps and tokenizes them in the same
order.
Dumps land in cpp/tts/ (C++) and python/tts/ (Python).
"""
@@ -140,7 +141,6 @@ def main():
"--model", model_lm,
"--codec", model_cdc,
"--seed", str(args.seed),
"--text", text,
"--instruct", args.instruct,
"--lang", args.lang,
"--max-new", str(args.max_new_tokens),
@@ -149,7 +149,7 @@ def main():
"--greedy",
]
print(f"[GGML] Cmd: {' '.join(cmd)}")
r = subprocess.run(cmd)
r = subprocess.run(cmd, input=text, text=True)
if r.returncode != 0:
sys.exit(r.returncode)