snakers4 / silero-vad

Silero VAD: pre-trained enterprise-grade Voice Activity Detector
MIT License
3.38k stars 353 forks source link

Can't make v3.1 release work with onnxruntime #436

Closed Purfview closed 3 months ago

Purfview commented 3 months ago

Why https://github.com/snakers4/silero-vad/releases/tag/v3.1 doesn't work? [No problems with v4 release]

  File "d:\Programs\Python64\silero-vad3\utils_vad.py", line 42, in __call__
    ort_outs = self.session.run(None, ort_inputs)
  File "D:\Programs\Python64\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 196, in run
    raise ValueError("Model requires {} inputs. Input Feed contains {}".format(num_required_inputs, num_inputs))
ValueError: Model requires 4 inputs. Input Feed contains 3

These are inputs from utils_vad.py line 41:

ort_inputs = {'input': x.numpy(), 'h0': self._h, 'c0': self._c}
snakers4 commented 3 months ago

For an older release to work you need to load the older commit of the repo.

Purfview commented 3 months ago

I'm using files directly from the release source -> https://github.com/snakers4/silero-vad/archive/refs/tags/v3.1.zip

Then I tried the repo files just before the v4 commit, same error too.

Purfview commented 3 months ago

Nevermind, there are some quirks in v3.1 with .cache folder, it was loading v4 model from cache instead of the right model from files folder.