Skip to content

Instantly share code, notes, and snippets.

@huyderman
Created June 19, 2015 13:53
Show Gist options
  • Save huyderman/52ada1d94273effee6e5 to your computer and use it in GitHub Desktop.
Save huyderman/52ada1d94273effee6e5 to your computer and use it in GitHub Desktop.
Answer Machine Audio Converter
#!/usr/bin/env sh
# Convert a file to mono 8kHz with PCM µ-law encoding
if [ -n "$1" ]; then
ffmpeg -i $1 -codec pcm_mulaw -ar 8000 -ac 1 ${2:-"${1%.*}.wav"}
else
echo "Usage:"
echo "answer_machine_convert.sh input_file.wma [output_file.wav]"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment