How do I have to call sox to transform an 2 second audio file into being speed up so that the resulting length of the file is 1.5 seconds (75%)? Do I have to pass an argument to do pitch correction? What arguments do I have to pass that the filesize stays small?
Open the audio file and select the audio to be changed. On the menu bar, open the “Effects” tab > Change Tempo. A dialogue box will open. Move slider as appropriate.
Try this (with input.wav as your input file)
sox input.wav output.wav speed 1.33
Taken from this, its example 13.
Regarding pitch correction, if the pitch should stay the same, use this command instead.
sox input.wav output.wav tempo 1.33
Regarding filesize. It depends on the audio format you want to use. If it is compressed, select settings for higher compression. If not, you may want to convert it to mono, reduce the sample rate or bits.
I just tried slowing down a typical CD-quality audio file with sox and ffmpeg for a side-by-side comparison of changing tempo without changing pitch.
It appears that sox introduced some stutter that ffmpeg did not. Would recommend ffmpeg, for slowing at least; here at half-tempo:
ffmpeg -i file.mp3 -filter:a "atempo=0.5" file_0.5.mp3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With