Example #1
0
        private async Task InitSpeechAsync()
        {
            // Create
            speechManager = new SpeechManager();

            // Subscribe to events
            speechManager.ResultRecognized += SpeechManager_ResultRecognized;

            // Initialize
            await speechManager.InitializeAsync(system);
        }
Example #2
0
 private void SpeechManager_ResultRecognized(SpeechManager sender, CelestialSpeechResult args)
 {
     // If one or more bodies were recognized, select them.
     if (args.Bodies != null)
     {
         // Must be set on UI thread
         DispatcherHelper.CheckBeginInvokeOnUI(() =>
         {
             SelectedBodies = new ObservableCollection<CelestialBody>(args.Bodies);
         });
     }
 }