Repository navigation
perf: keep 1 s of raw audio in openWakeWord's preprocessor - #34
Open
Ale Paredes (ale7714) wants to merge 1 commit into
Open
Ale Paredes (ale7714) wants to merge 1 commit into
Ale Paredes (ale7714) wants to merge 1 commit into
Conversation
openwakeword 0.6.0 copies its whole 10 s raw-audio deque into a list on every 80 ms chunk but reads only the newest chunk plus 480 samples. A 1 s deque holds the same samples for any chunk up to 960 ms, so features and scores don't change. A test on the installed openwakeword version makes a bump recheck that. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
|
Hey Ale Paredes (@ale7714) — CI is green and no reviewer is assigned yet. Could you request one when you have a chance? Auto-comment from overwatch. Will not re-nudge for 7 days. |
2 similar comments
Contributor
|
Hey Ale Paredes (@ale7714) — CI is green and no reviewer is assigned yet. Could you request one when you have a chance? Auto-comment from overwatch. Will not re-nudge for 7 days. |
Contributor
|
Hey Ale Paredes (@ale7714) — CI is green and no reviewer is assigned yet. Could you request one when you have a chance? Auto-comment from overwatch. Will not re-nudge for 7 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Alternative to #32. openwakeword 0.6.0 copies its whole 10 s raw-audio deque into a list on every 80 ms chunk, then reads only the newest 1,760 samples. #32 removes the copy by swapping in a numpy buffer and its own versions of two private openwakeword methods. This sets the deque to 1 s, which holds the same samples, so no openwakeword code is replaced and it keeps about 80% of #32's saving.
With the real melspectrogram, embedding,
hey_jarvis_v0.1andalexa_v0.1models on 55 s of speech and noise, scores and buffers matched stock exactly, with speex noise suppression on, for 80 ms and mixed chunk sizes. Chunks up to 960 ms stay exact; the module always sends 80 ms.Median
predict()per chunk on Linux aarch64, speex on, one core, across three runs (Docker on Apple silicon, not a Pi):The version test fails when
setup.shinstalls anything but openwakeword 0.6.0, so a bump has to recheck whatAudioFeaturesreads.🤖 Generated with Claude Code