Screen Reader


When it comes to an offline Screen Reader there are options on Parrot like Orca or Festival, which are Accessibility-focused but normally this type of software is pointed towards usability -and over-complicated extensibility- more than voice quality, in this case we aim to a more Natural Voice, so articles, emails or chats can be heard without a so robotic tone.

1. Dependency Installs

apt install libmp3-info-perl libmp3-tag-perl libsox-fmt-mp3 libunicode-string-perl sox xsel mpg321 python3-pip

2. gTTS Install

This is why you require pip (Python Package Installer) also gTTS (Google Text-to-Speech), library and CLI tool to interface with Google Translate’s text-to-speech API, that’s what makes most of the job.

pip install gTTS

3. Execution Scripts

There are two ways to do this, the Manual way and the Manuel way.

“Manual” Way

CLI-ready, Select, Execute: Select a text placed anywhere on your desktop, xsel will pipeline the order on the CLI and you’ll hear the voice reading.

:us: English Voice

xsel | gtts-cli --nocheck - | mpg321 -

:es: Spanish Voice

xsel | gtts-cli --nocheck --lang es - | mpg321 -

“Manuel” Way

Just create a keyboard shortcut or keybinding: Parrot comes with MATE so you can just Add another one to the existing list, it’ll do the same work. Bind the command to a key combination e.g., Ctrl + Shift + R.

:us: English Voice

bash -c "xsel | gtts-cli --nocheck - | mpg321 -"

:es: Spanish Voice

bash -c "xsel | gtts-cli --nocheck --lang es - | mpg321 -"

What’s next? Well, I would say being able to control the playing, like pause and resume functions, a GUI maybe? However, if you know an existing implementation (or have made one) for such things you can PM me anytime here or over the Telegram groups and make great things with this one.

1 Like