Extension: UDP audio Chat. Voice. WiFi. Send sound over UDP

1.- UDP audio Chat. WiFi. Send sound over UDP.

Through this extension we can send audio from one mobile to another, using UDP. WiFi.

- Blocks.

- Example:

p299J_Voz_UDP.aia (12.1 KB)

- Designer.

- Blocks.


2.- Send and receive audio to the same device.

  • To do the first test we run the application (it works in MIT Companion). We get the IP of the device, in my case:

  • We write that IP in "To IP". We establish the same port to send and receive, in this case: 4444

  • We activate the Microphone and the Speaker. We speak in front of the mobile and we must listen to our voice.

  • To avoid sound feedback it is advisable to use an earphone.

  • In this example the application is sending and receiving the sound.


1 Like

3.- Chat with two mobiles.

  • In each mobile we put the IP and the port of the other mobile ("To IP" and "To Port"), we also establish the port through which we will receive the audio.


4.- Broadcast.

  • If instead of establishing the IP of a device, we write To IP: the sound will be sent to the entire network, and it will "enter" those devices that have port 4444 (in this example) activated with UDP.


5.- Credits.

  • The code to Get the Local IP is an adaptation of...



Cool! But is there a way to use a mp3 file as input instead of microphone? I'd like to do something like phone-bot for my home

The easiest answer would be to send the .mp3 file

send mp3 as text and then playback it at remote device?

One idea would be to convert the file to Base64 and send it using UDP, I haven't tried it with large files.


these files wont be large. just some tts speech


i want use in network wan over internet not in lan, one idea

I haven't tried it, but maybe opening the port of a local network (NAT) can be achieved.

I did it

125kb file is too large even when at base64 (it isnt sending)

edit: 64kb is still too big

what did you do to achieve this?

What he said @Juan_Antonio i did it, i mounted server and not found the devices

ok, i interpreted your "I did it" as success

Another idea would be to install an FTP server on a PC.