commit 04df3e80bfe52bc5c60754bcb01c9164f327a2d1 Author: Gasper Spagnolo Date: Sun Sep 18 20:51:37 2022 +0200 first commit diff --git a/main.py b/main.py new file mode 100644 index 0000000..d061b8a --- /dev/null +++ b/main.py @@ -0,0 +1,10 @@ +# load the pipeline from Hugginface Hub +from pyannote.audio import Pipeline +pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization@2022.07") + +# apply the pipeline to an audio file +diarization = pipeline("f24122a7f35de434d996.ogg", min_speakers=3, max_speakers=9) + +# dump the diarization output to disk using RTTM format +with open("audio.rttm", "w") as rttm: + diarization.write_rttm(rttm) diff --git a/samples/f24122a7f35de434d996.ogg b/samples/f24122a7f35de434d996.ogg new file mode 100644 index 0000000..a27963e Binary files /dev/null and b/samples/f24122a7f35de434d996.ogg differ diff --git a/samples/mini.ogg b/samples/mini.ogg new file mode 100644 index 0000000..44bc727 Binary files /dev/null and b/samples/mini.ogg differ