How to automatically select a compatitable audio interface ID in the script of the python API for sound recognition?


I want to ask is there a way to have the script in the Python SDK library that classifies sounds from an input microphone, select an available compatitable audio interface ID to use automatically,because if i set a spesific device id inside the script,when i reboot the raspberry pi the id for that audio device has changed so the script stops executing for selection of an approperiate audio device id.

Thanks for taking the time to read my question,


Hi @geosasa,

That is the default behavior if you don’t provide a device ID to the script. If you want a bit more control on the selected device, you can also call the listAvailableDevices() from the Microphone class in our SDK:, and filter out the device description to select the correct ID for classification.

Let me know if that helps,

Thanks for the answer i will try it out and come back to you with the results,