Skip to content

feat: wavekat smart-turn variant + zh fine-tune#19

Merged
wavekat-eason merged 7 commits into
mainfrom
feat/wavekat-smart-turn
May 11, 2026
Merged

feat: wavekat smart-turn variant + zh fine-tune#19
wavekat-eason merged 7 commits into
mainfrom
feat/wavekat-smart-turn

Conversation

@wavekat-eason
Copy link
Copy Markdown
Contributor

@wavekat-eason wavekat-eason commented May 11, 2026

Summary

  • New SmartTurnVariant::Wavekat(SmartTurnLang::Zh) constructor on PipecatSmartTurn — loads the Mandarin fine-tune from wavekat/smart-turn-ONNX at runtime via hf-hub, cached under $HF_HOME/hub/. Existing PipecatSmartTurn::new() still ships the upstream Pipecat v3 weights unchanged.
  • New wavekat-smart-turn feature flag (implies pipecat, adds hf-hub). Off by default.
  • WAVEKAT_TURN_MODEL_DIR=<dir> escape hatch resolves <dir>/<lang>/smart-turn-cpu.onnx and skips the network — used for offline / CI builds.
  • Three Mandarin test fixtures synthesized with wavekat-tts (Qwen3-TTS, 24 kHz → 16 kHz mono via ffmpeg) under tests/fixtures/zh_*.wav.
  • #[ignore]-gated smoke test wavekat_hf_download_smoke (also make hf-smoke) downloads the model from HF and asserts the zh fine-tune classifies the three fixtures on the correct side of 0.5.
  • Design doc preserved at docs/04-plan-wavekat-smart-turn.md.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-features -- -D warnings
  • make ci (all feature-flag combos)
  • make hf-smoke — three zh fixtures classify as expected (finished/finished/unfinished); two English fixtures kept for diagnostics

🤖 Generated with Claude Code

wavekat-eason and others added 7 commits May 11, 2026 11:57
Design for shipping WaveKat-trained Smart Turn weights (zh first, more
languages to follow) via the wavekat HuggingFace org, with a language-
agnostic repo layout (wavekat/smart-turn-ONNX with per-language subdirs)
and runtime hf-hub loading aligned with wavekat-tts. Frozen to Pipecat's
ONNX contract so the same weights work from both Rust and Python.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds `SmartTurnVariant` / `SmartTurnLang` enums and a
`PipecatSmartTurn::with_variant(...)` constructor that selects between
the embedded upstream Pipecat v3 weights and WaveKat language-
specialized fine-tunes resolved from `wavekat/smart-turn-ONNX` via
`hf-hub`.

The new `wavekat-smart-turn` feature is opt-in, implies `pipecat`, and
pulls in `hf-hub` 0.5 with the synchronous `ureq` backend so the crate
stays runtime-agnostic. WaveKat fine-tunes resolve to
`<lang>/smart-turn-cpu.onnx` inside one language-agnostic HF repo, with
a `WAVEKAT_TURN_MODEL_DIR` env override for offline / CI builds. Both
enums are `#[non_exhaustive]` so new languages don't break callers.

Tests cover the `with_variant(PipecatV3)` path and a
`WAVEKAT_TURN_MODEL_DIR`-driven local lookup, both without network.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pulls wavekat/smart-turn-ONNX from HuggingFace and runs the zh
variant against the existing fixtures. Gated with #[ignore] so
the network call is opt-in.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Synthesized with wavekat-tts (Qwen3-TTS, zh) at 24 kHz, resampled to
16 kHz mono via ffmpeg. Mid-utterance clip was found by sweeping
trim points and picking one (3.3 s) the model classifies confidently
as Unfinished. The smoke test now asserts state classification for
all three zh fixtures; English clips remain print-only since the
zh fine-tune isn't expected to score them correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@wavekat-eason wavekat-eason changed the title feat: wavekat smart-turn distribution plan feat: wavekat smart-turn variant + zh fine-tune May 11, 2026
@wavekat-eason wavekat-eason merged commit 812d167 into main May 11, 2026
5 checks passed
@wavekat-eason wavekat-eason deleted the feat/wavekat-smart-turn branch May 11, 2026 10:01
@github-actions github-actions Bot mentioned this pull request May 11, 2026
wavekat-eason pushed a commit that referenced this pull request May 11, 2026
## 🤖 New release

* `wavekat-turn`: 0.0.7 -> 0.0.8 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.0.8](v0.0.7...v0.0.8)
- 2026-05-11

### Added

- wavekat smart-turn variant + zh fine-tune
([#19](#19))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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