Created
January 13, 2017 15:40
-
-
Save hdkmraf/43520735c18844e46280487741096cc5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Converts txt files to mp3, output goes into same directory as input | |
# Usage: | |
# ./text_to_mp3.sh 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