play_predefined_sound()
- 1 Minute to read
play_predefined_sound()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
play_predefined_sound()
Play a predefined sound in the robot.
You can find a list of predefined sounds, including suggested use cases for each of them under this section.
Arguments
Arguments | Type | |
---|---|---|
inter_name | string | name of the predefined sound |
wait | bool | If True , code will be blocked until the end of the sound. Default value is False . |
Return
None
Example
from raya.application_base import RayaApplicationBase
class RayaApplication(RayaApplicationBase):
async def setup(self):
self.sound = await self.enable_controller('sound')
async def loop(self):
await self.sound.play_predefined_sound('charging')
self.finish_app()
async def finish(self):
self.log.info(f'Hello from finish()')
Was this article helpful?