-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Hi,
I've been using faster-whisper with great results and I wanted to share the minor tweaks I've made to the library for some slight speed increases. The speed increases are anywhere from 1-5% without any slowdowns. The larger the audio file with a larger amount of text will give bigger speed increases. You can see the tweaks in my branch here. I'd be glad to make a PR of any of the tweaks you want integrated but feel free to do them yourself as they're so minor.
The rundown of changes is essentially: only assigning dtype once as assigning things in Python is costly, creating dicts with {} as it is always faster than with dict(), and converting suppress_tokens to a set right off the bat. The last one removed the list assertion check but GIGO and assertions are ignored in optimized modes anyway.