Dispatching a Win32 COM in the background?

Steven M. Castellotti SteveC at nospam.innocent.com
Wed Jun 19 17:48:36 EDT 2002


Hey all-

	I'm running a Python application under windows, and I want to make use
of the Microsoft Speech API to sythesize Text-To-Speech output, without
halting the execution of my program.

I'm making my calls like this:

(intialization)

from win32com.client import constants
import win32com.client
self.speech = win32com.client.Dispatch("SAPI.SpVoice")



(during execution)

self.speech.Speak(text)


	I'm not very familiar with win32com calls, but I'm wondering if there's
an easy to to either:

1) Make the call such that the process occurs in the background, and
application execution continues to flow

2) Make the call inside a thread which produces the same effect.


	Can anyone please offer me some tips/sample code to achieve this?


Thanks in advance.


Cheers,

Steve Castellotti
SteveC (at) innocent.com
http://cogengine.sourceforge.net/



More information about the Python-list mailing list