How to subcribe an event of ALSpeechRecognition Naoqi in Python

偶尔善良 提交于 2019-12-24 07:05:06

问题


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


回答1:


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")


来源:https://stackoverflow.com/questions/44160518/how-to-subcribe-an-event-of-alspeechrecognition-naoqi-in-python

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!