Nao机器人语音对话
C:ProgramFilesAldebaranRoboticsChoregrapheSuite2.1sharedocgetting_startedhelloworld_choregraphe_dialog.html
http://doc.aldebaran.com/2-1/naoqi/audio/dialog/dialog-syntax_full.html#delimiter-rule
首先根据这里建立一个工程,然后添加Setlanguage和Dialog模块。
接着双击左上角添加到工程的对话配置文件,这里以中文文件为例子*_mnc.top
输入以下内容
concept:(欢迎语)^rand[hihello"你好""很高兴见到你""哇""哇塞"]u:(~欢迎语)~欢迎语u:([hi你好{Nao}机器人科科])你好,我的[主人老板]u:(你叫什么名字)大家都叫我科科!u:(我的名字叫_*)很高兴见到你$1$name=$1u:(我的名字叫_[小熊石头])很高兴见到你$1$name=$1u:(我好饿)那你想吃什么呢,$nameu:(我想吃_*)你现在想吃$1吗,$name$food=$1u:(我点了什么)^first["你刚刚点了$food""我忘记了"]u:(给我讲个故事)%故事好的,要听新故事吗?u:([!不要给我讲个新故事要好的])好的,我会给你讲个新故事!u:([不要给我讲个新故事不不要])好的,我会给你讲三个和尚!u:([ShitFuck])不能讲脏话proposal:%天气今天的天气?因为Nao的语音是离线的,关于对话需要有一定的规则。
NAOqiAPIs—Audio—ALDialogfile:///C:/Program%20Files/Aldebaran%20Robotics/Choregraphe%20Suite%202.1/share/doc/naoqi/audio/dialog/aldialog.html#aldialog
file:///C:/Program%20Files/Aldebaran%20Robotics/Choregraphe%20Suite%202.1/share/doc/naoqi/audio/dialog/dialog.html#rule
u()为用户说的话,写在括号里。方括号[]里的为可替代词汇,{}里的为可省略词汇。
Concept¶AConceptisalistofwordsand/orphrasesthatrefertooneidea.Forexample,alistofcountries,alistofnames,synonymsofaword.TheycanbeusedbothinHumaninputorRobotoutput.
TherearetwotypesofConcepts:
TypeScopeAtruntime...Maycontain...StaticglobalcannotbemodifiedChoice:[],Optionalpart:{},concepts(staticanddynamic),functions(^rand,^first),Variable:$andConditions:==>