Я пытаюсь направить свой вывод TTS на внешнее устройство Bluetooth SCO (отлично работает с локальным динамиком и микрофоном), но он не воспроизводится.
Я устанавливаю маршрут для AudioManager следующим образом -
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
audioManager.startBluetoothSco();
audioManager.setBluetoothScoOn(true);
Высказывания разыгрываются таким методом -
private void say(String text, String utteranceId) {
Log.d(TAG, "Saying: " + text);
final Bundle ttsParams = new Bundle();
ttsParams.putInt(TextToSpeech.Engine.KEY_PARAM_STREAM, AudioManager.STREAM_VOICE_CALL);
mTextToSpeech.speak(text, TextToSpeech.QUEUE_FLUSH, ttsParams, utteranceId);
}
Нет звука из динамика. Если я не установил для BluetoothScoOn значение true, он отлично работает со встроенным динамиком.