Audio Control Module#
This module provides simple text-to-speech functionality for the dog robot. It wraps the underlying pyttsx3 engine and handles thread-safe playback.
- class go2.modules.audio.audio_module.AudioModule[source]#
Bases:
DogModuleAudioModulesupports both blocking and asynchronous playback.Users should not access or construct this class directly. Rather, they should access it through a
Go2Controllerinstance.Notes
Users do not need to manage threads or the underlying pyttsx3 engine. Though it can be done via a call
AudioModule.get_engine().
- get_engine() Engine[source]#
Access the underlying pyttsx3 engine.
- Returns:
The initialized text-to-speech engine.
- Return type:
pyttsx3.Engine
- Raises:
RuntimeError – If the audio module has not been initialized yet.
Notes
This method is primarily for advanced use cases. Users typically do not need to call this directly. Unless they want to modify the configuration of the text-to-speech