Asterisk performance improvment by Changing Sound CODEC


Command to convert wav file to sample 8000 and 16 bit
sox foo-in.wav -b 16 -r 8000 -c 1 -s foo-out.wav resample -ql
For Bulk changes
for a in *.wav; do sox /path/to/files/$a -b 16 -r 8000 -c 1 -s /path2/to2/files2/$a; done;

Asterisk command to convert sound files to differenet codecs.
asterisk -rx "file convert /tmp/not-permitted_c.wav /tmp/not-permitted.alaw"
For Bulk Changes
for a in /path/to/files/*.wav; do rasterisk -x "file convert $a `echo $a|sed "s/.wav/.alaw/"`"; done;

Rename IVRs
for a in ivr-name.*; do mv $a `echo $a | sed "s/ivr-name/ivr-new-name/"`; done

Reference
http://www.amitnepal.com/asterisk-convert-sound-to-g729/

No comments:

Post a Comment

How to compile and run a next application ?

Install nodejs Use  this  link for further reading curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash nvm inst...