zeroclaw/.github/workflows
Argenis 86ad0c6a2b
fix(channels): address critical bugs in voice wake word detection (#4191)
* feat(channels): add voice wake word detection channel

Add VoiceWakeChannel behind the `voice-wake` feature flag that:
- Captures audio from the default microphone via cpal
- Uses energy-based VAD to detect speech activity
- Transcribes speech via the existing transcription API (Whisper)
- Checks for a configurable wake word in the transcription
- On detection, captures the following utterance and dispatches it
  as a ChannelMessage

State machine: Listening -> Triggered -> Capturing -> Processing -> Listening

Config keys (under [channels_config.voice_wake]):
- wake_word (default: "hey zeroclaw")
- silence_timeout_ms (default: 2000)
- energy_threshold (default: 0.01)
- max_capture_secs (default: 30)

Includes tests for config parsing, state machine, RMS energy
computation, and WAV encoding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(config): fix pre-existing test compilation errors in schema.rs

- Remove #[cfg(unix)] gate on `use tempfile::TempDir` import since
  TempDir is used unconditionally in bootstrap file tests
- Add explicit type annotations on tokio::fs::* calls to resolve
  type inference failures (create_dir_all, write, read_to_string)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(channels): exclude voice-wake from all-features CI check

Add a `ci-all` meta-feature in Cargo.toml that includes every feature
except `voice-wake`, which requires `libasound2-dev` (ALSA) not present
on CI runners. Update the check-all-features CI job to use
`--features ci-all` instead of `--all-features`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(channels): address critical bugs in voice wake word detection

- Replace std::mem::forget(stream) with dedicated thread that holds the
  cpal stream and shuts down cleanly via oneshot channel, preventing
  microphone resource leaks on task cancellation
- Add config validation: energy_threshold must be positive+finite,
  silence_timeout_ms >= 100ms, max_capture_secs clamped to 300
- Guard WAV encoding against u32 overflow for large audio buffers
- Add hard cap on capture_buf size to prevent unbounded memory growth
- Increase audio channel buffer from 4 to 64 slots to reduce chunk
  drops during transcription API calls
- Remove dead WakeState::Processing variant that was never entered

---------

Co-authored-by: Giulio V <vannini.gv@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 20:43:19 -04:00
..
checks-on-pr.yml ci: add x86_64-pc-windows-msvc to build matrix (#3449) 2026-03-13 21:45:08 -04:00
ci-run.yml fix(channels): address critical bugs in voice wake word detection (#4191) 2026-03-21 20:43:19 -04:00
cross-platform-build-manual.yml feat(ci): add armv7-unknown-linux-gnueabihf release target (#4029) 2026-03-20 01:36:15 -04:00
master-branch-flow.md ci: add x86_64-pc-windows-msvc to build matrix (#3449) 2026-03-13 21:45:08 -04:00
pub-aur.yml fix(ci): harden AUR SSH key setup and add diagnostics (#3952) 2026-03-19 13:28:58 -04:00
pub-homebrew-core.yml fix: add Node.js build dependency to Homebrew formula template (#3996) 2026-03-19 15:13:56 -04:00
pub-scoop.yml ci: auto-sync Scoop and AUR on stable release (#3743) 2026-03-16 21:34:29 -04:00
publish-crates-auto.yml fix(ci): skip release and publish workflows on forks (#4190) 2026-03-21 20:42:55 -04:00
publish-crates.yml fix(publish): publish aardvark-sys dep before main crate (#4172) 2026-03-21 16:20:50 -04:00
README.md chore: update .gitignore, CODEOWNERS, and dependabot configuration 2026-03-07 21:05:23 -05:00
release-beta-on-push.yml fix(ci): skip release and publish workflows on forks (#4190) 2026-03-21 20:42:55 -04:00
release-stable-manual.yml fix(publish): publish aardvark-sys dep before main crate (#4172) 2026-03-21 16:20:50 -04:00
tweet-release.yml fix: only tweet for stable releases, not beta builds (#3808) 2026-03-17 14:06:46 -04:00

Workflow Directory Layout

GitHub Actions only loads workflow entry files from:

  • .github/workflows/*.yml
  • .github/workflows/*.yaml

Subdirectories are not valid locations for workflow entry files.

Repository convention:

  1. Keep runnable workflow entry files at .github/workflows/ root.
  2. Keep cross-tooling/local CI scripts under dev/ or scripts/ci/ when used outside Actions.

Workflow behavior documentation in this directory:

  • .github/workflows/master-branch-flow.md