How to downsample quality on many .wav audio files?
June 27, 2013 7:18 AM   Subscribe

I have several hundred recordings of research sessions which are .wav audio files, and they have nearly filled my external hard drive. How can I reduce the file size while preserving quality?

The files were recorded at 44.1 kHz, 16 bit stereo, and so they are quite large and are higher quality than we need. (We just need to be able to go back and hear the people talking on the recordings.)

I'd like to keep them at reasonable quality but reduce the file size. Right now, a 45-minute recording is taking up about 500 MB; I'd like to reduce that by at least a third, if possible. I am not much of an audiophile and so not sure how to approach this.

So, I have two questions:
-Can anyone recommend software, preferably free, that will allow us to do this in a streamlined manner, without opening each individual file and re-saving it? (Have tried this in Praat but found the scripting to be a pain.) Either mac or windows-based software is fine.

-What should I be saving the file as to reduce the size? (File type and quality?)

Thanks!
posted by supramarginal to Technology (13 answers total) 2 users marked this as a favorite
 
I recommend batch converting the .wav files to .ogg (Ogg Vorbis format). Expect a final size which is around ~10% of the original, but with "close to" the original quality. I recommend .ogg instead of .mp3 since Mp3 software often requires a license fee, and .ogg has slightly better quality, although this is debatable and ultimately doesn't really matter since you're recording human speech.

There are multiple programs out there which do this, with varying levels of technical know-how required. I've never had to do it (I do it one at a time using Audacity), so I can't recommend one specifically. Google "batch convert wav to ogg" for a list of links.

If you for some reason definitely don't want to go the compressed route, and want to retain everything as .wav, I wouldn't sample lower than 11025Hz mono. Although 8KHz is often quoted as being acceptable for phone conversations, in my opinion it's too low for this, as it distorts sibilance (the 'sss' and 'sh' sounds).
posted by hanoixan at 7:28 AM on June 27, 2013


Best answer: You can cut the size in half by mixing down to mono. If these are voice recordings made with a single microphone, you likely aren't even losing any information. You may be able to squeeze out plenty more by using lossless compression (MP3, AAC, Ogg Vorbis, etc.) with a reasonable bitrate.

What system are you on? If you are on Mac or Linux, you can install sox and do this with a single shell script.
posted by mkb at 7:29 AM on June 27, 2013


Response by poster: I have either Mac or Windows available. The files were recorded with one microphone, so I think using mono would be fine.

I looked at Sox, but am a little intimidated by the scripting. Any suggestions for how that script would look?

Thanks so much!
posted by supramarginal at 7:41 AM on June 27, 2013


MP3, perhaps tweaked for voice, would be fine for this. Clear voice recordings are very compressible compared to music. Even at a higher bitrate, like 320kbps, you're looking at a huge savings of space.

There are open MP3 codecs, such as the LAME codec, and LAME plugs in easily to most of the freeware out there. I think Handbrake can handle audio, but there are a ton of converters out there-- I use foobar2000 for Windows. Select the files (or select all), right-click -> Convert, and you can save your preferred settings once you've picked a quality and conversion level. It supports about a dozen other codecs as well.
posted by Sunburnt at 7:43 AM on June 27, 2013 [1 favorite]


Perhaps you could convert your files to FLAC, which is lossless and open source. I'm not an audio expert, but some quick searching suggests there there is no reduction in quality from wav but with about 50% compression. There appears to be plenty of discussion out there from smarter people of wav vs FLAC vs mp3 vs whatever regarding both quality and file size to help you make your decision.
posted by KinoAndHermes at 8:19 AM on June 27, 2013 [1 favorite]


If you want it to be dead simple, import the audio to iTunes, select all, right-click and select "Create AAC Version". Then delete original WAVs, copy AAC files back out of iTunes, and delete them from your library.
posted by caution live frogs at 8:27 AM on June 27, 2013 [1 favorite]


I mean, if you have a Mac you already have the software installed, it works, and it's fairly simple to do it. Arguments about open-ness of format aside, AAC will play back anywhere on pretty much any device you have, and quality is good at the default settings used by iTunes.
posted by caution live frogs at 8:28 AM on June 27, 2013 [1 favorite]


22kHz FLAC (lossless) will result in a file about 25% the size of the original. For a sampling rate comparison, "telephone quality" is 8kHz, so 22kHz will give you plenty of legibility with half the bandwidth, and FLAC conversions typically result in half-sized files.
posted by rhizome at 10:31 AM on June 27, 2013 [1 favorite]


Try razorlame! It's free and you can batch convert wav files to mp3.

Here's razorlame:

http://www.dors.de/razorlame/index.php

You can choose a high quality preset like VBR 11 Studio.

Be sure to also install lame.exe (which is also free) where Windows can find it, e.g. in the same directory as razorlame.exe.
posted by hz37 at 10:36 AM on June 27, 2013


Best answer: sox is the right tool for this, and 8KHz mono is a reasonable storage format for speech:
#!/bin/sh
for file in *.wav
do
  sox -t wav $file -r 8000 -c 1 ${file%.wav}.8kHz.wav resample
done
Try this a few times on some sample files, increasing the 8000 parameter until the sound is clear.
posted by nicwolff at 1:26 PM on June 27, 2013


FLAC is way overspecced for voice. Medium bitrate mp3s will be absolutely fine (128kb/s VBR, say), it takes a very trained ear to notice any signal degradation at all, and that will bring the file size down to 10% or so. You could do it in itunes or windows media player if you liked, though razorlame is also a good option.
posted by Sebmojo at 3:58 PM on June 27, 2013 [2 favorites]


Any conversion to either .ogg or .mp3 would save enough space in my opinion that I'd do them both.

As Sebmojo says above, I can't see you needing anything approaching FLAC. It's just spoken word, correct?

Just make sure to check the converted files before you delete the original .wavs.
posted by Sphinx at 5:20 PM on June 27, 2013


XLD and Max are two free, Mac friendly, batch-capable audio conversion apps. AAC or MP3 Mono at 96kbps is fine for voice.
posted by tomierna at 7:57 PM on June 27, 2013


« Older My sister's super stole her laptop. What do I do?   |   Help us decide where to move to in NH Newer »
This thread is closed to new comments.