User-defined sound recognition and automatic custom tags

I would like Sleep as Android to support user-defined sound categories.
For example, I regularly have recordings containing a distinct clicking sound. I can manually add the tag #click, but I would like the app to learn from the recordings I tag and automatically apply #click to similar recordings in the future.
A possible workflow could be:

The user creates a custom tag such as #click.
The user marks several example recordings with that tag.
Sleep as Android uses those examples to recognize similar sounds.
Future matching recordings are automatically tagged, ideally with a configurable confidence threshold.
The user can confirm or correct the result to improve recognition.

For privacy, it would be great if this could work locally on the device. Alternatively, users could explicitly opt in to sharing selected training samples.
This would also be useful for other recurring sounds, such as teeth grinding, bed noises, pets, specific breathing sounds, environmental noises, or medical equipment.

Hi @slingSleeper, just a note about this - teaching the app a new sound class requires hundred thousands of samples of the sound event, ideally recorded from different phones (different mic quality), distances, background sounds… The process of learning a new sound class takes months of heavy analysis. Under the current technical level, it cannot run locally on an Android device.