-
-
Notifications
You must be signed in to change notification settings - Fork 784
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
Huge acceleration for speaker-diarization pipeline #1442
Comments
Thank you for your issue. 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
|
Why did you use whisperX for loading? Is there method especially efficient? |
I'm using pyannote as part of the whisperX pipeline, which already loads the audio so I just reuse it for pyannote. |
I've tried this using the recommended way of processing an audio from memory (described here: https://github.com/pyannote/pyannote-audio/blob/develop/tutorials/applying_a_pipeline.ipynb): >> Sadly, I can see no difference in processing time.
|
@kaixxx i didn't say that whisperx.load is faster compared to another method of using an in-memory audio buffer. |
@davidas1 Sorry, I was a bit unclear. What I wanted to say was: |
I'm curious: where exactly is the slow down in the crop method? I was unable to track it down. The crop method should seek the corresponding audio parts, i don't get why it takes longer than loading first + diarization afterwards. If it is somehow related to the torchaudio.load() part: what torchaudio backend are you using? I found something strange in the sox_io source code, if I get it right we might download multiple times if we're providing an url. Additionally using something else than Torchaudio is moving it's audio io to ffmpeg soonish, if it's related to torchaudio.load it might be fixed with it. |
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. |
Due to some implementation detail in the Audio.crop method, I noticed a massive slow-down of the embedding part of the pipeline when working with a filepath.
If I run the same pipeline with pre-loaded audio (which is also resampled) - the performance is much faster.
So, using for example the load_audio method from whisperx, I run the following code:
This results in x5-x10 faster runtime compared to sending the file path to the pipeline.
I think you should consider making this the default way to run the code (or fix the issue that cause the slow performance when working with filepath)
The text was updated successfully, but these errors were encountered: