Pregunta

I use the speech recognition and text-to-speech but I would like to mute the "beep" sound of the speech recognition and then unmute for hear the vocal synthesis.

I succeed to mute but when I want to set the volume at its maximum, it applies to the phone and not to my app.

How to manage this ?

Thanks

¿Fue útil?

Solución

There is an answer you can refer to here regarding how to loop the recognition and silence the beep.

Whenever you call setStreamMute() it is for the entire device, not just your application.

The issue here is that the Google Search Application (4.1+) is controlling the beep and the audio, it is not part of the recognition API.

If you open Google Now whilst you have music playing and press the listen button, you'll note that the music stops until the recognition and voice interaction finishes, this is because the app is 'ducking' the audio.

There is nothing as developers we can do about this behaviour (other than use another Speech Recognition Provider) and it's frustrating, as voiced here.

Until we manage to persuade Google to allow us to pass parameters such as 'offline' and 'no audio prompt' in the Recognition Intent, there's nothing we can do but rant.....

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top