def __init__(self): self.define() rospy.Subscriber('speak_string', String, self.SpeedCB, queue_size=1) rospy.Timer(rospy.Duration(self.ResponseSensitivity), self.TimerCB) rospy.spin()