Closed simonottenhauskenbun closed 7 months ago
Thanks. Would you contribute proposed suggestion (1.)?
Sure! Working on it...
onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model /data/models/wespeaker-voxceleb-resnet34-LM/pytorch_model.bin failed:Protobuf parsing failed.
https://github.com/pyannote/pyannote-audio/pull/1662 aims to fix this by "Write some documentation how to load local models, pointing out this behaviour"
I did get the notification for PR #1662. Thanks. Will have a look when things get quieter on my side...
Tested versions
Versions to reproduce:
System information
Ubuntu 22.04.4 LTS - NVIDIA A100 PCIe 40GB - python 3.11
Issue description
First of all, thank you Hervé BREDIN for the gread work you are doing here!
I am in the process of combining your speaker diarization with asr models (non-whisper) and I need to run speaker-diarization-3.1 using local files only.
When I try to load the model I get ONNX/protobuf loading errors
How to reproduce
Download
to
models/
Adjusted the config to point to the local files:
Install
onnxruntime
:pip install onnxruntime
- if not installed,ImportError: 'onnxruntime' must be installed to use 'models/model_wespeaker-voxceleb-resnet34-LM.bin' embeddings.
is raised from https://github.com/pyannote/pyannote-audio/blob/develop/pyannote/audio/pipelines/speaker_verification.py#L420Load the pipeline:
Location of the bug
I've tracked down the source of the bug: https://github.com/pyannote/pyannote-audio/blob/develop/pyannote/audio/pipelines/speaker_verification.py#L712
Workaround
The workaround is to iclude
pyannote
in the path to the model, so the first if statement triggers, loading the wespeaker-voxceleb-resnet34-LM as a pyannote model.Changed config:
How to fix (suggestions)
Minimal reproduction example (MRE)
https://gist.github.com/simonottenhauskenbun/cf05d31b53055750e62a06ef5e317462