Festival TTS for Ruby
Prerequisites:
sudo apt-get install festival lame
sudo gem install festivaltts4r
require "rubygems" require "festivaltts4r" "I'm talking".to_speech
Reference: Festival TTS for Ruby - Make your Ruby Strings talk! [rubyforge.org]
11384 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
require "rubygems" require "festivaltts4r" "I'm talking".to_speech
#!/bin/sh # Copyright (c) 2005 Davor Babic <davorb@gmail.com> # All rights reserved. # Usage of the works is permitted provided that this # instrument is retained with the works, so that any # entity that uses the works is notified of this # instrument. # DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. url="http://digg.com/rss/index.xml" echo "Parsing RSS..." curl --silent "$url" | grep -E '(title>|description>)' | \ sed -n '4,$p' | \ sed -e 's/<title>//' -e 's/<\/title>//' -e 's/<description>/ /' \ -e 's/<\/description>//' | head -5 > digg echo "Reading..." festival --tts digg rm -rf ./digg echo "Done."