ModelLoader

actual object ModelLoader

Android implementation of ModelLoader.

Loads models from downloaded files via ModelDownloader. After VT.initialize(), models are downloaded in background and loaded on demand.

expect object ModelLoader

Platform-specific model loader.

Provides access to bundled ONNX models for VAD and pitch detection. Method names align with public VADBackend enum values.

actual object ModelLoader

iOS implementation of ModelLoader.

Loads models from downloaded files via ModelDownloader. After VT.initialize(), models are downloaded in background and loaded on demand.

Functions

Link copied to clipboard
actual fun configure(context: Any?)
expect fun configure(context: Any?)

Configure the model loader. Must be called before loading any models.

actual fun configure(context: Any?)
Link copied to clipboard

Check if Singing Realtime VAD model is available.

Link copied to clipboard
actual fun hasSpeechVAD(): Boolean
expect fun hasSpeechVAD(): Boolean

Check if Speech VAD model is available.

actual fun hasSpeechVAD(): Boolean
Link copied to clipboard
actual fun hasSwiftF0(): Boolean
expect fun hasSwiftF0(): Boolean

Check if SwiftF0 model is available.

actual fun hasSwiftF0(): Boolean
Link copied to clipboard

Load the Singing Realtime VAD model (SwiftF0). Use with VADBackend.SINGING_REALTIME.

Link copied to clipboard
actual fun loadSpeechVAD(): ByteArray
expect fun loadSpeechVAD(): ByteArray

Load the Speech VAD model (Silero). Use with VADBackend.SPEECH.

actual fun loadSpeechVAD(): ByteArray
Link copied to clipboard
actual fun loadSwiftF0(): ByteArray
expect fun loadSwiftF0(): ByteArray

Load the SwiftF0 pitch detection model. Use with CalibraPitch for pitch detection.

actual fun loadSwiftF0(): ByteArray