<?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>Zach Archer Blog &#187; speech</title> <atom:link href="http://blog.zacharcher.com/tag/speech/feed/" rel="self" type="application/rss+xml" /><link>http://blog.zacharcher.com</link> <description>Friend to analog and digital alike</description> <lastBuildDate>Tue, 10 Jan 2012 06:24:29 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Synthetic Speech in Flash: the Source Code</title><link>http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/</link> <comments>http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/#comments</comments> <pubDate>Tue, 10 Jan 2012 05:49:27 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Synth]]></category> <category><![CDATA[as3]]></category> <category><![CDATA[code]]></category> <category><![CDATA[robots]]></category> <category><![CDATA[source]]></category> <category><![CDATA[speech]]></category> <category><![CDATA[synthetic]]></category> <category><![CDATA[talking]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=326</guid> <description><![CDATA[Remember the Flash synthetic speech demo, which turned into a talking robot app? Here's the source code: Download it! Please note: This code comes with no warranty, nor support, whatsoever. None. Zip. Nada. If your talking robots become self-aware and enslave humanity, then I will not be held responsible. But if you're in the mood [...]]]></description> <content:encoded><![CDATA[<p>Remember the <a
href="http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/">Flash synthetic speech demo</a>, which turned into a <a
href="http://blog.zacharcher.com/2010/01/03/here-comes-the-metal-mouth/">talking robot app</a>? Here's the source code: <strong><a
href="http://zacharcher.com/lab/20120109_as3_speech/as3_speech.zip">Download it</a></strong>!</p><p><img
class="aligncenter" src="http://zacharcher.com/lab/20120109_as3_speech/supercali.png" alt="SUPERCALIFRAGILISTICEXPEALIDOSHUS" width="380" height="328" /></p><p>Please note: This code comes with no warranty, nor support, whatsoever. None. Zip. Nada. If your talking robots become self-aware and enslave humanity, then I will not be held responsible. But if you're in the mood for tinkering, here's how it's strung together:</p><ul><li>The sound is generating using <a
href="http://en.wikipedia.org/wiki/Linear_predictive_coding">Linear Predictive Coding</a> ("LPC").</li><li>First, some Python code: The <em>analyze_lpc.py</em> script analyzes <em>phonemes.dat</em> (which is just a headerless version of <em>phonemes.aif</em>). Individual phonemes are separated by moments of silence, so the script splits the sound file on those. Each phoneme is converted to LPC data, using code that I ported from <a
href="http://soundlab.cs.princeton.edu/software/rt_lpc/">the rt_lpc project</a>. I felt like I understood the mathematics 3 years ago, but I doubt I could explain it today.</li><li>Now, in Flash: Launch the <em>DictCompressor</em> application, and watch the trace messages. Click the screen to open the browser window, then select your <em>cmudict___.txt</em> pronouncing dictionary. (You can obtain the latest CMUdict <a
href="http://www.speech.cs.cmu.edu/cgi-bin/cmudict">here</a>.) Flash will convert this to a (smaller) <em>cmudict.dat</em> file, which is what <em>LPCsynth.swf</em> loads.</li><li><em>LPCsynth</em> is the application that talks. The <em>LPCSynthHarness.sayItNow()</em> method creates an array of <em>LPCFrames</em>, which are "spoken" in the <em>sampleData()</em> method.  This was never intended for public distribution, so the code is not exactly stellar (the talking bit should be extracted into its own class).</li></ul><p>Is this interesting? Did your Flash Player become self-aware after hearing its own voice? Let me know!</p><p>It's funny, originally this was intended for the <a
href="http://controlzinc.com/">controlzinc.com</a> website. The robot voice would sing as you clicked, crooning about your mousing habits. I still can't decide if that idea was brilliant, or terrible.</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/&amp;title=Synthetic Speech in Flash: the Source Code' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Synthetic Speech in Flash: the Source Code+http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Synthetic Speech in Flash: the Source Code&amp;uri=http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Synthetic Speech in Flash</title><link>http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/</link> <comments>http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/#comments</comments> <pubDate>Thu, 27 Aug 2009 10:46:44 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Synth]]></category> <category><![CDATA[audio]]></category> <category><![CDATA[linear predictive coding]]></category> <category><![CDATA[lpc]]></category> <category><![CDATA[speech]]></category> <category><![CDATA[synthesis]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=161</guid> <description><![CDATA[Recently, I learned about Linear Predictive Coding ("LPC"). This technique is used in classic arcade games (such as Gauntlet) and the Speak &#38; Spell to synthesize speech. Here's my first attempt at LPC speech in Flash: (click &#38; explore) It's great, except for one tiny problem: It sounds horrific. Can you feel the cold, robotic [...]]]></description> <content:encoded><![CDATA[<p>Recently, I learned about <a
href="http://en.wikipedia.org/wiki/Linear_predictive_coding">Linear Predictive Coding ("LPC")</a>. This technique is used in classic arcade games (such as <em>Gauntlet</em>) and the <em>Speak &amp; Spell</em> to synthesize speech.</p><p>Here's my first attempt at LPC speech in Flash: (click &amp; explore)</p><p><a
href="http://zacharcher.com/lab/20090827_lpc_speech/LPCsynth.swf"><img
class="aligncenter" title="LPC harness" src="http://zacharcher.com/lab/20090827_lpc_speech/lpc_harness.png" alt="" width="236" height="254" /></a></p><p>It's great, except for one tiny problem: It sounds horrific. Can you feel the cold, robotic love? This voice will stalk your nightmares.</p><p>The phonemes were derived from an unrehearsed recording of my voice. I'm confident that it can be improved. Note that direct LPC encodings of my voice, <a
href="http://zacharcher.com/lab/20090827_lpc_speech/zach_voice_test.mp3">such as this one</a>, sound more acceptable.</p><p><em><strong>EDIT:</strong> I made an iPhone version, "Metal Mouth", with lots of features. Here it is on <a
href="http://www.youtube.com/watch?v=g2NwVMjrY2o">YouTube</a> and the <a
href="http://itunes.apple.com/us/app/metal-mouth/id348741365?mt=8">iTunes Store</a>!</em></p><p><em><strong>EDIT #2:</strong> <a
href="http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/">The source code is available here</a>.</em></p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/&amp;title=Synthetic Speech in Flash' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Synthetic Speech in Flash+http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Synthetic Speech in Flash&amp;uri=http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/feed/</wfw:commentRss> <slash:comments>7</slash:comments> <enclosure
url="http://zacharcher.com/lab/20090827_lpc_speech/zach_voice_test.mp3" length="264600" type="audio/mpeg" /> </item> </channel> </rss>
