Error trying to create new module and subscribe using ALAudioDevice service

Viewed 185

I have been trying to run a python script to get Nao's audio as a stream

Found the example directly on aldebaran's website

http://doc.aldebaran.com/2-8/dev/python/examples/audio/audio_soundprocessing.html#process-microphone-signals

I am trying to run it as is with only my robot's proper IP. Once it gets to the startProcessing function, it cannot find the new service created in ALAudioDevice and gives the following error

self.audio_service.setClientPreferences(self.module_name, 16000, 3, 0)
RUNTIMEERROR:   ALPROXY::ALPROXY
        CANT FIND SERVICE: SoundProcessingModule
[W] 1609782681.228570 42712 QITYPE.SIGNAL: DISCONNECT: NO SUBSCRIPTION FOUND FOR SIGNALLINK 14. 

Any idea of what should change to be able to run that example?

1 Answers

As you can see in the link you provided, prior to setting the audio client preferences, you must register your service (or "module") to NAOqi:

app.session.listen()
app.session.registerService("SoundProcessingModule", MySoundProcessingModule)

It is important that your service is registered prior to referring to it in other APIs such as setClientPreferences.

Related