-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add precalculated values of sin/cos for speeding up FFT #1142
Add precalculated values of sin/cos for speeding up FFT #1142
Conversation
@AlexandrGraschenkov If you have some free time, could you do me a favor and test how much of an improvement there would be if the optimization in #1148 is combined with your optimization? This is because I've set it to skip FFT calculations and output the results directly when the FFT input is all zeros during the calculation of log Mel. If you have more time, please help me see how much the quality of speech-to-text has improved. Thank you! |
How often do you observe this to be the case? I would guess it never happens for normal audio |
After the log Mel correction, we should have |
Ok, makes sense. This change won't interfere with your changes and it is OK to merge, correct? I'm slowly working my way through the oldest PRs and will soon reach your changes. |
No, in this PR we should switch from |
Co-authored-by: bobqianic <[email protected]>
Co-authored-by: bobqianic <[email protected]>
…erganov#1142) * Add sin/cos precalculated values to speedup FFT * Update whisper.cpp Co-authored-by: bobqianic <[email protected]> * Update whisper.cpp Co-authored-by: bobqianic <[email protected]> --------- Co-authored-by: Georgi Gerganov <[email protected]> Co-authored-by: bobqianic <[email protected]>
…erganov#1142) * Add sin/cos precalculated values to speedup FFT * Update whisper.cpp Co-authored-by: bobqianic <[email protected]> * Update whisper.cpp Co-authored-by: bobqianic <[email protected]> --------- Co-authored-by: Georgi Gerganov <[email protected]> Co-authored-by: bobqianic <[email protected]>
…erganov#1142) * Add sin/cos precalculated values to speedup FFT * Update whisper.cpp Co-authored-by: bobqianic <[email protected]> * Update whisper.cpp Co-authored-by: bobqianic <[email protected]> --------- Co-authored-by: Georgi Gerganov <[email protected]> Co-authored-by: bobqianic <[email protected]>
…erganov#1142) * Add sin/cos precalculated values to speedup FFT * Update whisper.cpp Co-authored-by: bobqianic <[email protected]> * Update whisper.cpp Co-authored-by: bobqianic <[email protected]> --------- Co-authored-by: Georgi Gerganov <[email protected]> Co-authored-by: bobqianic <[email protected]>
…erganov#1142) * Add sin/cos precalculated values to speedup FFT * Update whisper.cpp Co-authored-by: bobqianic <[email protected]> * Update whisper.cpp Co-authored-by: bobqianic <[email protected]> --------- Co-authored-by: Georgi Gerganov <[email protected]> Co-authored-by: bobqianic <[email protected]>
The code works in the same way as before, except that we don't spend time on sin/cos calculations. This is a real bottleneck for FFT calculations.
System info:
Testing
base.en
model on:./main -f samples/a13.wav
Testing
base.en
model on:./main -f samples/diffusion2023-07-03.wav