| 1 |
generate/pyannote/README.TXT |
| 2 |
Anastasia Shchupak, 30 May 2026 |
| 3 |
|
| 4 |
This folder documents how the files |
| 5 |
external/whispercpp/model-ggml-segmentation.cpp and |
| 6 |
external/whispercpp/model-ggml-embedding.cpp |
| 7 |
were generated. They contain the model weights for the segmentation and embedding models |
| 8 |
used by pyannote/speaker-diarization-3.0 pipeline, which is implemented in Praat and used for speaker diarization. |
| 9 |
|
| 10 |
The HuggingFace repository from which the original models were downloaded is gated, |
| 11 |
so a HuggingFace account is necessary for downloading. |
| 12 |
|
| 13 |
1. Files in this folder |
| 14 |
======================= |
| 15 |
README.txt |
| 16 |
This file. |
| 17 |
|
| 18 |
convert-pyannote-segmentation-to-ggml.py |
| 19 |
Python script that converts the original pyannote/segmentation-3.0 PyTorch model to ggml binary format. |
| 20 |
Requires Python 3 and the pyannote.audio package. |
| 21 |
|
| 22 |
convert-pyannote-embedding-to-ggml.py |
| 23 |
Python script that converts the original pyannote/wespeaker-voxceleb-resnet34-LM PyTorch model to ggml binary format. |
| 24 |
Requires Python 3 and the pyannote.audio package. |
| 25 |
|
| 26 |
convert-pyannote-models-to-ggml.sh |
| 27 |
Shell script that converts the two models required by the pyannote/speaker-diarization-3.0 pipeline |
| 28 |
to ggml binary format, using the Python scripts convert-pyannote-segmentation-to-ggml.py |
| 29 |
and convert-pyannote-embedding-to-ggml.py. |
| 30 |
|
| 31 |
2. How to obtain the model files |
| 32 |
================================ |
| 33 |
2a. Segmentation model |
| 34 |
---------------------- |
| 35 |
Download the original pyannote/segmentation-3.0 model from HuggingFace: |
| 36 |
`https://huggingface.co/pyannote/segmentation-3.0/blob/main/pytorch_model.bin` |
| 37 |
and rename it from pytorch_model.bin to pyannote-segmentation.bin. |
| 38 |
Then run the following command to convert it to the ggml format: |
| 39 |
``` |
| 40 |
./convert-pyannote-models-to-ggml.sh ./pyannote-segmentation.bin ./ |
| 41 |
``` |
| 42 |
This is the file from which the .cpp model file was generated. |
| 43 |
|
| 44 |
2b. Embedding model |
| 45 |
------------------- |
| 46 |
Download the original pyannote/wespeaker-voxceleb-resnet34-LM model, which is a wrapper around WeSpeaker |
| 47 |
wespeaker-voxceleb-resnet34-LM pretrained speaker embedding model: |
| 48 |
`https://huggingface.co/pyannote/wespeaker-voxceleb-resnet34-LM/blob/main/pytorch_model.bin`. |
| 49 |
and rename it from pytorch_model.bin to pyannote-embedding.bin. |
| 50 |
Then run the following command to convert it to the ggml format: |
| 51 |
``` |
| 52 |
./convert-pyannote-models-to-ggml.sh ./pyannote-embedding.bin ./ |
| 53 |
``` |
| 54 |
This is the file from which the .cpp model file was generated. |