Tiny Sinatra App

In need of a simple text-to-speech web service, I wrote this little script on Sinatra to return an MP3 to the browser.  The TTS is being handled by Festival (which I absolutely would not recommend) and piped to LAME (which is great) for MP3 encoding.

I ended up not using this script in production since Festival's TTS quality is horrible, but it was a fun exercise nonetheless.

I painlessly deployed on Phusion Passenger + Apache with the following config.ru.