473,588 Members | 2,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

where is Microsoft Speech Object Library 5.1 option in PythonWin 2.5?

Hi all,

newbie question:
I'd like to try speech synthesis with PythonWin 2.5.

Problem
******
according to several instructions, such as found on
http://surguy.net/articles/speechrecognition.xml
and in a book on Python,

I have to select Tools | COM MakePy Utility | Microsoft Speech Object
Library 5.1, SDK 5.1, that is.

However, in my Python 2.5/PythonWin 2.5 installation I find as only option
"Microsoft Speech Object Library 5.0" to select.

Unfortunately, 5.1 is the lowest SDK version I found on
http://www.microsoft.com/downloads/d...kInfoContainer

Will this PythonWin's Tools | COM MakePy Utility for 5.0 work with SDK 5.1?

Or will PythonWin's Tools | COM MakePy Utility be updated to SDK 5.1, once
I have SDK 5.1 installed?

Thanks,

Siggi






Jan 5 '07 #1
4 4366
At Friday 5/1/2007 11:24, siggi wrote:
>However, in my Python 2.5/PythonWin 2.5 installation I find as only option
"Microsoft Speech Object Library 5.0" to select.
This list shows all the COM objects currently registered in Windows,
does not depend on Pythonwin.
>Unfortunatel y, 5.1 is the lowest SDK version I found on
http://www.microsoft.com/downloads/d...kInfoContainer
After you download and install version 5.1, it should appear on the list.
--
Gabriel Genellina
Softlab SRL


_______________ _______________ _______________ _____
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas

Jan 5 '07 #2
Gabriel Genellina wrote:
After you download and install version 5.1, it should appear on the list.
It should, but it does not! Shutting down and starting the WinXP Home system
anew did not help.
The SDK 5.1 installation went smoothly, however. What can I do to find out
what is wrong?

siggi

"Gabriel Genellina" <ga******@yahoo .com.arschrieb im Newsbeitrag
news:ma******** *************** *************** *@python.org...
At Friday 5/1/2007 11:24, siggi wrote:
>>However, in my Python 2.5/PythonWin 2.5 installation I find as only option
"Microsoft Speech Object Library 5.0" to select.

This list shows all the COM objects currently registered in Windows, does
not depend on Pythonwin.
>>Unfortunately , 5.1 is the lowest SDK version I found on
http://www.microsoft.com/downloads/d...kInfoContainer

After you download and install version 5.1, it should appear on the list.
--
Gabriel Genellina
Softlab SRL

_______________ _______________ _______________ _____ Preguntá. Respondé.
Descubrí. Todo lo que querías saber, y lo que ni imaginabas, está en
Yahoo! Respuestas (Beta). ¡Probalo ya! http://www.yahoo.com.ar/respuestas


Jan 5 '07 #3
Siggi kirjoitti:
Gabriel Genellina wrote:
>After you download and install version 5.1, it should appear on the list.

It should, but it does not! Shutting down and starting the WinXP Home system
anew did not help.
The SDK 5.1 installation went smoothly, however. What can I do to find out
what is wrong?

siggi

(Sorry for the long post!)
Unfortunately I can't comment on this 5.0/5.1 issue but if you look at page
http://www.cs.unc.edu/~parente/tech/tr02.shtml
you'll find the pyTTS system. I've used it and everything works.

The funny thing is that the page has a link named "Microsoft SAPI 5.1
redistributable " which links to
http://www.cs.unc.edu/Research/assis...hInstaller.msi
ie. a SAPI 5 installer. So I'm starting to wonder if it matters at all
whether the speech kit is a version 5 or 5.1.

Anyway: pyTTS works with Python 2.4 as advertized in the accompanying
examples. I've used it to resolve the following dilemma: how to
guarantee that I'm aware of new mail appearing on my ISP.

I had an unfortunate experience where a guy I was working with sent me
(to my home) mail that I didn't expect to receive just at the moment and
to which I would have liked to react immediately. Why I didn't notice
the mail coming: I was outside my house pumping more air to my wife's
bicycle tires! The mail notification was shown and erased and one more
icon among the more than dozen icons on my Windows System Tray didn't
account for much.

So I figured out that a voice to remind me would be nice. I have a low
rate inbox, usually only a maximum of hald a dozen messages per day so I
wouldn't have to listen the voice all day long. So the voice keeps
repeating that I have new mail at my ISP until I download the mail and
otherwise keeps quiet. So here is my program and a skeleton of the INI
file it uses. The program is not finished (I have a few ideas still) but
it runs all day long on my computer keeping me happy.

=============== ===========
New Email Notifier.py
=============== ===========
#!/usr/bin/python

'''
License: MIT License. See License.txt. If that file is not attached,
the license is http://www.opensource.org/licenses/mit-license.php,
where
<year= 2006 and <copyright holders= Jussi Salmela, Turku, Finland
'''

# This program checks for new email at ISP and notifies if new email is
found

import win32serviceuti l
import win32service
import win32event
import pyTTS, sys, os, poplib, logging, time
import ConfigParser,py wintypes

print '\nThis is the New Mail Notifier window\n'
notifierDirecto ry = r'C:\Python\OMA T___PROJEKTIT\N ew Email Notifier Service'
logging.basicCo nfig(level=logg ing.DEBUG,
format='%(ascti me)s %(levelname)-8s %(message)s',
filename=notifi erDirectory+r'\ error.log')
logging.info('= =============== =============== =============== ===========')
logging.info('N ew Email Notifier Service started')
config = ConfigParser.Co nfigParser()
config.readfp(o pen(notifierDir ectory+r'\New Email Notifier.INI'))
POP3Server = config.get('POP 3','server')
POP3Account = config.get('POP 3','account')
POP3Password = config.get('POP 3','password')
totalMessagesFo rmat = config.get('mes sages','total_m essage')
newMessagesForm at = config.get('mes sages','new_mes sage')
wakeupMessageFo rmat = config.get('mes sages','wakeup_ message')

tts = pyTTS.Create()
#set the speech volume percentage (0-100%)
tts.Volume = 100
#explicitly set a voice
tts.SetVoiceByN ame(u'MSMary')

uidDict = {}
# We wait to be stopped and check for new email every maxTimeToWait seconds
maxTimeToWait = 1 # First check after 1 second
while True:
time.sleep(maxT imeToWait)
maxTimeToWait = 60 # Rest of the checks after 60 second
try:
# Connect to the ISP
a = poplib.POP3(POP 3Server,110)
answer = a.getwelcome()
if answer[0:3] != '+OK':
raise ValueError,'a.g etwelcome returned: ' + answer
answer = a.user(POP3Acco unt)
if answer[0:3] != '+OK':
raise ValueError,'a.u ser returned: ' + answer
if answer[4:] == 'Password required':
answer = a.pass_(POP3Pas sword)
if answer[0:3] != '+OK':
raise ValueError,'a.p ass_ returned: ' + answer
answer = a.uidl()
if answer[0][0:3] != '+OK':
raise ValueError,'a.u idl returned: ' + repr(answer)
a.quit()
# Connection closed. Start handling the unique message identifiers
#logging.info(' Connection succesfully opened, used and closed!')
print 'answer', answer, time.asctime()
uidList = [e.split()[1] for e in answer[1]]
print 'uidList', uidList
totalMessages = len(uidList)
uidDictNew = {}
for e in uidList: uidDictNew[e] = True
uidList = [e for e in uidList if e not in uidDict]
uidDict = uidDictNew
if totalMessages:
tts.Speak(total MessagesFormat % totalMessages)
newMessages = len(uidList)
if newMessages:
tts.Speak(newMe ssagesFormat % newMessages)
except Exception,inst:
errorMsg = 'Unexpected error: %s' % sys.exc_info()[0]
logging.error(e rrorMsg)
logging.error(i nst)
try:
tts.Speak(wakeu pMessageFormat)
tts.Speak('I repeat: ' + wakeupMessageFo rmat)
tts.Speak(error Msg)
tts.Speak(inst)
except pywintypes.com_ error,inst:
errorMsg = 'Unexpected error: %s' % sys.exc_info()[0]
logging.error(e rrorMsg)
logging.error(i nst)

=============== ===========
New Email Notifier.INI
=============== ===========
[POP3]
server: myPOPserver
account: myAcoount
password: myPassword
[messages]
total_message: Your eemail server has. a total of %d messages. for you
to download
new_message: The number of new messages. since the last check. is %d
wakeup_message: Wake up, Youssi! This is your new eemail notifier,
reporting the following error!

HTH,
Jussi
Jan 5 '07 #4
Thanks, Jussi, for your post, but I found that PythonWin's SDK5.0 option
works well with MS SDk5.1.
Just had an Email read for me using a small Python program: correct English,
even the date such as 12/06/06 was correctly transformed into the names of
the month and year. Python is great1

Siggi
"Jussi Salmela" <ti*********@ho tmail.comschrie b im Newsbeitrag
news:0K******** ******@read3.in et.fi...
Siggi kirjoitti:
>Gabriel Genellina wrote:
>>After you download and install version 5.1, it should appear on the
list.

It should, but it does not! Shutting down and starting the WinXP Home
system anew did not help.
The SDK 5.1 installation went smoothly, however. What can I do to find
out
what is wrong?

siggi


(Sorry for the long post!)
Unfortunately I can't comment on this 5.0/5.1 issue but if you look at
page
http://www.cs.unc.edu/~parente/tech/tr02.shtml
you'll find the pyTTS system. I've used it and everything works.

The funny thing is that the page has a link named "Microsoft SAPI 5.1
redistributable " which links to
http://www.cs.unc.edu/Research/assis...hInstaller.msi
ie. a SAPI 5 installer. So I'm starting to wonder if it matters at all
whether the speech kit is a version 5 or 5.1.

Anyway: pyTTS works with Python 2.4 as advertized in the accompanying
examples. I've used it to resolve the following dilemma: how to guarantee
that I'm aware of new mail appearing on my ISP.

I had an unfortunate experience where a guy I was working with sent me (to
my home) mail that I didn't expect to receive just at the moment and to
which I would have liked to react immediately. Why I didn't notice the
mail coming: I was outside my house pumping more air to my wife's bicycle
tires! The mail notification was shown and erased and one more icon among
the more than dozen icons on my Windows System Tray didn't account for
much.

So I figured out that a voice to remind me would be nice. I have a low
rate inbox, usually only a maximum of hald a dozen messages per day so I
wouldn't have to listen the voice all day long. So the voice keeps
repeating that I have new mail at my ISP until I download the mail and
otherwise keeps quiet. So here is my program and a skeleton of the INI
file it uses. The program is not finished (I have a few ideas still) but
it runs all day long on my computer keeping me happy.

=============== ===========
New Email Notifier.py
=============== ===========
#!/usr/bin/python

'''
License: MIT License. See License.txt. If that file is not attached,
the license is http://www.opensource.org/licenses/mit-license.php,
where
<year= 2006 and <copyright holders= Jussi Salmela, Turku, Finland
'''

# This program checks for new email at ISP and notifies if new email is
found

import win32serviceuti l
import win32service
import win32event
import pyTTS, sys, os, poplib, logging, time
import ConfigParser,py wintypes

print '\nThis is the New Mail Notifier window\n'
notifierDirecto ry = r'C:\Python\OMA T___PROJEKTIT\N ew Email Notifier
Service'
logging.basicCo nfig(level=logg ing.DEBUG,
format='%(ascti me)s %(levelname)-8s %(message)s',
filename=notifi erDirectory+r'\ error.log')
logging.info('= =============== =============== =============== ===========')
logging.info('N ew Email Notifier Service started')
config = ConfigParser.Co nfigParser()
config.readfp(o pen(notifierDir ectory+r'\New Email Notifier.INI'))
POP3Server = config.get('POP 3','server')
POP3Account = config.get('POP 3','account')
POP3Password = config.get('POP 3','password')
totalMessagesFo rmat = config.get('mes sages','total_m essage')
newMessagesForm at = config.get('mes sages','new_mes sage')
wakeupMessageFo rmat = config.get('mes sages','wakeup_ message')

tts = pyTTS.Create()
#set the speech volume percentage (0-100%)
tts.Volume = 100
#explicitly set a voice
tts.SetVoiceByN ame(u'MSMary')

uidDict = {}
# We wait to be stopped and check for new email every maxTimeToWait
seconds
maxTimeToWait = 1 # First check after 1 second
while True:
time.sleep(maxT imeToWait)
maxTimeToWait = 60 # Rest of the checks after 60 second
try:
# Connect to the ISP
a = poplib.POP3(POP 3Server,110)
answer = a.getwelcome()
if answer[0:3] != '+OK':
raise ValueError,'a.g etwelcome returned: ' + answer
answer = a.user(POP3Acco unt)
if answer[0:3] != '+OK':
raise ValueError,'a.u ser returned: ' + answer
if answer[4:] == 'Password required':
answer = a.pass_(POP3Pas sword)
if answer[0:3] != '+OK':
raise ValueError,'a.p ass_ returned: ' + answer
answer = a.uidl()
if answer[0][0:3] != '+OK':
raise ValueError,'a.u idl returned: ' + repr(answer)
a.quit()
# Connection closed. Start handling the unique message identifiers
#logging.info(' Connection succesfully opened, used and closed!')
print 'answer', answer, time.asctime()
uidList = [e.split()[1] for e in answer[1]]
print 'uidList', uidList
totalMessages = len(uidList)
uidDictNew = {}
for e in uidList: uidDictNew[e] = True
uidList = [e for e in uidList if e not in uidDict]
uidDict = uidDictNew
if totalMessages:
tts.Speak(total MessagesFormat % totalMessages)
newMessages = len(uidList)
if newMessages:
tts.Speak(newMe ssagesFormat % newMessages)
except Exception,inst:
errorMsg = 'Unexpected error: %s' % sys.exc_info()[0]
logging.error(e rrorMsg)
logging.error(i nst)
try:
tts.Speak(wakeu pMessageFormat)
tts.Speak('I repeat: ' + wakeupMessageFo rmat)
tts.Speak(error Msg)
tts.Speak(inst)
except pywintypes.com_ error,inst:
errorMsg = 'Unexpected error: %s' % sys.exc_info()[0]
logging.error(e rrorMsg)
logging.error(i nst)

=============== ===========
New Email Notifier.INI
=============== ===========
[POP3]
server: myPOPserver
account: myAcoount
password: myPassword
[messages]
total_message: Your eemail server has. a total of %d messages. for you to
download
new_message: The number of new messages. since the last check. is %d
wakeup_message: Wake up, Youssi! This is your new eemail notifier,
reporting the following error!

HTH,
Jussi

Jan 6 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1343
by: Adrian Smith | last post by:
Hi, When doing a MakePy in Pythonwin of Microsoft Word 2000 there are a lot of functions that are missing from the type Library. If you look in the VB Script Editor from Word, you get a long list of functions including say 'Word.Cell' or even a 'Word.Table' but these do not appear in The COM explorer of Pythonwin if you try to use them they do not exist. Others do exist like 'Word.Selection' There are also a large number of lines in the...
16
7524
by: ShadowOfTheBeast | last post by:
Hi all, is there any one who have developed an application in c# using a text-speech engine using the Microsoft Speech SDK 5.1 especially using visual studio.net IDE 2003 (v7.1) I seem to get an inter-op compiling error and cant seem to resolve it! help! -- The Matrix Insurrection
0
1427
by: Sateesh Kumar E C | last post by:
Dear all, I have developed a speech web application using Speech SDK(SASDK) with VisualStudio.NET on Win2003 environment. Users can access this speech web application by using SALT enabled browser i.e. the browser must have installed with Speech plug-in. some of the users access this speech web application without having the Speech plug-in installed in their system. In that case I have to give the option to the user to run the setup...
17
4801
by: MLH | last post by:
From time to time, I find myself cross checking one block of code against another. Usually older stuff in which I've made modifications that don't work. I don't remember what all the changes were so I have to print an earlier version and compare it against a printout of a more recent version. I am dyslexic and it is helpful to have someone read one copy while I follow along on another copy until we hit a discrepancy. Could I somehow...
2
3019
by: psbasha | last post by:
Hi , We have a break point option in PythonWin IDE.Is it possible to use this break point option in debugging the code at that location?. Still I am not comfortable in using the PythonWin IDE. When to use IDLE - Python GUI and PythonWin IDE ?. Whether the same Python file can be used in both the editors for execution.
1
2343
by: Dave Lim | last post by:
>On May 3, 1:29 pm, Dave Lim <diband... at yahoo.com> wrote: site:http://surguy.net/articles/speechrecognition.xml used out tried ? to protection aroundhttp://mail.yahoo.com I went and
1
5392
by: Hakan Fatih YILDIRIM | last post by:
Hi List! i am making a project and i want the text in speech mode so idownload a .net speech library from code project.But i have to make the speech in Turkish accent.How can i change the speech accent? this library is for English..
0
2007
by: Kevin S Gallagher | last post by:
When building a project using the Speech library version 5. I am getting tons of warnings similar to the two below using option strict and implicit on. The application runs fine otherwise. Any thoughts why all of the sudden this might be happening. Thanks for any ideas on what might be going on. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets : warning : At least one of the arguments for...
0
7929
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7862
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6634
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3887
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1459
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1196
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.