I’ve had an idea kicking around in my head for a while that I wanted to get working, and lately I’ve been trying to find excuses to write simple programs in Python. The idea was a program that would take in e-book files, and allow you to play them back one work at a time at a speed that you control.
Thanks to modern miracles like GPT-4, prototyping something like this doesn’t require an intricate knowledge of the language you’re working with. Instead, it rewards the ability to clearly state goals, test cases, conditions, and expected output. When the code fails, you need to be able to explain the failure, and a LLM coding assistant is completely changing the game.
The program will prompt you to find an epub file, and it will read the file structure for a rough idea of chapter names. In the app, the user can choose to set their reading rate by either Words Per Minute or Syllables Per Minute. Syllables per minute seemed like a good addition after initially testing with WPM. When long or complicated words come up, it’s natural that you would need more time to process the extra information, even if only a fraction of a second. I used an additional library called pyphen to interpret the words as they came through, and used the result to alter the amount of time to wait before loading the next word.
I find that reading this way is something that works better with the way I process information. When I try to sit down and read a normal page of text, I find that my eyes dart all over the place. I’ll read portions of sentences from further down, read the start of a paragraph but skip the third sentence, read entire portions of a page out of order, etc. It’s made it difficult to be an active reader, as it takes me a great deal longer than I feel it should to get through a page and I often find myself having to re-read content fairly regularly.
This program isn’t complete. I want to add controls, a much better UI, intelligent pauses, and probably try to remake it for mobile devices. I’m not sure how much I’ll be using it in this initial form, but I am very interested to see if this helps me become a better reader.
If you’re interested in trying this, or would like to branch it and add your own functionality, the code is available at: