Sorry if this is a possible duplicate, but i have tried a lot of the possible solutions.
Im creating speech recognition app that uses STT and TTS in Android that uses a Bluetooth headset, What its suppose to do is take commands using the headset, but wont , but when i use the mic on the android phone to enter commands .The command can be played back through the headset speaker.
My Manifest file;
<uses-permission android:name="android.permission.READ_PHONE_STATE">
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN">
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
The code below is invoked when a button on the phone it clicked
audioM.setMode(audioM.MODE_IN_COMMUNICATION);
audioM.setBluetoothScoOn(true);
audioM.startBluetoothSco();
audioM.setSpeakerphoneOn(false)
This code successfully plays the command back through the headset.
I have tried using the same AudioManager
code, when speaking a command.
I have set up a sound clip to play just before the Speech Rec is about to begin. This sound successfully plays through the headset, But i cant speak through the headset(Name:Jabra Supreme) .
I have followed This post without success. And several others, with snippets of code
I am using this speech rec
My android device version 4.4.2 . Android Studio version 1.2.2.
Could it possibly be the headset that is causing the problem? I ask this because when i press the button on the headset , a built in voice plays asking for a command.
Many Thanks