<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tyler Clemons &#187; sapi5</title>
	<atom:link href="http://www.tylerclemons.com/tag/sapi5/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tylerclemons.com</link>
	<description>tylerclemons.com</description>
	<lastBuildDate>Mon, 06 Sep 2010 16:03:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ruby Speaks</title>
		<link>http://www.tylerclemons.com/ruby-speaks/</link>
		<comments>http://www.tylerclemons.com/ruby-speaks/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 05:28:01 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[sapi5]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://tylershome.nfshost.com/?p=31</guid>
		<description><![CDATA[Learned a new trick the other day.  I was searching around and I found out how to make Ruby talk.  So far this only works for Windows machines because the win32 files are only available in Windows&#8230; as far as my knowledge.  Copy and paste the following code into any editor.  [...]]]></description>
			<content:encoded><![CDATA[<p>Learned a new trick the other day.  I was searching around and I found out how to make Ruby talk.  So far this only works for Windows machines because the win32 files are only available in Windows&#8230; as far as my knowledge.  Copy and paste the following code into any editor.  It prompts the user for a file and reads it.</p>
<p><span id="more-12"></span></p>
<div id="codebox" style="overflow: auto; "><span style="color: #ff00ff;">require</span> &#8220;win32/sapi5&#8243;<br />
<span style="color: #ff00ff;">include</span> Win32</p>
<p>print &#8220;Enter Text File:&#8221;<br />
file = gets</p>
<p>voice = SpVoice.new<br />
speech = &#8220;&#8221;</p>
<p><span style="color: #00ff00;">File</span>.open(file.chomp).each {| words|  speech +=words } <span style="color: #ff0000;">#Automatic Close<br />
</span></p>
<p>voice.Speak(speech)<br />
puts</p></div>
<p>Or, you could just do this:</p>
<div id="codebox" style="overflow: auto; "><span style="color: #ff00ff;">require</span> &#8220;win32/sapi5&#8243;<br />
<span style="color: #ff00ff;">include</span> Win32</p>
<p>voice = SpVoice.new<br />
speech = &#8220;Tyler is cool, but Sharece is cooler.&#8221;</p>
<p>voice.Speak(speech)</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.tylerclemons.com/ruby-speaks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
