1. Design Goals
Language‑agnostic: relies on loudness only, no speech recognition or NLP.
Camera‑free: works entirely via microphone, suitable for privacy‑sensitive or camera‑unavailable scenarios.
Offline capable: all processing runs client‑side, no network requests.
Low latency: response time ~1 frame (~16ms), ensuring real‑time interactivity.
2. Technical Implementation
Uses AnalyserNode from the Web Audio API to acquire time‑domain audio data and compute RMS (root mean square) as the loudness metric.
Introduces VoiceSource as the audio source manager, handling microphone initialization and audio stream processing.
Calibration workflow: guides users through measuring ambient noise floor and peak loudness on first use, dynamically adjusting jump trigger thresholds.
3. Interaction Logic
Two‑tier jump height:
Small jump: triggered at a lower threshold, with height identical to the existing keyboard jump for predictable control.
Big jump: requires higher loudness (e.g., a shout), providing a significantly higher jump.
Volume‑meter overlay: displays real‑time loudness levels, replacing the camera PiP with a clear visual indicator.
This mode is mutually exclusive with keyboard, hand‑tracking, and head‑tracking modes — only one input method is active at any time to avoid conflicts.
5. Resources & Performance
Zero new dependencies, fully based on the browser’s native Web Audio API — no increase in final bundle size.
Extremely low computational cost, suitable for low‑end devices.