Add ul2algsm script to convert ulaw to alaw and GSM formats.

This commit is contained in:
Howard M. Harte
2016-10-23 12:56:14 -07:00
parent abe783f182
commit a256739c6e
2 changed files with 15 additions and 0 deletions

12
ul2algsm.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
#
# Script to convert ulaw files to alaw and gsm using sox.
#
for i in $( find ./ -name "*.ulaw" -printf '%P\n' ); do
filename="${i%.*}"
echo converting: $filename
sox -t ul -r 8000 -c1 $filename.ulaw -e a-law $filename.al
mv $filename.al $filename.alaw
sox -t ul -r 8000 -c1 $filename.ulaw $filename.gsm
done