Swift package for Voice Activity Detection using Silero VAD v6.2.0 model converted to CoreML.
- iOS 16.0+ / macOS 13.0+ / visionOS 1.0+
- Xcode 15.0+
dependencies: [
.package(url: "https://github.com/polrk/SileroVADKit.git", from: "1.0.0")
]import SileroVADKit
let vad = try SileroVAD()
// Process 512 samples at 16kHz (32ms chunk)
let audioChunk: [Float] = // ... your audio samples
let probability = try vad.process(audioChunk)
if probability > 0.5 {
print("Speech detected")
}
// Or use convenience method
if try vad.isSpeech(audioChunk) {
print("Speech detected")
}
// Reset state when starting new audio stream
try vad.reset()- Input: 512 audio samples at 16kHz (32ms)
- Output: Speech probability (0.0 - 1.0)
- Recommended threshold: 0.5
The Silero VAD model weights are licensed under MIT License by Silero Team.