KyO Hoai Bac
KyO Hoai Bac

Reputation: 53

How to subcribe an event of ALSpeechRecognition Naoqi in Python

Hi I want subcribe Event: "SpeechDetected" of ALSpeechRecognition API naoqi for Nao in python. Anyone know how to use this ?? http://doc.aldebaran.com/2-1/naoqi/audio/alspeechrecognition-api.html#SpeechDetected

Upvotes: 1

Views: 555

Answers (1)

Alexandre Mazel
Alexandre Mazel

Reputation: 2558

To do that, you need to create a python NAOqi module, then register to the variable using subscribeToEvent (or subscribeToMicroEvent).

you can have a look there: http://doc.aldebaran.com/2-1/naoqi/core/almemory-tuto.html#almemory-tuto

Beware: due to scoping the python variable must have the same name than the module name you create, as seen in this line:

pythonModule = myModule("pythonModule")

Upvotes: 0

Related Questions