Commit graph

532 commits

Author SHA1 Message Date
ac3a5156eb Fix Wyoming protocol: read data as separate chunk after header
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>
2026-02-24 13:44:08 +01:00
7d88c8c865 Add NixOS module, overlay, and systemd service for wyoming-whisper-rs
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>
2026-02-24 12:15:33 +01:00
f346829cc0 Add nix flake package for wyoming-whisper-rs
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>
2026-02-24 11:52:15 +01:00
50fdb08a38 Add Wyoming protocol ASR server and nix devshell
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>
2026-02-24 11:44:03 +01:00
Niko
d38738df8d
Update git submodule and update bindings.rs 2025-12-06 11:53:56 -08:00
Niko
298e0ddabd
Merge branch 'ysimonson-update-whisper' 2025-12-06 11:47:33 -08:00
Niko
470c88d84f
Merge branch 'vzctl-fix-build-script' 2025-12-06 11:44:41 -08:00
Niko
8306adfc58
Merge branch 'd-e-s-o-topic/rustfmt-cfg' 2025-12-06 11:38:12 -08:00
Niko
484d33da3f
Merge branch 'd-e-s-o-topic/full' 2025-12-06 11:36:18 -08:00
Yusuf Simonson
cc038de0f6 Fix test breakages 2025-12-06 10:26:30 -05:00
Alexey Lapitsky
1e85bb2d42
fix(sys): Correct cmake source path in build.rs 2025-11-03 00:17:46 +01:00
Daniel Müller
da73d0e053
Add .rustfmt.toml file
Add a rustfmt configuration to enable usage of default formatting
settings and override any otherwise active global configuration.
2025-10-24 09:02:55 -07:00
Daniel Müller
c611475bdf
Adjust WhisperState::full() to return () on success
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.
2025-10-24 08:55:08 -07:00
Niko
a23990c563
Fix examples 2025-09-29 13:40:02 -07:00
Niko
31c1527abe
Extend lifetimes on WhisperState and WhisperToken 2025-09-29 13:28:58 -07:00
Niko
4e2c466e79
Use as_chunks in favour of chunks_exact in convert_stereo_to_mono_audio 2025-09-29 13:23:08 -07:00
Niko
fcd6a538e6
Fix up tests 2025-09-29 13:07:15 -07:00
Niko
2fa5df779c
Clean up VAD example and write to output file 2025-09-29 12:40:49 -07:00
Niko
c2fba5055b
Remove unused import 2025-09-29 12:40:30 -07:00
Niko
37cc545ddd
Promote WhisperToken to its own module 2025-09-29 12:40:24 -07:00
Niko
65ec4d34ec
Clean up module directory layout 2025-09-29 12:33:54 -07:00
Niko
8bf0602e24
Implement Send + Sync for WhisperVadContext
All data stored internally on this struct appears to be similar to what's stored on WhisperContext so this should also be threadsafe.
2025-09-10 19:15:58 -07:00
Niko
d966ab1602
Update bindings and bump -sys version 2025-09-10 15:35:37 -07:00
Niko
f2e3eb397d
Bump whisper-rs version 2025-09-10 15:32:29 -07:00
Niko
64bc1f1384
Add VAD example 2025-09-10 15:28:47 -07:00
Niko
7e116dfb29
Fix UB in WhisperVadSegments 2025-09-10 15:28:40 -07:00
Niko
5f054c94b7
Explicitly set CMAKE_BUILD_TYPE always 2025-09-06 12:28:21 -07:00
Niko
0c509ec9c5
Fix inaccurate doc comment for C++ equivalent 2025-09-02 14:18:28 -07:00
Niko
3e6d3da162
Change return type of get_whisper_version (closes #241) 2025-08-19 21:48:24 -07:00
Niko
b376a1ef64
Update whisper.cpp to latest git (closes #240) 2025-08-19 16:06:50 -07:00
Niko
43e31a7345
Bump versions of crates 2025-08-16 00:22:33 -07:00
Niko
c327ec699b
Simplify if conditional in audio_transcription example 2025-08-15 23:38:03 -07:00
Niko
b07d20a3c1
Split out any functions that return a CStr or similar object into three returning all unique types of possible return value 2025-08-15 23:37:43 -07:00
Niko
4ed94c2831
Fix up audio_transcription example 2025-08-15 21:14:11 -07:00
Niko
67c343082b
Remove unused error handling 2025-08-13 13:19:04 -07:00
Niko
623e5a40cb
Remove inline attributes 2025-08-13 13:17:15 -07:00
Niko
96bbf7b89b
Add a quick entrypoint to the root docs 2025-08-13 01:42:49 -07:00
Niko
68fabfc95d
Add comments to basic_use example and fix README example 2025-08-13 01:40:43 -07:00
Niko
9162a2c502
Fix Clippy lint 2025-08-13 01:30:22 -07:00
Niko
814b2b836f
Make WhisperState::new unsafe 2025-08-13 01:27:28 -07:00
Niko
7e46c91cbd
Add docs to get_token and its unchecked variant 2025-08-13 00:53:44 -07:00
Niko
e34533731c
Add docs to no_speech_probability 2025-08-13 00:53:31 -07:00
Niko
ea1a762b41
Fix up Clippy lints 2025-08-13 00:52:54 -07:00
Niko
a840bdaa8b
Remove unnecessary error handling 2025-08-13 00:52:38 -07:00
Niko
527bb059dc
Fix up full_usage example 2025-08-02 19:47:58 -07:00
Niko
a9dea32c81
Fix up audio_transcription example 2025-08-02 19:42:32 -07:00
Niko
3d70621a51
Fix up basic_use example 2025-08-02 19:39:05 -07:00
Niko
e0b83e8248
Remove Default for SamplingStrategy and add docs
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.
2025-08-02 19:32:26 -07:00
Niko
15e70ffd07
Refactor the entire token/segment usage
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.
2025-08-02 18:45:42 -07:00
Niko
35ccb56e7f
Merge branch 'v1.7.6-update' 2025-08-02 14:43:19 -07:00