Visée Maxence
Visée Maxence

Reputation: 249

How to stream audio from Nao robot?

I would like to create a streaming audio from a Nao to my WPF form.

The only way that i have found is that we can download a recorded sound on Nao over SSH.

But its not a real streaming ...

If anyone has an idea !

Thanks

Upvotes: 1

Views: 1646

Answers (3)

Fotis Papadopoulos
Fotis Papadopoulos

Reputation: 1

For windows: Download the latest pulseaudio (not the official one) and creat a config.pa file with these two lines:

load-module module-native-protocol-tcp listen=0.0.0.0 auth-anonymous=1
load-module module-waveout

Run pulseaudio on your windows machine first with pulseaudio -F config.pa

On your NAO:

pacmd load-module module-tunnel-sink sink_name=nao server=192.168.1.152 

(change this address to your windows one. Also make sure pulseaudio is running on windows otherwise this wont work)

qicli call ALAudioDevice._listOutputs 

The previous command will show you the index number of the pulseaudio device you just created. Use this number in the next commands

pacmd set-default-sink 1
qicli call ALAudioDevice._setDefaultOutput 1

Thats it. Now everything comes through your pc speakers. index 0 is NAO's soundcard

For Linux: Run this on terminal:

pactl load-module module-rtp-recv

On NAO:

pactl load-module module-null-sink sink_name=nao (creates the sink)
qicli call ALAudioDevice._listOutputs  (checks the index on sink)
qicli call ALAudioDevice._setDefaultOutput 1  
pactl load-module module-rtp-send source=nao.monitor

I find the Linux approach more stable. The TCP one on windows might break after some time.

Upvotes: 0

Jürgen Brandstetter
Jürgen Brandstetter

Reputation: 7324

run this command on your NAO (login via ssh) gst-launch-0.10 pulsesrc ! audioconvert ! vorbisenc ! oggmux ! tcpserversink port=1234

list via VLC: vlc tcp://IP:1234/

Upvotes: 2

Alexandre Mazel
Alexandre Mazel

Reputation: 2558

You should look at gstreamer that is embedded in the robot. It would be a bit slow, but it'll be real streaming...

Upvotes: 1

Related Questions