converting batches in sox

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

converting batches in sox

Claire Wright
Hi I just posted this message to the audacity forum and got sent here so I'm wondering if anyone can help my predicament. 

"I'm using audacity 2.0 with OSX 10.7.4. I have 36,000 audio bin files (from a hydrophone) I need to convert to wav. Audacity works but I need a faster way of doing this. I want the file names to stay the same but when I import the bin file I have to change the sample rate from 44.1khz to 88.2 kHz and then I am also using a template for the meta data I want to keep the date of each recording. There are about a hundred in each date so I could do batches of around that size. It takes about 30 sec for each file so if I don't find a faster way of doing this it's going to take me around 300 hours which is ridiculous. please help!"
Thanks!
--
Claire Wright

Secretary - NAfMEC (National Association of Music Educators Collegiate)



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: converting batches in sox

Pascal Giard
Hi Claire,

On Wed, Jul 11, 2012 at 1:04 PM, Claire Wright <[hidden email]> wrote:

> Hi I just posted this message to the audacity forum and got sent here so I'm
> wondering if anyone can help my predicament.
>
> "I'm using audacity 2.0 with OSX 10.7.4. I have 36,000 audio bin files (from
> a hydrophone) I need to convert to wav. Audacity works but I need a faster
> way of doing this. I want the file names to stay the same but when I import
> the bin file I have to change the sample rate from 44.1khz to 88.2 kHz and
> then I am also using a template for the meta data I want to keep the date of
> each recording. There are about a hundred in each date so I could do batches
> of around that size. It takes about 30 sec for each file so if I don't find
> a faster way of doing this it's going to take me around 300 hours which is
> ridiculous. please help!"
> Thanks!

SoX most probably can help you do this. I just don't understand the
part where you mention using templates for meta data.

Here's a brief example that may help you get started.
Say you have a raw mono audio file (named input.bin) that uses signed
PCM 16bit at a sample rate of 44.1 kHz and you want to convert it into
a 88.2 kHz wav. You can do the following:
sox -t raw -r 44.1k -e signed -b 16 -c 1 input.bin -r 88.2k output.wav

Cheers,

-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users