diff --git a/src/robot_interface/core/config.py b/src/robot_interface/core/config.py index 97cc876..4690323 100644 --- a/src/robot_interface/core/config.py +++ b/src/robot_interface/core/config.py @@ -118,11 +118,11 @@ class RobotConfig(object): """ Configuration of Pepper-specific parameters, like speech pitch. - :ivar pitch: The relative pitch offset of Pepper's voice, in relation to its base pitch. - :vartype pitch: float + :ivar voice_shaping: Pepper's voice shape, a number between 50 and 150. Defaults to 100. + :vartype voice_shaping: int """ def __init__(self, pitch=None): - self.pitch = get_config(pitch, "ROBOT__PITCH", 0.0, float) + self.voice_shaping = get_config(pitch, "ROBOT__VOICE_SHAPING", 100, int) class Settings(object): diff --git a/src/robot_interface/endpoints/actuation_receiver.py b/src/robot_interface/endpoints/actuation_receiver.py index 00c246a..68b92c3 100644 --- a/src/robot_interface/endpoints/actuation_receiver.py +++ b/src/robot_interface/endpoints/actuation_receiver.py @@ -68,7 +68,6 @@ class ActuationReceiver(ReceiverBase): if not self._tts_service: self._tts_service = state.qi_session.service("ALTextToSpeech") - self._tts_service.setParameter("pitchShift", settings.robot_config.pitch) if message.get("is_priority"): # Bypass queue and speak immediately @@ -157,7 +156,7 @@ class ActuationReceiver(ReceiverBase): try: text = self._message_queue.get(timeout=0.1) state.is_speaking = True - self._tts_service.say(text) + self._tts_service.say("\VCT={}\{}\RST\".format(settings.robot_config.voice_shaping, text)) except Queue.Empty: state.is_speaking = False except RuntimeError: