суббота, 18 мая 2013 г.

wav to alaw convert for asterisk


Делаем  из "толстого"  wav, легкоусвояемый  alaw файл для астериска
sox welcome.wav -c 1 -r 8000 -A welcome_mono_8khz_alaw.wav


sox welcome.wav  -r 8000 -c 1 -e a-law
or for u-law
sox welcome.wav -r 8000 -c 1 -e u-law
or gsm
sox welcome.wav -r 8000 -c 1 -e gsm
sox фраза_1.mp3  -r 8000 -c 1  -e a-law radio.alaw


If file1.wav is any WAV file, then executing this command:
/usr/bin/sox file1.wav -r 8000 -c 1 -s file2.wav -q
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
   /usr/src/mor/x5/scripts/convert_mp3wav2astwav.sh $i /root/folder_with_Voices/rdy/$i
done

среда, 8 мая 2013 г.