pyannote / pyannote-audio

Neural building blocks for speaker diarization: speech activity detection, speaker change detection, overlapped speech detection, speaker embedding
http://pyannote.github.io
MIT License
5.77k stars 749 forks source link

How to save the plot as a jpg and predicted rttms as a file for each test file? #1497

Closed sucv closed 1 week ago

sucv commented 10 months ago

Dear author, I have a question about how to save the plot and prediction when I called the code snippet below. Seems that I cannot find any example from the ipynb tutorials. Thanks in advance!

    for file in dataset.test():
        # apply pretrained pipeline
        file["pretrained pipeline"] = pretrained_pipeline(file)

        # evaluate its performance
        metric(file["annotation"], file["pretrained pipeline"], uem=file["annotated"])
github-actions[bot] commented 10 months ago

Thank you for your issue.You might want to check the FAQ if you haven't done so already.

Feel free to close this issue if you found an answer in the FAQ.

If your issue is a feature request, please read this first and update your request accordingly, if needed.

If your issue is a bug report, please provide a minimum reproducible example as a link to a self-contained Google Colab notebook containing everthing needed to reproduce the bug:

Providing an MRE will increase your chance of getting an answer from the community (either maintainers or other power users).

Companies relying on pyannote.audio in production may contact me via email regarding:

This is an automated reply, generated by FAQtory

hbredin commented 10 months ago

There is no easy way to save plots. You would have to dive into pyannote.core code.

Saving Annotation instances to RTTM file can be done with Annotation.write_rttm

Approximetal commented 8 months ago

There is no easy way to save plots. You would have to dive into pyannote.core code.

Saving Annotation instances to RTTM file can be done with Annotation.write_rttm

Sometimes different speakers seem to be plotted with the same color, how can I change that? image

alephpi commented 7 months ago

well I think saving plot is really a necessary functionality. if we can export the annotation object as a matplotlib plot, it will also be easier to modify the plots.

stale[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.