Closed Pololot64 closed 4 years ago
Do you have any suggestions on how to do this in realtime? (Sorry for marking it as an issue. I don't want to clutter up your github)
For example: https://librosa.github.io/librosa/generated/librosa.effects.time_stretch.html
A simple way to do this on your own is to cut the signal into short, overlapping blocks. For example, hann-windowed blocks of 20 ms, with 10 ms overlap, so they add back to the original signal if simply added at their original offsets. Then remove every third block to speed up by 30%. If you want to be fancy, remove the block with the lowest crest factor of every three. This will invariably be a vowel, not a consonant, and will lessen the impact on speech. This works surprisingly well, and is far simpler than FFT-based time stretching algorithms. Doesn't work particularly well for music, though, where you'll need something more complicated.
If you need that, FFT every block, then truncate the spectra, then IFFT with a shorter FFT length.
Awesome! Thank you so much!
Not within SoundCard, no. SoundCard does not change the audio in any way.