Speech recognised text into g-code or coordinates

69 Views Asked by At

I am presently engaged in a project centered around a speech-enabled writing machine. This endeavor involves converting spoken words into handwritten text using Python programming. Subsequently, precise coordinates are generated to control a CNC machine via an Arduino and raspberry pi interface, ensuring faithful replication of the handwritten text.

The CNC machine I've developed has the capability to draw or write various figures using Inkscape and a g-code sender application. Hardware components utilized include stepper motor sets sourced from old printers for X-axis and Y-axis movement, a servo motor for pen manipulation, A4988 stepper motor drivers, a CNC shield V3, and an Arduino UNO.

Here is the video link demonstrating the operation of my CNC machine that I have already built: [https://drive.google.com/file/d/1IhFmCsghhaR9XCrN8W5deedl79upsjki/view?usp=sharing].

My objective is to transform this CNC machine into a writing machine where user input is provided through speech. To achieve this, I've employed the Whisper.cpp model for speech recognition, as demonstrated in this YouTube video: [https://www.youtube.com/watch?v=Mfbei9I8qQc].

Now, I want your assistance in consolidating the recognized text into a coherent paragraph and converting it into a g-code or coordinate file. This file format will enable the CNC machine to write the text on paper in a realistic human handwriting style, akin to the model I've previously created.

Also is there any tutorial for fixing the above problem?

If this approach proves unfeasible, I welcome alternative suggestions to accomplish my project goals.

1

There are 1 best solutions below

5
KoalaMaybe On

This is a very broad question. I suggest in the future breaking it down into multiple specific questions.

What you described is unclear but from what i understand you are trying to voice control a cnc machine.

I recommend you create a bunch of “patterns” to match the recognized text to. When one of these “patterns” are recognized call a function which interfaces/controles your cnc machine (how this is achieved depends on your cnc machine firmware/controller)

I would suggest looking into languages parsing and how to implement a parser. Then looking up your specific cnc machine and how to send gcode to it remotely.