0

Assuming I am using an A2DP-compatible bluetooth headset and that the headset is properly paired and connected, how can I record to an audio file using the bluetooth headset as the source?

In this case, when there isn't a Bluetooth headset, I record from the microphone to an M4A file containing AAC data with a sample rate of 44100 and a bit rate of 160,000, then proceed to manipulate the audio data--changing the format is not an option.

I have read How to record sound using bluetooth headset and tried the approach indicated--but cannot get it to work.

Community
  • 1
  • 1
Chad Schultz
  • 7,770
  • 6
  • 57
  • 96

2 Answers2

2

http://developer.android.com/reference/android/media/AudioManager.html#startBluetoothSco%28%29, if accurate, indicates that the sampling for audio input streams must be 8kHz... very low audio quality.

Any examples I have found just show recording raw PCM data to an AudioRecorder, where it can then be turned into a WAV file. Using the MediaRecorder seems right out. As far as I can tell, there is no solution.

Chad Schultz
  • 7,770
  • 6
  • 57
  • 96
1

From what I can tell from my experience, I think A2DP is a one way "play audio phone->headset speaker" technology.

I do not think A2DP supports "record headset microphone->phone".

In order to record from a headset microphone must use SCO (startBluetoothSco(), etc).

swooby
  • 3,005
  • 2
  • 36
  • 43