O'Reilly logo

Microsoft HoloLens Developer’s Guide by Dennis Vroegop

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The VoiceRecognizer class

As usual, begin a new Holographic project in Visual Studio. I called mine SpeechRecognitionSample. We will begin our VoiceRecognizer class with some standard code and place it next to the SpinningCubeRenderer in the Content folder and namespace. This is what it looks like:

 using System; using System.Collections.Generic; using System.Threading.Tasks; using Windows.Media.SpeechRecognition; namespace SpeechRecognitionSample.Content { internal class VoiceRecognizer : IDisposable { private readonly Dictionary<string, Action> _actions = new Dictionary<string, Action>(); private SpeechRecognizer _speechRecognizer; public void Dispose() { GC.SuppressFinalize(this); Dispose(true); } protected void Dispose(bool isDisposing) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required