मैं चाहूँगा पता है कि कैसे सी # में System.Speech के साथ नीचे माइक्रोफोन संवेदनशीलता ..System.Speech नीचे माइक्रोफोन संवेदनशीलता
अपने आप की व्याख्या करने के लिए, मैं एक व्याकरण फ़ाइल है, और अपने आवेदन जब मुझे रिकॉर्ड करने के लिए शुरू करना चाहिए मैं SIVRAJ (मेरे कार्यक्रम का नाम) का कहना है कि
हालांकि, मैं कुछ पूरी तरह से अलग कह सकते हैं, और अपने आवेदन कुछ 'SIVRAJ' समझ जाएगा ...
मेरी एक्सएमएल फ़ाइल से एक हिस्सा है:
<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
और इस समारोह जो मान्यता इंजन शुरू होता है:
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;
अंत में, मैं डेटा यहाँ की वसूली:
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);
}