## WAV files sound high pitched - how do I bulk fix the sample rate in the metadata?

3

For stupid reasons, I think I recorded a bunch of stuff through a USB microphone that reported to the OS as a 48.0 kHz input device while it was actually 44.1 kHz. Oddly enough it worked normally until suddenly my sound files sounded high pitched. I can only speculate what happened exactly, but these are the facts:

• I usually record through an aggregate device on macOS that is set to 48 kHz. Normally I initialize my microphone (which is part of the aggregate device) to 48 as well, but this time it accidentally recorded to 44.1.
• My recordings report a 48 kHz sample rate and sound high pitched.

I assume that I somehow have to edit the metadata of all my sound files to report a sample rate of 44.1 kHz instead of 48.0 kHz. How do I do that? I have Reaper.

Nevermind, I found something. The command line tool sox seems to do the trick:
find . -name '*.wav' | xargs -I {} basename {} .wav | xargs -I {} sox -r 44100 {}.wav {}.edited.wav