Example #1
0
 /// <summary>
 /// Assigns the speech result to one the speech enabled controls.
 /// </summary>
 /// <param name="e"></param>
 private void ProcessListeners(SpeechRecognitionEventArgs e)
 {
     lock (this.listeners)
     {
         foreach (var l in this.listeners)
         {
             if (l.Value.ProcessResults(e.Results))
             {
                 return;
             }
         }
     }
 }
Example #2
0
 /// <summary>
 /// Fires the Error event.
 /// </summary>
 /// <param name="e">A <see cref="T:Wisej.Web.Ext.Speech.SpeechRecognitionEventArgs" /> that contains the event data. </param>
 protected virtual void OnError(SpeechRecognitionEventArgs e)
 {
     ((SpeechRecognitionEventHandler)base.Events[nameof(Error)])?.Invoke(this, e);
 }
Example #3
0
        /// <summary>
        /// Fires the Result event.
        /// </summary>
        /// <param name="e">A <see cref="T:Wisej.Web.Ext.Speech.SpeechRecognitionEventArgs" /> that contains the event data. </param>
        protected virtual void OnResult(SpeechRecognitionEventArgs e)
        {
            ProcessListeners(e);

            ((SpeechRecognitionEventHandler)base.Events[nameof(Result)])?.Invoke(this, e);
        }