Ruby, Ruby on Rails, Artificial Intelligence and something more ...

Ver y Cocinar, descubre la cocina y disfrĂștala a simple vista

RailsConf Europe 2007 Speaker

RailsConf Europe 2007 Speaker
http://www.railsconfeurope.com/

Spejman Thumblog!

Showing posts with label festivalttsOnRails. Show all posts
Showing posts with label festivalttsOnRails. Show all posts

Monday, 3 September 2007

The Talking Rails Application

After a long time without publishing anything, I have finished an example of what you can do with festivaltts for Ruby: A Ruby on Rails application that talks!

You can test it at: http://thetalkingrailsapp.sergioespeja.com/

I hope it gives you ideas for your RoR applications!

Tuesday, 12 June 2007

Text to speech for Ruby on Rails applications

I just published the first usable festivaltts4r version, it comes with its plugin for Ruby on Rails, festivalttsOnRails. With this library and this plugin you can make talk your Ruby and your Ruby on Rails applications.

The rails plugin is so easy to use in Ubuntu linux:

  1. Install tts and mp3 generation libraries:

    sudo apt-get install festival lame

  2. Install the festivalttsOnRails plugin for Ruby on Rails:

    script/plugin install \
    svn://rubyforge.org/var/svn/festivaltts4r/plugins/festivaltts_on_rails

  3. Use text_to_flash_player(text) method in your views:

    <%= text_to_flash_player "Talk me!" %>

At the moment the plugin works with a simple english voice but can be very useful as a proof of concept. If people found it interesting it could be improved.

It works so well in Ubuntu Linux, testing in other platforms will be appreciated.

You can also use the festivaltts4r gem in order to make local voice applications with Ruby:
  1. Install tts and mp3 generation libraries:

    sudo apt-get install festival lame

  2. Install festivaltts4r gem:

    sudo gem install festivaltts4r

  3. Include required gems and call to_speech method defined into the String class by festivaltts4r:

    require "rubygems"
    require "festivaltts4r"

    "I'm talking".to_speech

This project has been developed using Festival TTS and lame libraries.

The flash mp3 player used to play the voice has been developed by dew under Creative Commons Attribution-ShareAlike License France license.

More info about festivaltts4r and festivalttsOnRails: festivaltts4r.rubyforge.org

About Me

Barcelona, Barcelona, Spain