3

I wish to change the speed of an audio file (in the .wav format) by small amounts(±25%). The catch is that I need to retain the previous sample rate of the file. Both solutions involving a change of speed and pitch, and change of speed only (tempo change) are welcome, as ideally I would like to do both separately.

Bruno KM
  • 768
  • 10
  • 20

1 Answers1

8

You can use ffmpeg for that purpose:

ffmpeg -i in.wav -filter:a "atempo=0.5" out.wav

If you want to call it from Python, you can use ffmpy.

import ffmpy
ff = ffmpy.FFmpeg(inputs={"in.wav": None}, outputs={"out.wav": ["-filter:a", "atempo=0.5"]})
ff.run()
filaton
  • 2,257
  • 17
  • 27