with one click
audio-vad-cpu
Voice Activity Detection on CPU using energy and spectral engines
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Voice Activity Detection on CPU using energy and spectral engines
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Coordinate multiple agents for software development across any language. Use for parallel execution of independent tasks, sequential chains with dependencies, swarm analysis from multiple perspectives, or iterative refinement loops. Handles Python, JavaScript, Java, Go, Rust, C#, and other languages.
Multi-step GOAP planning for complex audio pipeline development. Orchestrates analysis, decomposition, strategy selection, and execution with state persistence in plans/.
Generates DORA metrics and agent delivery reports from structured events.
Records agent execution events for lead time, success rate, and human intervention tracking.
Generic TRIZ analysis for identifying technical and physical contradictions in software architecture and pipelines.
Generic TRIZ solver for resolving architectural and technical contradictions using inventive principles.
| name | audio-vad-cpu |
| description | Voice Activity Detection on CPU using energy and spectral engines |
Use when implementing or debugging the VAD stage of the audio pipeline. Applies to energy threshold calibration, spectral threshold tuning, frame classification, and noise floor estimation.
rms >= threshold boolean per frame| Parameter | Default | Purpose |
|---|---|---|
sample_rate_hz | 16000 | Standard audio processing rate |
frame_ms | 20 | Frame duration in milliseconds |
energy_threshold | 0.015 | RMS threshold for speech detection |
speech_hangover_ms | 200-300 | Typical hangover buffer |
min_speech_ms | 120 | Minimum speech segment duration |
1. Compute RMS per frame: sqrt(mean(sample^2))
2. Threshold comparison: frame.rms >= config.energy_threshold
3. Threshold selection criteria:
- Too high: Misses quiet speech (whispers, breathy voices)
- Too low: Captures breath, mic noise, room hiss
- Optimal: ~3-5x above noise floor
(sample_rate * frame_ms) / 1000// Collect RMS values from known non-voice regions
let noise_frames: Vec<f32> = segments
.iter()
.filter(|s| s.kind == SegmentKind::NonVoice)
.flat_map(|s| frames_in_range(s.start_ms, s.end_ms))
.map(|f| f.rms)
.collect();
// Set threshold 4x above median noise floor
let noise_floor = median(&noise_frames);
let threshold = noise_floor * 4.0;
| Failure | Symptom | Fix |
|---|---|---|
| Breathing detected as speech | Thin high-frequency audio flagged as speech | Increase threshold by +0.002 |
| Mic self-noise | Constant low-level noise creates false positives | Lower threshold, check hardware |
| Clippy/peaky audio | RMS spikes from clipping create false speech | Pre-normalize audio, reduce threshold |
| Whispered dialogue | Low RMS speech below threshold | Reduce threshold by -0.003 |
| Electric hum (60Hz) | Periodic false detections | Apply bandpass filter 300-3400Hz |
analysis/learnings/latest-calibration.jsonenergy_threshold in config based on:
speech_to_non_voice count → threshold too highnon_voice_to_speech count → threshold too low| Profile | Delta | Rationale |
|---|---|---|
| action | +0.010 | High background noise, explosions, music |
| documentary | -0.003 | Clean narration, controlled environment |
| animation | +0.000 | Mixed: clean dialogue + sound effects |
| drama | -0.001 | Intimate whispering, quiet moments |
precision: Of speech detected, % actually speech (target: >0.90)recall: Of actual speech, % detected (target: >0.85)min_speech_ms (120ms default)tests/validation/ datasetbash scripts/benchmark.sh testdata/generated/alternating.wavclassify_frames() pure: same input → same outputpython3 scripts/optimize_fp_sweep.py--min-coverage-ratio) to avoid low-coverage candidates.python3 scripts/generate_optimized_profiles.py