I think I could implement some CoreML in a OXT Extension, it seems like an easy very high-level API.
It's pretty cool, and the demo for the Sound Analyzer includes a use case that I'm very interested in https://developer.apple.com/videos/play/wwdc2019/425/