• v0.4.0 1b055fa08c

    DmitryBykov-ISPO released this 2026-04-23 11:10:17 +03:00 | 0 commits to master since this release

    Closes a known gap with the Python fork v0.2.0+: post-wake-word listening window now ends as soon as the user stops talking, not on a fixed timeout.

    What's in

    • webrtc-vad workspace dep (pure-Rust port of Google's WebRTC VAD; same algorithm as Python's webrtcvad).
    • jarvis-core::audio_processing::vad::listen_window \u2014 pure state machine (ListenWindow::push(is_speech) -> WindowDecision), no I/O. Closes the window when silence run \u2265 1200 ms AND \u2265 500 ms of speech was detected; refuses to close before 1000 ms; hard cap at 15000 ms. 4/4 unit tests.
    • jarvis-core::audio_processing::vad::webrtc \u2014 adapter that buffers pv_recorder's 512-sample frames into 480-sample VAD frames at 16 kHz.
    • jarvis-core::stt::vosk::finalize_speech \u2014 forces Vosk to emit final result when VAD says "speech ended".
    • jarvis-app::recognize_command \u2014 feeds every frame through VAD, handles WindowDecision::Close (fast path) and HardCap (return to wake-word).
    • 5 new config constants in jarvis-core::config mirroring Python v0.2.0 exactly.

    What does NOT happen

    • The pre-existing wake-word VAD path (audio_processing::vad/{init,detect,reset} with energy/none/nnnoiseless backends) is not touched. New webrtc-vad runs only in the post-wake listening window.
    • The legacy fixed-timeout path is gone.

    Build / test

    • cargo build --workspace --release \u2014 succeeded, 0 new warnings vs v0.3.0 baseline.
    • cargo test for the new tests \u2014 4/4 pass.

    Reaction time

    On short commands ("стоп", "пауза") the bot now reacts in ~1.5 s instead of waiting the full timeout window. Same speedup as Python v0.2.0.

    License

    CC BY-NC-SA 4.0. Original attribution to Priler/Tugalov preserved.

    Downloads