Пример #1
0
 /// <summary>
 /// Called when the microphone status has changed.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="MicrophoneEventArgs"/> instance containing the event data.</param>
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     if (e.Recording)
     {
         Query = ("Please start speaking.");
     }
 }
Пример #2
0
 public static void onMicrophoneStatusHandler(object sender, MicrophoneEventArgs e)
 {
     if (!e.Recording)
     {
         ((MicrophoneRecognitionClient)sender).StartMicAndRecognition();
     }
 }
Пример #3
0
        /// <summary>
        /// Called when the microphone status has changed.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="MicrophoneEventArgs"/> instance containing the event data.</param>
        private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
        {
            Dispatcher.Invoke(() =>
            {
                /*
                 * WriteLine($"--- Microphone status change received by OnMicrophoneStatus() --- {sw.ElapsedMilliseconds}");
                 * WriteLine("********* Microphone status: {0} *********", e.Recording);
                 * if (e.Recording)
                 * {
                 *  WriteLine("Please start speaking.");
                 * }
                 *
                 * WriteLine();
                 */

                if (e.Recording)
                {
                    this.RecordingOn();
                }
                else
                {
                    this.RecordingOff();
                }
            });
        }
Пример #4
0
 /// <summary>
 /// Called when the microphone status has changed.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="MicrophoneEventArgs"/> instance containing the event data.</param>
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     Dispatcher.Invoke(() =>
     {
         WriteLine();
     });
 }
Пример #5
0
 /// <summary>
 /// Called when the microphone status has changed.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="MicrophoneEventArgs"/> instance containing the event data.</param>
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     Dispatcher.Invoke(() =>
     {
         if (e.Recording)
         {
         }
     });
 }
        // ----------------------------------------------------------------------------------------------------------------------------------------

        private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
        {
            Console.WriteLine("--- Microphone status change received by OnMicrophoneStatus() ---");
            Console.WriteLine("********* Microphone status: {0} *********", e.Recording);
            if (e.Recording)
            {
                Console.WriteLine("Please start speaking.");
            }
        }
Пример #7
0
 /// <summary>
 ///     Called when the microphone status has changed.
 /// </summary>
 void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     Console.WriteLine("********* Microphone status: {0} *********", e.Recording);
     if (!e.Recording)
     {
         m_micClient.EndMicAndRecognition();
     }
     Console.WriteLine();
 }
Пример #8
0
        /// <summary>
        /// Called when the microphone status has changed.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="MicrophoneEventArgs"/> instance containing the event data.</param>
        private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
        {
            if (e.Recording)
            {
                WriteLine("Please start speaking.");
            }

            WriteLine();
        }
Пример #9
0
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     if (e.Recording)
     {
         WriteLine("Please start speaking." + Environment.NewLine);
     }
     else
     {
         WriteLine("Mic not ready or not working." + Environment.NewLine);
     }
 }
Пример #10
0
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     Dispatcher.Invoke(() =>
     {
         Debug.WriteLine("********* Microphone status: {0} *********", e.Recording);
         if (e.Recording)
         {
             Debug.WriteLine("Please start speaking.");
             txtText.Text = "Listening..";
         }
     });
 }
Пример #11
0
        /// <summary>
        /// Called when the microphone status has changed.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="MicrophoneEventArgs"/> instance containing the event data.</param>
        private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
        {
            Dispatcher.Invoke(() =>
            {
                WriteLine("********* 麥克風是否開啟: {0} *********", e.Recording);
                if (e.Recording)
                {
                    WriteLine("請開始說話!");
                }

                WriteLine();
            });
        }
        /// <summary>
        /// 麦克风状态改变时调用。
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="MicrophoneEventArgs"/> instance containing the event data.</param>
        private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
        {
            Dispatcher.Invoke(() =>
            {
                WriteLine("", e.Recording);
                if (e.Recording)
                {
                    WriteLine("请开始你的表演");
                }

                WriteLine("\n");
            });
        }
Пример #13
0
        private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
        {
            // Dispatcher dispatcherUI = Dispatcher.CurrentDispatcher;
            Dispatcher.Invoke(() =>
            {
                if (e.Recording)
                {
                    WriteLine("Please start speaking ... :)");
                }

                WriteLine("");
            });
        }
Пример #14
0
        private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
        {
            this.BeginInvoke((MethodInvoker) delegate() {
                // WriteLine("--- Microphone status change received by OnMicrophoneStatus() ---");
                //  WriteLine("********* Microphone status: {0} *********", e.Recording);
                if (e.Recording)
                {
                    WriteLine("Please start speaking.");
                }

                WriteLine();
            });
        }
Пример #15
0
 /// <summary>
 ///     Called when the microphone status has changed.
 /// </summary>
 void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     Dispatcher.Invoke(() =>
     {
         WriteLine("--- Microphone status change received by OnMicrophoneStatus() ---");
         WriteLine("********* Microphone status: {0} *********", e.Recording);
         if (e.Recording)
         {
             WriteLine("Please start speaking.");
         }
         WriteLine();
     });
 }
Пример #16
0
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     Dispatcher.Invoke(() =>
     {
         if (e.Recording)
         {
             Debug.WriteLine("Please start speaking.");
         }
         else if (!e.Recording)
         {
             //e.Recording = FALSE when: this.micClient.EndMicAndRecognition();
         }
     });
 }
Пример #17
0
        /// <summary>
        /// Called when the microphone status has changed.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="MicrophoneEventArgs"/> instance containing the event data.</param>
        private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
        {
            Dispatcher.Invoke(() =>
            {
                Console.WriteLine("--- Microphone status change received by OnMicrophoneStatus() ---");
                Console.WriteLine("********* Microphone status: {0} *********", e.Recording);
                if (e.Recording)
                {
                    Console.WriteLine("Please start speaking.");
                    this.UpdateStr("Please start speaking.", 12);
                }

                Console.WriteLine();
            });
        }
Пример #18
0
 /// <summary>
 /// Called when the microphone status has changed.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="MicrophoneEventArgs"/> instance containing the event data.</param>
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     Dispatcher.Invoke(() =>
     {
         StartButton.IsEnabled = !e.Recording;
         if (e.Recording)
         {
             this.imageAnimationController?.Play();
         }
         else
         {
             this.imageAnimationController?.Pause();
         }
     });
 }
 /// <summary>
 /// Called when the microphone status has changed.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="MicrophoneEventArgs"/> instance containing the event data.</param>
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     Dispatcher.Invoke(() =>
     {
         //   WriteLine("--- Microphone status change received by OnMicrophoneStatus() ---");
         //    WriteLine("********* Microphone status: {0} *********", e.Recording);
         if (e.Recording)
         {
             WriteLine("Meeting start!.");
         }
         else
         {
             //  forward();
         }
         WriteLine();
     });
 }
 private void MicClient_OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                                                new Action(() =>
     {
         if (e.Recording)
         {
             this.status.Text             = "Escuchando...";
             this.RecordingBar.Visibility = Visibility.Visible;
         }
         else
         {
             this.status.Text             = "No Escuchando...";
             this.RecordingBar.Visibility = Visibility.Collapsed;
         }
     }));
 }
Пример #21
0
        /// <summary>
        /// Called when the microphone status has changed.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="MicrophoneEventArgs"/> instance containing the event data.</param>
        private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
        {
            Dispatcher.Invoke(() =>
            {
                WriteLine("--- Microphone status change received by OnMicrophoneStatus() ---");
                WriteLine("********* Microphone status: {0} *********", e.Recording);
                if (e.Recording)
                {
                    WriteLine("Please start speaking.");
                }
                else
                {
                    //this.micClient.EndMicAndRecognition();
                    //CreateMicrophoneRecoClient();
                    //this.micClient.StartMicAndRecognition();
                }

                WriteLine();
            });
        }
Пример #22
0
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     this.SetText(metaText, "--- OnMicrophoneStatus ---");
 }
Пример #23
0
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
 }
Пример #24
0
 /// <summary>
 /// Event handler function for changes in microphone status. Will print status in the debug console
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     Debug.WriteLine($"Microphone status changed to recording: {e.Recording}");
 }
Пример #25
0
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     isMicrophoneActive = e.Recording;
 }
Пример #26
0
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     this.SetText(MessageType.Metadata, "--- OnMicrophoneStatus ---");
 }
Пример #27
0
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     //WriteToLog(e.Recording
     //    ? "****************** I'm recording ************************"
     //    : "================== I'm NO recording =====================");
 }
Пример #28
0
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     WriteTextBoxLine(txtPartial, e.Recording ? "LISTENING..." : "NOT LISTENING (for some reason...)");
     WriteTextBoxLine(txtPartial, String.Empty);
 }
Пример #29
0
 //Event handler that is called when the microphone status is ready
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     WriteLine(e.Recording ? "Mic Recording. Please start speaking." : "Mic Stopped.");
 }
Пример #30
0
 private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     //WriteToLog(e.Recording
     //    ? "****************** I'm recording ************************"
     //    : "================== I'm NO recording =====================");
 }
 /// <summary>
 ///     Called when the microphone status has changed.
 /// </summary>
 void OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     Console.WriteLine("********* Microphone status: {0} *********", e.Recording);
     if (!e.Recording)
     {
         m_micClient.EndMicAndRecognition();
     }
     Console.WriteLine();
 }
Пример #32
0
 private void Client_OnMicrophoneStatus(object sender, MicrophoneEventArgs e)
 {
     systemLog.Debug($"{ prefix } Microphone status changed (recording: { e.Recording })");
 }