Choose your e-book, article or select any text and the reader will speak it out loud, sentence by sentence, while you read it in big ASCII Art letters!
Navigate as you wish, and control everything easily: the speed, the language, the volume of the audio and even the colors!
This is, by far, the most comfortable way to read a book and to be engaged in your favourite readings! You will read and listen to the text, at the same time, sentence by sentence.
cat-reader is an acronym for C Art Text Reader. It combines the power of C programming with modern text-to-speech technology to give you an artistic reading experience directly in your terminal.
- Versatile Input: Reads almost anything! Supports plain text, and complex formats like
epub,markdown,docx,odt,rtf,html, and even text extracted frompdffiles. - Simultaneous Reading & Listening: As the text scrolls in big ASCII Art, the sentence is spoken aloud in your chosen language via the integrated Piper TTS engine.
- Images in ASCII Art Format: When existing, images will be displayed colored in ASCII Art format.
- Total Control: Fine-tune the reading experience with controls for audio speed, volume, language, and visual appearance (colors, bold, dim, highlight).
- Seamless Navigation: Move through the text sentence-by-sentence, or jump large blocks forward or backward using intuitive keyboard shortcuts.
- Resource Efficient: Built in C, ensuring it runs quickly and without hogging your machine resources.
When in the immersive Reader mode, these shortcuts allow you to navigate, control playback, and customize the display.
| Key | Action | Description |
|---|---|---|
| β / A | Move Back (Single) | Moves to the previous sentence. |
| β / D | Move Forward (Single) | Moves to the next sentence. |
| β / W | Move Forward (Block) | Jumps forward by 10 sentences. |
| β / S | Move Back (Block) | Jumps backward by 10 sentences. |
| Page Up | Jump Forward (Large) | Jumps forward by 25 sentences. |
| Page Down | Jump Back (Large) | Jumps backward by 25 sentences. |
| Key | Action | Description |
|---|---|---|
| Space / P | Play / Pause | Toggles the audio playback. |
| Q / ESC | Quit | Immediately exits the Reader. |
| ] | Increase Speed | Makes the voice speak faster. |
| [ | Decrease Speed | Makes the voice speak slower. |
| { | Half Speed | Sets the playback speed to half. |
| } | Double Speed | Sets the playback speed to double. |
| R / Backspace | Reset Speed | Returns the playback speed to the default (1.0x). |
| +/- | Adjust Volume | Fine-tunes the speaker volume up or down. |
| Key | Action | Description |
|---|---|---|
| X | Change Background Color | Cycles through different background color schemes. |
| C | Next Color Scheme | Jumps to the next predefined visual theme. |
| Z | Reset Colors | Returns the text and background to the default green/dark-blue scheme. |
| B | Toggle Bold | Applies or removes bold formatting. |
| N | Toggle Dim | Applies or removes dim formatting. |
| H | Toggle Highlight | Applies or removes a highlight effect. |
| L | Cycle Languages | Quickly switches the language setting without returning to the main menu. |
| K | Print Sentence | Prints the current sentence in normal letters, allowing copy the text. |
cat-reader stands, as it has told above, for C Art Text Reader. It is written in C Language and provides a way to read your Text in an Artistic way, displaying it in ASCII Art big letters! In the image above we can see our little black cat also listening to something, which is the sound of the letters contained in the book, since our reader also "reads for you" the text out loud in the language you select!
For this text-to-speech feature, our application uses the Piper engine in the background (the new version GPL) and SDL2 to play the audio streaming. You don't need to install piper or any of its libraries, because they are already embedded in the code and in installed files.
To compile and run cat-reader, you need the following system packages:
gccbashmakepandoc(For.markdown,.epub,.docx,.rtf,.odt,.html)poppler-utils(For text extraction from.pdf)jqandnewt(For configuration and selecting options)json-c(The external C library for configuration parsing)SDL2(External C library for accessing the audio devices. It is needed to play the generated audio streams)
In Debian or Ubuntu:
sudo apt install build-essential bash pandoc poppler-utils jq newt libjson-c-dev libsdl2-devIn Fedora or CentOS:
sudo dnf install gcc make bash pandoc poppler-utils jq newt json-c-devel sdl2-compat-devel-
Clone this repository:
git clone https://github.com/MorceNOX/cat-reader.git
-
Install dependencies (see above).
-
Build the Binary:
cd cat-reader make -j$(nproc) make install-user sudo make install
-
You also need the
ascii-image-converterto show images in ASCII Art format, when they are available.
In this repository: ascii-image-converter you can download the last version which fits with your environment and copy it to the /usr/local/bin directory.
Done that and cat-reader will call it to display images.
Open your terminal and run:
cat-readerYou can intuitively navigate through the main menu, choose your language, configure your voice models, and select your documents or any text to be displayed in big letters and spoken out loud while you read.
Here are some screenshots followed by brief explanations. You can hit the Help option at any time in the main menu to get help.
This is the main menu containing the options to play (read) a file or a selected piece of text, select the language, the voice and the application settings.
To add new voices to the Reader, you firstly download a voice file .onnx and its corresponding JSON configuration file .onnx.json. You can find lots of Piper voice files on the internet. The main files are available here. Just download the files you want and hit the Get a Voice Model option in the main menu. A file dialog will appear and you must point to the downloaded .onnx file location, so the application will make the new voice ready to be used.
This is The Reader, Your terminal dimensions will determine the size and the amount of the text displayed in the screen. The punctuation determines the limits of a sentence.
If you find cat-reader useful and want to help improve it, contributions are welcome! Whether it's fixing a bug, refining the ASCII art, or adding support for a new file format, your input helps make this reader better for everyone. Please feel free to fork the repository and submit a pull request.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.














