Macro to reduce sample rate of hundreds of wav files

I need assistance with a macro I want to create. I have 1000+ voice audio files in wav format that take up a lot of disk space (about 100 GB). I have noticed that most of these files are recorded at 44100 Hz. That’s overkill for voice recordings, specially because the quality doesn’t need to be perfect, as long as the sound is decent that’s OK. I have realized that a rate of 11025 Hz is more than enough to store these files in acceptable quality. My understanding is that reducing the sample rate four-fold will also reduce the file size by the same proportion. That means that if I convert these hundreds of audio files to 11025 sample rate they will take up four times less space in disk, which will save me 75 GB.

I know how to do this manually: I open the file in Audacity, change the project rate to 11025 Hz, export and overwrite the original file. But it would be extremely tedious to do that with 1000+ files. The best way to do it would be to create a macro that repeats this process for each file. I have tried to create such a macro, but I cannot find any command that changes the sample rate. Is there any command that does this?

Thank you.

If super high quality is unimportant, why not just convert them to MP3? Audacity includes a macro to do that. That should reduce the file size even more, with better quality sound.

What are the voices?

export and overwrite the original file.

That’s dangerous. I would wait until the export succeeds before destroying the original.

We should wait for someone who knows more about Macros, but Macros are simple and tend to stay away from system changes such as bit depth and sample rate. It’s a common request. I believe you need to get into Python programming to do your job. Someone will post.

Any reason you’re not going straight to MP3? Significant reduction in file sizes with little or no decrease in audible quality.

Koz

I might want to edit some of those files in the future. According to the advice I’ve been given in this forum, MP3 or any other compressed format is a very bad choice when you plan to do further editing.


These are recordings of me talking to other people. Most of them are recordings of my sessions with my therapist.


You’re right. I have the habit of overwriting originals with the edited file, which is fine as long as the export succeeds, but it is indeed a dangerous practice. It would be a good idea to change it.

Low sample rate audio is not great either - any sound quality that is lost will never come back.

Perhaps it’s worth considering FLAC format. Files have the same sound quality as WAV but at around half the file size.

Whatever you decide I’d recommend using a “conversion program” rather than writing a macro.

With [u]Kabuu Audio Converter[/u] or [u]TAudioConverter[/u] (both free), once you’ve set-up your desired output-format and output-location you can drag-in multiple files or folders and just click “start” (or whatever the button is called).

Or you can get a 1TB USB hard drive for about $50 USD. (Or, there are 160-250MB drives for about $30.)

or there are 128 GB thumb drives for around $15.