get_predefined_sounds()¶
Returns a list with all the prederfined sounds that can be played.
Reference¶
Arguments¶
None
Return¶
Type |
Description |
|---|---|
|
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']