Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: add pseudo speaker diarization pipeline based on segmentation stitching #201

Draft
wants to merge 19 commits into
base: develop
Choose a base branch
from

Conversation

hbredin
Copy link
Collaborator

@hbredin hbredin commented Nov 9, 2023

As segmentation models are getting better, it might make sense to revisit the idea of stitching based on segmentation alone. That's what this (WIP) pipeline does.

Also, that was an excuse for me to start experimenting with diart and ... I'm enjoying it so far :)

@juanmc2005
Copy link
Owner

very very cool, I think it also makes more sense with the powerset model because of the bigger window too. Let me know if you need a hand with this! We should also find a more catchy name for pseudo speaker diarization 😃

* bump pyannote to 3.0

* add wespeaker inference

* add weights normalization, cpu for numpy conversion

* unify api

* remove try catch

* always normalize

* use PretrainedSpeakerEmbedding in Loader

* Fix min-max normalization equation

* fix: remove imports

* Change embedding model return type to Callable

Co-authored-by: Simon <80467011+sorgfresser@users.noreply.github.com>

* fix: remove type checking

* remove from active if NaN embeddings

* Fix wrong typing of model in `LazyModel`

* add docstrings

* Simplify EmbeddingModel.__call__()

* Add numpy import

* add normalize boolean

* Update requirements.txt

* Update setup.cfg

* Apply suggestions from code review

* Fix wrong kwarg name

* add abstract __call__

* move __call__ to parent class

---------

Co-authored-by: Juan Coria <juanmc2005@hotmail.com>
@hbredin hbredin changed the base branch from main to develop November 9, 2023 20:20
@juanmc2005 juanmc2005 self-requested a review November 9, 2023 21:35
* feat: add support for powerset segmentation models

* wip: trying this PowersetAdapter thing

* fix: initialize nn.Module before setting attribute

* Fix unresolved duration and sample rate

* Apply suggestions from code review

* fix: remove Inference import

* fix: black embedding.py

... though it has nothing to do with this PR...

---------

Co-authored-by: Juan Coria <juanmc2005@hotmail.com>
@juanmc2005 juanmc2005 added the feature New feature or request label Nov 10, 2023
@juanmc2005 juanmc2005 added this to the Version 0.10 milestone Nov 10, 2023
hbredin and others added 4 commits November 10, 2023 14:56
* bump pyannote to 3.0

* add wespeaker inference

* add weights normalization, cpu for numpy conversion

* unify api

* remove try catch

* always normalize

* use PretrainedSpeakerEmbedding in Loader

* Fix min-max normalization equation

* fix: remove imports

* Change embedding model return type to Callable

Co-authored-by: Simon <80467011+sorgfresser@users.noreply.github.com>

* fix: remove type checking

* remove from active if NaN embeddings

* Fix wrong typing of model in `LazyModel`

* add docstrings

* Simplify EmbeddingModel.__call__()

* Add numpy import

* add normalize boolean

* Update requirements.txt

* Update setup.cfg

* Apply suggestions from code review

* Fix wrong kwarg name

* add abstract __call__

* move __call__ to parent class

---------

Co-authored-by: Juan Coria <juanmc2005@hotmail.com>
* feat: add support for powerset segmentation models

* wip: trying this PowersetAdapter thing

* fix: initialize nn.Module before setting attribute

* Fix unresolved duration and sample rate

* Apply suggestions from code review

* fix: remove Inference import

* fix: black embedding.py

... though it has nothing to do with this PR...

---------

Co-authored-by: Juan Coria <juanmc2005@hotmail.com>
* Add ONNX segmentation and embedding models

* Minor readability improvements

* Replace onnxruntime with onnxruntime-gpu

* ONNX can have only one output

* Clean up useless embedding model subclasses

* Remove duration and sample_rate properties from SegmentationModel. Clean up code

* Update README
juanmc2005 and others added 9 commits November 11, 2023 19:50
* Add initial docs

* Include README in docs page

* Improve README

* Update README

* Add docs requirements.txt

* Add readthedocs config file

* Fix links

* Add some docstrings

* Ignore private attrs in docs

* Add some docstrings. Effectively ignore __init__

* Blacken code

* Blacken code with good version

* Clean up some code

* Fix wrong html title
* Add link to accept conditions of segmentation 3.0

* Add table with available models. Add some latencies

* Add more info on selecting different models

* Add missing info on available models

* Improve top menu

* Improve python badge

* Move things around. Simplify code and wording

* Add dark themed logo

* Remove whitespace at the top

* Update README.md

* Rename from_pyannote to from_pretrained in segmentation and embedding blocks

* Separate huggingface links from model name

* Fix reproducibility link

* Add animated diarization pipeline diagram

* Improve pipeline gif

* Update README.md

* Update snippet gif. Fix torch multiprocessing crash with pyannote 3.1. Other README improvements

* Update README.md

* Fix bad link
* Update version. Add reproducibility note

* Add link to pyannote 3.1 interpolation issue in README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants