Show HN: Lue – Terminal eBook Reader with Text-to-Speech

github.com

97 points by superstarryeyes 3 days ago

Shown HN: Lue - Terminal eBook Reader with Text-to-Speech

Hello,

Just went live on GitHub with this project.

I really enjoy listening to my eBooks as audiobooks but was frustrated by the available options. Converting books into audiobooks with scripts is tedious, and most tools stumble over footnotes, headers, or formatting. I wanted something simple: just throw a book at it, and it starts reading immediately without any clicking or loading.

I also wanted it to be customizable and modular because new, better TTS engines are released all the time. For this initial release, I settled on Edge and Kokoro because they’re both fast (real-time) and good quality. I’ve already made modules for Kitten TTS, Gemini and a few others, and they work too. So I hope this setup is future-proof.

Here’s what Lue supports:

Multi-format: EPUB, PDF, TXT, DOCX, HTML, RTF, and Markdown.

Modular TTS system: Default Edge TTS (online) and Kokoro TTS (offline/local), with an architecture to add more models.

Rich terminal UI: Full keyboard and mouse support, customizable color themes, smooth scrolling.

Smart persistence: Automatically saves reading progress across sessions.

Cross-platform & multilingual: macOS, Linux, Windows, supporting 100+ languages.

I’d love feedback on both usability and the TTS experience. Are there any features you wish it had?

nd4spdviper 3 days ago

For some reason I'm more interested on the "read epubs in terminal" than the TTS part. Don't know for certain for how long would one be interested on reading monospace text, also without certainty of the app remembering where I left, pagination and that stuff.

For me, running it on my home server so it can save my progress would be good.

  • aidenn0 2 days ago

    If you already have a favorite pagination tool, then just pipe this into it for reading epubs in the terminal:

        pandoc -f epub file.epub -t plain
  • superstarryeyes 3 days ago

    thanks for your insight! i started to build this project mainly for the tts features but you can certainly just read text on it.

    it saves the state of having the narration on or off, so if you ever open the book again you don't hear any voice. also the reading progress and state is automatically saved to your system log files. I'm pretty sure with a few settings in the config.py file you could direct them to your server.

    about the monospace fonts. yes, they're not the prettiest but they're very easy to read! easier than many much more beautiful fonts. and if you're tired of reading, just switch on the tts. ;)

    • starkparker 3 days ago

      In a DE and depending on the terminal emulator, one could probably set up a profile that uses variable-width fonts and switch to it for Lue. That experience would depend on how well it renders text, particularly typographical elements.

      • superstarryeyes 3 days ago

        that's a really cool idea! i wonder if it would break the ui though? i should try that.

        me, mainly i just look for the most beautiful monospace font i can find that has a nostalgic feel. recently my favourite has been "modeseven" (https://online-fonts.com/fonts/modeseven), which is also featured in the screenshot on the github page.

        • starkparker 3 days ago

          It does break the border, but that's a two-line fix in ui.py to use a Rich Panel without side borders:

            +  from rich import box
               ...
               book_panel = Panel(
                   book_content,
            +      box=box.SIMPLE_HEAD,
                   title=f"[{COLORS.PANEL_TITLE}]{progress_text}[/{COLORS.PANEL_TITLE}]",
               ...
          
          Then running lue in an emacs ansi-term or mlterm with a variable-width font configured, it looks like a typical ePub reader.
SilentM68 2 days ago

I just tried it in a Python UV Environment and it works more or less alright. I am using Ubuntu 24.04 LTS.

Only drawback, in my view, is the requirement of "espeak, antiword" packages outside the uv environment. I would prefer that all tools be installable inside the uv environment to reduce possible corruption or errors.

I do seem to have one issue. When I tried to use the "t" keyboard shortcut, the application refused to continue reading the book, epub in this case, when I pressed "a" to start auto playback. Pressing and depressing "pause" has no effect. Deactivating and reactivating the environment has no effect but it does drop me back to where it left off.

Though the terminal interface is acceptable, may I suggest that a more interactive interface might make it more attractive to people that are also used to a GUI interface. Perhaps creating a terminal GUI option using the Textual Python Terminal package.

It would also be good if when typing "lue", the app will automatically find the book I was last reading without me having to specify it in as an argument every time. A keyboard shortcut to display the reading history would also be useful.

Just a thought :)

  • superstarryeyes 2 days ago

    nice to hear! yes, there are some dependencies outside python which is not optimal, but at least the default install seem work, which is nice.

    i hadn't heard of textual python terminal before but i'm looking at the documentation right now and it seems very useful package. thanks for the recommendation! i'll definitely research this more.

sync 2 days ago

Awesome, I've been playing in the ebook space myself, will check it out. Particularly interested in digging into the code too see how you skip headers, footnotes, etc.

Just one quick note as I ran into this when setting it up:

   ╰─▶ Because the requested Python version (>=3.8) does not satisfy Python>=3.10,<3.13 and kokoro==0.9.4 depends on Python>=3.10,<3.13, we can conclude that kokoro==0.9.4 cannot be used.
Note I definitely disregarded your instructions and used `uv` to setup the project. Still, it seems like changing the `pyproject.toml` to `requires-python = ">=3.10"` would be good considering kokoro's Python version support.
  • superstarryeyes 2 days ago

    hey, appreciate the comment! yes, this definitely slipped by me. python 3.8 is too low for this project. i'll be fixing it asap and changing to 3.10.

stakhanov 2 days ago

Thanks a lot!

I have a section on my reading list for books that are available as e-books, but not as audiobooks, and that section just keeps growing ad infinitum. I seldom find the time to read, but I often have time for audiobooks, as I listen to them while driving, or doing household chores, etc.

So, when I saw your post, I immediately tried it out, and it works really well for my purposes.

One feature request: It would be awesome if there was a control for the speech rate.

  • superstarryeyes 2 days ago

    Great to hear that! Speech rate control is definitely on the roadmap.

drewbitt 2 days ago

I can't say I have ever desired to read something for multiple hours in the terminal, but it seems great for quickly checking a book.

> I’ve already made modules for Kitten TTS, Gemini and a few others, and they work too.

Did you publish these? or provide a guide to build your own? I have my own quick epub/txt to MiniMax tool but adapters or a framework to build your own would be nice. I see "modular" and "extensible" but not what to do.

  • superstarryeyes 2 days ago

    hey! i haven't released them yet. i'm still wondering what would be a proper method of distributing them. i would rather not have the main repo be filled with a bunch models that are not as universally compatible or as good quality as something like kokoro and edge. should i make another repo for them? some different fork?

    anyway, the instructions are here: https://github.com/superstarryeyes/lue/blob/main/DEVELOPER.m...

    i'll give you a tip for making the modules, which worked for me incredibly well:

    copy/paste the DEVELOPER.md to a high context window llm like gemini and then use something like this tool: https://repomix.com to generate a markdown of the whole github repo of a tts you want to port, and ask it to generate a module out of it for lue. it might work with one shot like it did for me for kitten tts, or you could have to do some follow ups, but this method has worked for me with many models already.

tiberius_p 3 days ago

Can it be made to work on Android from Termux or Userland?

  • superstarryeyes 3 days ago

    this I'm unable to answer because I don't have the means to try, but i'd love to know if it's doable. edge tts is surely light enough to run since all the processing happens in the cloud. the basic setup is just python and ffmpeg. let me know if you get it running!

skyzouwdev 3 days ago

This is neat. Most eBook → audio tools I’ve tried either butcher formatting or feel clunky, so a “just throw it in and listen” approach is refreshing. Curious how well it handles footnotes/sidebars in practice — do you skip them entirely or try to inline them?

  • superstarryeyes 3 days ago

    thank you! yes footnotes, page numbers, weird characters and other extra bits that interrupt the tts is one of my biggest gripes about ebook readers with audio. this was my biggest motivation to build this.

    those elements are basically removed from the text, because i wanted to keep the reading experience very simple in a sense, but i should maybe add an option to only skip them with the tts.

    though, i have to say lue is still not absolutely 100% perfect with this. epubs were easier because many of them are full of standardized xhtml/html tags. but there is still a lot of manual regexing in my code which i took a lot of time with, testing filters with 100 or so books to find the best and most general ones that are able to clean up most books.

    pdfs are whole another beast because they are basically blocks of text without any tags so it's much harder to format and clean them up. the way i solved this was to use positional filters which are of course not bullet proof because people scan pdf's in different ways and pages are laid out differently. so i tried to find the best average placements of these elements (top 10% and bottom 10%) and there's always the option not enable this filtering or change the values. i'm still trying to look maybe a better way to solve this.

Ciantic 3 days ago

I plan to test this, but I'm still holding off. This is coming from a user who seems to have a new account on GitHub and HN. Must take caution first and read about the implementation.

P.S. "lue" means "read" in Finnish.

  • superstarryeyes 3 days ago

    hei! no worries, take your time. just a first-time builder here who finally decided to release something after years of scripting privately for myself. thought this project might be use to someone else too. and yes, i'm from finland!

  • gosub100 3 days ago

    It's about 2500 lines of python. You should be done auditing it by now.