I would like to know how to down microphone sensitivity with System.Speech in C#..
To explain myself, i have a grammar file, and my application should begin to record me when i say SIVRAJ (my program's name)
However, i can say something TOTALLY different, and my application will understand something 'SIVRAJ'...
There is a part from my XML file :
<rule id="mouskie" scope="public">
<item>
<one-of>
<item>SIVRAJ</item>
</one-of>
</item>
<ruleref special="GARBAGE" />
<one-of>
<item>
<one-of>
<item>quit</item>
</one-of>
<tag>$.mouskie={}; $.mouskie._value="QUIT";</tag> // quit programm when i say SIVRAJ + quit
</item>
..... etc etc
And this is the function which start Recognition Engine :
SrgsDocument xmlGrammar = new SrgsDocument("Grammaire.grxml");
Grammar grammar = new Grammar(xmlGrammar);
ASREngine = new SpeechRecognitionEngine();
ASREngine.SetInputToDefaultAudioDevice();
ASREngine.LoadGrammar(grammar);
ASREngine.SpeechRecognized += ASREngine_SpeechRecognized;
ASREngine.SpeechRecognitionRejected += ASREngine_SpeechRecognitionRejected;
ASREngine.SpeechHypothesized += ASREngine_SpeechHypothesized;
Finally, i recover data here :
recoText.Text = e.Result.Text;
devine.Text = "";
affiche.Text = "";
string baseCommand = e.Result.Semantics["mouskie"].Value.ToString();
commandText.Text = baseCommand;
if (baseCommand.Equals("QUIT"))
{
m_SpeechSynth.Speech("au revoir", VoiceGender.Male, VoiceAge.Adult);
Environment.Exit(0);
}