get_predefined_sounds()
- 1 Minute to read
get_predefined_sounds()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
Returns a list with all the prederfined sounds that can be played.
Arguments
None
Return
Type | Description |
---|---|
List | List of predefined sounds names. |
Usage example
Code:
from raya.application_base import RayaApplicationBase
class RayaApplication(RayaApplicationBase):
async def setup(self):
self.sound = await self.enable_controller('sound')
async def loop(self):
self.sounds = self.sound.get_predefined_sounds()
print(self.sounds)
self.finish_app()
async def finish(self):
self.log.info(f'Hello from finish()')
Console output:
['happy', 'finish_task', 'on_the_go']
Was this article helpful?