Replies: 1 comment
-
|
from faster_whisper.audio import decode_audio
from faster_whisper.vad import get_speech_timestamps, VadOptions
audio = decode_audio("audio.wav", sampling_rate=16000) # exactly what FW feeds the VAD
vad_opts = VadOptions() # must match what you pass to transcribe(vad_parameters=...)
speech = get_speech_timestamps(audio, vad_opts)
# -> [{'start': <samples>, 'end': <samples>}, ...]
for s in speech:
print(s["start"] / 16000, s["end"] / 16000) # samples -> secondsKey points: always decode at 16000 Hz (the VAD is fixed to that rate), and if you customized |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to access whatever timestamp silero vad produces internally based on which it gives timestamp if vad fileter is true. I tried get_speech_timestamps() method but it seems this requires preprocessing the audio again and i think it recalculates based on what i provide rather than what faster whisper uses. Is there any way to access it? I even tried recreating the entire vad enabled pipeline but no luck.
Beta Was this translation helpful? Give feedback.
All reactions