Ejemplo n.º 1
0
class ChatTrack:
    def __init__(self):
        self.atomo = AtomicMsgs()
        rospy.Subscriber("chatbot_speech", ChatMessage, self.stt_cb)

    # ---------------------------------------------------------------
    # Speech-to-text callback
    def stt_cb(self, msg):
        if msg.confidence >= 50:
            self.atomo.who_said(msg.utterance)
Ejemplo n.º 2
0
class ChatTrack:

	def __init__(self):
		self.atomo = AtomicMsgs()
		rospy.Subscriber("chatbot_speech", ChatMessage, self.stt_cb)

	# ---------------------------------------------------------------
	# Speech-to-text callback
	def stt_cb(self, msg):
		if msg.confidence >= 50:
			self.atomo.who_said(msg.utterance)
Ejemplo n.º 3
0
class ChatTrack:
    def __init__(self):
        self.atomo = AtomicMsgs()
        rospy.Subscriber("chatbot_speech", ChatMessage,
                         self.chat_perceived_text_cb)

    # ---------------------------------------------------------------
    # Speech-to-text callback
    def chat_perceived_text_cb(self, msg):
        if msg.confidence >= 50:
            # XXX FIXME WTF Why are there two of these????
            # Surely one of these is enough to do the trick!
            self.atomo.who_said(msg.utterance)
            self.atomo.perceived_text(msg.utterance)
Ejemplo n.º 4
0
class ChatTrack:

	def __init__(self):
		self.atomo = AtomicMsgs()
		rospy.Subscriber("chatbot_speech", ChatMessage,
			self.chat_perceived_text_cb)

	# ---------------------------------------------------------------
	# Speech-to-text callback
	def chat_perceived_text_cb(self, msg):
		if msg.confidence >= 50:
			# XXX FIXME WTF Why are there two of these????
			# Surely one of these is enough to do the trick!
			self.atomo.who_said(msg.utterance)
			self.atomo.perceived_text(msg.utterance)