Train an audio model at
teachablemachine.withgoogle.com
with classes like "bat_crack" and "background". Export and paste the share URL below.
Not loaded
ML Confidence
Trigger confidence80%
How confident the model must be to trigger a capture
Amplitude Threshold
Trigger level-15 dB
Audio level (dB) that triggers a capture. Lower = more sensitive.
Audio Input
Input gain1.0x
Cooldown period5s
Minimum time between triggers to prevent duplicate captures
Clip Duration
Pre-roll (before hit)10s
Seconds of video kept BEFORE the detected hit
Post-roll (after hit)20s
Seconds of video recorded AFTER the detected hit
Camera Settings
Resolution
Frame rate
Camera
Pose Detection
Enable pose detection
Uses MoveNet to detect human poses and track runners on the field. Increases CPU/GPU usage.
Model
Variant
Lightning recommended for mobile. Thunder for tripod/stationary setups.
Overlay
Show skeleton
Show keypoint labels
Performance
Detection FPS10 FPS
Higher FPS = smoother tracking but more CPU load
Base Runner Tracking
Auto-stop on base arrival
Automatically end clip recording when a runner reaches a base zone
Tap to define where each base appears in the camera view
Manual Controls
Simulate a bat crack detection for testing the capture pipeline
Audio Spectrogram
Pose Data
Enable pose detection to see data
Event Log
Settings
System
Heap: --/-- MB
Keyboard Shortcuts
Space — Start/Stop listening T — Manual trigger Esc — Close panel / preview
Captured Clips0
📹
No clips yet
Clips appear here when a hit is detected. Stored in memory — download to save.
Future: Auto-Export
A future version will auto-export clips to cloud storage, Google Drive, or a custom API endpoint.
For now, use the Download buttons to save clips locally.
by Mathew Sanford
ML Audio Capture
Real-time audio event detection with automatic video capture. Uses TensorFlow.js for ML classification, MoveNet for pose estimation, and a ring-buffer recording pipeline.
📹
Camera
🎙
Microphone
🧠
ML Model
Best on Chrome Android in landscape orientation.
📱
Rotate to Landscape
Baseball fields are wider than tall — landscape mode gives the best view and more accurate pose tracking.