SHARE
TWEET

Voice TTS with cache

a guest Feb 27th, 2015 242 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. EXP=`echo -n $1 | md5sum | awk '{print $1}'`
  4. DIR=cache
  5.  
  6. if [ ! -f $DIR/$EXP.mp3 ]; then
  7.  
  8. wget --user-agent "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13" \
  9.     -O $DIR/$EXP.mp3 \
  10.     "http://translate.google.com/translate_tts?tl=fr&q=$1"
  11. fi
  12.  
  13. mpg321 -g 100 $DIR/$EXP.mp3
  14. #yatm -t 1.3 $DIR/$EXP.mp3
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top