By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,621 Members | 1,101 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,621 IT Pros & Developers. It's quick & easy.

SAPI and Python

P: n/a
Ok - I've done a lot of searching with google for info on
what I'm about to ask, and haven't found enough to accomplish
what I'm after - so if anyone has the answers (or even
just ideas on how to proceed) I'd love the help.

I'm fairly new to Python, but not to OO programming. I've
written a simple wx application that uses an SpSharedRecognizer
for voice recognition, and currently sendKeys to send control
applications. The basic ideas came from Inigo Surguy's
web page describing voice recognition in Python.

The problems:

1. The application is specifically tailored to World of Warcraft,
and it will not be useful to the folks who might otherwise use it
if I can't share the audio in with Teamspeak and/or Ventrillo. I
currently have Push-to-Talk implemented by clearing the wordsrule
when it's not listening and setting it when it is. That, as far
as I can tell, will not allow another app to grab the audio in

My first notion of an idea on how to accomplish this came from the
following code at

It looks there like they are releasing the audio-in. However, setting
the AudioInput property to None in Python results in an exceptions with
a type mismatch.

Question: Do you think clearing the AudioInput property will actually
release the audio-in? And, what is the correct way to do it in Python?

2. sendKeys works - but it has the problem of causing McAfee to perk
up and raise a warning on the python interpreter. I can tell it to allow
the script to run, but it only works until the next time I close and
restart the application.

Question: Is sendEvent a better way to do this? And is there a nice
web site with sample python code about it?

Thanks from a python newbie for any insights you folks have.

Oct 16 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.