<?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>Entrepreneurial Geekiness &#187; Python</title>
	<atom:link href="http://ianozsvald.com/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://ianozsvald.com</link>
	<description>My thoughts on screencasting, ProCasts and high-tech entrepreneurship</description>
	<lastBuildDate>Sat, 17 Jul 2010 22:17:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>EuroPython 2010</title>
		<link>http://ianozsvald.com/2010/07/17/europython-2010/</link>
		<comments>http://ianozsvald.com/2010/07/17/europython-2010/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 22:17:08 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Aerodynamics]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Birds]]></category>
		<category><![CDATA[Feather Session]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[Hotel Room]]></category>
		<category><![CDATA[Love]]></category>
		<category><![CDATA[Programming Opengl]]></category>
		<category><![CDATA[Pypy]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Sequential Processes]]></category>
		<category><![CDATA[Unladen Swallow]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=1005</guid>
		<description><![CDATA[I&#8217;m hugely looking forward to EuroPython in Birmingham from Monday. I&#8217;m driving up Monday very early (I wish I&#8217;d booked the hotel room for Sunday night too&#8230;). Browsing through the abstracts I&#8217;d say all the following look darned interesting! C++ integration concurrent sequential processes Arduino hacking javascript OpenData aerodynamics PyPy and Unladen Swallow game programming [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m hugely looking forward to <a href="http://www.europython.eu/" onclick="pageTracker._trackPageview('/outgoing/www.europython.eu/?referer=');">EuroPython</a> in Birmingham from Monday. I&#8217;m driving up Monday very early (I wish I&#8217;d booked the hotel room for Sunday night too&#8230;). Browsing through the <a href="http://www.europython.eu/talks/talk_abstracts/" onclick="pageTracker._trackPageview('/outgoing/www.europython.eu/talks/talk_abstracts/?referer=');">abstracts</a> I&#8217;d say all the following look darned interesting!</p>
<ul>
<li>C++ integration</li>
<li>concurrent sequential processes</li>
<li>Arduino hacking</li>
<li>javascript</li>
<li>OpenData</li>
<li>aerodynamics</li>
<li>PyPy and Unladen Swallow</li>
<li>game programming</li>
<li>OpenGL</li>
<li>Pyjamas</li>
<li>idiomatic Python</li>
<li>MediaCore</li>
<li>Twisted and gevent</li>
<li>science and maths</li>
<li>SHOGUN machine learning</li>
</ul>
<p>I&#8217;ll bring <a href="http://blog.aicookbook.com/2010/06/building-a-face-tracking-robot-headroid1-with-python-in-an-afternoon/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/2010/06/building-a-face-tracking-robot-headroid1-with-python-in-an-afternoon/?referer=');">Headroid</a> along and I hope to organise a Birds of a Feather session on Artificial Intelligence and robotics. If you&#8217;re interested in these topics, I&#8217;d love to say hi!</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/07/17/europython-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>22,937* faster Python math using pyCUDA</title>
		<link>http://ianozsvald.com/2010/07/14/22937-faster-python-math-using-pycuda/</link>
		<comments>http://ianozsvald.com/2010/07/14/22937-faster-python-math-using-pycuda/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 11:52:10 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Calculation Routine]]></category>
		<category><![CDATA[Cpu Tests]]></category>
		<category><![CDATA[Default Problem]]></category>
		<category><![CDATA[Double Precision]]></category>
		<category><![CDATA[Dual Core]]></category>
		<category><![CDATA[Floating Point Numbers]]></category>
		<category><![CDATA[Gigabyte Ga]]></category>
		<category><![CDATA[Implementations]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[Mandelbrot]]></category>
		<category><![CDATA[Numpy Arrays]]></category>
		<category><![CDATA[Nvidia]]></category>
		<category><![CDATA[Nvidia Graphics Card]]></category>
		<category><![CDATA[Precision 2]]></category>
		<category><![CDATA[Psu]]></category>
		<category><![CDATA[Speed Differences]]></category>
		<category><![CDATA[Speed Ups]]></category>
		<category><![CDATA[Top Of The Line]]></category>
		<category><![CDATA[Ups]]></category>
		<category><![CDATA[Variants]]></category>
		<category><![CDATA[Windows Machines]]></category>
		<category><![CDATA[Windows Xp Sp3]]></category>
		<category><![CDATA[World Timings]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=992</guid>
		<description><![CDATA[I&#8217;ve just uploaded a new Mandelbrot.py demo for pyCUDA, it adds a new calculation routine that straddles the numpy (C based math) and the pure-CUDA implementations. In total there are 4 variants to choose from. The speed differences are huge! Update &#8211; this Reddit thread has more details including real-world timings for two client problems [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just uploaded a new Mandelbrot.py demo for pyCUDA, it adds a new calculation routine that straddles the numpy (C based math) and the pure-CUDA implementations. In total there are 4 variants to choose from. The speed differences are huge!</p>
<p><strong>Update</strong> &#8211; this <a href="http://www.reddit.com/r/Python/comments/cpfaa/22937_faster_python_math_using_pycuda/" onclick="pageTracker._trackPageview('/outgoing/www.reddit.com/r/Python/comments/cpfaa/22937_faster_python_math_using_pycuda/?referer=');">Reddit thread</a> has more details including real-world timings for two client problems (showing 10-3,677* speed-ups over a C task).</p>
<p>This post builds upon my earlier <a href="http://ianozsvald.com/2010/01/26/pycuda-on-windows-and-mac-for-super-fast-python-math-using-cuda/">pyCUDA on Windows and Mac for super-fast Python math using CUDA</a>.</p>
<p>You&#8217;ll need <a href="http://developer.nvidia.com/object/cuda_3_1_downloads.html" onclick="pageTracker._trackPageview('/outgoing/developer.nvidia.com/object/cuda_3_1_downloads.html?referer=');">CUDA</a> 3.1 and <a href="http://mathema.tician.de/software/pycuda" onclick="pageTracker._trackPageview('/outgoing/mathema.tician.de/software/pycuda?referer=');">pyCUDA</a> installed with a compatible NVIDIA graphics card. This version of the Mandelbrot code forces single precision math &#8211; this means it&#8217;ll work on all CUDA cards (even the older ones &#8211; <a href="http://www.nvidia.com/object/cuda_gpus.html" onclick="pageTracker._trackPageview('/outgoing/www.nvidia.com/object/cuda_gpus.html?referer=');">full list</a>). It runs on my MacBook (Leopard) and Windows, the Windows machines use a 9800 GT and GTX 480. Here&#8217;s what it generates:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4793065042/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4793065042/?referer=');"><img class="aligncenter" title="Mandelbrot.py result for pyCUDA" src="http://farm5.static.flickr.com/4120/4793065042_0cea04fa97_m.jpg" alt="" width="228" height="240" /></a></p>
<p>The big-beast graphics card for my physics client is a <a href="http://www.nvidia.com/object/product_geforce_gtx_480_us.html" onclick="pageTracker._trackPageview('/outgoing/www.nvidia.com/object/product_geforce_gtx_480_us.html?referer=');">GTX 480</a> &#8211; this is NVIDIA&#8217;s top of the line consumer card (costing £420GBP in the UK a few weeks back). It is huge &#8211; it covers two slots, uses one PCIe 2.0&#215;16 slot and has a requirement for 300-400W of power (I&#8217;m using a 750W PSU to be safe on a Gigabyte GA H55M S2H motherboard):</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4793201874/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4793201874/?referer=');"><img class="aligncenter" title="GTX 480 CUDA card on motherboard" src="http://farm5.static.flickr.com/4114/4793201874_0fdf5f7c34_m.jpg" alt="" width="180" height="240" /></a></p>
<p>The <a href="http://wiki.tiker.net/PyCuda/Examples/Mandelbrot" onclick="pageTracker._trackPageview('/outgoing/wiki.tiker.net/PyCuda/Examples/Mandelbrot?referer=');">mandelbrot.py</a> demo has four options (e.g. &#8216;python mandelbrot.py gpu&#8217;):</p>
<ul>
<li>&#8216;gpu&#8217; is a pure CUDA solution on the GPU</li>
<li>&#8216;gpuarray&#8217; uses a numpy-like CUDA wrapper in Python on the GPU</li>
<li>&#8216;numpy&#8217; is a pure Numpy (C-based) solution on the CPU</li>
<li>&#8216;python&#8217; is a pure Python solution on the CPU with numpy arrays</li>
</ul>
<p>The default problem is a 1000*1000 Mandelbrot plot with 1000 max iterations. I&#8217;m running this on a 2.9GHz dual core Windows XP SP3 with Python 2.6 (only 1 thread is used for all CPU tests). The timings:</p>
<ul>
<li>&#8216;gpu&#8217; &#8211; 0.07 seconds</li>
<li>&#8216;gpuarray&#8217; &#8211; 3.45 seconds &#8211; 49* slower than GPU version</li>
<li>&#8216;numpy&#8217; &#8211; 43.4 seconds &#8211; 620* slower than GPU version</li>
<li>&#8216;python&#8217; &#8211; 1605.6 seconds &#8211; 22,937* slower than GPU version</li>
<li>&#8216;python&#8217; with psyco.full() &#8211; 1428.3 seconds &#8211; 20,404* slower than GPU version</li>
</ul>
<p>By default mandelbrot.py forces single precision for all the math. Interestingly on my box if I let numpy default to numpy.complex128 (two double precision floating point numbers rather than numpy.complex64 with two single precision floats) then the Python result is faster:</p>
<ul>
<li>&#8216;numpy&#8217; &#8211; 34.0 seconds (double precision)</li>
<li>&#8216;python&#8217; &#8211; 627 seconds (double precision) &#8211; 2.5* faster than the single precision version</li>
</ul>
<p>The &#8217;22,937*&#8217; figure is a little unfair in light of the 627 second result (which is 8,957* slower) but I wanted to use only single precision math for consistency and compatibility across all CUDA cards (the older cards can only do single precision math).</p>
<p>On my older dual core 2.66GHz machine with a 9800 GT I get:</p>
<ul>
<li>&#8216;gpu&#8217; &#8211; 1.5 seconds</li>
<li>&#8216;gpuarray&#8217; &#8211; 7.1 seconds &#8211; 4.7* slower than GPU version</li>
<li>&#8216;numpy&#8217; &#8211; 51 seconds &#8211; 34* slower than GPU version</li>
<li>&#8216;python&#8217; &#8211; 1994.3 seconds &#8211; 1,329* slower than GPU version</li>
</ul>
<p>If we compare the 0.07 seconds for the GTX 480 against the 1.5 seconds for the 9800 GT (albeit on different machines but the runtime is just measuring the GPU work) then the GTX 480 is 21* faster than the 9800 GT. That&#8217;s not a bad speed-up for a couple of years difference in architectures.</p>
<p>If you take a look at the source code you&#8217;ll see that the &#8216;gpu&#8217; option uses a lump of C-like CUDA code, behind the scenes all pyCUDA code is converted into this C-like code and then down to <a href="http://en.wikipedia.org/wiki/Parallel_Thread_Execution" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Parallel_Thread_Execution?referer=');">PTX</a> via their compiler. This is the way to go if you understand the memory model and you want to write very fast code.</p>
<p>The gpuarray option uses a numpy-like interface to pyCUDA which, behind the scenes, is converted into CUDA code. Because it is compiled from Python code the resulting CUDA code isn&#8217;t as efficient &#8211; the compiler can&#8217;t make the same assumptions about memory usage as I can make when hand-crafting CUDA code (at least &#8211; that&#8217;s my best understanding at present!).</p>
<p>The numpy version uses C-based math running on the CPU &#8211; generally it is regarded as being &#8216;pretty darned fast&#8217;. The python version uses numpy arrays with straight Python arithmetic, this makes it awfully slow. Psyco 2.0.0 makes it a bit faster.</p>
<p>Feedback and extensions are welcomed via the <a href="http://wiki.tiker.net/PyCuda/Examples" onclick="pageTracker._trackPageview('/outgoing/wiki.tiker.net/PyCuda/Examples?referer=');">wiki</a>!</p>
<p>If you want to get started then make sure you have a <a href="http://www.nvidia.com/object/cuda_gpus.html" onclick="pageTracker._trackPageview('/outgoing/www.nvidia.com/object/cuda_gpus.html?referer=');">compatible CUDA card</a>, get pyCUDA (<a href="http://wiki.tiker.net/PyCuda/Installation" onclick="pageTracker._trackPageview('/outgoing/wiki.tiker.net/PyCuda/Installation?referer=');">installation instructions</a>), compile pyCUDA (takes 30 minutes from scratch if you&#8217;re on a well-known system), try the examples and run <a href="http://wiki.tiker.net/PyCuda/Examples/Mandelbrot" onclick="pageTracker._trackPageview('/outgoing/wiki.tiker.net/PyCuda/Examples/Mandelbrot?referer=');">mandelbrot.py</a>. The <a href="http://lists.tiker.net/listinfo/pycuda" onclick="pageTracker._trackPageview('/outgoing/lists.tiker.net/listinfo/pycuda?referer=');">mailing list</a> is helpful.</p>
<p>It&#8217;d be nice to see some comparisons with PyPy, ShedSkin and other Python implementations. You&#8217;ll find links in my older <a href="http://ianozsvald.com/2008/11/17/making-python-math-196-faster-with-shedskin/">ShedSkin</a> post. It&#8217;ll also be interesting to tie this in to some of the A.I. projects in the <a href="http://aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/?referer=');">A.I. Cookbook</a>, I&#8217;ll have to ponder some of the problems that might be tackled.</p>
<p>Books:</p>
<p>The following two books will be useful if you&#8217;re new to CUDA. The first is very friendly, I&#8217;m still finding it very useful.</p>
<table>
<tr>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0123814723" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
</td>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0131387685" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/07/14/22937-faster-python-math-using-pycuda/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Presenting A.I. at FlashBrighton (using Python!)</title>
		<link>http://ianozsvald.com/2010/07/11/presenting-a-i-at-flashbrighton-using-python/</link>
		<comments>http://ianozsvald.com/2010/07/11/presenting-a-i-at-flashbrighton-using-python/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 13:17:19 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Blah]]></category>
		<category><![CDATA[Blue Plaque]]></category>
		<category><![CDATA[Blurry Photo]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[English Heritage]]></category>
		<category><![CDATA[Face Detection]]></category>
		<category><![CDATA[Futurology]]></category>
		<category><![CDATA[General Knowledge]]></category>
		<category><![CDATA[Grey Scale]]></category>
		<category><![CDATA[Image Text]]></category>
		<category><![CDATA[International Competitions]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Music Theatre]]></category>
		<category><![CDATA[Ocr]]></category>
		<category><![CDATA[Optical Character Recognition]]></category>
		<category><![CDATA[Plaques]]></category>
		<category><![CDATA[Privacy Invasion]]></category>
		<category><![CDATA[Python Source Code]]></category>
		<category><![CDATA[Robot]]></category>
		<category><![CDATA[Robots]]></category>
		<category><![CDATA[Tesseract]]></category>
		<category><![CDATA[Text Extraction]]></category>
		<category><![CDATA[Text Regions]]></category>
		<category><![CDATA[Toop]]></category>
		<category><![CDATA[Translator]]></category>
		<category><![CDATA[Video Link]]></category>
		<category><![CDATA[Web Service]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=970</guid>
		<description><![CDATA[A couple of weeks back I presented an Artificial Intelligence evening at FlashBrighton with John Montgomery and Emily Toop. The night covered optical character recognition, face detection, robots and some futurology. A video link should follow. Optical Character Recognition to Read Plaques Recently I&#8217;ve been playing with OCR to read photos with text, a particular [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks back I presented an <a href="http://flashbrighton.org/?p=698" onclick="pageTracker._trackPageview('/outgoing/flashbrighton.org/?p=698&amp;referer=');">Artificial Intelligence evening at FlashBrighton</a> with <a href="http://www.psychicorigami.com/" onclick="pageTracker._trackPageview('/outgoing/www.psychicorigami.com/?referer=');">John Montgomery</a> and <a href="http://emilytoop.com/" onclick="pageTracker._trackPageview('/outgoing/emilytoop.com/?referer=');">Emily Toop</a>. The night covered optical character recognition, face detection, robots and some futurology. A video link should follow.</p>
<p><strong>Optical Character Recognition to Read Plaques</strong></p>
<p>Recently I&#8217;ve been playing with OCR to read photos with text, a particular example I care about is extracting the text from English Heritage Plaques for the <a href="http://openplaques.org/" onclick="pageTracker._trackPageview('/outgoing/openplaques.org/?referer=');">OpenPlaques</a> project:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4701373630/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4701373630/?referer=');"><img class="aligncenter" title="Dartmouth plaque" src="http://farm5.static.flickr.com/4002/4701373630_5025fe6a4a_m.jpg" alt="" width="180" height="240" /></a></p>
<p>I gave an overview of the <a href="http://code.google.com/p/tesseract-ocr" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/tesseract-ocr?referer=');">tesseract</a> open source OCR tool (originally created by HP). Some of the notes I explained came from this <a href="http://tesseract-ocr.googlecode.com/files/TesseractOSCON.pdf" onclick="pageTracker._trackPageview('/outgoing/tesseract-ocr.googlecode.com/files/TesseractOSCON.pdf?referer=');">tesseract OSCON</a> paper. Some notes:</p>
<ul>
<li>tesseract ranked highly in international competitions for scanned-image text extraction</li>
<li>it works better if you remove non-text regions (e.g. you isolate just the blue plaque in the above image) and threshold the image to a grey scale</li>
<li>it runs very quickly &#8211; it&#8217;ll extract text in a fraction of a second so it will run on a mobile phone (iPhone ports exist)</li>
</ul>
<p>To get people thinking about the task from the computer&#8217;s point of view I had everyone read out the text from this blurry photo. Treating the image as a computer would see it shows that you need several passes to learn which country is involved and to guess at some of the terms:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/ehayes/397062588/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/ehayes/397062588/?referer=');"><img class="aligncenter" title="Blurry text for OCR demo" src="http://farm1.static.flickr.com/129/397062588_62fe20ec76_m.jpg" alt="" width="240" height="180" /></a></p>
<p style="text-align: left;">You can guess that the domain is music/theatre (which helps you to specialise the dictionary you&#8217;re using), based in the US (so you know that 1.25 is $1.25USD) and even though the time is hard to read it is bound to be 7.30PM (rather than 7.32 or 7.37) because events normally start on the hour or half hour. General knowledge about the domain greatly increases the chance that OCR can extract the correct text.</p>
<p style="text-align: left;">I talked about the forthcoming competition to write a Plaque-transcriber system, that project is close to starting and you can see demo Python source code in the <a href="http://aicookbook.com/wiki/Automatic_plaque_transcription" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/wiki/Automatic_plaque_transcription?referer=');">AI Cookbook</a>.</p>
<p><strong>Optical Character Recognition Web Service and Translator iPhone Demo</strong></p>
<p>To help make OCR a bit easier to use I&#8217;ve setup a simple website: <a href="http://ocr.aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/ocr.aicookbook.com/?referer=');">http://ocr.aicookbook.com/</a>. You call a URL with an image that&#8217;s on the web (I use flickr for my examples) and it returns a JSON string with the translated text. The website is a few lines of Python code created using the fabulous <a href="http://bottle.paws.de/" onclick="pageTracker._trackPageview('/outgoing/bottle.paws.de/?referer=');">bottle.py</a>.</p>
<p>The JSON also contains a French translation and mp3 links for text to speech, this shows how easy it is to make a visual-assist device for the hard of sight.</p>
<p><a href="http://emilytoop.com/" onclick="pageTracker._trackPageview('/outgoing/emilytoop.com/?referer=');">Emily</a> built an iPhone demo based on this web service &#8211; you can a photograph of some text, it uploads the text to flickr, retrieves the JSON and then plays the mp3s and shows you the translated text.</p>
<p><strong>OCR on videos</strong></p>
<p>The final OCR demo shows a proof of concept that extracts keywords from <a href="http://showmedo.com/" onclick="pageTracker._trackPageview('/outgoing/showmedo.com/?referer=');">ShowMeDo</a>&#8216;s screencast videos. The screencasts show programming in action &#8211; it is easy to extract frames, perform OCR and build up strong lists of keywords. These keywords can then be added back to the ShowMeDo video page to give Google more indexable content.</p>
<p>There&#8217;s a write-up of the early system <a href="http://ianozsvald.com/2010/05/17/extracting-keyword-text-from-screencasts-with-ocr/">here</a>.</p>
<p><strong>OCR futurology</strong></p>
<p>Text is all around us and mobile phones are everywhere. It strikes me that sooner or later we&#8217;ll be pointing our mobile phone at a poster like this and we&#8217;ll get extra information in return:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4721567317/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4721567317/?referer=');"><img class="aligncenter" title="Poster from Dartmouth" src="http://farm2.static.flickr.com/1012/4721567317_4a7de65c24_m.jpg" alt="" width="180" height="240" /></a></p>
<p>From the photo we can extract names of places, we also know the phone&#8217;s location so a WikiPedia geo-lookup will return relevant pages. Probably we can also extract dates and costs from posters and these can go into our calendar. I used tesseract on this image and extracted enough information to link to several WikiPedia pages with history and a map.</p>
<p><strong>Face Detection for Privacy Invasion</strong></p>
<p>John and I built a system for correlating gowalla check-ins with faces seen in images from the <a href="http://cam.theskiff.org/" onclick="pageTracker._trackPageview('/outgoing/cam.theskiff.org/?referer=');">SkiffCam</a> &#8211; the webcam that&#8217;s hosted in the Skiff co-working space. The goal was to show that we lose quite a lot of privacy without realising it &#8211; the SkiffCam has 29,000 images (1Gb of data) dating back over several years.</p>
<p>Using openCV&#8217;s <a href="http://opencv.willowgarage.com/wiki/FaceDetection" onclick="pageTracker._trackPageview('/outgoing/opencv.willowgarage.com/wiki/FaceDetection?referer=');">face detection</a> system I extracted thousands of faces. John retrieved all the <a href="http://gowalla.com/spots/32096" onclick="pageTracker._trackPageview('/outgoing/gowalla.com/spots/32096?referer=');">gowalla check-ins</a> based at the Skiff and built a web service that lets us correlate the faces with check-ins. We showed faces for many well-known Brightoners including <a href="http://sebleedelisle.com/" onclick="pageTracker._trackPageview('/outgoing/sebleedelisle.com/?referer=');">Seb</a>, <a href="http://niquimerret.com/" onclick="pageTracker._trackPageview('/outgoing/niquimerret.com/?referer=');">Niqui</a>, <a href="http://paulofierro.com/" onclick="pageTracker._trackPageview('/outgoing/paulofierro.com/?referer=');">Paulo</a>, <a href="http://jot.is/" onclick="pageTracker._trackPageview('/outgoing/jot.is/?referer=');">Jon &amp; Anna</a> and <a href="http://natbat.net/" onclick="pageTracker._trackPageview('/outgoing/natbat.net/?referer=');">Nat</a>.</p>
<p>Given a persons face we could then train a face recogniser to see other occurrences of that person at the Skiff even if they&#8217;re not checking in with gowalla. We can also mine their twitter accounts for other identifying data like blogs and build a profile of where they go, who they know and what they talk about. This feels pretty invasive &#8211; all with open source tools and public data.</p>
<p><strong>Emotion detection</strong></p>
<p>Building on the face detector I next demonstrated the <a href="http://sourceforge.net/apps/mediawiki/pyvision/index.php?title=FaceL:_Facile_Face_Labeling" onclick="pageTracker._trackPageview('/outgoing/sourceforge.net/apps/mediawiki/pyvision/index.php?title=FaceL_Facile_Face_Labeling&amp;referer=');">FaceL</a> face labeling project from Colorado State Uni, built on <a href="http://sourceforge.net/apps/mediawiki/pyvision/index.php?title=Main_Page" onclick="pageTracker._trackPageview('/outgoing/sourceforge.net/apps/mediawiki/pyvision/index.php?title=Main_Page&amp;referer=');">pyVision</a>. The tool works out of the box on a Mac &#8211; it can learn several faces or poses during a live demo. Most face recognisers only label the name of the person &#8211; the difference with FaceL is that it can recognise basic emotional states such as &#8216;happy&#8217;, &#8216;neutral&#8217; and &#8216;sad&#8217;. This makes it really easy to work towards an emotion-detecting user interface.</p>
<p>During my demo I showed FaceL correctly recognising &#8216;happy&#8217; and &#8216;sad&#8217; on my face, then &#8216;left&#8217; and &#8216;right&#8217; head poses&#8217;, then &#8216;up&#8217; and &#8216;down&#8217; poses. I suspect with the up/down poses that it is really easy to build a nod-detecting interface!</p>
<p><strong>Headroid2 &#8211; a Face Tracking Robot</strong></p>
<p>Finally I demo&#8217;d Headroid2 &#8211; my face tracking robot (using the same openCV module as above) that uses an Arduino, a <a href="http://www.botbuilder.co.uk/ssb.html" onclick="pageTracker._trackPageview('/outgoing/www.botbuilder.co.uk/ssb.html?referer=');">servo board</a>, <a href="http://pyserial.sourceforge.net/" onclick="pageTracker._trackPageview('/outgoing/pyserial.sourceforge.net/?referer=');">pySerial</a> and a few lines of code to give the robot the ability to track faces, smile and frown:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/lilspikey/4725075065/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/lilspikey/4725075065/?referer=');"><img class="aligncenter" title="Headroid2 with smiley face" src="http://farm2.static.flickr.com/1384/4725075065_4279547ba9_m.jpg" alt="" width="180" height="240" /></a></p>
<p>Here&#8217;s a video of the earlier version (without the smiling face feedback):</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/_9DXecQdJEY&amp;hl=en_US&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/_9DXecQdJEY&amp;hl=en_US&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>For full details including build instructions see <a href="http://blog.aicookbook.com/2010/06/building-a-face-tracking-robot-headroid1-with-python-in-an-afternoon/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/2010/06/building-a-face-tracking-robot-headroid1-with-python-in-an-afternoon/?referer=');">building a face tracking robot</a>.</p>
<p><strong>EuroPython</strong></p>
<p>I&#8217;ll bring Headroid3 (this adds face-seeking behaviour) to <a href="http://www.europython.eu/" onclick="pageTracker._trackPageview('/outgoing/www.europython.eu/?referer=');">EuroPython</a> in a few weeks, hopefully I can find a few other A.I. folk and we can run some demos.</p>
<p><strong>Reading material:</strong></p>
<p>If you&#8217;re curious about A.I. then the following books will interest you:</p>
<table>
<tr>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0596516134" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0596510519" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0615155111" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
</td>
</tr>
</table>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/07/11/presenting-a-i-at-flashbrighton-using-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Talking on Artificial Intelligence next Tuesday at FlashBrighton</title>
		<link>http://ianozsvald.com/2010/06/18/talking-on-artificial-intelligence-next-tuesday-at-flashbrighton/</link>
		<comments>http://ianozsvald.com/2010/06/18/talking-on-artificial-intelligence-next-tuesday-at-flashbrighton/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 14:30:02 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[sussexdigital]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Assiduity]]></category>
		<category><![CDATA[Automatic Transcription]]></category>
		<category><![CDATA[Collaborator]]></category>
		<category><![CDATA[Concept Web]]></category>
		<category><![CDATA[Cookbook]]></category>
		<category><![CDATA[Face Detection]]></category>
		<category><![CDATA[Gentleman]]></category>
		<category><![CDATA[Goode]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[Little Time]]></category>
		<category><![CDATA[Open Source Libraries]]></category>
		<category><![CDATA[Optical Character Recognition]]></category>
		<category><![CDATA[Privacy Invasion]]></category>
		<category><![CDATA[Proof Of Concept]]></category>
		<category><![CDATA[Repute]]></category>
		<category><![CDATA[Seb]]></category>
		<category><![CDATA[Skiff]]></category>
		<category><![CDATA[Web Service]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=961</guid>
		<description><![CDATA[I&#8217;ve been invited to speak with John Montgomery next Tuesday at FlashBrighton &#8211; 7pm at The Werks for 1.5-2 hours or so of demos. We&#8217;ll be covering: Head tracking robot (build your own in a few hours!) Skiff Privacy Invasion &#8211; what we can learn from data mining the SkiffCam (the Gov&#8217;t can do it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been invited to speak with John Montgomery next <a href="http://flashbrighton.org/?p=698" onclick="pageTracker._trackPageview('/outgoing/flashbrighton.org/?p=698&amp;referer=');">Tuesday at FlashBrighton</a> &#8211; 7pm at The Werks for 1.5-2 hours or so of demos. We&#8217;ll be covering:</p>
<ul>
<li>Head tracking robot (build your own in a few hours!)</li>
<li>Skiff Privacy Invasion &#8211; what we can learn from data mining the SkiffCam (the Gov&#8217;t can do it &#8211; now you can too)</li>
<li>Optical Character Recognition web service with an iPhone visual-assistant demo</li>
<li>Automatic transcription of <a href="http://openplaques.org/" onclick="pageTracker._trackPageview('/outgoing/openplaques.org/?referer=');">OpenPlaques</a> images (because Google can&#8217;t read images!)</li>
<li>Extracting text from videos to feed Google (because Google can&#8217;t read videos!)</li>
<li>Face detection proof of concept web service</li>
</ul>
<p>Which, frankly, is quite a lot to cover in 1.5 hours and a couple of the demos still need some development&#8230;but that&#8217;s part of the fun, right? The demos are mostly in Python and will be written up on the <a href="http://aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/?referer=');">A.I. Cookbook</a>. The goal is to show non-A.I. programmers that a lot of A.I. is pretty accessible now via good open-source libraries.</p>
<p>Richard has given me a lovely Victorian-researcher inspired write-up, it is <a href="http://flashbrighton.org/?p=698" onclick="pageTracker._trackPageview('/outgoing/flashbrighton.org/?p=698&amp;referer=');">worth a proper read</a>:</p>
<blockquote><p>I have spoken this night with <a onclick="pageTracker._trackPageview('/outgoing/sebleedelisle.com/?referer=');javascript:pageTracker._trackPageview('/outgoing/sebleedelisle.com/');" href="http://sebleedelisle.com/">Sir Seb Lee-Delisle</a>, the gentleman  who runs the FlashBrighton club, an institution of long standing  repute. He expressed great delight with my research into Artificial  Intelligence, which he assuryes me he has been following with the  greatest assiduity, and kindly invited me to present my findings at his  club. I did of course accept, and have spent the remaynder of the day  deliberating over how I might present these goode labours. I have  settled on involving my <a onclick="pageTracker._trackPageview('/outgoing/fivepoundapp.com/?referer=');javascript:pageTracker._trackPageview('/outgoing/fivepoundapp.com/');" href="http://fivepoundapp.com/">£5 app</a> collaborator <a onclick="pageTracker._trackPageview('/outgoing/www.psychicorigami.com/?referer=');javascript:pageTracker._trackPageview('/outgoing/www.psychicorigami.com/');" href="http://www.psychicorigami.com/">Mr. John Montgomery</a>, with  whom I have been engaged on a number of projects for some little time  now. &#8230;</p>
<p>[<a href="http://flashbrighton.org/?p=698" onclick="pageTracker._trackPageview('/outgoing/flashbrighton.org/?p=698&amp;referer=');">keep reading</a>]</p></blockquote>
<p>We&#8217;ll hope to see you along!</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/06/18/talking-on-artificial-intelligence-next-tuesday-at-flashbrighton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Headroid1 &#8211; a face tracking robot head</title>
		<link>http://ianozsvald.com/2010/05/21/headroid1-a-face-tracking-robot-head/</link>
		<comments>http://ianozsvald.com/2010/05/21/headroid1-a-face-tracking-robot-head/#comments</comments>
		<pubDate>Fri, 21 May 2010 13:44:10 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Andy White]]></category>
		<category><![CDATA[Building Robot]]></category>
		<category><![CDATA[Chap]]></category>
		<category><![CDATA[Coffee]]></category>
		<category><![CDATA[Collaboration]]></category>
		<category><![CDATA[Concentration]]></category>
		<category><![CDATA[Cookbook]]></category>
		<category><![CDATA[Degress]]></category>
		<category><![CDATA[Doddle]]></category>
		<category><![CDATA[Emotions]]></category>
		<category><![CDATA[Face Detection]]></category>
		<category><![CDATA[Frustration]]></category>
		<category><![CDATA[Glare]]></category>
		<category><![CDATA[Heather]]></category>
		<category><![CDATA[Interface]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Minute Mp3]]></category>
		<category><![CDATA[Opencv]]></category>
		<category><![CDATA[Philips Spc900nc]]></category>
		<category><![CDATA[Pretty Faces]]></category>
		<category><![CDATA[Py]]></category>
		<category><![CDATA[Pyserial]]></category>
		<category><![CDATA[Python Bindings]]></category>
		<category><![CDATA[Reference Material]]></category>
		<category><![CDATA[Robocam]]></category>
		<category><![CDATA[Robot Head]]></category>
		<category><![CDATA[Servo]]></category>
		<category><![CDATA[Silicon Beach Training]]></category>
		<category><![CDATA[Smile]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=936</guid>
		<description><![CDATA[The video below introduces Headroid1, this face-tracking robot will grow into a larger system that can follow people&#8217;s faces, detect emotions and react to engage with the visitor. The above system uses openCV&#8217;s face detection (using the Python bindings and facedetect.py) to figure out whether the face is in the centre of the screen, if [...]]]></description>
			<content:encoded><![CDATA[<p>The video below introduces Headroid1, this face-tracking robot will grow into a larger system that can follow people&#8217;s faces, detect emotions and react to engage with the visitor.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/_9DXecQdJEY&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/_9DXecQdJEY&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The above system uses openCV&#8217;s <a href="http://opencv.willowgarage.com/wiki/FaceDetection" onclick="pageTracker._trackPageview('/outgoing/opencv.willowgarage.com/wiki/FaceDetection?referer=');">face detection</a> (using the Python bindings and facedetect.py) to figure out whether the face is in the centre of the screen, if the camera needs to move it then talks via <a href="http://pyserial.sourceforge.net/" onclick="pageTracker._trackPageview('/outgoing/pyserial.sourceforge.net/?referer=');">pySerial</a> to <a href="http://www.botbuilder.co.uk/store/index.php" onclick="pageTracker._trackPageview('/outgoing/www.botbuilder.co.uk/store/index.php?referer=');">BotBuilder</a>&#8216;s ServoBoard to pan or tilt the camera until the face is back in the centre of the screen.</p>
<p><strong>Update</strong> &#8211; see <a href="http://blog.aicookbook.com/2010/06/building-a-face-tracking-robot-headroid1-with-python-in-an-afternoon/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/2010/06/building-a-face-tracking-robot-headroid1-with-python-in-an-afternoon/?referer=');">Building A Face Tracking Robot In An Afternoon</a> for full details to build your own Headroid1.</p>
<p>Headroid is pretty good at tracking faces as long as there&#8217;s no glare, he can see people from 1 foot up to about 8 feet from the camera. He moves at different speeds depending on your distance from the centre of the screen and stops with a stable picture when you&#8217;re back at the centre of his attention. The smile/frown detector which will follow will add another layer of behaviour.</p>
<p><a href="http://www.facebook.com/#!/SBTtraining?ref=ts" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/_/SBTtraining?ref=ts&amp;referer=');">Heather</a> (founder of <a href="http://www.siliconbeachtraining.co.uk/" onclick="pageTracker._trackPageview('/outgoing/www.siliconbeachtraining.co.uk/?referer=');">Silicon Beach Training</a>) used Headroid1 (called Robocam in her video) at <a href="http://www.facebook.com/#!/group.php?gid=33691973165&amp;ref=ts" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/_/group.php?gid=33691973165_amp_ref=ts&amp;referer=');">Likemind</a> coffee this morning, she&#8217;s <a href="http://www.siliconbeachtraining.co.uk/blog/python-programming-face-detection/" onclick="pageTracker._trackPageview('/outgoing/www.siliconbeachtraining.co.uk/blog/python-programming-face-detection/?referer=');">written up the event</a>:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/IJgV_P1YFjQ&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/IJgV_P1YFjQ&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Andy White (<a href="http://twitter.com/doctorpod" onclick="pageTracker._trackPageview('/outgoing/twitter.com/doctorpod?referer=');">@doctorpod</a>) also did a quick 2 minute MP3 interview with me <a href="http://audioboo.fm/boos/132833-hedroid" onclick="pageTracker._trackPageview('/outgoing/audioboo.fm/boos/132833-hedroid?referer=');">via audioboo</a>.</p>
<p>Later over coffee <a href="http://yandleblog.com/" onclick="pageTracker._trackPageview('/outgoing/yandleblog.com/?referer=');">Danny Hope</a> and I discussed (with Headroid looking on) some ideas for tracking people, watching for attention, monitoring for frustration and concentration and generally playing with ways people might interact with this little chap:</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/54145418@N00/4626280009/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/54145418_N00/4626280009/?referer=');"><img class="aligncenter" title="Headroid1 tracks Danny Hope over coffee" src="http://farm5.static.flickr.com/4043/4626280009_e08d9e1854_m.jpg" alt="" width="180" height="240" /></a></p>
<p>The above was built in collaboration with <a href="http://www.buildbrighton.com/" onclick="pageTracker._trackPageview('/outgoing/www.buildbrighton.com/?referer=');">BuildBrighton</a>, there&#8217;s some discussion about it in <a href="http://groups.google.com/group/brightonhackerspace/browse_thread/thread/62ee77d2effdf9a9" onclick="pageTracker._trackPageview('/outgoing/groups.google.com/group/brightonhackerspace/browse_thread/thread/62ee77d2effdf9a9?referer=');">this thread</a>. The camera is a Philips SPC900NC which works using <a href="http://webcam-osx.sourceforge.net/" onclick="pageTracker._trackPageview('/outgoing/webcam-osx.sourceforge.net/?referer=');">macam</a> on my Mac (and runs on Linux and Win too). The ServoBoard has a super-simple interface &#8211; you send it commands like &#8217;90a&#8217; (turn servo A to 90 degress) as text and &#8216;it just works&#8217; &#8211; it makes interactive testing a doddle.</p>
<p><strong>Update</strong> &#8211; the <a title="Artificial Intelligence Cookbook blog" href="http://blog.aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/?referer=');">blog</a> for the <a title="Artificial Intelligence Cookbook" href="http://aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/?referer=');">A.I. Cookbook</a> is now active, more A.I. and robot updates will occur there.</p>
<p><strong>Reference material:</strong></p>
<p>The following should help you move forwards:</p>
<table>
<tr>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0596516134" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0596510519" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=1430224770" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
</td>
</tr>
</table>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/05/21/headroid1-a-face-tracking-robot-head/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>&#8220;Artificial Intelligence in the Real World&#8221; lecture at Sussex University 2010</title>
		<link>http://ianozsvald.com/2010/05/10/artificial-intelligence-in-the-real-world-lecture-at-sussex-university-2010/</link>
		<comments>http://ianozsvald.com/2010/05/10/artificial-intelligence-in-the-real-world-lecture-at-sussex-university-2010/#comments</comments>
		<pubDate>Mon, 10 May 2010 17:59:57 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ShowMeDo]]></category>
		<category><![CDATA[SussexUniversity]]></category>
		<category><![CDATA[projectbrightonblogs]]></category>
		<category><![CDATA[sussexdigital]]></category>
		<category><![CDATA[£5 App Meet]]></category>
		<category><![CDATA[10 Years]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Bangalores]]></category>
		<category><![CDATA[Business Project]]></category>
		<category><![CDATA[Challenge Entries]]></category>
		<category><![CDATA[Collaborative Project]]></category>
		<category><![CDATA[Cookbook]]></category>
		<category><![CDATA[Darpa Grand Challenge]]></category>
		<category><![CDATA[Firearms]]></category>
		<category><![CDATA[Guest Lecture]]></category>
		<category><![CDATA[High Performance Computing]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Optical Character Recognition]]></category>
		<category><![CDATA[Project Ideas]]></category>
		<category><![CDATA[Real World]]></category>
		<category><![CDATA[Robot]]></category>
		<category><![CDATA[Saving Private Ryan]]></category>
		<category><![CDATA[Slides]]></category>
		<category><![CDATA[Sussex]]></category>
		<category><![CDATA[Sussex University]]></category>
		<category><![CDATA[Undergraduates]]></category>
		<category><![CDATA[World Lecture]]></category>
		<category><![CDATA[Youtube Video]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=915</guid>
		<description><![CDATA[I&#8217;m chuffed to have delivered the second version of my &#8220;A.I. in the real world&#8221; lecture (I gave it last May too) to 2nd year undergraduates at Sussex University this afternoon. The slides are below, I cover: A.I. that I&#8217;ve seen and have been involved with in the last 10 years Some project ideas for [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m chuffed to have delivered the second version of my &#8220;A.I. in the real world&#8221; lecture (I gave it <a href="http://ianozsvald.com/2009/05/19/ai-in-the-real-world-lecture-at-sussex-university/">last May</a> too) to 2nd year undergraduates at Sussex University this afternoon.</p>
<p>The slides are below, I cover:</p>
<ul>
<li>A.I. that I&#8217;ve seen and have been involved with in the last 10 years</li>
<li>Some project ideas for undergraduates</li>
<li>How to start a new tech business/project in A.I.</li>
</ul>
<p>In the talk I also showed or talked about:</p>
<ul>
<li>A YouTube video of the DARPA Grand Challenge (down below)</li>
<li><a href="http://www.imfdb.org/index.php/Saving_Private_Ryan#M1A1_Bangalore_Torpedo" onclick="pageTracker._trackPageview('/outgoing/www.imfdb.org/index.php/Saving_Private_Ryan_M1A1_Bangalore_Torpedo?referer=');">The Internet Movie Firearms Database</a> when talking about searching for &#8220;movie on a beach with bangalores&#8221; which resolves to Saving Private Ryan&#8230;if someone writes this search engine</li>
<li><a href="http://ianozsvald.com/2010/04/04/tesseract-optical-character-recognition-to-read-plaques/">Optical Character Recognition</a> using the open source Tesseract</li>
<li>pyCUDA and high performance computing (which I&#8217;m teaching at <a href="http://brightonpy.org/" onclick="pageTracker._trackPageview('/outgoing/brightonpy.org/?referer=');">BrightonPy</a> soon)</li>
<li>My plan for an <a href="http://ianozsvald.com/2010/04/04/new-book-a-practical-artificial-intelligence-handbook/">Artificial Intelligence Handbook</a> (collaborative project &#8211; all welcome!)</li>
<li><a href="http://buildbrighton.com/" onclick="pageTracker._trackPageview('/outgoing/buildbrighton.com/?referer=');">BuildBrighton</a> &#8211; the local HackerSpace</li>
<li><a href="http://fivepoundapp.com/" onclick="pageTracker._trackPageview('/outgoing/fivepoundapp.com/?referer=');">£5 App event</a> &#8211; celebrating people who build need stuff</li>
<li><a href="http://flashbrighton.org/" onclick="pageTracker._trackPageview('/outgoing/flashbrighton.org/?referer=');">FlashBrighton</a> &#8211; lots of interesting talks</li>
<li><a href="http://www.facebook.com/group.php?gid=33691973165" onclick="pageTracker._trackPageview('/outgoing/www.facebook.com/group.php?gid=33691973165&amp;referer=');">LikeMind coffees</a> &#8211; lots of interesting people</li>
</ul>
<p><a style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;" title="View Artificial Intelligence in the Real World May 2010 Sussex University Guest Lecture on Scribd" href="http://www.scribd.com/doc/31149763/Artificial-Intelligence-in-the-Real-World-May-2010-Sussex-University-Guest-Lecture" onclick="pageTracker._trackPageview('/outgoing/www.scribd.com/doc/31149763/Artificial-Intelligence-in-the-Real-World-May-2010-Sussex-University-Guest-Lecture?referer=');">Artificial Intelligence in the Real World May 2010 Sussex University Guest Lecture</a> <object id="doc_954498868160807" style="outline: none;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="600" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="doc_954498868160807" /><param name="data" value="http://d1.scribdassets.com/ScribdViewer.swf" /><param name="wmode" value="opaque" /><param name="bgcolor" value="#ffffff" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="FlashVars" value="document_id=31149763&amp;access_key=key-2b3rtj49qmb18ckxpbp2&amp;page=1&amp;viewMode=slideshow" /><param name="src" value="http://d1.scribdassets.com/ScribdViewer.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value="document_id=31149763&amp;access_key=key-2b3rtj49qmb18ckxpbp2&amp;page=1&amp;viewMode=slideshow" /><embed id="doc_954498868160807" style="outline: none;" type="application/x-shockwave-flash" width="100%" height="600" src="http://d1.scribdassets.com/ScribdViewer.swf" flashvars="document_id=31149763&amp;access_key=key-2b3rtj49qmb18ckxpbp2&amp;page=1&amp;viewMode=slideshow" allowscriptaccess="always" allowfullscreen="true" bgcolor="#ffffff" wmode="opaque" data="http://d1.scribdassets.com/ScribdViewer.swf" name="doc_954498868160807"></embed></object></p>
<p>Here&#8217;s the YouTube video showing the Grand Challenge entries:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/M2AcMnfzpNg&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;hd=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/M2AcMnfzpNg&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong>Update</strong> &#8211; the <a title="Artificial Intelligence Cookbook blog" href="http://blog.aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/?referer=');">blog</a> for the <a title="Artificial Intelligence Cookbook" href="http://aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/?referer=');">A.I. Cookbook</a> is now active, more  A.I. and robot updates will occur there.</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/05/10/artificial-intelligence-in-the-real-world-lecture-at-sussex-university-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New book/wiki &#8211; a practical artificial intelligence &#8216;cookbook&#8217;</title>
		<link>http://ianozsvald.com/2010/04/04/new-book-a-practical-artificial-intelligence-handbook/</link>
		<comments>http://ianozsvald.com/2010/04/04/new-book-a-practical-artificial-intelligence-handbook/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 18:39:37 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Artificial Brains]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Automated Control]]></category>
		<category><![CDATA[Collaborative Book]]></category>
		<category><![CDATA[Commercial Toolkits]]></category>
		<category><![CDATA[Commercial Tools]]></category>
		<category><![CDATA[Commodore 64]]></category>
		<category><![CDATA[Computation Engines]]></category>
		<category><![CDATA[Darpa Grand Challenge]]></category>
		<category><![CDATA[Demolition Derby]]></category>
		<category><![CDATA[Ec2]]></category>
		<category><![CDATA[Evolutionary Optimisation]]></category>
		<category><![CDATA[Flight Simulators]]></category>
		<category><![CDATA[Free Meta]]></category>
		<category><![CDATA[Meta Data]]></category>
		<category><![CDATA[Optical Character Recognition]]></category>
		<category><![CDATA[Parallel Computation]]></category>
		<category><![CDATA[Practical Guides]]></category>
		<category><![CDATA[Real Robots]]></category>
		<category><![CDATA[Recognition Engines]]></category>
		<category><![CDATA[Relevant Languages]]></category>
		<category><![CDATA[Robot Kits]]></category>
		<category><![CDATA[Speech Tools]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[World Competitions]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=888</guid>
		<description><![CDATA[Having almost completed The Screencasting Handbook I&#8217;m now thinking about my next project. I&#8217;ve been involved in the field of artificial intelligence since my first computer (a Commodore 64 back in the 80s) and I&#8217;ve continued to be paid to work in this area since the end of the 90s. Update &#8211; as mentioned below [...]]]></description>
			<content:encoded><![CDATA[<p>Having almost completed <a href="http://thescreencastinghandbook.com/" onclick="pageTracker._trackPageview('/outgoing/thescreencastinghandbook.com/?referer=');">The Screencasting Handbook</a> I&#8217;m now thinking about my next project. I&#8217;ve been involved in the field of artificial intelligence since my first computer (a Commodore 64 back in the 80s) and I&#8217;ve continued to be paid to work in this area since the end of the 90s.</p>
<p><strong>Update</strong> &#8211; as mentioned below the new project has started &#8211; read more at the <a href="http://blog.aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/?referer=');">A.I. Cookbook blog</a>.</p>
<p>My goal now is to write a collaborative book (probably using a wiki) that takes a very practical look at the use of artificial intelligence in web-apps and desktop software. The big goal would be to teach you how to effectively use A.I. techniques in your job and for your own research. Here&#8217;s a few of the topics that could be covered:</p>
<ul>
<li>Using open source and commercial tools for face, object and speech recognition</li>
<li>Playing with open source and commercial text to speech tools (e.g. the open source <a href="http://ianozsvald.com/2009/12/13/text-to-speech-festival-cross-platform-and-macspeechx-python-on-mac/">festival</a>)</li>
<li>Automated control of driving and flight simulators with artificial brains</li>
<li>Building chatbot systems using tools like AIML, CHAT-L and natural language parsing kits</li>
<li>Using natural language parsing to add some smarts to apps &#8211; maybe for reading and identifying interesting people in Twitter and on blogs</li>
<li>Building useful demos around techniques like neural networks and evolutionary optimisation</li>
<li>Adding brains to real robots with some Arduinos and open source robot kits</li>
<li>Teaching myself machine learning and pattern matching (an area I&#8217;m weak on) along with useful libraries like Bayesian classification (Python&#8217;s <a href="http://reverend.sourceforge.net/" onclick="pageTracker._trackPageview('/outgoing/reverend.sourceforge.net/?referer=');">reverend</a> is great for this)</li>
<li>Parallel computation engines like Amazon&#8217;s EC2, libcloud and GPU programming with CUDA and OpenCL</li>
<li>Using Python and C++ for prototyping (along with Matlab and some other relevant languages)</li>
<li>and a whole bunch of other stuff &#8211; your input is very welcome</li>
</ul>
<p>I&#8217;ve noticed that there are an awful lot of open source (and commercial) toolkits but very few practical guides to using them in your own software. What I want to encourage are some fun projects that&#8217;ll run for a month or two, here are some ideas:</p>
<ul>
<li>Using optical character recognition engines to augment projects like <a href="http://openplaques.org/" onclick="pageTracker._trackPageview('/outgoing/openplaques.org/?referer=');">OpenPlaques.org</a> with free meta data from real-world photos (for a start see my <a href="http://ianozsvald.com/2010/04/04/tesseract-optical-character-recognition-to-read-plaques/">Tesseract OCR</a> post)</li>
<li>Collaborating in real-world competitions like the <a href="http://www.coboslab.psychologie.uni-wuerzburg.de/competitions/" onclick="pageTracker._trackPageview('/outgoing/www.coboslab.psychologie.uni-wuerzburg.de/competitions/?referer=');">Simulated Car Racing Competition 2010: Demolition Derby</a> (they&#8217;re running a simulated project that&#8217;s not unlike the DARPA Grand Challenge)</li>
<li>Applying face recognition algorithms to flickr photos so we can track who is posting images of us for identity management</li>
<li>Creating a Twitter bot that responds to questions and maybe can have a chat (checking the weather should be easy, some memory could be useful &#8211; using Twitter as an interface to tools like <a href="http://ianozsvald.com/2010/04/04/tesseract-optical-character-recognition-to-read-plaques/">OCR for plaques</a> might be fun too) &#8211; I have one of these in development right now</li>
<li>Build a Zork-solving bot (using NLP and tools like <a href="http://conceptnet.media.mit.edu/" onclick="pageTracker._trackPageview('/outgoing/conceptnet.media.mit.edu/?referer=');">ConceptNet</a>) that can play <a href="http://www.ifarchive.org/" onclick="pageTracker._trackPageview('/outgoing/www.ifarchive.org/?referer=');">interactive fiction</a>, build maps and try to solve puzzles</li>
<li>Using evolutionary optimisation techniques like genetic algorithms on the traveling salesman problem</li>
<li>Building Braitenberg-like brains for open source robot kits (like those by Steve at <a href="http://www.botbuilder.co.uk/" onclick="pageTracker._trackPageview('/outgoing/www.botbuilder.co.uk/?referer=');">BotBuilder</a>)</li>
<li>Crate a QR code and Bar Code reader, tied to a camera</li>
</ul>
<p><a href="http://uk.linkedin.com/in/ianozsvald" onclick="pageTracker._trackPageview('/outgoing/uk.linkedin.com/in/ianozsvald?referer=');">LinkedIn</a> has my history &#8211; here&#8217;s my work site (please forgive it being a little&#8230;simple) <a href="http://morconsulting.com/" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com/?referer=');">Mor Consulting Ltd</a>, I&#8217;m the AI Consultant for <a href="http://www.qtara.com/" onclick="pageTracker._trackPageview('/outgoing/www.qtara.com/?referer=');">Qtara.com</a> and I used to be the Senior Programmer for the UK R&amp;D arm of <a href="http://masagroup.net/" onclick="pageTracker._trackPageview('/outgoing/masagroup.net/?referer=');">MasaGroup.net</a>/<a href="http://www.bluekaizen.com/" onclick="pageTracker._trackPageview('/outgoing/www.bluekaizen.com/?referer=');">BlueKaizen.com</a>.</p>
<p>I don&#8217;t have a definite timeline for the book, I&#8217;ll be making that up with you and everyone else once I&#8217;ve finished <a href="http://thescreencastinghandbook.com/" onclick="pageTracker._trackPageview('/outgoing/thescreencastinghandbook.com/?referer=');">The Screencasting Handbook</a> (end of April).</p>
<p>The <a href="http://aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/aicookbook.com/?referer=');">Artificial Intelligence Cookbook</a> project has started &#8211; the <a href="http://blog.aicookbook.com/" onclick="pageTracker._trackPageview('/outgoing/blog.aicookbook.com/?referer=');">blog</a> is currently active (along with the <a href="http://twitter.com/aicookbook" onclick="pageTracker._trackPageview('/outgoing/twitter.com/aicookbook?referer=');">@aicookbook</a> Twitter account). There is a mailing list to join for occasional updates &#8211; email AICookbook@Aweber.com to join.</p>
<p>It will be a commercial project and I will be looking to make it very relevant to however you&#8217;re using AI. Sign-up and you&#8217;ll get some notifications from me as the project develops.</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/04/04/new-book-a-practical-artificial-intelligence-handbook/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fix for ConceptNet error &#8220;Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined&#8221;</title>
		<link>http://ianozsvald.com/2010/02/10/fix-for-conceptnet-error-settings-cannot-be-imported-because-environment-variable-django_settings_module-is-undefined/</link>
		<comments>http://ianozsvald.com/2010/02/10/fix-for-conceptnet-error-settings-cannot-be-imported-because-environment-variable-django_settings_module-is-undefined/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 03:11:29 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Csc]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Environment Variable]]></category>
		<category><![CDATA[Error Settings]]></category>
		<category><![CDATA[Import Models]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=838</guid>
		<description><![CDATA[If you&#8217;re using ConceptNet and you see: ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined. then the fix is simple (I&#8217;ve been hacking away at an idea whilst at IUI2010 &#8211; thanks Rob for the fix). To replicate the error run: from csc.nl import get_nl en_nl = get_nl('en') en_nl.is_stopword('the') The fix is [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using <a href="http://conceptnet.media.mit.edu/" onclick="pageTracker._trackPageview('/outgoing/conceptnet.media.mit.edu/?referer=');">ConceptNet</a> and you see:</p>
<pre>ImportError: Settings cannot be imported, because environment variable
DJANGO_SETTINGS_MODULE is undefined.</pre>
<p>then the fix is simple (I&#8217;ve been hacking away at an idea whilst at <a href="http://iuiconf.org/" onclick="pageTracker._trackPageview('/outgoing/iuiconf.org/?referer=');">IUI2010</a> &#8211; thanks <a href="http://torg.media.mit.edu/rob/index.php/Main_Page" onclick="pageTracker._trackPageview('/outgoing/torg.media.mit.edu/rob/index.php/Main_Page?referer=');">Rob</a> for the fix).</p>
<p>To replicate the error run:</p>
<pre>from csc.nl import get_nl</pre>
<pre>en_nl = get_nl('en')</pre>
<pre>en_nl.is_stopword('the')</pre>
<p>The fix is to run:</p>
<pre>import csc.conceptnet.models</pre>
<p>which sets up Django, the call is_stopword again and all is fine.</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/02/10/fix-for-conceptnet-error-settings-cannot-be-imported-because-environment-variable-django_settings_module-is-undefined/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pyCUDA on Windows and Mac for super-fast Python math using CUDA</title>
		<link>http://ianozsvald.com/2010/01/26/pycuda-on-windows-and-mac-for-super-fast-python-math-using-cuda/</link>
		<comments>http://ianozsvald.com/2010/01/26/pycuda-on-windows-and-mac-for-super-fast-python-math-using-cuda/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 13:01:22 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Bleeding Edge]]></category>
		<category><![CDATA[C Code]]></category>
		<category><![CDATA[Compatible Devices]]></category>
		<category><![CDATA[Demo Code]]></category>
		<category><![CDATA[Desktop Computer]]></category>
		<category><![CDATA[Device Architecture]]></category>
		<category><![CDATA[Gpu]]></category>
		<category><![CDATA[Graphics Card]]></category>
		<category><![CDATA[Graphics Cards]]></category>
		<category><![CDATA[Graphics Processing Unit]]></category>
		<category><![CDATA[Hissy Fit]]></category>
		<category><![CDATA[Intensive Calculations]]></category>
		<category><![CDATA[Macbook]]></category>
		<category><![CDATA[Macbooks]]></category>
		<category><![CDATA[Math Calculations]]></category>
		<category><![CDATA[Math Operations]]></category>
		<category><![CDATA[Msvc]]></category>
		<category><![CDATA[Nvidia Cards]]></category>
		<category><![CDATA[Nvidia Graphics]]></category>
		<category><![CDATA[Speed Ups]]></category>
		<category><![CDATA[Time Forum]]></category>
		<category><![CDATA[Ups]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=820</guid>
		<description><![CDATA[I&#8217;ve just started to play with pyCUDA which lets you run parallel math operations on a CUDA-compliant NVidia graphics card through Python. CUDA stands for Compute Unified Device Architecture &#8211; it is an architecture that lets us program the Graphics Processing Unit (GPU) on a high powered graphics card to do scientific or graphical math [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just started to play with <a href="http://mathema.tician.de/software/pycuda" onclick="pageTracker._trackPageview('/outgoing/mathema.tician.de/software/pycuda?referer=');">pyCUDA</a> which lets you run parallel math operations on a <a href="http://en.wikipedia.org/wiki/CUDA" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/CUDA?referer=');">CUDA</a>-compliant NVidia graphics card through Python.</p>
<p>CUDA stands for Compute Unified Device Architecture &#8211; it is an architecture that lets us program the Graphics Processing Unit (GPU) on a high powered graphics card to do scientific or graphical math calculations rather than the usual texture processing for games.  In essence it is a mini supercomputer that is specialised just for fast math operations &#8211; if you can figure out how to use it.</p>
<p>The goal is to off-load the CPU-intensive calculations for two of my clients (a physics company and a flood modelling company) to achieve 10* to 100* speed-ups using commodity graphics cards.</p>
<p>pyCUDA makes it easy to interactively program a CUDA device rather than hitting C++ code with the slow write/compile/debug loop.  Recent MacBooks (mine was bought in January 2009) have NVidia cards with CUDA-compatible devices built-in (mine is a <a href="http://en.wikipedia.org/wiki/GeForce_9_Series#9400M_G.5B37.5D" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/GeForce_9_Series_9400M_G.5B37.5D?referer=');">9400M</a>).  For my desktop computer I have a <a href="http://en.wikipedia.org/wiki/GeForce_9_Series#GeForce_9800_GT" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/GeForce_9_Series_GeForce_9800_GT?referer=');">9800 GT</a> (costing £100).</p>
<p>It turns out that this is bleeding-edge stuff &#8211; getting pyCUDA compiled on my MacBook and Win XP machine took <a href="http://tiker.net/pipermail/pycuda_tiker.net/2010-January/000857.html" onclick="pageTracker._trackPageview('/outgoing/tiker.net/pipermail/pycuda_tiker.net/2010-January/000857.html?referer=');">some</a> <a href="http://tiker.net/pipermail/pycuda_tiker.net/2010-January/000866.html" onclick="pageTracker._trackPageview('/outgoing/tiker.net/pipermail/pycuda_tiker.net/2010-January/000866.html?referer=');">time</a> (forum posts for Mac and Windows issues) thankfully the group is helpful and the <a href="http://wiki.tiker.net/PyCuda" onclick="pageTracker._trackPageview('/outgoing/wiki.tiker.net/PyCuda?referer=');">wiki</a> has an installation section for Windows, Mac and Linux and some reasonable <a href="http://documen.tician.de/pycuda/index.html" onclick="pageTracker._trackPageview('/outgoing/documen.tician.de/pycuda/index.html?referer=');">documentation</a>.</p>
<p>Right now I&#8217;ve got as far as running some of the demo code on my MacBook (showing a 5* speed-up over the CPU) and my desktop (showing a 30* speed-up over the CPU).  I&#8217;ll report more as I progress.</p>
<p><strong>Update</strong> &#8211; pyCUDA works inside <a href="http://ipython.scipy.org/" onclick="pageTracker._trackPageview('/outgoing/ipython.scipy.org/?referer=');">IPython</a> too, lovely.</p>
<p><strong>Update</strong> &#8211; I don&#8217;t have OpenGL working for gl_interop.py but as noted <a href="http://www.mail-archive.com/pycuda@tiker.net/msg00586.html" onclick="pageTracker._trackPageview('/outgoing/www.mail-archive.com/pycuda_tiker.net/msg00586.html?referer=');">here </a> you need &#8220;CUDA_ENABLE_GL = True&#8221; in siteconf.py and you need <a href="http://pyopengl.sourceforge.net/" onclick="pageTracker._trackPageview('/outgoing/pyopengl.sourceforge.net/?referer=');">PyOpenGL</a> installed.  When rebuilding my MSVC threw a hissy fit, it isn&#8217;t essential to my work so I&#8217;m skipping this demo.</p>
<p><strong>Update</strong> &#8211; I&#8217;ve submitted a patch and two examples to the wiki (<a href="http://wiki.tiker.net/PyCuda/Examples/SimpleSpeedTest" onclick="pageTracker._trackPageview('/outgoing/wiki.tiker.net/PyCuda/Examples/SimpleSpeedTest?referer=');">SimpleSpeedTest</a>, <a href="http://wiki.tiker.net/PyCuda/Examples/Mandelbrot" onclick="pageTracker._trackPageview('/outgoing/wiki.tiker.net/PyCuda/Examples/Mandelbrot?referer=');">Mandelbrot</a>). I get 200* speed-ups on the speed test (using a for loop on a sin() calculation) and 5 to 20* speed-up on Mandelbrots (it seems to scale very well vs numpy with increasing dimensions).</p>
<p><strong>Update</strong> &#8211; There are lots of interesting papers for CUDA surfacing like this one showing a <a href="http://gpgpu.org/2010/02/10/acoustic-likelihoods-in-speech-recognition" onclick="pageTracker._trackPageview('/outgoing/gpgpu.org/2010/02/10/acoustic-likelihoods-in-speech-recognition?referer=');">3* speed-up for voice recognition</a> tasks (using CPU and GPU together) and yet another way to <a href="http://gpgpu.org/2010/02/28/lattice-boltzmann-shallow-water-equations" onclick="pageTracker._trackPageview('/outgoing/gpgpu.org/2010/02/28/lattice-boltzmann-shallow-water-equations?referer=');">improve fluid dynamic simulations</a>. This Tom&#8217;s 3D article gives a <a href="http://www.tomshardware.com/reviews/future-3d-graphics,2560.html" onclick="pageTracker._trackPageview('/outgoing/www.tomshardware.com/reviews/future-3d-graphics_2560.html?referer=');">great write-up</a> (starting with the history of audio cards) on where 3D is right now and how NVidia is beating ATI for scientific computing.</p>
<p><strong>Books to read:</strong></p>
<p>The following CUDA books will help you understand the basics of CUDA programming &#8211; I particularly like the first (Kirk and Hwu).</p>
<table>
<tr>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0123814723" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
</td>
<td>
<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=entrepreneuri-21&#038;o=2&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=0M5A6TN3AXP2JHJBWT02&#038;asins=0131387685" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2010/01/26/pycuda-on-windows-and-mac-for-super-fast-python-math-using-cuda/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text to Speech &#8211; Festival (cross platform) and MacSpeechX (Python on Mac)</title>
		<link>http://ianozsvald.com/2009/12/13/text-to-speech-festival-cross-platform-and-macspeechx-python-on-mac/</link>
		<comments>http://ianozsvald.com/2009/12/13/text-to-speech-festival-cross-platform-and-macspeechx-python-on-mac/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 16:05:30 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[ArtificialIntelligence]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[000000000]]></category>
		<category><![CDATA[Amp]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Const]]></category>
		<category><![CDATA[Cross Platform]]></category>
		<category><![CDATA[E On Line]]></category>
		<category><![CDATA[Googling]]></category>
		<category><![CDATA[Intel]]></category>
		<category><![CDATA[Isnan]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Mac Results]]></category>
		<category><![CDATA[Open Source Solution]]></category>
		<category><![CDATA[Page Test]]></category>
		<category><![CDATA[Relevant Archive]]></category>
		<category><![CDATA[Scope]]></category>
		<category><![CDATA[Speech Festival]]></category>
		<category><![CDATA[Speech Tools]]></category>
		<category><![CDATA[Text To Speech]]></category>
		<category><![CDATA[Waveformat]]></category>
		<category><![CDATA[Web Demo]]></category>

		<guid isPermaLink="false">http://ianozsvald.com/?p=800</guid>
		<description><![CDATA[I wanted to play with text to speech, I&#8217;ve been looking for a cross-platform open-source solution that sounds reasonable.  I&#8217;m really impressed with the festival project, the web demo lets you enter your own text. Update &#8211; I&#8217;m including this post in my plans for an Artificial Intelligence Handbook. Festival is cross-platform but compiling it [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to play with text to speech, I&#8217;ve been looking for a cross-platform open-source solution that sounds reasonable.  I&#8217;m really impressed with the festival project, the <a href="http://www.cstr.ed.ac.uk/projects/festival/morevoices.html" onclick="pageTracker._trackPageview('/outgoing/www.cstr.ed.ac.uk/projects/festival/morevoices.html?referer=');">web demo</a> lets you enter your own text.</p>
<p><strong>Update</strong> &#8211; I&#8217;m including this post in my plans for an <a href="http://ianozsvald.com/2010/04/04/new-book-a-practical-artificial-intelligence-handbook/">Artificial Intelligence Handbook</a>.</p>
<p>Festival is cross-platform but <a href="http://www.cstr.ed.ac.uk/cgi-bin/cstr/lists.cgi?config=festival_faq&amp;entry=installing_festival" onclick="pageTracker._trackPageview('/outgoing/www.cstr.ed.ac.uk/cgi-bin/cstr/lists.cgi?config=festival_faq_amp_entry=installing_festival&amp;referer=');">compiling</a> it on a Mac takes a touch of effort (it looks like it is easier on Linux and Win).</p>
<p>This <a href="http://www.xenocafe.com/tutorials/php/festival_text_to_speech/index.php" onclick="pageTracker._trackPageview('/outgoing/www.xenocafe.com/tutorials/php/festival_text_to_speech/index.php?referer=');">article</a> shows you how to use it and how to web-enable it with some php.  For the simplest demo I used &#8216;bin/text2wave input.txt -o output.wav&#8217; with input.txt containing a sentence.</p>
<p>To get started, get the <a href="http://festlang.berlios.de/docu/doku.php?id=tips#where_can_i_download_the_latest_festival_and_festvox" onclick="pageTracker._trackPageview('/outgoing/festlang.berlios.de/docu/doku.php?id=tips_where_can_i_download_the_latest_festival_and_festvox&amp;referer=');">latest code</a>.  I have v1.96beta.  You may also want the official <a href="http://lists.berlios.de/pipermail/festlang-talk/" onclick="pageTracker._trackPageview('/outgoing/lists.berlios.de/pipermail/festlang-talk/?referer=');">festlang-talk</a> list and possibly this <a href="http://marc.info/?l=festival-talk&amp;r=1&amp;w=2" onclick="pageTracker._trackPageview('/outgoing/marc.info/?l=festival-talk_amp_r=1_amp_w=2&amp;referer=');">more complete</a> archive.</p>
<p><strong>Compiling speech_tools-1.2.96-beta.tar.gz<br />
</strong></p>
<p>It ought to have been as simple as &#8216;make clean; make&#8217; but there&#8217;s a few changes to make first.  <a href="http://lists.berlios.de/pipermail/festlang-talk/2008-January/000792.html" onclick="pageTracker._trackPageview('/outgoing/lists.berlios.de/pipermail/festlang-talk/2008-January/000792.html?referer=');">First</a> we need this fix or we get a compile error in macosxaudio in kAudioUnitProperty_SetInputCallback:</p>
<pre>If you add
#include &lt;AudioUnit/AUNTComponent.h&gt;
after the include block on lines 45-48 in audio/macosxaudio.cc the
problem should be solved.

By the way, remember to change the byte order if you have an intel
mac, i.e. on line 131:
     waveformat.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger
		 | kLinearPCMFormatFlagIsPacked;
	// For Intel	| kLinearPCMFormatFlagIsPacked;
     // For PowerPC    | kLinearPCMFormatFlagIsPacked |
kLinearPCMFormatFlagIsBigEndian;</pre>
<p>The following was a trickier error to solve:</p>
<pre>g++ -c -fno-implicit-templates -O3 -Wall -I../include sigpr_frame.cc
sigpr_frame.cc: In function
‘void lpc2cep(const EST_FVector&amp;, EST_FVector&amp;)’:
sigpr_frame.cc:318: error: ‘__isnan’ was not declared in this scope
make[1]: *** [sigpr_frame.o] Error 1
make: *** [sigpr] Error 2</pre>
<p>The fix was known but the relevant archive was missing, some googling for &#8216;<a href="http://209.85.229.132/search?q=cache:z2emAYdWfr4J:lists.berlios.de/pipermail/festlang-talk/2006-August/001155.html+__isnan+mac&amp;cd=1&amp;hl=en&amp;ct=clnk&amp;gl=uk&amp;client=firefox-a" onclick="pageTracker._trackPageview('/outgoing/209.85.229.132/search?q=cache_z2emAYdWfr4J_lists.berlios.de/pipermail/festlang-talk/2006-August/001155.html+_isnan+mac_amp_cd=1_amp_hl=en_amp_ct=clnk_amp_gl=uk_amp_client=firefox-a&amp;referer=');">__isnan mac</a>&#8216; results in this cached 2006 page:</p>
<pre>--- ../test/speech_tools/include/EST_math.h     2006-08-03  
08:49:35.000000000 -0500
+++ include/EST_math.h  2006-08-17 17:53:33.000000000 -0500
@@ -43,7 +43,7 @@
#if defined(__APPLE__)
/* Not sure why I need this here, but I do */
-extern "C" int isnan(double);
+extern "C" int isnan(float);
#endif
/* this isn't included from c, but just to be safe... */
@@ -101,7 +101,6 @@
/* Apple OSX */
#if defined(__APPLE__)
#define isnanf(X) isnan(X)
-#define isnan(X) __isnan(X)
#endif
/* FreeBSD *and other 4.4 based systems require anything, isnanf is  
defined */</pre>
<p><strong>Compiling festival-1.96-beta.tar.gz</strong></p>
<p>Once speech-tools is compiled, getting &#8216;festival-1.96-beta.tar.gz&#8217; compiled is as easy as &#8216;make clean;make&#8217;.</p>
<p><strong>Python&#8217;s MacSpeechX</strong></p>
<p>I also had a play with the <a href="http://www-acc.kek.jp/WWW-ACC-exp/KEKB/control/member/N.Yamamoto/Python/macspeech/module-macspeechX.html" onclick="pageTracker._trackPageview('/outgoing/www-acc.kek.jp/WWW-ACC-exp/KEKB/control/member/N.Yamamoto/Python/macspeech/module-macspeechX.html?referer=');">macspeechx</a> module which ties Python to the Mac&#8217;s voice-synthesiser.  See list_voice_name() in <a href="http://www-acc.kek.jp/WWW-ACC-exp/KEKB/control/member/N.Yamamoto/Python/macspeech/macspeechX.py" onclick="pageTracker._trackPageview('/outgoing/www-acc.kek.jp/WWW-ACC-exp/KEKB/control/member/N.Yamamoto/Python/macspeech/macspeechX.py?referer=');">macspeechX.py</a> for an example of how it all works.</p>
<p>It works to power the speech synthesiser but it doesn&#8217;t appear to let you record the speech to a file (unlike festival above).</p>
<p><strong>Update</strong> &#8211; Mike Driscoll has a <a href="http://www.blog.pythonlibrary.org/2010/04/02/python-test-to-speech-making-your-pc-talk/" onclick="pageTracker._trackPageview('/outgoing/www.blog.pythonlibrary.org/2010/04/02/python-test-to-speech-making-your-pc-talk/?referer=');">post</a> about <a href="http://sourceforge.net/projects/uncassist/files/" onclick="pageTracker._trackPageview('/outgoing/sourceforge.net/projects/uncassist/files/?referer=');">pyTTS</a> which hooks into Microsoft&#8217;s SAPI on Windows and <a href="http://pypi.python.org/pypi/pyttsx" onclick="pageTracker._trackPageview('/outgoing/pypi.python.org/pypi/pyttsx?referer=');">pyTTSX</a> which is cross-platform, along with some speech recognition links.</p>
<hr>
Ian applies Artificial Intelligence for companies (<a href="http://morconsulting.com" title="Artificial Intelligence consultant" onclick="pageTracker._trackPageview('/outgoing/morconsulting.com?referer=');pageTracker._trackPageview('/outgoing/morconsulting.com?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">Mor Consulting</a>), programs Python, 
produces professional screencasts (<a href="http://procasts.co.uk/examples.html" title="Professional screencast production" onclick="pageTracker._trackPageview('/outgoing/procasts.co.uk/examples.html?referer=');pageTracker._trackPageview('/outgoing/procasts.co.uk?referer=http://ianozsvald.com/wp-admin/users.php?page=ft_signature_manager.php');">ProCasts</a>), writes <a href="http://TheScreencastingHandbook.com" title="Screencasting Tutorial eBook" onclick="pageTracker._trackPageview('/outgoing/TheScreencastingHandbook.com?referer=');">The Screencasting Handbook</a> and is also a sea-side dweller and consumer of fine coffees.]]></content:encoded>
			<wfw:commentRss>http://ianozsvald.com/2009/12/13/text-to-speech-festival-cross-platform-and-macspeechx-python-on-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
