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.

Revisions

  1. ipoddubny created this gist Feb 4, 2013.
    11 changes: 11 additions & 0 deletions convert.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/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