def AsrServerActivateKeyword_cb(userdata, request):
     rospy.loginfo("Activating Keyword " + userdata.keyword_name)
     requ = ASRSrvRequest()
     requ.requests = [ASRSrvRequest.KWSPOTTING]                
     requ.model.action = ASRLangModelMngmt.ENABLE
     requ.model.modelName = copy.deepcopy(userdata.keyword_name)
     rospy.logwarn("AsrServerActivateKeyword_cb sending keyword: \n" + str(requ.model.modelName))
     return requ
示例#2
0
 def AsrServerRequestStatus_cb(userdata, request):
     requ = ASRSrvRequest()
     requ.requests = [ASRSrvRequest.STATUS]
     requ.activation.action = ASRActivation.ACTIVATE
     requ.model.action = ASRLangModelMngmt.ENABLE
     requ.model.modelName = ''
     requ.lang.language = 'en_US'
     userdata.standard_error = ''
     return requ
示例#3
0
 def AsrServerRequestDeactivate_cb(userdata, request):
     rospy.loginfo("Deactivating Asr service")
     requ = ASRSrvRequest()
     requ.requests = [ASRSrvRequest.ACTIVATION] #, ASRSrvRequest.GRAMMAR, ASRSrvRequest.LANGUAGE]
     requ.activation.action = ASRActivation.DEACTIVATE                
     #requ.model.action = ASRLangModelMngmt.ENABLE
     #requ.model.modelName = userdata.grammar_name       
     #requ.lang.language = 'en_US'
     return requ
示例#4
0
 def AsrServerRequestActivate_cb(userdata, request):
     rospy.loginfo("Activating Asr service")
     requ = ASRSrvRequest()
     requ.requests = [ASRSrvRequest.ACTIVATION]
     requ.activation.action = ASRActivation.CALIBRATE 
     #requ.model.action = ASRLangModelMngmt.ENABLE
     #requ.model.modelName = copy.deepcopy(userdata.grammar_name)
     rospy.logwarn("AsrServerRequestActivate_cb Calibrating")
     return requ
示例#5
0
 def AsrServerRequestStatus_cb(userdata, request):
     requ = ASRSrvRequest()
     requ.requests = [ASRSrvRequest.STATUS]
     requ.activation.action = ASRActivation.ACTIVATE                
     requ.model.action = ASRLangModelMngmt.ENABLE
     requ.model.modelName = ''       
     requ.lang.language = 'en_US'
     userdata.standard_error = ''
     return requ
示例#6
0
 def AsrServerRequestActivate_cb(userdata, request):
     rospy.loginfo("Activating Asr service")
     requ = ASRSrvRequest()
     requ.requests = [ASRSrvRequest.GRAMMAR, ASRSrvRequest.ACTIVATION]
     requ.activation.action = ASRActivation.ACTIVATE
     requ.model.action = ASRLangModelMngmt.ENABLE
     requ.model.modelName = copy.deepcopy(userdata.grammar_name)
     rospy.logwarn("AsrServerRequestActivate_cb activating grammar: " + str(requ.model.modelName))
     return requ
示例#7
0
 def AsrServerActivateGram_cb(userdata, request):
     rospy.loginfo("Activating Grammar " + userdata.grammar_name + " and Language")
     requ = ASRSrvRequest()
     requ.requests = [ASRSrvRequest.GRAMMAR, ASRSrvRequest.LANGUAGE]
     requ.model.action = ASRLangModelMngmt.ENABLE
     requ.model.modelName = copy.deepcopy(userdata.grammar_name)
     requ.lang.language = "en_US"
     rospy.logwarn("AsrServerActivateGram_cb sending grammar: \n" + str(requ.model.modelName))
     return requ
示例#8
0
 def AsrServerRequestActivate_cb(userdata, request):
     rospy.loginfo("Activating Asr service")
     requ = ASRSrvRequest()
     requ.requests = [ASRSrvRequest.ACTIVATION]
     requ.activation.action = ASRActivation.CALIBRATE 
     #requ.model.action = ASRLangModelMngmt.ENABLE
     #requ.model.modelName = copy.deepcopy(userdata.grammar_name)
     rospy.logwarn("AsrServerRequestActivate_cb Calibrating")
     return requ
示例#9
0
 def AsrServerActivateKeyword_cb(userdata, request):
     rospy.loginfo("Activating Keyword " + userdata.keyword_name)
     requ = ASRSrvRequest()
     requ.requests = [ASRSrvRequest.KWSPOTTING]
     requ.model.action = ASRLangModelMngmt.ENABLE
     requ.model.modelName = copy.deepcopy(userdata.keyword_name)
     rospy.logwarn(
         "AsrServerActivateKeyword_cb sending keyword: \n" +
         str(requ.model.modelName))
     return requ
示例#10
0
 def AsrServerActivateGram_cb(userdata, request):
     rospy.loginfo("Activating Grammar " + userdata.grammar_name +
                   " and Language")
     requ = ASRSrvRequest()
     requ.requests = [ASRSrvRequest.GRAMMAR, ASRSrvRequest.LANGUAGE]
     requ.model.action = ASRLangModelMngmt.ENABLE
     requ.model.modelName = copy.deepcopy(userdata.grammar_name)
     requ.lang.language = 'en_US'
     rospy.logwarn("AsrServerActivateGram_cb sending grammar: \n" +
                   str(requ.model.modelName))
     return requ
示例#11
0
 def AsrServerRequestActivate_cb(userdata, request):
     rospy.loginfo("Activating Asr service")
     requ = ASRSrvRequest()
     requ.requests = [
         ASRSrvRequest.KWSPOTTING, ASRSrvRequest.ACTIVATION
     ]
     requ.activation.action = ASRActivation.ACTIVATE
     requ.model.action = ASRLangModelMngmt.ENABLE
     requ.model.modelName = copy.deepcopy(userdata.keyword_name)
     rospy.logwarn(
         "AsrServerRequestActivate_cb activating keyword: " +
         str(requ.model.modelName))
     return requ