1

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

3 Answers 3

2

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/

5
  • What should be done for this to work? At least can you point to some manual? Because I get only this response: ERROR: pipeline could not be constructed: no element "pulsesrc"
    – gluk47
    Oct 7, 2014 at 19:18
  • you need a recent system that embed pulsesrc, 1.14 or worst 2.x Oct 14, 2014 at 13:02
  • 1
    I was running this on NAO version 2.x Oct 24, 2014 at 3:15
  • @Alexandre Mazel it does not work on 1.14. I guess, I should try upgrading to 2.0 (or manually recompile kernel with, saying, alsaloop module)
    – gluk47
    Oct 31, 2014 at 21:38
  • You can use alsasrc instead of pulsesrc on older NAOs. Aug 18, 2017 at 10:01
1

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

1
  • Did you have any success with it or any manual how to do it? I tried gst-launch-0.10 alsasrc, but got only Device 'default' is busy. Pulseaudio is not installed on nao.
    – gluk47
    Oct 8, 2014 at 21:56
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.