Real-time voice chat between iOS devices on the same network

I work in an application where I need to implement simple voice functions between two iOS devices on the same network.

My doubt is how to get audio devices from the host device and send via Wi-Fi or bluetooth directly to the slave device in real time.

Some things about network communication that I have done, I can transfer any NSData between devices using TCP.

It is very important not to use the GK structure, because I need to connect two clients without notice. For example, when I use GK to connect two devices, iOS displays a warning with a connection request, I need to avoid this connection request.

Currently, I can do this with video, easier than audio. Any ideas on implementing this are welcome.

Thanks.

+7
source share
2 answers

First of all, you need to learn how to record audio using Audio Queue Services .

Then transfer the audio data via Wi-Fi and Bluetooth and play it from the other side.

The most obvious choice for you is to use bonjour .

The GameKit frame is built on top of this. However, you do not need to build too much for this application. Your direct bonjour application.

Please provide the chatty code if necessary. If you need some background theory, go to http://mobileorchard.com/tutorial-networking-and-bonjour-on-iphone/ .

+2
source

I used Audio Queue Services for the same project.

For Networking, I use Bonjour, and it really solved the problem of text and video transmission.

There were many workarounds for creating voice chat in wifi using audio queue services, but failed. I will update when I find a solution other than this.

+1
source

All Articles