473,326 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

SAPI and Python

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
device.

My first notion of an idea on how to accomplish this came from the
following code at http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/SAPI51sr/html/VB_ISpeechRecognizer_AudioInput.asp

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
0 1104

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

Similar topics

0
by: AndyNY | last post by:
I am trying to write a dll in C# using SAPI 5.1 SDK. The DLL is supposed to take in a prerecorded WAV file and provide both the recognized text and a wav file created from Text to speech on the...
0
by: Bob | last post by:
I have a C# windows application that uses SAPI 5.1 speech recognition. I would like to use dynamic grammars but am having trouble finding the right command syntax and method parameters to use for...
2
by: Winston Wong | last post by:
Dear All, I am using MFC and SAPI 5.1. I want to get the pronunciation of a word. For example, give L"thank" and then get its pronunciation. Which function/class should I use? Many thanks!...
1
by: New Devil | last post by:
hi how can i use SAPI with TAPI in C# ... give me any idea how to make a simple program to use SAPI with TAPI in C# ........... Best Regards ibrahim@islamabad.net Ibrahim Zaman Posted Via...
0
by: celine langlois | last post by:
Hello, This my code in asp : <% set spvoice = server.createobject("SAPI.SpVoice") set spfilestream = server.createobject("SAPI.SpFileStream") rem spfilestream .Format.Type = 6
0
by: matetelki | last post by:
Hi! As I've found tons of VB and C# sample codes, I was trying to transform it into PHP code, using the COM objects. My aim is to create a simple html, that creates a wav from a text. Here's...
1
by: ma | last post by:
Hello, I download SAPI 5.1 and open coffes0 project and tried to compile it using MSVC2005. I am getting the following error which I don't know to solve. Would you please help me? Is there...
1
by: Peter Oliphant | last post by:
Sorry to bother everyone, but where do I go to discuss SAPI (speech recognition) software? Thanx!
1
by: weheh | last post by:
I'm running Python 2.3 and calling pyTTS. I've had it working forever. Today, I ran out of disk space. After deleting some of my personal files, for no apparent reason, pyTTS no longer runs. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.