Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Video URL: https://www.youtube.com/watch?v=ktmMDZ5dcs4
- So sollte euer FormLoad() aussehen:
- private void Form1_Load(object sender, EventArgs e)
- {
- lbl_time.Text = DateTime.Now.ToShortTimeString();
- lbl_date.Text = DateTime.Now.ToLongDateString();
- tab_control.SelectTab(tab_text);
- Choices commands = new Choices();
- string path = Directory.GetCurrentDirectory() + "\\commands.txt";
- commands.Add(File.ReadAllLines(path));
- GrammarBuilder gbuilder = new GrammarBuilder();
- gbuilder.Append(commands);
- Grammar grammar = new Grammar(gbuilder);
- DictationGrammar dgrammar = new DictationGrammar();
- h.LoadGrammarAsync(dgrammar);
- h.SetInputToDefaultAudioDevice();
- h.SpeechRecognized += recEngine_SpeechRecognized;
- h.RecognizeAsync(RecognizeMode.Multiple);
- s.SelectVoiceByHints(VoiceGender.Female,VoiceAge.Adult);
- s.SpeakAsync("Wie kann ich dir helfen");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement