diff --git a/src/reachy2_sdk/audio.py b/src/reachy2_sdk/audio.py index 5da72fd7..4e71c3f8 100644 --- a/src/reachy2_sdk/audio.py +++ b/src/reachy2_sdk/audio.py @@ -12,6 +12,7 @@ RecordingRequest, SoundId, SoundRequest, + TextRequest, VolumeRequest, ) from reachy2_sdk_api.sound_pb2_grpc import SoundServiceStub @@ -70,3 +71,6 @@ def set_audio_volume(self, volume: float) -> None: if not 0 <= volume <= 1: raise ValueError(f"Volume should be between 0 and 1, got {volume}") self._audio_stub.ChangeVolume(VolumeRequest(id=self._speaker_id, volume=volume)) + + def say_text(self, text: str) -> None: + self._audio_stub.SayText(TextRequest(text=text))