Difference between revisions of "Convert WAV file to Asterisk playable format"
From Kolmisoft Wiki
Jump to navigationJump to search
Line 16: | Line 16: | ||
ls >/tmp/a | ls >/tmp/a | ||
for i in `cat /tmp/a`; do | for i in `cat /tmp/a`; do | ||
/root/folder_with_Voices/convert_mp3wav2astwav.sh $i /root/ | /root/folder_with_Voices/convert_mp3wav2astwav.sh $i /root/folder_with_Voices/rdy/$i | ||
done | done |
Revision as of 12:52, 30 December 2009
Install SOX:
yum install sox or apt-get install sox
If file1.wav is any WAV file, then executing this command:
/usr/bin/sox file1.wav -r 8000 -c 1 -s -w file2.wav resample -ql
you will get Asterisk playable WAV file: file2.wav
Use following script if you need to convert multiple files:
#!/bin/bash ls >/tmp/a for i in `cat /tmp/a`; do /root/folder_with_Voices/convert_mp3wav2astwav.sh $i /root/folder_with_Voices/rdy/$i done