Thamotharan-5143 avatar image
0 Votes"
Thamotharan-5143 asked LeonLu-MSFT commented

Is it possible to listen only user's input and ignore TextToSpeech?

I have implemented speech recognition in Xamarin with dependency service.

Meanwhile I am using TextToSpeech. If user spoke anything then TextToSpeech need to stop. I have trying it but sometime TextToSpeech string is became a output of speech recognition.

  public void speak(string text)
             Task.Run(async () =>
                 textToSpeechCancellationToken = new CancellationTokenSource();                
                 await TextToSpeech.SpeakAsync(text, textToSpeechCancellationToken.Token);

I am textToSpeechCancellationToken.Cancel() on EndOfSpeech in SpeechRecognitionListener. But I got which is input of speak function.


//I am starting speech recognition but I am getting output for speech recognition is "hello"

Please help me.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am confused about your achievement, you used TextToSpeech to speech a text, then you need to use Speech to Text to get the speech text?

0 Votes 0 ·

Actually, I am creating small chat bot application with speech recognition and TextToSpeech.
On app start I will get API response and I am putting that response in TextToSpeech.
Meanwhile I would like to speech next input of chat bot. That will convert as text using speech recognition.
If I spoke anything TextToSpeech need to stop and send next request.
But sometime speech recognition is detecting TextToSpeech value.

0 Votes 0 ·

0 Answers