RAW to WAV Files on the Verdex Pro
Anyone wishing to use sox for audio file conversions on the Gumstix may be interested in this information.
While you could simply cross-compile sox using the OE environment for Gumstix, you’ll quickly learn that a number of additional dependencies are required. Here they are in the order they need to be installed (all in the OE environment):
- libogg0 >=1.1
- libvorbis >= 1.0.1
- libmad0 >= 0.15.16
I used sox-13.0.0 for my app. A few flags have changed between the various versions, but here is what I used to convert a directory full of .raw audio files to .wav files:
for i in /media/card/*.raw
do
sox -2 -s -r 8000 -c2 $i ${i%.*}.wav
done
The flags indicate the following:
-2 sample size in bytes
-s signed-integer
-r 8000 is the sample rate
-c2 is the number of channels
Good luck! Hope it helps.
Posted in Embedded | No Comments »