Programming BBC micro:bit Systems Using C# by Yury Magda & Yury Magda

Programming BBC micro:bit Systems Using C# by Yury Magda & Yury Magda

Author:Yury Magda & Yury Magda [Magda, Yury]
Language: eng
Format: azw3
Published: 2017-09-16T04:00:00+00:00


sre.SpeechRecognized += Sre_SpeechRecognized;

Now, that we have the recognizer initialized by determining the input set, loading a grammar and assigning a handler for the SpeechRecognized event, we are ready to start speech recognition. This can be done either as a synchronous operation using the Recognize() method, or as an asynchronous operation using one of the RecognizeAsync() methods.

In our case, we use RecognizeAsync() by invoking the method

sre.RecognizeAsync(RecognizeMode.Multiple);

To transfer the command string to the BBC micro:bit, we use the serial interface (COM5, in our case). When the speech is recognized as a command, the corresponding text string is transferred via UART. The following sequence within the Sre_SpeechRecognized() event handler accomplishes that:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.