You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a wiki available for our users. Please make sure you have checked it out first.
I tried parsing an audio in vad and came up with a value of 0 for the last SpeechEndAt, which confused me. Sometimes the last audio is still around for a long time, but the value of the SpeechEndAt is still zero, making it impossible for me to figure out whether the final data is silent or speaking. The data are as follows:
[
{
"SpeechStartAt": 0.994,
"SpeechEndAt": 6.142
},
{
"SpeechStartAt": 6.242,
"SpeechEndAt": 0 //// this is 0 ?
}
]
The original sound file is as follows: http://cyber-milestone.oss-cn-shanghai.aliyuncs.com/uploads/2025/01/16/audio_tmp_a8e5341d230effa9fd7084d4f4aca3a5.wav
For this particular audio, if I use the onnx-runtime version, I get the following:
code invocation
USE_PIP=False# download model using pip package or torch.hubUSE_ONNX=True# change this to True if you want to test onnx modelifUSE_ONNX:
!pipinstall-qonnxruntimeifUSE_PIP:
!pipinstall-qsilero-vadfromsilero_vadimport (load_silero_vad,
read_audio,
get_speech_timestamps,
save_audio,
VADIterator,
collect_chunks)
model=load_silero_vad(onnx=USE_ONNX)
else:
model, utils=torch.hub.load(repo_or_dir='snakers4/silero-vad',
model='silero_vad',
force_reload=True,
onnx=USE_ONNX)
(get_speech_timestamps,
save_audio,
read_audio,
VADIterator,
collect_chunks) =utilswav=read_audio('audio_tmp_a8e5341d230effa9fd7084d4f4aca3a5.wav', sampling_rate=SAMPLING_RATE)
# get speech timestamps from full audio filespeech_timestamps=get_speech_timestamps(wav, model, sampling_rate=SAMPLING_RATE, visualize_probs=True)
pprint(speech_timestamps)
❓ Questions and Help
We have a wiki available for our users. Please make sure you have checked it out first.
I tried parsing an audio in vad and came up with a value of 0 for the last SpeechEndAt, which confused me. Sometimes the last audio is still around for a long time, but the value of the SpeechEndAt is still zero, making it impossible for me to figure out whether the final data is silent or speaking. The data are as follows:
[
{
"SpeechStartAt": 0.994,
"SpeechEndAt": 6.142
},
{
"SpeechStartAt": 6.242,
"SpeechEndAt": 0 //// this is 0 ?
}
]
The original sound file is as follows: http://cyber-milestone.oss-cn-shanghai.aliyuncs.com/uploads/2025/01/16/audio_tmp_a8e5341d230effa9fd7084d4f4aca3a5.wav
code:
detector, err := speech.NewDetector(speech.DetectorConfig{
ModelPath: "./sources/vad/silero/silero_vad_16k_op15.onnx",
SampleRate: 16000,
Threshold: 0.2,
MinSilenceDurationMs: 100,
SpeechPadMs: 30,
})
if err != nil {
return nil, nil, 0.0, fmt.Errorf("failed to create speech detector: %s", err)
}
defer func() {
_ = detector.Destroy()
}()
The text was updated successfully, but these errors were encountered: