TuyaOS Mic / Recorder (tkl_ai)
Demo: …/examples/driver_mic/example_recorder.c (+ wav_encode.*)
Key APIs
| Function | Role |
|---|---|
tkl_ai_init / tkl_ai_start / tkl_ai_set_vol |
capture path |
tkl_ao_set_vol / tkl_ao_put_frame |
playback path if looping |
tkl_fs_mount / tkl_fopen / tkl_fwrite / … |
save WAV/PCM |
tkl_system_psram_malloc / _free |
large buffers |
tkl_gpio_* |
optional trigger pin |
Guidance
- Open the demo and copy the
TKL_AUDIOconfig struct fields for this SDK. - Confirm sample rate / channels / trigger GPIO with the user.
- PSRAM may be required on T5-class chips — follow demo allocators.
- This is not TuyaOpen
tdl_audio_*.