Voice and Wi-Fi controlled Lamp II

Congratulations! As you have already made it work, we’re now ready to add a speech recognition to be able to turn on or off the lamp by saying the magic word.

Things you need

Speech Recognition service

To detect voice commands we’re going to use a great, built-in SpeechRecognition API.

First of all, set the Microphone device capability in the package.appxmanifest file to get access to the microphone’s audio feed.


Next, create a new class called SpeechRecognitionService.

Basically, all you need to do is start a new SpeechRecognizer, define its grammar (vocabulary), compile it and listen for commands in a loop.

How simple is that? 🙂


Next time, I really looking forward to implementing a peer-to-peer communication between the Raspberry Pi and Xamarin application.

Leave a Reply