create
Create VAD with config and model provider.
val config = VADConfig.Builder()
.preset(VADConfig.SPEECH)
.threshold(0.4f)
.build()
val vad = CalibraVAD.create(config, VADModelProvider.Speech { ModelLoader.loadSpeechVAD() })Content copied to clipboard
Return
Configured CalibraVAD instance
Parameters
config
VAD configuration
model Provider
Type-safe model provider that supplies the model
Create VAD with model provider (convenience, uses default config for backend).
Backend is inferred from the provider type. Each backend has appropriate defaults baked in. Use VADConfig.Builder for customization.
// GENERAL backend (no model required)
val vad = CalibraVAD.create(VADModelProvider.General)
// SPEECH backend (Silero)
val vad = CalibraVAD.create(VADModelProvider.Speech { ModelLoader.loadSpeechVAD() })
// SINGING_REALTIME backend (SwiftF0)
val vad = CalibraVAD.create(VADModelProvider.SingingRealtime { ModelLoader.loadSingingRealtimeVAD() })Content copied to clipboard
Return
Configured CalibraVAD instance
Parameters
model Provider
Type-safe model provider that determines backend