Text To Speech with pyTTS

Steve Holden steve at holdenweb.com
Mon Feb 28 10:30:37 EST 2005


Mike P. wrote:

> Hi,
> I was wondering if anyone has had any luck with the python text to speech
> (pyTTS) module available on Sourceforge:
> http://sourceforge.net/projects/uncassist
> 
> I have followed the tutorial for pyTTS at:
> http://www.cs.unc.edu/~parente/tech/tr02.shtml
> 
> Using the first simple speech example:
> 
> import pyTTS
> 
> tts = pyTTS.Create()
> tts.Speak("Hello World!")
> 
> I get the following error on the call to pyTTS.Create()
> 
> C:\Program Files\Python23\Lib\site-packages\pyTTS>python
> ActivePython 2.3.2 Build 232 (ActiveState Corp.) based on
> Python 2.3.2 (#49, Nov 13 2003, 10:34:54) [MSC v.1200 32 bit (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> 
>>>>import pyTTS
>>>>tts = pyTTS.Create()
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "C:\Program Files\Python23\Lib\site-packages\pyTTS\__init__.py", line
> 28, in Create
>     raise ValueError('"%s" not supported' % api)
> ValueError: "SAPI" not supported
> 
> 
> I followed the instructions in the tutorial in order and installed the
> required packages in the following order, given that I already had an
> ActiveState Python 2.3 installation under Windows XP.
> 
> 1) wxPython2.5-win32-unicode-2.5.3.1-py23.exe (didn't already have this and
> some of the pyTTS demos need it)
> 
> 2) Microsoft SAPI 5.1 (SAPI5SpeechInstaller.msi)
> 3) Extra Microsoft Voices (SAPI5VoiceInstaller.msi)
> 4) pyTTS-3.0.win32-py2.3.exe (pyTTS for Python 2.3 under windows)
> 
> I ran the example and it didn't work. I didn't initially install Mark
> Hammond's
> Python win32all extensions, because they already come with ActiveState
> Python.
> So I tried installing the win32all (win32all-163.exe) package just in case,
> but I still
> get the SAPI not supported error.
> 
> Anyone get this working - any suggestions? Or am I missing something
> obvious?
> 
> Thanks In Advance.
> 
> Mike P.
> 
> 
I got the "SAPI not supported" error until I installed the 
SpeechInstaller and VoiceInstaller components, after which everything 
worked fine for me. (Win2K SP4, Python 2.4 plus win32 extentions).

regards
  Steve


-- 
Meet the Python developers and your c.l.py favorites March 23-25
Come to PyCon DC 2005                      http://www.pycon.org/
Steve Holden                           http://www.holdenweb.com/



More information about the Python-list mailing list