In context: Researchers are turning the creative world upside down, exploiting artificial intelligence and machine learning algorithms to turn many tasks into semi-autonomous processes. Nothing is safe from generative AI anymore, not even your local doctor's illegible writing.

Years before OpenAI and other organizations started toying with AI to easily generate text, speech, artworks, malware, and videos, machine learning researcher Sean Vasquez was studying a 2013 paper by Google DeepMind's Alex Graves to create "handwriting synthesis" experiments.

Vasquez archived his code on GitHub along with his web-based demo. The experiment is available at Calligrapher.ai, which Hacker News recently rediscovered. The handwriting synthesis behind Calligrapher.ai employs a generative method built upon a recurrent neural network (RNN).

An RNN is a class of artificial neural networks where connections between nodes can create a cycle allowing output from some nodes to affect subsequent input to the same nodes. Recurrent neural networks can exhibit temporal dynamic behavior, which makes them particularly useful in tasks such as handwriting or speech recognition. Like any other neural network, Vasquez trained Calligrapher.ai on a moderately large dataset of calligraphy samples, primarily the IAM On-Line Handwriting Database.

The IAM-On database contains "forms of handwritten English text acquired on a whiteboard," with samples from 221 different "writers" and more than 1,700 acquired forms. The database includes 13,049 isolated and labeled text lines in "on-line" and "off-line" format, for a total of 86,272 samples from an 11,059-word dictionary.

Calligrapher.ai can generate variable handwriting in 9 different styles, while users can change speed, legibility, and stroke width sliders for further customization. Unlike traditional font types designed to mimic handwriting, every sample generated by Calligrapher.ai should be unique even when the writing style is the same. Users can download the final result as an SVG vector file.

According to Vasquez, the legibility slider employs a method known as "adjusting the temperature of the sampling distribution" to alter variation in handwriting. Outputs come from a "probability distribution," and increasing the legibility "effectively concentrates probability density around more likely outcomes."

Being just a demo, Calligrapher.ai is limited in scope despite its ability to create believable handwriting patterns. Furthermore, Vasquez only trained the underlying RNN on English language samples, so the website isn't particularly good at reproducing accents commonly used in other languages.