Android Speech Recognition while music is playing

丶灬走出姿态 提交于 2019-12-19 09:27:40

问题


referencing to Hoans answer here Jelly Bean Beep In Speech Recognition I tried to implement a speech recognizer in the background.

And it works all fine. The service runs in background and listens to words the user say. My problem is:

If a music player is running and the speech recognizer restarts, the system sound stream is muted to prevent the beep sound of speech recognition. But muting this stream paues and mutes the music player, too.

Does anyone have an idea how to prevent the beep sound without muting the whole system?

I already tried to mute another stream but the system stream is the only one muting the beep.

I test on a Nexus 4 with Android 4.4

Best regards.

来源:https://stackoverflow.com/questions/20495397/android-speech-recognition-while-music-is-playing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!