Text To Speech with pyTTS

Discussion in 'Python' started by Mike P., Feb 27, 2005.

  1. Mike P.

    Mike P. Guest

    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.
    Mike P., Feb 27, 2005
    #1
    1. Advertising

  2. Mike P.

    Peter Hansen Guest

    Mike P. wrote:
    > 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
    Peter Hansen, Feb 27, 2005
    #2
    1. Advertising

  3. Mike P.

    Will McGugan Guest

    Peter Hansen wrote:
    > Mike P. wrote:
    >
    >> 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.


    I experience the same thing as Mike P. Im running on Windows 2K.

    Will McGugan
    Will McGugan, Feb 27, 2005
    #3
  4. 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
    > ...


    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
    Hans Georg Krauthaeuser, Feb 28, 2005
    #4
  5. Mike P.

    Steve Holden Guest

    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/
    Steve Holden, Feb 28, 2005
    #5
  6. Mike P.

    Peter Guest

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


    Peter Hansen wrote:
    > Mike P. wrote:
    > > 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
    Peter, Mar 4, 2005
    #6
  7. Peter wrote:
    > 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
    Hans Georg Krauthaeuser, Mar 4, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. carmel stanley

    interactive programme, using pyTTS

    carmel stanley, Jun 15, 2006, in forum: Python
    Replies:
    0
    Views:
    315
    carmel stanley
    Jun 15, 2006
  2. Replies:
    7
    Views:
    974
  3. masternige

    interactive program,pyTTS & Tk

    masternige, Sep 24, 2006, in forum: Python
    Replies:
    0
    Views:
    287
    masternige
    Sep 24, 2006
  4. Rob Williscroft

    interactive programe-pyTTS &Tk

    Rob Williscroft, Sep 24, 2006, in forum: Python
    Replies:
    1
    Views:
    323
    Nigel
    Sep 24, 2006
  5. simon kagwe

    Using pyTTS with other languages.

    simon kagwe, Jun 4, 2007, in forum: Python
    Replies:
    2
    Views:
    301
    simon kagwe
    Jun 4, 2007
Loading...

Share This Page