<?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>Smart-Page.net &#187; Chatbot</title>
	<atom:link href="http://www.smart-page.net/blog/tag/chatbot/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smart-page.net/blog</link>
	<description>C++ / C# / Py / Actionscript ... &#039;My God. It&#039;s full of stars!&#039;</description>
	<lastBuildDate>Thu, 23 Jun 2011 00:14:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Flash AIML TTS Chatbot &#8211; &#8216;HAL9000&#8242; using PHP and Festival</title>
		<link>http://www.smart-page.net/blog/2009/10/16/flash-aiml-tts-chatbot-hal9000-using-php-and-festival/</link>
		<comments>http://www.smart-page.net/blog/2009/10/16/flash-aiml-tts-chatbot-hal9000-using-php-and-festival/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 21:42:09 +0000</pubDate>
		<dc:creator>flashgordon</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[AIML]]></category>
		<category><![CDATA[Chatbot]]></category>
		<category><![CDATA[Festival]]></category>
		<category><![CDATA[HAL9000]]></category>
		<category><![CDATA[LAME]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Program E]]></category>
		<category><![CDATA[TTS]]></category>

		<guid isPermaLink="false">http://www.smart-page.net/blog/?p=562</guid>
		<description><![CDATA[<a href="http://www.smart-page.net/blog/2009/10/16/flash-aiml-tts-chatbot-hal9000-using-php-and-festival/" title="Flash AIML TTS Chatbot &#8211; &#8216;HAL9000&#8242; using PHP and Festival"><img src="http://www.smart-page.net/blog/wp-content/uploads/yapb_cache/hal1dg3lkl0telko408cg4gc4ck84ekdjdxruf9s8k40s08o080wksth.bg9mdfdn8mis080ww0c0kg8sw.h9fw4mcunmtegc04wgoo4wck.th.jpeg" width="200" height="150" alt="Flash AIML TTS Chatbot &#8211; &#8216;HAL9000&#8242; using PHP and Festival" style="float:left;padding:0 10px 10px 0;" ></a>Ever dreamed of having a chat with you own personal AI? Well, we are still a bit behind Arthur C. Clarke´s dream of a self-aware AI like the HAL9000 but with AIML, Festival and Flash you can build your own talking chatbot in no time. Have a chat with HAL first. The Brain room: So [...]]]></description>
			<content:encoded><![CDATA[<a href="http://www.smart-page.net/blog/2009/10/16/flash-aiml-tts-chatbot-hal9000-using-php-and-festival/" title="Flash AIML TTS Chatbot &#8211; &#8216;HAL9000&#8242; using PHP and Festival"><img src="http://www.smart-page.net/blog/wp-content/uploads/yapb_cache/hal1dg3lkl0telko408cg4gc4ck84ekdjdxruf9s8k40s08o080wksth.bg9mdfdn8mis080ww0c0kg8sw.h9fw4mcunmtegc04wgoo4wck.th.jpeg" width="200" height="150" alt="Flash AIML TTS Chatbot &#8211; &#8216;HAL9000&#8242; using PHP and Festival" style="float:left;padding:0 10px 10px 0;" ></a><p>Ever dreamed of having a chat with you own personal AI?</p>
<p>Well, we are still a bit behind Arthur C. Clarke´s dream of a self-aware AI like the <a href="http://en.wikipedia.org/wiki/HAL_9000" target="_blank">HAL9000</a> but with AIML, Festival and Flash you can build your own talking chatbot in no time.</p>
<p><strong><a href="http://www.smart-page.de/as3/sp_hal9000/" target="_blank">Have a chat with HAL first.</a></strong><br/><br/></p>
<p><span id="more-562"></span><br />
<img class="alignnone size-full wp-image-572" title="brainroom" src="http://www.smart-page.net/blog/wp-content/uploads/2009/10/brainroom.jpg" alt="brainroom" width="680" height="100" /></p>
<p><strong>The Brain room:</strong></p>
<p>So we are going to build ourselves the poor man’s version of a &#8220;Heuristically programmed ALgorithmic Computer&#8221; and of course we start with its brain.</p>
<p>The <a href="http://sourceforge.net/projects/programe/" target="_blank">Program E &#8211; AIML Manager</a> will function as the brain room and during the setup we install a set of data crystals (aka an AIML set).<br />
Program E runs on PHP and parses and stores the actual &#8220;brain&#8221; within a mysql database.</p>
<p>So create a new database, install Program E to <em>&#8220;mydir/programe&#8221;</em> and upload the <em>&#8220;talk2me.php&#8221;</em> from the project package at the end of this article into <em>&#8220;programe/src&#8221;</em>. </p>
<p>Then upload and parse an AIML brain file into the db &#8211; call the new bot &#8220;HAL&#8221;.<br />
<br/><br />
<img class="alignnone size-full wp-image-571" title="module1" src="http://www.smart-page.net/blog/wp-content/uploads/2009/10/module1.jpg" alt="module1" width="680" height="100" /></p>
<p><strong>The speech module:</strong></p>
<p>We will use the Festival Text To Speech package to make HAL talk.<br />
This needs a Unix based system and the installation is quite simple &#8211; refer to <a href="http://www.xenocafe.com/tutorials/php/festival_text_to_speech/index.php#text2wave" target="_blank">this tutorial</a> if you encounter problems.</p>
<p>Festival comes with a &#8220;text2wave&#8221; script and a suitable default language.</p>
<p>We will also need the LAME mp3 encoder in order to convert those created wav files to a transferable mp3 because speed is critical.</p>
<p>Within the package you will find some PHP files including a <em>&#8220;config.php&#8221;</em>.<br />
Upload and chmod them and modify the config to fit your servers directory structure.<br />
<br/><br />
<img class="alignnone size-full wp-image-569" title="hal3" src="http://www.smart-page.net/blog/wp-content/uploads/2009/10/hal3.jpg" alt="hal3" width="680" height="100" /></p>
<p><strong>The eye:</strong></p>
<p>Now we setup an interface to Program E and our TTS system &#8211; HAL´s famous &#8220;eye&#8221;.</p>
<p>Open the <em>&#8220;src/hal9000.fla&#8221;</em> and the <em>&#8220;src/Main.as&#8221;</em> and change the variable <em>&#8220;path&#8221;</em> in line 31.</p>
<p>Upload the recompiled <em>&#8220;index.swf&#8221;</em> along with the HTML and JS file and have a first small talk with your chatbot.<br />
<br/><br />
<a href="http://www.smart-page.de/as3/sp_hal9000/hal9000.zip">Download the project here !</a><br />
<br/><br/><br />
Note: <em>This is the poor &#8211; AND the lazy man´s way to build a talking chatbot.<br />
This could be implemented in many more elegant ways &#8211; it´s even possible to have a bidirectional voice communication with HAL by using an rmtp server and a speach recognition sdk. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smart-page.net/blog/2009/10/16/flash-aiml-tts-chatbot-hal9000-using-php-and-festival/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

