private void ResponceRecived(object sender, PartialSpeechResponseEventArgs e) { var result = e.PartialResult; Dispatcher.Invoke(() => { ResponceTxt.Text = e.PartialResult; ResponceTxt.Text += "\n"; } ); }
private void OnPartialResponseReceived_HANDLER(object sender, PartialSpeechResponseEventArgs e) { string result = e.PartialResult; txt_Cikti.BeginInvoke((Action)(() => { txt_Cikti.Text = (result); txt_Cikti.Text += "\n"; } )); }
/// <summary> /// Called when a partial response is received. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="PartialSpeechResponseEventArgs"/> instance containing the event data.</param> private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { Console.WriteLine("--- Partial result received by OnPartialResponseReceivedHandler() ---"); Console.WriteLine("{0}", e.PartialResult); var formattedStr = string.Format("{0}", e.PartialResult); //this.FontSize = 30; this.UpdateStr("{0}", 50, e.PartialResult); Console.WriteLine(); }
private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { Dispatcher.Invoke( (Action)(() => { RecognizeResult.Document.Blocks.Clear(); RecognizeResult.AppendText(e.PartialResult); RecognizeResult.SelectAll(); RecognizeResult.Selection.ApplyPropertyValue(TextElement.ForegroundProperty, Brushes.Gray); RecognizeResult.Selection.Select(RecognizeResult.Document.ContentEnd, RecognizeResult.Document.ContentEnd); })); }
/// <summary> /// Called when a partial response is received. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">An object that contains the event data.</param> private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { this.lastPartialResult = e.PartialResult; var result = this.BuildPartialSpeechRecognitionResult(e.PartialResult); // Since this is a partial response, VAD may not yet have signalled the end of speech // so just use the last audio packet time (which will probably be ahead). this.PostWithOriginatingTimeConsistencyCheck(this.PartialRecognitionResults, result, this.lastAudioOriginatingTime); // Post the raw result from the underlying recognition engine this.PostWithOriginatingTimeConsistencyCheck(this.PartialSpeechResponseEvent, e, this.lastAudioOriginatingTime); }
public static void onPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { string response = e.PartialResult; Application.Current.Dispatcher.Invoke((async() => { bool x; getWindow().setSpeechBoxText("Partial: " + response); if (!(x = await Agent.checkForObjection(response))) { Agent.checkforData(response); } })); }
/// <summary> /// Called when a partial response is received. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="PartialSpeechResponseEventArgs"/> instance containing the event data.</param> private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { Console.WriteLine("--- Partial result received by OnPartialResponseReceivedHandler() ---"); Console.WriteLine("{0}", e.PartialResult); var formattedStr = string.Format("{0}", e.PartialResult); //this.FontSize = 30; this.UpdateStr("{0}", 50, e.PartialResult); if (e.PartialResult.Contains("computer")) { this.Dispatcher.Invoke(() => { image.Source = new BitmapImage(new Uri("Assets\\img.png", UriKind.Relative)); }); } Console.WriteLine(); }
private void ResponseReceived(object sender, PartialSpeechResponseEventArgs e) { string result = e.PartialResult; Dispatcher.Invoke(() => { partial = (e.PartialResult); Responsetxt.Text = partial; Responsetxt.Text += ("\n"); continuous = value_senti; }); }
private void ResponceRecived(object sender, PartialSpeechResponseEventArgs e) { Dispatcher.Invoke(() => { if (e.PartialResult.Contains("start dictation")) { ((IBioInfoUserIo) this).OpenEmailDictation(true); _voiceToText.StopRecording(); tbTextInput.Text = ""; return; } tbTextInput.Text = e.PartialResult; tbTextInput.Text += "\n"; } ); }
/// <summary> /// Called when a partial response is received. /// </summary> void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { if (recording) { pingPong++; this.Dispatcher.Invoke((Action)(() => { partialString = e.PartialResult; userInput.Text = this.fullText + partialString; /*partialString = e.PartialResult; * userInput.Text = this.fullText + e.PartialResult; */ })); } }
//Textbox에 text입력 private void ResponseReceived(object sender, PartialSpeechResponseEventArgs e) { speechRecognitionResult = e.PartialResult; Dispatcher.Invoke(() => { /* * if(e.PartialResult.Contains("am")) * { * temp = e.PartialResult; * Responsetxt.Text = temp.Replace("am", "is"); ; * Responsetxt.Text += ("\n"); * } */ speechRecognition.Text = (e.PartialResult); additionalQuestion.testBox.Text = speechRecognition.Text;///////////////////////////////////////////////////////// //mainQuestion. }); }
/// <summary> /// Called when a partial response is received. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="PartialSpeechResponseEventArgs"/> instance containing the event data.</param> private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { Dispatcher.Invoke( (Action)(() => { this.speechSniplets = e.PartialResult; RecEvent q = this.ParseRecEvent(e.PartialResult); if (q != null && (q.Kind == RecEventType.Stop || q.Kind == RecEventType.Reset)) { // we got the final result, so it we can end the mic reco. No need to do this // for dataReco, since we already called endAudio() on it as soon as we were done // sending all the data. this.micClient.EndMicAndRecognition(); dispatchEvent(q); } })); }
private void PartialResponceRecived(object sender, PartialSpeechResponseEventArgs e) { Dispatcher.Invoke(() => { CallCommand(e); if (e.PartialResult.Contains("command mode") || e.PartialResult.Contains("pause")) { _partialResponces = ""; _tbCtrl.Text = _fullResponces + " " + _partialResponces; _commandMode = true; return; } if (_commandMode || _partialResponces == "###") { _partialResponces = string.Empty; return; } _partialResponces = AjustPartialResponseText(e.PartialResult); _tbCtrl.Text = _fullResponces + " " + _partialResponces; _tbCtrl.SelectionStart = _fullResponces.Length; _tbCtrl.SelectionLength = _fullResponces.Length + _partialResponces.Length + 1; }); }
private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { ContinueSession(e.PartialResult); }
/// <summary> /// Event handler function for partial responses. Prints the response to the debug console /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnPartialResponseReceived(object sender, PartialSpeechResponseEventArgs e) { Debug.WriteLine($"Partial response received: {e.PartialResult}"); }
/// <summary> /// Called when a partial response is received. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="PartialSpeechResponseEventArgs"/> instance containing the event data.</param> private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { Query = $"{e.PartialResult}"; }
private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { WriteLine("RecognitionStatus is PartialResult."); this.SendMessage(WebSocketMessageType.PartialResult, e.PartialResult); }
private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { this.SetText(metaText, "--- OnMicrophoneStatus ---"); }
private static void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { log.Debug(string.Format(" --> OnPartialResponseReceivedHandler:[{0}]", e.PartialResult)); }
private void CallCommand(PartialSpeechResponseEventArgs e) { if (e.PartialResult.Contains("stop recording")) { _partialResponces = "###"; _tbCtrl.Text = _fullResponces; StopRecording(); } if (_commandMode && e.PartialResult.Contains("chemical") && e.PartialResult.Contains("properties")) { string chemical; try { chemical = e.PartialResult.Replace("chemical ", ""); chemical = chemical.Replace(" properties", ""); _tbCtrl.Text += "looking up data for " + chemical + " ...\n"; _chemOperations.FillChemicalValues(chemical); _tbCtrl.Text += " All Data fully loaded for chemical :" + chemical; } catch (Exception ex) { _tbCtrl.Text += " " + ex.Message; } } if (_commandMode && e.PartialResult.Contains("send email")) { _emailOperations.SendDictationEmail(TbEmailAddress.Text, TbDictation.Text); Close(); } if (_commandMode && e.PartialResult.Contains("email address")) { _partialResponces = "###"; _tbCtrl.Background = Brushes.White; _tbCtrl = TbEmailAddress; _fullResponces = _tbCtrl.Text; SetTextBox(); _commandMode = false; } if (_commandMode && e.PartialResult.Contains("subject")) { _partialResponces = "###"; _tbCtrl.Background = Brushes.White; _tbCtrl = TbSubject; _fullResponces = _tbCtrl.Text; SetTextBox(); _commandMode = false; } if (_commandMode && e.PartialResult.Contains("content")) { _partialResponces = "###"; _tbCtrl.Background = Brushes.White; _tbCtrl = TbDictation; _fullResponces = _tbCtrl.Text; SetTextBox(); _commandMode = false; } if (_commandMode && e.PartialResult.Contains("exit command") || e.PartialResult.Contains("resume")) { _partialResponces = "###"; _commandMode = false; _fullResponces = TbDictation.Text; } //chemical properties if (_commandMode && e.PartialResult.Contains("target chemical")) { _tbCtrl.Text += _chemOperations.Chemical; } if (_commandMode && e.PartialResult.Contains("mw") || e.PartialResult.Contains("molecular weight")) { _tbCtrl.Text += " Molecular Weight = " + _chemOperations.MolecularWeight; } if (_commandMode && e.PartialResult.Contains("formula")) { var text = " Formula = " + _chemOperations.MolecularWeight; _tbCtrl.Text += text; _fullResponces += text; } if (_commandMode && e.PartialResult.Contains("synonym")) { var text = "Synonyms = " + _chemOperations.Synonyms; _tbCtrl.Text += text; _fullResponces += text; } if (_commandMode && e.PartialResult.Contains("chemical id")) { var text = "CID's = " + _chemOperations.CiDs; _tbCtrl.Text += text; _fullResponces += text; } if (_commandMode && e.PartialResult.Contains("keys")) { var text = "InCHI keys = " + _chemOperations.CiDs; _tbCtrl.Text += text; _fullResponces += text; } }
private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { WriteLine("{0}", e.PartialResult); WriteLine(""); }
private void Client_OnPartialResponseReceived(object sender, PartialSpeechResponseEventArgs e) { systemLog.Debug($"{ prefix } Partial response received"); systemLog.Debug(e.PartialResult); }
private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { WriteTextBoxLine(txtPartial, e.PartialResult); }
private void DataClient_OnPartialResponseReceived(object sender, PartialSpeechResponseEventArgs e) { _parts.Add(e.PartialResult); }
private void OnPartialResponseReceived(object sender, PartialSpeechResponseEventArgs e) { WriteToLog($"Partial Result: {e.PartialResult}"); }
/// <summary> /// Called when a partial response is received. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="PartialSpeechResponseEventArgs"/> instance containing the event data.</param> private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { ; }
/// <summary> /// Called when a partial response is received; /// </summary> void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { Console.WriteLine("********* Partial Result *********"); Console.WriteLine("{0}", e.PartialResult); Console.WriteLine(); }
private void OnPartialReponseReceiveHandler(object sender, PartialSpeechResponseEventArgs e) { RecognizeText.Add(e.PartialResult); }
private void OnPartialResponseReceived(object sender, PartialSpeechResponseEventArgs e) { PartialResponseReceived?.Invoke(e.PartialResult); }
/// <summary> /// Called when a partial response is received. /// </summary> void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { if (recording) { pingPong++; this.Dispatcher.Invoke((Action)(() => { partialString = e.PartialResult; userInput.Text = this.fullText + partialString; /*partialString = e.PartialResult; userInput.Text = this.fullText + e.PartialResult; */ })); } }
/// <summary> /// Called when a partial response is received. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="PartialSpeechResponseEventArgs"/> instance containing the event data.</param> private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { this.WriteLine("--- Partial result received by OnPartialResponseReceivedHandler() ---"); this.WriteLine("{0}", e.PartialResult); this.WriteLine(); }