How to recognize handwritten text like the Notes app?

In WWDC-20 Inspect, modify, and construct PencilKit drawings, Will Thimbleby said:

Spline-based recognition can make use of maskedPathRanges to provide a sensible interpretation of masked strokes, and this is what we do for handwriting recognition in Notes.

If I have a PKCanvas and make a PKDrawing with Apple Pencil, how can I convert these PKStrokePaths:

into

str = "Hello, World!"

Can this be done using Apple frameworks?

Cheers!

How to recognize handwritten text like the Notes app?
 
 
Q