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
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
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
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
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
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
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
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
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