TuyaOS Speaker (tkl_ao / audio)
Demo: …/examples/driver_speaker/speaker_play.c (+ media assets)
Key APIs
| Function | Role |
|---|---|
tkl_ai_init / tkl_ai_start / tkl_ai_set_vol |
audio system bring-up in demo |
tkl_ao_set_vol / tkl_ao_put_frame |
output frames |
tkl_fs_mount / tkl_fopen / tkl_fread |
read media from flash/sd |
tkl_system_psram_malloc / _free |
decode buffers |
Guidance
- Prefer adapting
speaker_play.crather than inventing a new audio stack. - Confirm media location (inner flash vs SD) and volume with the user.
- Not TuyaOpen
tdl_audio_*/tdl_audio_play.