I think it is using the VNRecognizeTextRequest class from the Vision framework.
You find sample code for an Mac app from the 10041 session here: https://developer.apple.com/documentation/vision/locating_and_displaying_recognized_text
Topic:
Community
SubTopic:
Apple Developers
Tags: