voip:create_moh_files
This is an old revision of the document!
Quick script to convert .mp3 files to .wav
- convertsongs.sh
#!/bin/bash IFSORG=$IFS BITRATES="8000 16000 32000 48000" IFS=$'\n'; for x in `ls *.mp3`; do # Convert the name to something FS can use SONGNAME=`echo $x | tr " " _ | sed 's/\.mp3/\.wav/'` # Now convert 'em songs! echo "Converting $x:"; IFS=$IFSORG; for y in $BITRATES; do echo -n "$y Hz.. "; mpg123 -q -s -f 8192 --mono -r $y -w "${y}_$SONGNAME" "$x" done echo ""; IFS=$'\n'; done IFS=$IFSORG echo "Done converting."
voip/create_moh_files.1386277405.txt.gz · Last modified: 2015/08/15 22:56 (external edit)