Skip to content

Add ABI v2 cached reference support - #2

Merged
andimarafioti merged 1 commit into
mainfrom
update-qwentts-abi-v2
Jun 24, 2026
Merged

andimarafioti merged 1 commit into
mainfrom
update-qwentts-abi-v2

Conversation

@andimarafioti

Copy link
Copy Markdown
Owner

Summary

Updates the Python bindings for qwentts.cpp ABI v2 and pins wheel builds to upstream 4536dcdce27c3764a93a06d6bf64026b124962f5.

What changed

  • Added ABI v2 tail fields to qt_tts_params: ref_spk_emb, ref_spk_dim, ref_codes, ref_T.
  • Added optional binding for qt_num_codebooks, qt_n_speakers, and qt_speaker_name.
  • Added QwenTTS.num_codebooks(), QwenTTS.speaker_names(), and QwenTTS.load_rvq_codes().
  • Added load_speaker_embedding() and load_rvq_codes() helpers for .spk / .rvq files from qwen-codec --talker.
  • Added ref_spk_emb and ref_codes to buffered and streaming synthesis calls.
  • Bumped the package version to 0.1.0a1.

Validation

  • uv run --with pytest --with numpy --with huggingface-hub pytest -q -> 5 passed, 1 skipped
  • Built a CPU libqwen from qwentts.cpp 4536dcdce27c3764a93a06d6bf64026b124962f5.
  • Loaded a real 1.7B Base Q4 model with the new library and verified:
    • QwenLibrary().version() returns 4536dcd (2026-06-21)
    • ABI v2 helper symbols are present
    • .spk loads as a 2048-dim float32 vector
    • .rvq loads as a [16, 215] int32 matrix
    • synthesis succeeds with ref_spk_emb
    • synthesis succeeds with ref_spk_emb + ref_codes + ref_text
  • uv run --with build python -m build --wheel --outdir /tmp/qwentts-cpp-python-abi-v2-dist
  • Imported the built 0.1.0a1 wheel and loaded its bundled library successfully.

@andimarafioti
andimarafioti merged commit b1788ae into main Jun 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant