首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >更改Nao的Choregraphe对话框置信区间

更改Nao的Choregraphe对话框置信区间
EN

Stack Overflow用户
提问于 2018-01-05 17:26:47
回答 3查看 457关注 0票数 1

我目前正在使用Choregraphe的一个Nao机器人工作,并试图将通过QiChat发出的请求所需的置信区间从默认的50%降低到30%。

我找到了这个解决方案,https://community.ald.softbankrobotics.com/en/forum/change-speech-engine-confidence-threshold-choregraphe-dialog-8624,但不幸的是,在Choregraphev2.1中,对话框的脚本功能被弃用了。有人知道这是什么“新”方法吗?

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2018-01-05 17:38:49

我已经找到了解决方案。不允许为对话框编写脚本,但您可以在对话框之前添加Python脚本以更改此间隔。此框中应该包含的代码如下所示。

代码语言:javascript
复制
class MyClass(GeneratedClass):
def __init__(self):
    GeneratedClass.__init__(self)

def onLoad(self):
    #put initialization code here
    pass

def onUnload(self):
    #put clean-up code here
    pass

def onInput_onStart(self):
    # Lower confidence threshold from 50% to 30%
    ALDialog = ALProxy('ALDialog')
    ALDialog.setASRConfidenceThreshold(0.3) 
    self.onStopped() #activate the output of the box

def onInput_onStop(self):
    self.onUnload() #it is recommended to reuse the clean-up as the box is stopped
    self.onStopped() #activate the output of the box
票数 1
EN

Stack Overflow用户

发布于 2018-01-06 00:11:50

提高识别率的两种解决方案:

1)在你的输入中添加更多的变体--例如,如果你在听"yes",你也应该确保你听到的是"yep","yup",“yes”,“for”,“for”,"fine“等等-概念对此很有用,参见the qichat doc

1)按照您的建议,设置置信度阈值-对于更紧凑的版本(我更喜欢更少的样板):

代码语言:javascript
复制
class MyClass(GeneratedClass):
    def onInput_onStart(self):
        # Lower confidence threshold from 50% to 30%
        ALProxy('ALDialog').setASRConfidenceThreshold(0.3) 
        self.onStopped() # activate the output of the box

但是,请注意,这并不是很优雅;您将需要重置它,并且它极大地增加了误报的风险,因此,只有在仅通过添加更多变体不能解决它的情况下,才应该使用它。

票数 1
EN

Stack Overflow用户

发布于 2020-03-04 00:24:23

setASRConfidenceThreshold代表Nao V5;在Pepper和Nao V6中,你应该使用setConfidenceThreshold

代码语言:javascript
复制
class MyClass(GeneratedClass):
    def onInput_onStart(self):
        # Lower confidence threshold from 50% to 30%
        ALProxy('ALDialog').setConfidenceThreshold("BNF", 0.3)

        self.onStopped() # activate the output of the box
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48110638

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档