Skip to content

Commit

Permalink
added script to set henrys voice
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-hanheide committed Feb 25, 2015
1 parent 7f14105 commit a169858
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions aaf_bringup/scripts/set_henry_voice.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#! /usr/bin/env python

import rospy
import mary_tts.srv

class IdleBehaviour(object):
# create messages that are used to publish feedback/result

def __init__(self, name):
# Variables
self._action_name = name

#Getting parameters
self.locale = rospy.get_param("~speak_locale", "de")
self.voice = rospy.get_param("~speak_voice", "dfki-pavoque-neutral-hsmm")

self.setVoice()

def setVoice(self):
rospy.wait_for_service('ros_mary/set_locale')
rospy.wait_for_service('ros_mary/set_voice')
try:
set_locale = rospy.ServiceProxy('ros_mary/set_locale', mary_tts.srv.SetLocale)
set_voice = rospy.ServiceProxy('ros_mary/set_voice', mary_tts.srv.SetVoice)
set_locale(self.locale)
set_voice(self.voice)
return
except rospy.ServiceException, e:
rospy.logerr("Service call failed: %s",e)

if __name__ == '__main__':
rospy.init_node('set_voice')
IdleBehaviour(rospy.get_name())

0 comments on commit a169858

Please sign in to comment.