How to convert handwriting to Text simultaneously?

How to make handwriting to text component/ utility ?

I want to create a facility in my app where someone draws or writes with his or her finger and that is converted in relative text, number, sign etc.

It is an education app where questions are available and below the questions, I want to create such functionality to write or draw with finger (or type with keyboard, as per user’s choice) which is ultimately converted in typed text.

Can you please help me ?