Enable Voice Activity Detection (VAD)
mainVAD detects speech before transcription, which reduces processing time for long recordings containing silence. The recommended Silero model is small (< 1 MB) and can be automatically downloaded.
Automatic Setup:
Provide autoDownloadVadModelName in the main options object (e.g., 'silero-v6.2.0').
Manual Setup:
Set whisperOptions.vad to true and provide the path via whisperOptions.vadModelPath.
await nodewhisper(filePath, {
modelName: 'tiny.en',
autoDownloadModelName: 'tiny.en',
autoDownloadVadModelName: 'silero-v6.2.0',
whisperOptions: {
vadThreshold: 0.5,
vadMinSilenceDurationMs: 100,
},
})