Skip to content

Instantly share code, notes, and snippets.

@ipoddubny
Created February 4, 2013 06:54
Show Gist options
  • Save ipoddubny/4705341 to your computer and use it in GitHub Desktop.
Save ipoddubny/4705341 to your computer and use it in GitHub Desktop.
Convert mp3 files into Asterisk native format
#!/bin/bash
# converts .mp3 files in current directory into .sln Asterisk 16-bit signed linear audio
for f in *.mp3; do
lame --decode $f;
done
for f in *.wav; do
sox $f -t raw -r 8000 -b 16 -c 1 ${f%.wav}.sln
rm $f
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment