{"id":309,"date":"2008-04-03T16:48:57","date_gmt":"2008-04-03T20:48:57","guid":{"rendered":"http:\/\/cherrycoated.com\/wordpress\/?p=309"},"modified":"2008-04-03T16:48:57","modified_gmt":"2008-04-03T20:48:57","slug":"text-to-speech-tts-for-python","status":"publish","type":"post","link":"http:\/\/www.webliminal.com\/webliminalblog\/about-the-internet-and-the-web\/text-to-speech-tts-for-python","title":{"rendered":"Text to Speech (TTS) for Python"},"content":{"rendered":"<p><a href=\"http:\/\/webliminal.com\/images\/sidepics\/sp34.jpg\"><img decoding=\"async\" src=\"http:\/\/webliminal.com\/images\/sidepics\/cwdata\/sp34.jpg\" title=\"Building on the road to Warsaw, VA\" alt=\"Building on the road to Warsaw, VA\" align=\"left\" hspace=\"20\" \/><\/a> Preparing for my <a href=\"http:\/\/paprika.umw.edu\/~ernie\/cpsc110\/\">Introduction to Computer Science class, CPSC 110<\/a>, this morning I stumbled upon the notion that it would be pretty neat if I could discuss TTS methods using Python.  I was starting to prepare somethign on functions and was looking at a function  from the <a href=\"http:\/\/www.fbeedle.com\/99-6.html\">Zelle&#8217;s excellent book<\/a>  that <a href=\"http:\/\/paprika.umw.edu\/~ernie\/cpsc110\/ppics_support\/Code\/chapter06\/happy.py\">displays the text to the Happy Birthday song<\/a>.<\/p>\n<p>Finding an implementation of tts in Python was necessary, of course.<\/p>\n<p>I found these instructions for a Windows system at<br \/>\n<a href=\"http:\/\/www.daniweb.com\/code\/snippet326.html\">http:\/\/www.daniweb.com\/code\/snippet326.html<\/a>, and they worked well.<\/p>\n<blockquote><p>&#8221; Yes, you can let your computer read text to you. The task is relatively easy, if you have Windows on your machine. All you need is Microsoft&#8217;s speech-API SAPI, the <strong class=\"highlight\">Python<\/strong><strong> <\/strong>Text to Speech module pyTTS, and an updated version of win32com, all free downloads. Here are some experiments with the pyTTS module that literally talk to you.&#8221;<\/p><\/blockquote>\n<p>For my students I&#8217;ve put all the necessary parts in the directory I keep for CSPC 110 on paprika.umw.edu.<\/p>\n<ul>\n<li>\n<pre><a href=\"http:\/\/paprika.umw.edu\/%7Eernie\/cpsc110\/pyTTS\/SAPI5SpeechInstaller.msi\">SAPI5SpeechInstaller..&gt; <\/a>  Microsoft's speech-API SAPI<\/pre>\n<\/li>\n<li>\n<pre><a href=\"http:\/\/paprika.umw.edu\/%7Eernie\/cpsc110\/pyTTS\/pyTTS-3.0.win32-py2.5.exe\">pyTTS-3.0.win32-py2...&gt;<\/a> pyTTS 3.0 for Python 2.5<\/pre>\n<\/li>\n<li>\n<pre><a href=\"http:\/\/paprika.umw.edu\/%7Eernie\/cpsc110\/pyTTS\/pywin32-210.win32-py2.5.exe\">pywin32-210.win32-py..&gt;<\/a> pywin32 for Python 5.0<\/pre>\n<\/li>\n<\/ul>\n<p>&#8212;<\/p>\n<table id=\"Table6\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"300\">\n<tr>\n<td align=\"left\" valign=\"top\"><font color=\"#000080\" size=\"2\">U.S. Deaths Confirmed By  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tThe DoD:<\/font><\/td>\n<td align=\"right\" valign=\"top\"><font color=\"#000080\" size=\"2\"><span id=\"lblConfirmed\" style=\"color: #804000; background-color: transparent; font-family: Verdana; font-size: x-small; font-weight: bold; width: 56px\">4010<\/span><\/font><\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\"><font color=\"#000080\" size=\"2\">Reported U.S. Deaths  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPending DoD Confirmation:<\/font><\/td>\n<td align=\"right\" valign=\"top\"><span id=\"lblPending\" style=\"color: #804000; background-color: transparent; font-family: Verdana; font-size: x-small; font-weight: bold\">2<\/span><\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\"><font color=\"#000080\" size=\"2\"><font color=\"#000080\" size=\"2\">Total<\/font><\/font><\/td>\n<td align=\"right\" valign=\"top\"><span id=\"lblCount\" style=\"color: #804000; background-color: transparent; font-family: Verdana; font-size: x-small; font-weight: bold\">4012<\/span><\/td>\n<\/tr>\n<\/table>\n<p><a href=\"http:\/\/icasualties.org\/oif\/BY_DOD.aspx\" id=\"Hyperlink26\" title=\"View Confirmation List of U.S. Deaths\" class=\"LinkLabel\" style=\"border-color: transparent; background-color: transparent; font-weight: bold\">DoD Confirmation List<br \/>\n<\/a><span id=\"lblLatestDate\" style=\"color: DarkBlue; background-color: transparent; font-family: Verdana; font-size: x-small\">Latest Coalition Fatality: Mar 31, 2008<\/span><\/p>\n<p>Source: <a href=\"http:\/\/icasualties.org\/oif\/\">Iraqi Coalition Casualty Count<\/a><\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Preparing for my Introduction to Computer Science class, CPSC 110, this morning I stumbled upon the notion that it would be pretty neat if I could discuss TTS methods using Python. I was starting to prepare somethign on functions and was looking at a function from the Zelle&#8217;s excellent book that displays the text to [&hellip;]<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,12],"tags":[],"class_list":["post-309","post","type-post","status-publish","format-standard","hentry","category-about-the-internet-and-the-web","category-teaching"],"_links":{"self":[{"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/posts\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/comments?post=309"}],"version-history":[{"count":0,"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/posts\/309\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/media?parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/categories?post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.webliminal.com\/webliminalblog\/wp-json\/wp\/v2\/tags?post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}