Is there a speech recognition API on macOS?

There is a Speech Recognition API in iOS 10 introduced in 2016 that can be used for transcribing. It is limited and runs on the sever.


However, macOS already has speech recognition & transcribing built in which you can use in several applications including Pages, and runs locally and uses only your computer's resources and doesn't require the server or an internet connection.


Is there a way to write a mac app that uses this capability? If not, I'm wondering why. Getting access to a limited server based transcribing service but not to a local one limited only by the machine's capacity seems like a missed oportunity.


I am wondering if this framwork is accessible and I simply can't find info on it, if this this indeed is not available to developers.


Thanks