|
Hello pyannote team, Hello everyone ! First of all, thank you very much for open-sourcing this excellent project. I have integrated and decoupled pyannote.audio 4.0.4 into my own speech processing pipeline, and I would like to ask for some advice regarding customization and fine-tuning. My questions are:
Thank you very much for your time and help. Billions of thanks. |
Replies: 1 comment 4 replies
|
The short answer to (1) is that there isn't a current recipe to follow — both places the docs send you are pinned to older majors, and the APIs they use were removed in 4.0. So the first thing worth knowing is what to translate. Why the existing tutorials don't run on 4.0.4
Mapping the differences, from the 4.0.0 changelog:
1. Fine-tuning segmentation on 4.x The structure of the 2.1 recipe still holds — only the task class and its arguments changed: from pyannote.audio import Model
from pyannote.audio.tasks import SpeakerDiarization
from pyannote.database import registry, FileFinder
registry.load_database("database.yml")
dataset = registry.get_protocol(
"MyCorpus.SpeakerDiarization.MyProtocol", {"audio": FileFinder()}
)
model = Model.from_pretrained("pyannote/segmentation-3.0", token=True)
task = SpeakerDiarization(
dataset,
duration=model.specifications.duration,
# match the checkpoint you are adapting, otherwise the classifier is resized
max_speakers_per_chunk=len(model.specifications.classes),
max_speakers_per_frame=model.specifications.powerset_max_classes,
batch_size=32,
)
model.task = task
model.prepare_data()
model.setup()Those two Training itself is unchanged apart from the import — 2. Overlapping speech There is no separate overlap task or pipeline to tune any more — 4.0 removed both, and overlap is handled inside The knob is One caveat on all of the above: this is the API as it stands in the 4.x source, not a fine-tuning run I have benchmarked end to end — so treat the values as defaults to start from rather than tuned ones. |
Thanks for the reply, and for 茅塞顿开 — glad it helped. Happy to help with your issue.
Short answers: yes to both.
1. Fine-tuning the
segmentationcheckpoint is the right targetFor your two goals it's the only component that matters. The segmentation model decides speaker boundaries and which frames contain overlap; the embedding and PLDA only decide who is who once boundaries exist. Sharper turn boundaries and better overlap in telephone audio are entirely a segmentation problem.
Load that checkpoint on its own with the
subfolderargument: