codec: add pre-encoded voice reference (--ref-spk / --ref-rvq)

qwen-codec --talker extracts the speaker embedding (.spk, raw f32)
and the ICL codes (.rvq) in one pass, encode truncated to the hop
boundary conforming to the --ref-wav path. qwen-tts loads them via
--ref-spk / --ref-rvq and skips the speaker encoder and codec encode
on every synthesis: TTFA 205 ms -> 89 ms. Extends qt_tts_params with
ABI v2 latent fields, adds qt_num_codebooks(), ships freeman.spk +
freeman.rvq and switches clone scripts to the latent path. Output is
bit-identical to the raw path at fixed seed.
This commit is contained in:
Pascal
2026-06-11 21:45:13 +02:00
parent e8e33629c1
commit 0bf4a18b22
11 changed files with 399 additions and 144 deletions
+2 -1
View File
@@ -5,7 +5,8 @@ set PATH=%~dp0..\build\Release;%PATH%
qwen-tts.exe ^
--model ..\models\qwen-talker-1.7b-base-Q8_0.gguf ^
--codec ..\models\qwen-tokenizer-12hz-Q8_0.gguf ^
--ref-wav freeman.wav ^
--ref-spk freeman.spk ^
--ref-rvq freeman.rvq ^
--ref-text freeman.txt ^
--lang English ^
-o clone.wav < prompt.txt
+2 -1
View File
@@ -5,7 +5,8 @@ set -eu
../build/qwen-tts \
--model ../models/qwen-talker-1.7b-base-Q8_0.gguf \
--codec ../models/qwen-tokenizer-12hz-Q8_0.gguf \
--ref-wav freeman.wav \
--ref-spk freeman.spk \
--ref-rvq freeman.rvq \
--ref-text freeman.txt \
--lang English \
-o clone.wav < prompt.txt
Binary file not shown.
Binary file not shown.