我目前正在使用Choregraphe的一个Nao机器人工作,并试图将通过QiChat发出的请求所需的置信区间从默认的50%降低到30%。
我找到了这个解决方案,https://community.ald.softbankrobotics.com/en/forum/change-speech-engine-confidence-threshold-choregraphe-dialog-8624,但不幸的是,在Choregraphev2.1中,对话框的脚本功能被弃用了。有人知道这是什么“新”方法吗?
发布于 2018-01-05 17:38:49
我已经找到了解决方案。不允许为对话框编写脚本,但您可以在对话框之前添加Python脚本以更改此间隔。此框中应该包含的代码如下所示。
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发布于 2018-01-06 00:11:50
提高识别率的两种解决方案:
1)在你的输入中添加更多的变体--例如,如果你在听"yes",你也应该确保你听到的是"yep","yup",“yes”,“for”,“for”,"fine“等等-概念对此很有用,参见the qichat doc。
1)按照您的建议,设置置信度阈值-对于更紧凑的版本(我更喜欢更少的样板):
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但是,请注意,这并不是很优雅;您将需要重置它,并且它极大地增加了误报的风险,因此,只有在仅通过添加更多变体不能解决它的情况下,才应该使用它。
发布于 2020-03-04 00:24:23
setASRConfidenceThreshold代表Nao V5;在Pepper和Nao V6中,你应该使用setConfidenceThreshold
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 boxhttps://stackoverflow.com/questions/48110638
复制相似问题