Text To Speech with pyTTS

M

Mike P.

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.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.
 
P

Peter Hansen

Mike said:
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 saw the following blog entry by Joey deVilla:
http://farm.tucows.com/blog/Platforms/Windows/_archives/2005/1/19/266813.html

and immediately tried it out. All I did was download the
PyTTS package for Python (2.4, not 2.3), and install it,
then ran Joey's sample above. It worked as advertised.
This was on Windows XP SP2.

-Peter
 
H

Hans Georg Krauthaeuser

Mike said:
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.

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
...

The TTSFast.py file is missing in the 2.3 distribution. I made a copy
from the 2.4 dist and everything worked fine for me.

Hans Georg
 
S

Steve Holden

Mike said:
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.

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
 
P

Peter

I released a new version of the Windows installer for Python 2.3 that
includes the missing _TTSFast.pyd file.
 
H

Hans Georg Krauthaeuser

Peter said:
I released a new version of the Windows installer for Python 2.3 that
includes the missing _TTSFast.pyd file.
Unfortunenately, the file TTSFast.py is missing, not _TTSFast.pyd.

Hans Georg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top