Skip to content

Returning Speech Probabilities #577

Answered by snakers4
qiisziilbash asked this question in Q&A
Discussion options

You must be logged in to vote

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 1 reply

Comment options

You must be logged in to vote
1 reply
@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
None yet
2 participants