android Programming Glossary: stream_voice_call
Using the Android RecognizerIntent with a bluetooth headset http://stackoverflow.com/questions/14991158/using-the-android-recognizerintent-with-a-bluetooth-headset with Text To Speech you need to set the AudioManager to STREAM_VOICE_CALL before calling speak. Or use the code below protected void speak.. String.valueOf AudioManager.STREAM_VOICE_CALL mTts.speak text TextToSpeech.QUEUE_FLUSH myHashRender Copy the..
Routing audio to Bluetooth Headset (non-A2DP) on Android http://stackoverflow.com/questions/2144694/routing-audio-to-bluetooth-headset-non-a2dp-on-android sample.mp3 .getFD mPlayer.setAudioStreamType AudioManager.STREAM_VOICE_CALL mPlayer.prepare mPlayer.start catch Exception e Log.e TAG.. is a phone call Using MediaPlayer's setAudioStreamType STREAM_VOICE_CALL using AudioManager's setBluetoothScoOn true using AudioManager's.. they can be routed to SCO headset the stream type must be STREAM_VOICE_CALL the format must be mono the sampling must be 16kHz or 8kHz The..
Android, phone call audio stream via wlan http://stackoverflow.com/questions/2492457/android-phone-call-audio-stream-via-wlan which has constant named public static final int STREAM_VOICE_CALL The audio stream for phone calls But I don't know how to use..
Need to play audio to the caller http://stackoverflow.com/questions/4319949/need-to-play-audio-to-the-caller caller hears it. I tried setting the stream STREAM_DTMF STREAM_VOICE_CALL ... tried all of them but nothing worked. STREAM_MUSIC made..
TTS output always going to A2DP http://stackoverflow.com/questions/6963461/tts-output-always-going-to-a2dp String.valueOf AudioManager.STREAM_VOICE_CALL My understanding is that audio routing to a Bluetooth headset.. to A2DP aka media audio in Android Bluetooth settings and STREAM_VOICE_CALL goes to HSP aka phone audio in Android Bluetooth settings ... settings . But regardless whether I use STREAM_MUSIC or STREAM_VOICE_CALL in my little application the audio always goes for some reason..
Using the Android RecognizerIntent with a bluetooth headset http://stackoverflow.com/questions/14991158/using-the-android-recognizerintent-with-a-bluetooth-headset public void onHeadsetConnected To use bluetooth headset with Text To Speech you need to set the AudioManager to STREAM_VOICE_CALL before calling speak. Or use the code below protected void speak String text HashMap String String myHashRender new HashMap.. if mBluetoothHelper.isOnHeadsetSco myHashRender.put TextToSpeech.Engine.KEY_PARAM_STREAM String.valueOf AudioManager.STREAM_VOICE_CALL mTts.speak text TextToSpeech.QUEUE_FLUSH myHashRender Copy the BluetoothHeadsetUtils class to your project. import java.util.List..
Routing audio to Bluetooth Headset (non-A2DP) on Android http://stackoverflow.com/questions/2144694/routing-audio-to-bluetooth-headset-non-a2dp-on-android try mPlayer.setDataSource new FileInputStream sdcard sample.mp3 .getFD mPlayer.setAudioStreamType AudioManager.STREAM_VOICE_CALL mPlayer.prepare mPlayer.start catch Exception e Log.e TAG e.toString @Override public void onDestroy mPlayer.stop amanager.setMode.. methods that I thought will fool the phone to believe my audio is a phone call Using MediaPlayer's setAudioStreamType STREAM_VOICE_CALL using AudioManager's setBluetoothScoOn true using AudioManager's setMode MODE_IN_CALL But none of the above worked. If I.. following restrictions apply on audio output streams so that they can be routed to SCO headset the stream type must be STREAM_VOICE_CALL the format must be mono the sampling must be 16kHz or 8kHz The following restrictions apply on input streams the format..
Android, phone call audio stream via wlan http://stackoverflow.com/questions/2492457/android-phone-call-audio-stream-via-wlan some research in the Android API and all I found was the AudioManager which has constant named public static final int STREAM_VOICE_CALL The audio stream for phone calls But I don't know how to use it our how it should give me access to the actual audiostreams..
Need to play audio to the caller http://stackoverflow.com/questions/4319949/need-to-play-audio-to-the-caller I enable the app it should play back the audio such that the caller hears it. I tried setting the stream STREAM_DTMF STREAM_VOICE_CALL ... tried all of them but nothing worked. STREAM_MUSIC made the audio play through the speaker but was not such that the..
TTS output always going to A2DP http://stackoverflow.com/questions/6963461/tts-output-always-going-to-a2dp And for phone calls params.put TextToSpeech.Engine.KEY_PARAM_STREAM String.valueOf AudioManager.STREAM_VOICE_CALL My understanding is that audio routing to a Bluetooth headset works such that STREAM_MUSIC goes to A2DP aka media audio.. to a Bluetooth headset works such that STREAM_MUSIC goes to A2DP aka media audio in Android Bluetooth settings and STREAM_VOICE_CALL goes to HSP aka phone audio in Android Bluetooth settings . But regardless whether I use STREAM_MUSIC or STREAM_VOICE_CALL.. goes to HSP aka phone audio in Android Bluetooth settings . But regardless whether I use STREAM_MUSIC or STREAM_VOICE_CALL in my little application the audio always goes for some reason to A2DP . What am I am doing wrong Is there a way to route..
|