I'm trying to convert 728 .raw files to 16khz .wav files but I'm receiving the following error
sox FAIL formats: can't open input file
`outputdir/rawfile/b95981d1-3aa6-4d10-b755-990915951efc': No such file
or directory
script I'm using is
#!/bin/bash
mkdir -p "outputdir"
for i in rawfile/*.raw; do
o=outputdir/${i}
sox "$i" -r 16000 -e signed ${o%.raw} ${o%.wav}
done
the script is in convert.sh and the raw files are in rawfiles folder. The file structure is like
/Orginal/rawfiles/.rawfiles
and
/Orginal/convert.sh
I have 728 files to convert .raw files to 16 bit 16khz mono wav files. What modifications do I have to do in order to remove the error and convert the files?
No comments:
Post a Comment