The Wyoming wire format sends data as a separate byte chunk after the
header JSON line, not inline. The header's data_length field indicates
how many bytes to read for the data JSON, followed by payload_length
bytes of binary payload.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add module.nix exposing config.services.wyoming.whisper-cpp with
multi-instance support, systemd hardening, and GPU device access.
Export as nixosModules.default and overlays.default from the flake.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add package.nix with rustPlatform.buildRustPackage and Vulkan support.
Track Cargo.lock (removed from .gitignore) and add .direnv to .gitignore.
Build with: nix build 'git+file:.?submodules=1'
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New wyoming-whisper-rs binary crate implementing the Wyoming protocol
over TCP, making whisper-rs usable with Home Assistant's voice pipeline.
Includes nix flake devshell with Vulkan, ROCm/hipBLAS, clippy, and
rustfmt support.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
It makes no sense for WhisperState::full() to return an int: the only
possible returned value is 0. Hence, it adds no information whatsoever.
Worse yet, it is confusing everyone using the method. Just return
nothing on success.
The default value was not a good choice whatsoever,
and forcing the user to choose makes them at least put thought into it,
especially with better documentation on it.
This was spurred by noticing a trivial case of UB in the original code:
all one needed was an out-of-bounds index on any of several methods with tokens or segment indexes on the state to cause UB.
I took this opportunity to consolidate methods into Rust structs that verify their index before use.