VadConfig

data class VadConfig(val frameMs: Int = 30, val speechThreshold: Float = 0.015f, val minSpeechMs: Int = 90, val trailingSilenceMs: Int = 600, val preRollMs: Int = 300, val maxTurnMs: Int)(source)

Deterministic energy-gate parameters of the voice-activity turn detector that segments com.donfuldauer.kggml.whisper.WhisperEngine.transcribeStream audio into turns. All durations are at 16 kHz.

Constructors

Link copied to clipboard
constructor(frameMs: Int = 30, speechThreshold: Float = 0.015f, minSpeechMs: Int = 90, trailingSilenceMs: Int = 600, preRollMs: Int = 300, maxTurnMs: Int)

Properties

Link copied to clipboard

analysis frame length; each frame is classified voiced / unvoiced by its RMS.

Link copied to clipboard

longest turn before it is force-committed; at most Whisper's 30,000 ms window.

Link copied to clipboard

consecutive voiced audio needed to start a turn (shorter blips are ignored).

Link copied to clipboard

audio preceding the speech onset that is prepended to a turn (soft word starts).

Link copied to clipboard

RMS (linear, full scale = 1.0) at or above which a frame is voiced.

Link copied to clipboard

consecutive unvoiced audio after speech that commits the turn.