Created
June 20, 2021 16:07
-
-
Save xprilion/9a59895a1434ab0b1c5355046c995798 to your computer and use it in GitHub Desktop.
Change sample rate of wavefile without speeding up the audio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import librosa | |
import soundfile as sf | |
filepath = "sample.wav" | |
y, s = librosa.load(filepath, sr=16000) | |
sf.write(filepath, y, s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment