RSS to synthesized speech in 47 inefficient lines

07Aug07

A few posts back I mentioned a ruby aggregator in 26 lines of code. I’ve spent the last fifteen minutes or so tying it to festival so it can read out RSS feeds.

If you just want to read the script fast, click here.

The code’s all there, but the coolest thing is the library I found, FestivalTTS4Ruby.

To actually run the code, you’ll need festival installed (I just shell out to it). Fire up irb, and:


require 'rss_to_speech'
RSSToSpeech.new

That will read in each line of feeds.txt, suck down the posts for the feed, pipe it through a python script called html2text.py, then pipe that through festival –tts. More lines than I’d like it to be, but I don’t feel like working on it any more šŸ™‚

Advertisements


One Response to “RSS to synthesized speech in 47 inefficient lines”


  1. 1 Morning Brew #57

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: