Convert Any Book to a DIY Audiobook?

If the idea of reading a physical book sounds like hard work, [Nick Bild’s] latest project, the PageParrot, might be for you. While AI gets a lot of flak these days, one thing modern multimodal models do exceptionally well is image interpretation, and PageParrot demonstrates just how accessible that’s become.
[Nick] demonstrates quite clearly how little code is needed to get from those cryptic black and white glyphs to sounds the average human can understand, specifically a paltry 80 lines of Python. Admittedly, many of those lines are pulling in libraries, and some are just blank, so functionally speaking, it’s even shorter than that. Of course, the whole application is mostly glue code, stitching together other people’s hard work, but it’s still instructive and fun to play with.
The hardware required is a Raspberry Pi Zero 2 W, a camera (in this case, a USB webcam), and something to hold it above the book. Any Pi with the ability to connect to a camera should also work, however, with just a little configuration.
On the software side, [Nick] pulls in the CV2 library (which is the interface to OpenCV) to handle the camera interfacing, programming it to full HD resolution. Google’s GenAI is used to interface the Gemini 2.5 Flash LLM via an API endpoint. This takes a captured image and a trivial prompt, and returns the whole page of text, quick as a flash.
Finally, the script hands that text over to Piper, which turns that into a speech file in WAV format. This can then be played to an audio device with a call out to the console aplay tool. It’s all very simple at this level of abstraction.
Yes, we know it’s essentially just doing the same thing OCR software has been doing for decades. Still, the AI version is remarkably low-effort and surprisingly accurate, especially when handling unusual layouts that confound traditional OCR algorithms. Extensions to this tool would be trivial; for example, adjusting the prompt to ask it to translate the text to a different language could open up a whole new world to some people.
If you want to play along at home, then head on over to the PageParrot GitHub page and download the script.
If this setup feels familiar, you’d be quite correct. We covered something similar a couple of years back, which used Tesseract OCR, feeding text to Festvox’s CMU Flite tool. Whilst we’re talking about text-to-speech, here’s a fun ESP32-based software phoneme synthesiser to recreate that distinctive 1980s Speak & Spell voice.