filter out typical noise detected

This commit is contained in:
Emil Lerch 2025-10-09 08:53:51 -07:00
parent d6cab46c99
commit ebd4b531c7
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -26,7 +26,9 @@ const SpeechHandler = struct {
/// Handle detected speech
fn onSpeech(ctx: *anyopaque, text: []const u8) void {
if (builtin.is_test) return; // Suppress output during tests
// Look for noise words and skip it if so
if (std.mem.eql(u8, text, "huh")) return;
if (std.mem.eql(u8, text, "but")) return;
const self: *SpeechHandler = @ptrCast(@alignCast(ctx));
self.speech_count += 1;