Skip to content

libtorch jit forward error #154

Answered by snakers4
kli017 asked this question in Q&A
Jan 6, 2022 · 1 comments · 7 replies
Discussion options

You must be logged in to vote

while make the project I got the error as below, which said that the forward function need a parameter named sr.

Yes, this is correct

silero-vad/utils_vad.py

Lines 205 to 211 in 76687cb

speech_probs = []
for current_start_sample in range(0, audio_length_samples, window_size_samples):
chunk = audio[current_start_sample: current_start_sample + window_size_samples]
if len(chunk) < window_size_samples:
chunk = torch.nn.functional.pad(chunk, (0, int(window_size_samples - len(chunk))))
speech_prob = model(chunk, sampling_rate).item()
speech_probs.append(speech_prob)

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@snakers4
Comment options

@kli017
Comment options

@snakers4
Comment options

@kli017
Comment options

@snakers4
Comment options

Answer selected by snakers4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
2 participants
Converted from issue

This discussion was converted from issue #153 on January 06, 2022 07:40.