I have a large number of .RAW audio files (unsigned 8-bit PCM with no-endianness) which I want to convert to .WAV files. What command-line tool (windows or linux) can I use
If you have a file name.txt which contains all the raw audio file names, then with python you can convert a batch of raw files to batch of wav.
from subprocess import call
file = "name.txt"
with open(file,'rU') as f:
for name in f:
name = name[:len(name)-4]
name1 = './'+name+'raw' #input
name2 = './'+name+'wav' #output
call(["sox","-r","48000", "-t", "sw", "-e", "signed", "-c", "1", "-b", "16", name1, name2])
sample rate 48K,mono channel, precision 16 bit.