private async void Recognizer_StateChanged
            (SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
        {
            await _dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {
                var state = args.State;
                _state.Text = state.ToString();

                if (state == SpeechRecognizerState.SoundEnded)
                {
                    SplitText(_recognizedText.Text);
                }
            });
        }
 private async void onStateChanged(SpeechRecognizer rec, SpeechRecognizerStateChangedEventArgs args)
 {
     System.Diagnostics.Debug.WriteLine("in onStateChanged");
     await Dispatcher.InvokeAsync(() =>
     {
         if (args.State == SpeechRecognizerState.Paused)
         {
             System.Diagnostics.Debug.WriteLine("state was paused");
             InputSimulator.SimulateModifiedKeyStroke(VirtualKeyCode.LWIN, VirtualKeyCode.VK_S);
         }
     });
     
 }
Ejemplo n.º 3
0
 // Recognizer state changed
 private void RecognizerStateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     Debug.WriteLine("Speech recognizer state: " + args.State.ToString());
 }
Ejemplo n.º 4
0
 private async void SpeechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal,
         () =>
         {
             stat.Text = args.State.ToString();
         });
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Provides feedback to client code based on whether the recognizer is receiving speech input.
        /// </summary>
        /// <param name="sender">The recognizer that is currently running.</param>
        /// <param name="args">The current state of the recognizer.</param>
        private void SpeechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
        {
            StateChangedEventArgs e = new StateChangedEventArgs(args);

            OnStateChanged(e);
        }
Ejemplo n.º 6
0
 private async void SpeechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
     });
 }
Ejemplo n.º 7
0
 // Recognizer state changed
 private void RecognizerStateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     UpdateStatus("Speech recognizer state: " + args.State.ToString());
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Provides feedback to client code based on whether the recognizer is receiving speech input.
 /// </summary>
 void OnSpeechRecognizerStateChanged(SpeechRecognizer sender,
                                     SpeechRecognizerStateChangedEventArgs args)
 => OnStateChanged(new StateChangedEventArgs(args));
Ejemplo n.º 9
0
 /// <summary>
 /// Provide feedback to the user based on whether the recognizer is receiving their voice input.
 /// </summary>
 /// <param name="sender">The recognizer that is currently running.</param>
 /// <param name="args">The current state of the recognizer.</param>
 private void SpeechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     Debug.WriteLine($"SpeechRecognizer_StateChanged {args.State.ToString()}");
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Provide feedback to the user based on whether the recognizer is receiving their voice input.
 /// </summary>
 /// <param name="sender">The recognizer that is currently running.</param>
 /// <param name="args">The current state of the recognizer.</param>
 private void SpeechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     RecognizerStatusChanged?.Invoke(this, args);
 }
Ejemplo n.º 11
0
        private async void RecognizerStateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
        {
            Log.i("SR State: " + args.State.ToString());

            await EnsureOnUI(() => {
                ShowListeningInfo = args.State == SpeechRecognizerState.SpeechDetected;
            });
        }
Ejemplo n.º 12
0
 private void SpeechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     SetStatus("SpeechReg : " + args.State.ToStringInvariant());
 }
Ejemplo n.º 13
0
 private static void SpeechRecognizerStateChangedHandler(Windows.Media.SpeechRecognition.SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
 }
Ejemplo n.º 14
0
 // Recognizer state changed
 private void RecognizerStateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     UpdateStatus("Speech recognizer state: " + args.State.ToString());
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Provide feedback to the user based on whether the recognizer is receiving their voice input.
 /// </summary>
 /// <param name="sender">The recognizer that is currently running.</param>
 /// <param name="args">The current state of the recognizer.</param>
 private async void SpeechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {
         rootPage.NotifyUser(args.State.ToString(), NotifyType.StatusMessage);
         
         //If they stop talking we need to send the current text to the API
         if (args.State.ToString() == "SoundEnded")
         {
             var inputText = dictationTextBox.Text;
             if (inputText.Length > 1 ){
                 getTeddyResponse(inputText);
             }                    
         }
     });
 }
Ejemplo n.º 16
0
 private void Recognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     VoiceCommanderSpeechRecognizerStateChanged?.Invoke(this, args.State);
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Invoked when speech recognition state changes
 /// </summary>
 /// <param name="sender">The speech recognizer</param>
 /// <param name="args">The status arguments</param>
 private void RecognizerStateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     Debug.WriteLine(args.State);
 }
Ejemplo n.º 18
0
 private void SpeechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     Log.Verbose("StateChanged: " + args.State.ToString());
 }
Ejemplo n.º 19
0
 private void MyRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     // Write Debug Information
     Debug.WriteLine(args.State);
 }
Ejemplo n.º 20
0
        private void Recognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
        {
            if (args.State == SpeechRecognizerState.Idle || args.State == SpeechRecognizerState.SoundEnded)
            {
                _commandExecuting = false;
            }
            else
            {
                _commandExecuting = true;
            } 
            

        }
Ejemplo n.º 21
0
 private async void HandleStateChange(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     await Dispatcher.RunIdleAsync(_ => lastState.Text = args.State.ToString());
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Event fired when the state of speechrecognize object change for a simple speech recognition
 /// </summary>
 private void InstantRecognition_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     Messenger.Default.Send(new SpeechStateChangedMessage(args.State));
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Provide feedback to the user based on whether the recognizer is receiving their voice input.
 /// </summary>
 /// <param name="sender">The recognizer that is currently running.</param>
 /// <param name="args">The current state of the recognizer.</param>
 private async void SpeechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {
         this.NotifyUser(args.State.ToString(), NotifyType.StatusMessage);
     });
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Event if recognizer state changed.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="Windows.Media.SpeechRecognition.SpeechRecognizerStateChangedEventArgs" /> instance containing the event data.</param>
 private static async void RecognizerStateChanged(Windows.Media.SpeechRecognition.SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     Log(LogLevel.Debug, "Speech recognizer state: " + args.State);
     if (args.State == SpeechRecognizerState.Idle)
     {
         lastListenCylce = DateTime.Now;
         await Listen();
     }
 }
        private void Recognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
        {
            Debug.WriteLine("SpeechRecognizer_StateChanged " + args.State);

            switch (args.State)
            {
                case SpeechRecognizerState.Idle:
                    if (capturingWasStarted)
                    {
                        FireOnListeningStopped();
                        capturingWasStarted = false;
                    }

                    break;
                case SpeechRecognizerState.Capturing:
                    capturingWasStarted = true;
                    FireOnListeningStarted();
                    break;
                case SpeechRecognizerState.Processing:
                    if (capturingWasStarted)
                    {
                        FireOnListeningStopped();
                        capturingWasStarted = false;
                    }
                    break;
                case SpeechRecognizerState.SoundStarted:
                    break;
                case SpeechRecognizerState.SoundEnded:
                    break;
                case SpeechRecognizerState.SpeechDetected:
                    break;
                case SpeechRecognizerState.Paused:
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }
        }
 /// <summary>
 /// Provide feedback to the user based on whether the recognizer is receiving their voice input.
 /// </summary>
 /// <param name="sender">The recognizer that is currently running.</param>
 /// <param name="args">The current state of the recognizer.</param>
 private void SpeechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     Debug.WriteLine($"VoiceCommand: Status changed {args.State}");
 }
Ejemplo n.º 27
0
 // Recognizer state changed
 private void RecognizerStateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     Debug.WriteLine("Speech recognizer state: " + args.State.ToString());
 }
Ejemplo n.º 28
0
 private void speechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     SpeechRecognizerState = args.State;
 }
 private async void SpeechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {
         System.Diagnostics.Debug.WriteLine(args.State.ToString());
     });
 }
Ejemplo n.º 30
0
 /// <summary>
 /// Invoked when speech recognition state changes
 /// </summary>
 /// <param name="sender">The speech recognizer</param>
 /// <param name="args">The status arguments</param>
 private void RecognizerStateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     Debug.WriteLine(args.State);
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Handle SpeechRecognizer state changed events by updating a UI component.
 /// </summary>
 /// <param name="sender">Speech recognizer that generated this status event</param>
 /// <param name="args">The recognizer's status</param>
 private async void SpeechRecognizer_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
         MainPage.Current.NotifyUser("Speech recognizer state: " + args.State.ToString(), NotifyType.StatusMessage);
     });
 }
Ejemplo n.º 32
0
 private void spcLissener_StateChanged(SpeechRecognizer sender, SpeechRecognizerStateChangedEventArgs args)
 {
     RenderStatus(args.State.ToString());
 }