diff --git a/dialogflow_task_executive/node_scripts/dialogflow_client.py b/dialogflow_task_executive/node_scripts/dialogflow_client.py index 5f443346b..25e7c032a 100755 --- a/dialogflow_task_executive/node_scripts/dialogflow_client.py +++ b/dialogflow_task_executive/node_scripts/dialogflow_client.py @@ -73,6 +73,7 @@ def __init__(self): # use TTS feature self.use_tts = rospy.get_param("~use_tts", True) + self.volume = rospy.get_param('~volume', 1.0) # timeout for voice input activation by hotword self.timeout = rospy.get_param("~timeout", 10.0) @@ -181,9 +182,10 @@ def speak_result(self, result): msg = SoundRequest( command=SoundRequest.PLAY_ONCE, sound=SoundRequest.SAY, - volume=1.0, + volume=self.volume, arg=result.fulfillment_text.encode('utf-8'), arg2=self.language) + self.sound_action.send_goal_and_wait( SoundRequestGoal(sound_request=msg), rospy.Duration(10.0))