def sendVisime(self, visime): if visime['name'] != 'Sil': msg = Viseme() msg.duration.nsecs = visime['duration']*1000000000*BaseVisemes.visemes_param[visime['name']]['duration'] msg.name = visime['name'] msg.magnitude = BaseVisemes.visemes_param[visime['name']]['magnitude'] msg.rampin = BaseVisemes.visemes_param[visime['name']]['rampin'] msg.rampout = BaseVisemes.visemes_param[visime['name']]['rampout'] self.vis_topic.publish(msg) else: # Send silence viseme: Using M instead msg = Viseme() msg.duration.nsecs = 100000000 msg.name = 'M' self.vis_topic.publish(msg)
def sendVisime(self, visime): if self.lipsync_enabled and self.lipsync_blender and (visime['name'] != 'Sil'): #Need to have global shapekey_store class. msg = Viseme() # Duration should be overlapping msg.duration.nsecs = visime['duration']*1000000000*BaseVisemes.visemes_param[visime['name']]['duration'] msg.name = visime['name'] msg.magnitude = BaseVisemes.visemes_param[visime['name']]['magnitude'] msg.rampin = BaseVisemes.visemes_param[visime['name']]['rampin'] msg.rampout = BaseVisemes.visemes_param[visime['name']]['rampout'] self.vis_topic.publish(msg) if self.lipsync_enabled and not self.lipsync_blender: msg = MakeFaceExpr() msg.exprname = 'vis_'+visime['name'] msg.intensity = 1.0 self.expr_topic.publish(msg)
def sendVisime(self, visime): if self.lipsync_enabled and self.lipsync_blender and (visime['name'] != 'Sil'): #Need to have global shapekey_store class. msg = Viseme() # Duration should be overlapping duration = visime['duration'] msg.duration.nsecs = duration * 1e9 * BaseVisemes.visemes_param[ visime['name']]['duration'] msg.name = visime['name'] msg.magnitude = BaseVisemes.visemes_param[ visime['name']]['magnitude'] msg.rampin = BaseVisemes.visemes_param[visime['name']]['rampin'] msg.rampout = BaseVisemes.visemes_param[visime['name']]['rampout'] self.vis_topic.publish(msg) if self.lipsync_enabled and not self.lipsync_blender: msg = MakeFaceExpr() msg.exprname = 'vis_' + visime['name'] msg.intensity = 1.0 self.expr_topic.publish(msg)
def sendVisime(self, visime): if visime["name"] != "Sil": msg = Viseme() msg.duration.nsecs = visime["duration"] * 1000000000 * BaseVisemes.visemes_param[visime["name"]]["duration"] msg.name = visime["name"] msg.magnitude = BaseVisemes.visemes_param[visime["name"]]["magnitude"] msg.rampin = BaseVisemes.visemes_param[visime["name"]]["rampin"] msg.rampout = BaseVisemes.visemes_param[visime["name"]]["rampout"] self.vis_topic.publish(msg) else: # Send silence viseme: Using M instead msg = Viseme() msg.duration.nsecs = 100000000 msg.name = "M" self.vis_topic.publish(msg)