Things used in this project

Hardware components:
Slide projector
Get a used one on the flee market or thrift shop.
×1
R8326274 01
Raspberry Pi 2 Model B
×1
Relay 2 channel
×1
Usb microphone
×1
Software apps and online services:
10
Microsoft Windows 10 IoT Core
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)

Code

Speech recognition snippetC#
 if (recognizer == null)

{

recognizer = new SpeechRecognizer();

var languages = SpeechRecognizer.SupportedGrammarLanguages;

var SysSpeech = SpeechRecognizer.SystemSpeechLanguage;

}

string[] possibleAnswers = { "Light on", "Light off", "on", "off", "light", "dark", "bright", "next", "previous", "forward", "back", "slideshow", "stop" };

var listConstraint = new SpeechRecognitionListConstraint(possibleAnswers, "Answer");

recognizer.Constraints.Add(listConstraint);

listenText.Text = recognizer.CurrentLanguage.DisplayName;

await recognizer.CompileConstraintsAsync();

recognizer.ContinuousRecognitionSession.Completed += ContinuousRecognitionSession_Completed;

recognizer.ContinuousRecognitionSession.ResultGenerated += ContinuousRecognitionSession_ResultGenerated;

await recognizer.ContinuousRecognitionSession.StartAsync();
GPIO/relays controlling:C#
private async void ContinuousRecognitionSession_ResultGenerated(SpeechContinuousRecognitionSession sender, SpeechContinuousRecognitionResultGeneratedEventArgs args)
        {
            SpeechRecognitionResult tmpRes = args.Result;
            if (tmpRes != null && tmpRes.Status.Equals(SpeechRecognitionResultStatus.Success))
            {
// some less relevant code removed
                  listenText.Text = tmpRes.Text;
                  if (!slideshow)
                  {
                      if (listenText.Text.Equals("Light on") || listenText.Text.Equals("on") || listenText.Text.Equals("light") || listenText.Text.Equals("bright"))
                      {
                          lightPinValue = GpioPinValue.Low;
                          lightPin.Write(lightPinValue);
                          LED.Fill = redBrush;
                          lightOn = true;
                      }
Complete UWP Project code
For a quick and happy compile and deploy experience.

Credits

Wiwweihnsm
Wido Wirsam
1 project • 11 followers
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaBlog