feat: pitch setting

This commit is contained in:
2026-05-11 16:04:24 +02:00
parent ecf9d14a4e
commit 485dee8c39
2 changed files with 16 additions and 1 deletions

View File

@@ -114,6 +114,17 @@ class MainConfig(object):
self.max_handler_time_ms = get_config(max_handler_time_ms, "MAIN__MAX_HANDLER_TIME_MS", 50, int)
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
"""
def __init__(self, pitch=None):
self.pitch = get_config(pitch, "ROBOT_PITCH", 0.0, float)
class Settings(object):
"""
Global settings container.
@@ -126,12 +137,15 @@ class Settings(object):
:vartype audio_config: AudioConfig
:ivar main_config: Main system-level configuration.
:vartype main_config: MainConfig
:ivar robot_config: Robot configuration.
:vartype robot_config: RobotConfig
"""
def __init__(self, agent_settings=None, video_config=None, audio_config=None, main_config=None):
def __init__(self, agent_settings=None, video_config=None, audio_config=None, main_config=None, robot_config=None):
self.agent_settings = agent_settings or AgentSettings()
self.video_config = video_config or VideoConfig()
self.audio_config = audio_config or AudioConfig()
self.main_config = main_config or MainConfig()
self.robot_config = robot_config or RobotConfig()
settings = Settings()