I have some WAV format audio files with a frequency of 48Khz and I want to load them into the program I'm making. The program however only accepts up to 44.1Khz (CD music quality) due to hardware restrictions, so I need some way to convert my audio file's hz. To be clear I don't think this is pitch shifting like this question says because I want the files to sound about the same rather than sounding deeper.

Ideally I'd like to use a commandline tool that just takes in the WAV files and outputs new 44.1KHz options so I can automate the build process (And if it can handle other formats like OOG, thats a bonus). Also I'm not terribly familiar with sound terminology so there might be a super obvious answer I'm missing.

1 Answer 1


What you are dealing with is the sampling frequency or sampling rate of your audio files. And what you want to achieve is called sample rate conversion.

There are many software that can deal with this process. Two examples come to mind to automate the process :

Simple example with Sox that will convert in.wav sample rate to 44.1 kHz and save it as out.wav :

$ sox in.wav --rate 44100 out.wav
  • Ah ofc sampling frequency. I'll install SoX and try it out later tonight. Thanks :)
    – Protofall
    Oct 8, 2020 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.