VADModel Provider
Type-safe model provider for VAD backends.
Each subclass carries the appropriate model loading closure for its backend. Backend is inferred from the provider type, enabling unified API.
Zero-Config Usage (Recommended)
After VT.initialize(), models auto-load from bundled assets:
// Auto-loads bundled Silero model
CalibraVAD.create(VADModelProvider.speech())
// Auto-loads bundled SwiftF0 model
CalibraVAD.create(VADModelProvider.singingRealtime())
// No model required
CalibraVAD.create(VADModelProvider.general)Content copied to clipboard
Custom Model Loading
Pass a custom loader to override bundled models:
CalibraVAD.create(VADModelProvider.speech { loadCustomSileroModel() })Content copied to clipboard
Inheritors
Types
Link copied to clipboard
GENERAL backend - no model required. Uses RMS-based heuristics for basic voice detection.
Link copied to clipboard
SINGING_REALTIME backend - single SwiftF0 ONNX model. Low-latency pitch-based singing detection.
Link copied to clipboard
SPEECH backend - single Silero ONNX model. State-of-the-art accuracy for speech detection.