Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hi there

I'm trying to use SpeechLib with my project to respond to specific commands within my program using speech recognition.

Every time I initialize the speech recognition section of the code, it starts the Windows 7 Speech Recognition which then tries to listen to everything I say, including stupid commands like minimize the program or exit application.

Is there a way that I can force it to only listen to a set of commands that I specify?

Currently I am using
menuRule.InitialState.AddWordTransition(null, "command here", " ", SpeechGrammarWordType.SGLexical, "command here", 1, ref PropValue, 1.0F)


to add commands, then
MIDL
grammar.Rules.Commit();
grammar.CmdSetRuleState("MenuCommands", SpeechRuleState.SGDSActive);

to finalize them

Any help would be most appreciated! Thanks!
Posted
Updated 27-May-10 13:48pm
v2
Comments
Charithmax 31-May-10 23:25pm    
Hey,

I'm having the same problem in windows 7.
I'm too looking for an answer.

Thanks.

1 solution

You could use the listbox-example of the [MS Windows SDK for Win 7]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900