Skip to content

offline vad vs online vad #85

Answered by garymmi
garymmi asked this question in Q&A
Jul 13, 2021 · 4 comments · 5 replies
Discussion options

You must be logged in to vote

thanks for your quick reply

offline vad code


import glob
import onnxruntime
import torch
from pprint import pprint

from IPython.display import Audio

_, utils = torch.hub.load(repo_or_dir='snakers4/silero-vad',
                              model='silero_vad_mini',
                              force_reload=False)

(get_speech_ts,
 get_speech_ts_adaptive,
 save_audio,
 read_audio,
 state_generator,
 single_audio_stream,
 collect_speeches) = utils

def init_onnx_model(model_path: str):
    return onnxruntime.InferenceSession(model_path)

def validate_onnx(model, inputs):
    with torch.no_grad():
        ort_inputs = {'input': inputs.cpu().numpy()}
        outs = model.run(None, ort_inpu…

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@snakers4
Comment options

Comment options

You must be logged in to vote
1 reply
@snakers4
Comment options

Answer selected by snakers4
Comment options

You must be logged in to vote
1 reply
@snakers4
Comment options

Comment options

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

@garymmi
Comment options

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