Done! Accelerate Whisper tasks such as transcription, by multiprocesing through parallelization #432
Replies: 4 comments 6 replies
-
Standart implementation already use all CPU cores for inference. |
Beta Was this translation helpful? Give feedback.
-
The proposed solution gets its speed-up by chunking the audio file. There is discussion elsewhere in this forum regarding the deterioration of transcription when chunking due to loss of context, of which one should be aware when taking this approach. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to parallelize the transcription of multiple long-form audio files? i.e. Have 2 or more copies of the same Whisper model processing different files? |
Beta Was this translation helpful? Give feedback.
-
Alternatively is there a way to use more resources ? such as setting the vram / cpu cores or gpu allocated? |
Beta Was this translation helpful? Give feedback.
-
I recently made my first ever commit, that is also one of my first Python programs, which I hope will be of benefit to others.
The program accelerates Whisper tasks such as transcription, by multiprocessing through parallelization for CPUs.
No modification to Whisper is needed.
It makes use of multiple CPU cores and the results are as follows
The input file duration was 3706.393 seconds - 01:01:46(H:M:S)
Using 011 of 16CPUs for the "tiny.en" model, a transcription speed of 32.713x
Using 007 of 16CPUs for the "base.en" model, a transcription speed of 16.416x
Using 009 of 16CPUs for the "small.en" model, a transcription speed of 5.595x
Machine -- MacBook, macOS Big Sur using 2.3 GHz Intel Core i9, 16 cores, with 16G of RAM.
Testing of "medium.en" model was very limited because I quickly ran out of memory, so those tests were not included.
https://github.com/MrEdwards007/WhisperTaskAcceleration
Beta Was this translation helpful? Give feedback.
All reactions