Go to the documentation of this file.00001
00002
00003 import roslib; roslib.load_manifest('sound_play')
00004 import rospy
00005 from std_msgs.msg import String
00006 from sound_play.libsoundplay import SoundClient
00007
00008 class SoundIntermediary():
00009 def __init__(self):
00010 self.sound_client = SoundClient()
00011 self.voice = rospy.get_param("~voice", "kal_diphone")
00012 rospy.Subscriber("wt_speech", String, self.speak)
00013
00014 def speak(self, msg):
00015 self.sound_client.say(msg.data, self.voice)
00016
00017 if __name__=='__main__':
00018 rospy.init_node('wt_sound_intermediary')
00019 SI = SoundIntermediary()
00020 while not rospy.is_shutdown():
00021 rospy.spin()