<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: tts code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 17 May 2008 14:20:28 GMT</pubDate>
    <description>DZone Snippets: tts code</description>
    <item>
      <title>Festival TTS for Ruby</title>
      <link>http://snippets.dzone.com/posts/show/5234</link>
      <description>This text-to-speech engine uses Ruby and festival. Listen to the output as an &lt;a href="http://tinyurl.com/2knm39"&gt;mp3 sample&lt;/a&gt; [twittergram.com]&lt;br /&gt;&lt;br /&gt;Prerequisites:&lt;br /&gt;  sudo apt-get install festival lame&lt;br /&gt;  sudo gem install festivaltts4r&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;require "rubygems"&lt;br /&gt;require "festivaltts4r"&lt;br /&gt;				&lt;br /&gt;"I'm talking".to_speech&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Reference: &lt;a href="http://festivaltts4r.rubyforge.org/"&gt;Festival TTS for Ruby - Make your Ruby Strings talk!&lt;/a&gt; [rubyforge.org]</description>
      <pubDate>Sat, 15 Mar 2008 02:55:23 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5234</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
    <item>
      <title>Interactive Text-to-Speech (Windows, Perl)</title>
      <link>http://snippets.dzone.com/posts/show/5047</link>
      <description>This script calls the Windows OLE for the built in TTS. Type what you want the computer to say at the prompt and hit enter. To quit type ":q" (minus the quotation marks).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;use Win32::OLE qw( EVENTS );&lt;br /&gt;&lt;br /&gt;get_text();&lt;br /&gt;&lt;br /&gt;sub get_text{&lt;br /&gt;	$output_speech = &lt;STDIN&gt;;&lt;br /&gt;	chomp($output_speech);&lt;br /&gt;	if($output_speech ne ":q"){&lt;br /&gt;		say_this();&lt;br /&gt;		get_text();&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub say_this{&lt;br /&gt;	my $myTTS = new Win32::OLE( "Sapi.SpVoice" ); &lt;br /&gt;	$myTTS-&gt;Speak( "$output_speech" );&lt;br /&gt;	while( $myTTS-&gt;{Speaking} )&lt;br /&gt;	{&lt;br /&gt;		Win32::OLE-&gt;SpinMessageLoop();&lt;br /&gt;		Win32::Sleep( 100 );&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 28 Jan 2008 19:59:29 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5047</guid>
      <author>minitotoro (Natalie)</author>
    </item>
    <item>
      <title>Text-to-speech</title>
      <link>http://snippets.dzone.com/posts/show/733</link>
      <description>&lt;code&gt;&lt;br /&gt;&gt;&gt;&gt; import win32com.client&lt;br /&gt;&gt;&gt;&gt; s = win32com.client.Dispatch("SAPI.SpVoice")&lt;br /&gt;&gt;&gt;&gt; s.Speak('Hello, how are you?')&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;You need MS Speech SDK installed. See &lt;a href=http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/114216&gt;recipe&lt;/a&gt;.</description>
      <pubDate>Sat, 17 Sep 2005 06:16:48 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/733</guid>
      <author>korakot (Korakot Chaovavanich)</author>
    </item>
  </channel>
</rss>
