Currently I'm learning how to use the Android Speech library. I tested it with various stream types.
This is my code:
Bundle params = new Bundle();
params.putInt(TextToSpeech.Engine.KEY_PARAM_STREAM, AudioManager.STREAM_ALARM);
params.putInt(TextToSpeech.Engine.KEY_PARAM_VOLUME, 1);
speech.speak(text, TextToSpeech.QUEUE_FLUSH, params, "Yow");
Unfortunately the device seems not to use the Alarm volume. I also noticed that when I use the alarm stream in MediaPlayer
, it increments the volume gradually.
Before I upgraded to Marshmallow, the volume was instantly loud enough.
How can I increase the volume of the speech engine so it instantly uses the Alarm volume?