Skip to content

Add option to speed up the audio tempo by x2 #143

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

Merged
merged 1 commit into from
Nov 13, 2022
Merged

Add option to speed up the audio tempo by x2 #143

merged 1 commit into from
Nov 13, 2022

Conversation

ggerganov
Copy link
Member

ref #137

Using a Phase Vocoder for speeding up the audio tempo by scaling down the frequencies in the frequency domain.
Use the -su or --speed-up command line argument to enable it:

./main -m ./models/ggml-small.en.bin -f samples/gb0.wav -su

This reduces the computation in the Encoder by a factor of 2.
The transcription accuracy is degraded, but for slow to normal speech - it seems to be still very good.

I think this can find application for real-time transcription - i.e. the "stream" example.

Similar result is achieved with ffmpeg's atempo filter:

# speed-up tempo by factor of 2
ffmpeg -i samples/gb0.wav -filter_complex "[0:a]atempo=2.0[a]" -map "[a]" samples/gb0-fast.wav

./main -m ./models/ggml-small.en.bin -f samples/gb0-fast.wav

Using a Phase Vocoder for speeding up the audio tempo by scaling down
the frequencies in the frequency domain.

This reduces the computation in the Encoder by a factor of 2.
The transcription accuracy is degraded, but for slow to normal speech -
it seems to be still very good.

I think this can find application for real-time transcription - i.e. the
"stream" example.
@ggerganov ggerganov merged commit 83c742f into master Nov 13, 2022
@ggerganov ggerganov deleted the tempo branch November 13, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant