Created
November 10, 2014 04:03
-
-
Save bradymholt/8f4fc9ae2429a287a8ef to your computer and use it in GitHub Desktop.
Text to Speech - Airport Express
This file contains hidden or 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 | |
| if [ ! -f /tmp/"$1".mp3 ] | |
| then | |
| echo "Downloading TTS file from Google Translate..." | |
| wget -O /tmp/"$1".mp3 --user-agent="Mozilla/4.0" http://translate.google.com/translate_tts?q="$1" | |
| else | |
| echo "Skipping download, cached file found." | |
| fi | |
| echo "Sending audio to Airport..." | |
| sox -t mp3 /tmp/"$1".mp3 -t raw -r 87k - pad 0 4 | mono /opt/JustePort/JustePort.exe - "$2" "$3" | |
| #wget -O- --user-agent="Mozilla/4.0" http://translate.google.com/translate_tts?q="$1" | sox -t mp3 - -t raw -r 87k - pad 0 4 | mono /opt/JustePort/JustePort.exe - "$2" "$3" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment