<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.2800.1561" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV style="BACKGROUND: #e4e4e4; font-color: black"><B></B> </DIV>
<DIV style="BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A
title=cappy2112@gmail.com href="mailto:cappy2112@gmail.com">Tony Cappellini</A>
</DIV>Message: 1<BR>Date: Thu, 26 Jun 2008 08:01:21 -0400<BR>From: "FT" <<A
href="mailto:chester_lab@fltg.net">chester_lab@fltg.net</A>><BR>Subject:
[python-win32] How Do You Make Your Speech or SAPI 5 Voices<BR>
Portable?<BR>To: <<A
href="mailto:python-win32@python.org">python-win32@python.org</A>><BR>
<DIV class="ArwC7c ckChnd" id=1fer><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial
size=2></FONT><BR>This doesn't address your portability issue, but is provided
as an FYI.<BR>Peter Parente already has a nice Python wrapper from the Microsoft
Speech API- PyTTS<BR><A
href="http://sourceforge.net/project/showfiles.php?group_id=65529&package_id=74248">http://sourceforge.net/project/showfiles.php?group_id=65529&package_id=74248</A><BR></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2>Hi Tony,</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> Thanks,
but I had used that first. My methods are simple, and essentially identical, but
I added the pitch method, for he did not include it. Do not know why, did not
ask him, but I am using the SAPI 5 and do a check to see if it is loaded onto
the machine. Yet doing that check I do not do anything if the False comes back.
</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> I have not
added other methods to it, at least not in my test samples. </FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> But, the
question of most importance is how to have my py2exe also include the wrapper
for installing a speech engine if none exist on the destination computer. Which
would mean as tim had mentioned, have it pop up an install, which would mean
have them go to a link, or have the install in the data folder or as is and run
the install. But that means porting in up to 35 megs or more to run the SAPI 5.
</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> But having
said that from XP on in windows machines the SAPI 5 is installed, but is Vista
compatible? For I have heard so many nightmarish stories about Vista, there is
no guarantee.</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> Anyway, in
response to your suggestion, I have pyTTS on my machine, studied there methods,
took a look at what the SAPI has and decided to write my own, learn it, and
expand on it. To allow a simple speech method for anyone to use. It is not
written in C and relies only on SAPI 5 engine methods, along with XML
commands.</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> In other
words a simple speech to plug into anyones program/game.</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> So, the
engine part may not be an issue except for older machines, I am interested in
porting voices only. The eSpeak install is a small install, as is the extra SAPI
5 voices, Mike and Mary are.</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> I do no
that the NVDA project exists, but when asking them how they do it I was told to
learn it on my own.</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> In the
NVDA project it appears they install up to 4 voice engines, including eSpeak and
SAPI, and was wondering how they did it.</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> Anyway, I
will just keep on asking until I stumble onto the way by accident. Which is what
I did when searching for the stream file to use for the save and read of .wav
files. It took over 30 searches to find it. I had to just get the search parms
exact before finding the needed format for the file stream in
comtypes.</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> Now that I
found out how that is installed, now I may have found the one Microsoft variable
that eluded me when looking at there sapi help. Which means I might be able to
write all the commands inside the com types, but have not bothered to
yet.</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> The pyTTS
does not allow you to use a simple name for voices, but eSpeak is as long as
Microsoft. But I list the voices in my test sapi file. And when using them I
search for the space in the name and default to -1 if not found, but in both
cases add one to start at the proper position.</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2> Time to
get moving on, this response is getting too long.</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2></FONT> </DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial size=2>
Bruce</FONT></DIV>
<DIV class="ArwC7c ckChnd"><FONT face=Arial
size=2></FONT> </DIV></BODY></HTML>