I am creating an application that can play music and switch to talk mode. In talk mode, the user will speak into the microphone, and these spoken words will be played in dynamics in real time (using AudioTrack).
I made this function with wired headphones using RecognitionListener
like this link , but I'm adding code for the onBufferReceived function (byte [] buffer) for AudioTrack
but on a bluetooth headset, I can only play music using AudioManager. When I call the speech recognition function, it works, but it detects notes from the microphone. I think this is due to the fact that the microphone of the Bluetooth headset is turned on only during a conversation.
Is there a way to do this on a bluetooth headset?
source share