To stream voice, fundamentally, we need the following components.
- A method to obtain PCM audio from the Mic and store it in an in-memory buffer.
- A protocol suitable for transfer of real time data - RTP in other words.
- Some kind of signaling protocol to negotiate the call. (Eg: SIP, XMPP/Jingle).
- A codec to optimize the data transfer format. (Eg: Speex).
As far as the Google Android platform is considered, until recently (Android SDK 1.1 and lower) did not have the first capability. Android 1.5 still does not have an RTP stack, but I have ported a small but functional Open Source RTP stack to the platform. As for signalling, SIP and XMPP/Jingle, I feel have too much overhead. Since both peers will be utilizing my client, a stripped down negotiation protocol would be more efficient. This is where XMPP comes in. As you may know, XMPP is XML based and is widely used. Hence, we can build a small but fast call negotiation protocol over XMPP, given that the parties are logged in via their Jabber accounts.
One may think that this won't inter-operate with existing infrastructures. This is true. To have that capability would translate into unnecessary complexity at this stage. Integration with existing systems is future work as of now. :-)
Another point is that trasmitting raw PCM over the internet is not a very efficient design choice. For this, we need some kind of Codec that will provide us with compression, decompression etc. the Speex codec is Open source and available in Java as jSpeex. It is simple to use.
I will be approaching this project in the following manner.
1. Write PURE java code and test my ideas and algorithms on a Java applet.
2. Port it to the Android platform.
One may think that this won't inter-operate with existing infrastructures. This is true. To have that capability would translate into unnecessary complexity at this stage. Integration with existing systems is future work as of now. :-)
Another point is that trasmitting raw PCM over the internet is not a very efficient design choice. For this, we need some kind of Codec that will provide us with compression, decompression etc. the Speex codec is Open source and available in Java as jSpeex. It is simple to use.
I will be approaching this project in the following manner.
1. Write PURE java code and test my ideas and algorithms on a Java applet.
2. Port it to the Android platform.