pyTTS com_error

D

Dick

I am trying to get the pyTTS module working. I have Python 2.4, the
Microsodt SAPI and pyTTS-3.0.win32-py2.4.exe installed.

When I run this script:

import pyTTS
tts = pyTTS.Create()

#set the speech rate
tts.Rate = 4

#set the speech volume percentage (0-100%)
tts.Volume = 40

#get a list of all the available voice actors
print tts.GetVoiceNames()

#explicitly set a voice
tts.SetVoiceByName('MSMary')

#speak the text
tts.Speak('This is the sound of my voice.')

I get this result
[u'MSMary', u'MSMike', u'MS-Anna-1033-20-DSK']

Traceback (most recent call last):
File "C:/Python24/spelling/testspeech", line 17, in -toplevel-
tts.Speak('This is the sound of my voice.')
File "C:\Python24\Lib\site-packages\pyTTS\sapi.py", line 213, in
Speak
self.speech.Speak(text, flagsum)
File "C:\Python24\lib\site-packages\win32com\gen_py
\C866CA3A-32F7-11D2-9602-00C04F8EE628x0x5x3.py", line 2831, in Speak
, Flags)
com_error: (-2147352567, 'Exception occurred.', (0, None, None, None,
0, -2147221164), None)
I am a brand-newby, and any help will be greatly appreciated.

Thanks
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top