Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Al ejecutar el Script en Mac OSX, salta el problema:
- Jorge:Desktop jorge$ ./t2s.sh es Este es un texto muy interesante para convertir.
- /*_____________________________________________
- ---------------------------
- Speech Script by Dan Fountain
- TalkToDanF@gmail.com
- ---------------------------
- Playing line: 1 of 1
- ./t2s.sh: line 38: mpg123: command not found
- _____________________________________________*/
- Haciendo una pequeña modificación en el Scrip, podemos reproducir el T2S con VLC añadiendo la siguiente línea:
- /Applications/VLC.app/Contents/MacOS/VLC
- El Script quedaría así:
- #!/bin/bash
- #################################
- # Speech Script by Dan Fountain #
- # Modified by Pablo Castagnino #
- # TalkToDanF@gmail.com #
- #################################
- INPUT=$*
- STRINGNUM=0
- ary=(${INPUT:2})
- echo "---------------------------"
- echo "Speech Script by Dan Fountain"
- echo "TalkToDanF@gmail.com"
- echo "---------------------------"
- for key in "${!ary[@]}"
- do
- SHORTTMP[$STRINGNUM]="${SHORTTMP[$STRINGNUM]} ${ary[$key]}"
- LENGTH=$(echo ${#SHORTTMP[$STRINGNUM]})
- #echo "word:$key, ${ary[$key]}"
- #echo "adding to: $STRINGNUM"
- if [[ "$LENGTH" -lt "100" ]]; then
- #echo starting new line
- SHORT[$STRINGNUM]=${SHORTTMP[$STRINGNUM]}
- else
- STRINGNUM=$(($STRINGNUM+1))
- SHORTTMP[$STRINGNUM]="${ary[$key]}"
- SHORT[$STRINGNUM]="${ary[$key]}"
- fi
- done
- for key in "${!SHORT[@]}"
- do
- #echo "line: $key is: ${SHORT[$key]}"
- echo "Playing line: $(($key+1)) of $(($STRINGNUM+1))"
- /Applications/VLC.app/Contents/MacOS/VLC "http://translate.google.com/translate_tts?tl=${1}&q=${SHORT[$key]}"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement