Alec Bennett wrote: > I'm trying to save the output of some TTS to a sound file, is this possible? > > Here's how I'm doing the TTS, though am certainly open to other methods: > > import pythoncom, win32com > import win32api, win32com.client > pythoncom.CoInitialize () > > s = win32com.client.Dispatch("SAPI.SpVoice") > s.Speak("hi there")
You definitely want the pyTTS module [1][2] for this -- which wraps the SAPI stuff at C level. <code> import pyTTS speaker = pyTTS.Create () speaker.SpeakToWave ("c:/temp/hello.wav", "hello") </code> TJG [1] http://www.cs.unc.edu/Research/assist/doc/pytts/ [2] http://sourceforge.net/project/showfiles.php?group_id=65529&package_id=74248 _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32