Pyannote ONNX
Project description
Speaker Diarization
pyannote-audio is an open-source toolkit written in Python for speaker diarization.
pyannote-onnx
is used to convert the pretrained model defined in PyTorch into the ONNX format and then run it with ONNX Runtime (in C++ or Python).
Only Python 3.8+ is supported.
Usage
- Download the pretrained model from Hugging Face pyannote/segmentation.
- Export the pretrained model to ONNX model.
- Run the ONNX model with ONNX Runtime in C++ or Python.
$ pip install torch onnx https://github.com/pyannote/pyannote-audio/archive/refs/heads/develop.zip
$ python export_onnx.py pytorch_model.bin pyannote.onnx
Python Usage
$ pip install -r requirements.txt
$ python main.py data/test_16k.wav
C++ Usage
$ cmake -S src -B build -DCMAKE_BUILD_TYPE=Release
$ cmake --build build
$ mkdir output
$ ./build/diarization_main \
--model_path pyannote.onnx \
--wav_path data/test_16k.wav \
--output_dir output
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyannote-onnx-0.0.1.tar.gz
(11.1 MB
view hashes)