# Speaker Diarization
> [pyannote-audio](https://github.com/pyannote/pyannote-audio) is an open-source toolkit written in Python for speaker diarization.
`pyannote-onnx` is used to convert the [pretrained model](https://huggingface.co/pyannote/segmentation-3.0) defined in PyTorch into the ONNX format and then run it with [ONNX Runtime](https://github.com/microsoft/onnxruntime) (in C++ or Python).
> Only Python 3.8+ is supported.
## Usage
1. Download the [pretrained model](https://huggingface.co/pyannote/segmentation-3.0/resolve/main/pytorch_model.bin) from Hugging Face [pyannote/segmentation-3.0](https://huggingface.co/pyannote/segmentation-3.0/tree/main).
2. Export the pretrained model to ONNX model.
3. Run the ONNX model with ONNX Runtime in C++ or Python.
```bash
$ pip install torch onnx https://github.com/pyannote/pyannote-audio/archive/refs/heads/develop.zip
$ python export_onnx.py pytorch_model.bin segmentation-3.0.onnx
$ pip install pyannote-onnx
$ diarize data/test_16k.wav --plot
```
Raw data
{
"_id": null,
"home_page": "https://github.com/pengzhendong/pyannote-onnx",
"name": "pyannote-onnx",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Zhendong Peng",
"author_email": "pzd17@tsinghua.org.cn",
"download_url": "https://files.pythonhosted.org/packages/09/19/fa432b95cc6fa89be8ad44d0a8d7230d374892404e44882b06534a0d07f4/pyannote-onnx-0.1.1.tar.gz",
"platform": null,
"description": "# Speaker Diarization\n\n> [pyannote-audio](https://github.com/pyannote/pyannote-audio) is an open-source toolkit written in Python for speaker diarization.\n\n`pyannote-onnx` is used to convert the [pretrained model](https://huggingface.co/pyannote/segmentation-3.0) defined in PyTorch into the ONNX format and then run it with [ONNX Runtime](https://github.com/microsoft/onnxruntime) (in C++ or Python).\n\n> Only Python 3.8+ is supported.\n\n## Usage\n\n1. Download the [pretrained model](https://huggingface.co/pyannote/segmentation-3.0/resolve/main/pytorch_model.bin) from Hugging Face [pyannote/segmentation-3.0](https://huggingface.co/pyannote/segmentation-3.0/tree/main).\n2. Export the pretrained model to ONNX model.\n3. Run the ONNX model with ONNX Runtime in C++ or Python.\n\n```bash\n$ pip install torch onnx https://github.com/pyannote/pyannote-audio/archive/refs/heads/develop.zip\n$ python export_onnx.py pytorch_model.bin segmentation-3.0.onnx\n\n$ pip install pyannote-onnx\n$ diarize data/test_16k.wav --plot\n```\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Pyannote ONNX",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/pengzhendong/pyannote-onnx"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0919fa432b95cc6fa89be8ad44d0a8d7230d374892404e44882b06534a0d07f4",
"md5": "b05fce90df63df1a4e0542ff0372ae74",
"sha256": "615d613e4d539eae3f6689950599be69d66bd6eefa812321b0f7c09606b310ca"
},
"downloads": -1,
"filename": "pyannote-onnx-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "b05fce90df63df1a4e0542ff0372ae74",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8694,
"upload_time": "2024-09-11T09:41:58",
"upload_time_iso_8601": "2024-09-11T09:41:58.874454Z",
"url": "https://files.pythonhosted.org/packages/09/19/fa432b95cc6fa89be8ad44d0a8d7230d374892404e44882b06534a0d07f4/pyannote-onnx-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-11 09:41:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pengzhendong",
"github_project": "pyannote-onnx",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "click",
"specs": []
},
{
"name": "librosa",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "modelscope",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "onnxruntime",
"specs": []
}
],
"lcname": "pyannote-onnx"
}