NAO机器人上的语音识别

时间:2018-07-02 11:13:04

标签: python speech-recognition nao-robot

我目前正在使用python脚本开发人与NAO机器人之间的互动游戏,目前我正在开发speechRecognition部分:

from naoqi import ALProxy
from ar_markers.hamming.detect import detect_markers

IP = ""
tts = ALProxy("ALTextToSpeech", IP, 9559)
asr = ALProxy("ALSpeechRecognition", IP, 9559)
asr.setLanguage("English")

vocabulary = ["yes", "help"]
asr.setVocabulary(vocabulary, False)

我定义了此功能:

def getTheOtherMatchingPair():
global StringPair
tts.say("The other matching pair is ")
tts.say(StringPair)

无论如何我是否可以找到单词,例如,当用户说“帮助”时,将调用getTheOtherMatchingPair函数,并且机器人会说出结果吗?

0 个答案:

没有答案