So I’ve been wanting to get my hands dirty at cooking up an Android app, and have had dreamed up a few ideas. Some of these ideas have since been implemented by others (barcode scanner with camera that searches for products and prices online, music “recognizer” like Shazam, etc). The latest idea that I have is a mobile app that records live phone conversation on demand.
Quick searches for existing solutions suggest that there are no apps of this kind for the Andoird and the iPhone, but a few good candidates may be available for the Symbian as well as for Windows Mobile. I’m not certain about the WebOS that newer Palm devices run on.
The idea seems simple enough, but the actual implementation seems to have been curbed by limitations of the baseband processor in most smartphones. From what I have gathered, most smartphones incorporates two major processors. One of them is the “general purpose” processor, or that application processor that runs the OS and applications. The other is a “special purpose” DSP or sometimes referred to as the baseband processor that handles real-time voice encoding and decoding. While it’s fairly straight-forward to record and encode local voice using the application processor, capturing the output of the baseband processor, or the remote voice, seems to have caused issues with most developers.
In my quest to write a conversation recorder app for the Android, I came across this class:
MediaRecorder.AudioSource
One of the values available is:
public static final int VOICE_CALL
Voice call uplink + downlink audio source
Constant Value: 4 (0×00000004)
This is available since API Level 4, which corresponds to Android 1.6. It then appears deceptively simple to just set
MediaRecorder.AudioSource = VOICE_CALL;
to record both the uplink (local) and downlink (remote) audio feeds. I don’t actually have an Android phone to test on, but if you do, and have the means to load your code onto your Android phone, please let me know if you get 2-way voice recording going. As I’ve said, it may depend on the capabilities of the baseband processor you have.
I’m eyeing on the HTC Passion/Google Nexus One, which is rumored to be based on Qualcomm’s Snapdragon QSD8×50. The QSD8650 is especially interesting, with some reports having said that it may be clocked at 1.3GHz, with the capabilities to run on both the CDMA and GSM families of 3G data networks, making it a powerful world phone. Detailed specs are especially hard to find, but I’m hoping the baseband processor inQSD8×50 will expose the downlink audio to the application processor, by perhaps providing some sort of DMA to the cache that the baseband processor uses.
I’ll report my findings as more details are available in the coming days, I hope, as the Passion/Nexus One is supposed to be coming out in as early as January 2010!