Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Converts txt files to mp3, output goes into same directory as input
# Usage:
# ./ input_file
# Requirements:
# say, ffmpeg
# $1 - filepath
echo "Input text $1"
say -f $1 -o "$1.aiff"
ffmpeg -i "$1.aiff" -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 "$1.mp3"
rm "$1.aiff"
echo "Your file is ready as $1.mp3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment