Read Text Extension uses an external program or a web service to read text. Read the selection with Calc, Draw, Impress, Web Writer and Writer. Read the contents of the clipboard. Use speech synthesis to help to edit documents. Compare computer documen
latest release: 2023-03-15 04:55:22
Read Text Extension lets an external program or web application read text from Writer, Calc, Draw, Impress, Web Writer or the system clipboard. If you use it to read text aloud, it can help you to edit your writing or to compare your document's text with a printed document. If you use it with a web application, you can translate your text to another language or check punctuation and grammar. It can help you to learn a new language or to find out how to say words you do not know. To use it, highlight some text. If you are using the word processor or the HTML editor, you can highlight several selections by holding down the Control key. When you have highlighted some text, select Tools - Add-Ons - Read Selection or click the Read Selection button on the tool bar. To read the system clipboard, select Tools - Add-Ons - Read clipboard.
If you can't read the screen easily, consider a system-wide accessibility solution for Apple OSX, Gnome, KDE or Microsoft Windows. If you have installed a system-wide accessibility solution, and it is activated, then you might not need this extension to read text aloud. You can use the Read Text Extension to read using a different language or voice, to save speech as an audio file, or send the text to a web application.
The Read text extension uses temporary files to send information to external programs. Depending on the security set up of your computer, other users or programs might be able to read the contents of files that the the extension or other external programs produce. If you are concerned about privacy, launch this add-on again with no text selected to replace the temporary file that contains the text you want to remain confidential. The paths and names of any temporary files directly created by the extension are shown in the Command and Script areas of the About... dialog.
Built-in speech synthesis
Read Text extension uses your computer platform's built-in speech synthesis application by default. For example, Linux uses espeak. Apple OSX uses say. Windows uses the system's SAPI5 voices. A Windows computer can read with a different voice or language if you install an additional SAPI5 voice.
External programs can give your computer the ability to use different languages or voices. To use text to speech with a command-line based speech synthesis program like Festival or eSpeak on your computer, you may need to install extra speech files for your language and dialect. Custom voices will only work if they are installed. If you are using espeak with a recent release of Ubuntu Linux, you can install mbrola voices using the package manager. For other platforms, see the espeak-mbrola web page for instructions how to install voices from the mbrola project.
The external application can be any program you can start with a command line that can read plain text documents.
If you have an Internet connection, you can get started reading text aloud right away using different languages or voices without installing software by using the web application option. The extension uses your web browser or media player to play the selection. The main dialog of the Read Text Extension includes access to a web application for creating QR codes. QR codes are patterns of squares that embed text in a visual image so that mobile devices can quickly and reliably read information with a built-in camera. The application is powered by the Google Chart API. Read the on-line help for more information.
Additional documentation: http://code.google.com/p/readtextextension/wiki/About
- Bug fixes
- Additional docker tools - MaryTTS & Rhvoice-rest
- Pronunciation editor
How to edit localized pronunciation
When you use this extension with a compatible app, you can replace incorrectly pronounced words and acronyms with a string that the system speech synthesizer can read correctly.
"g":"Metis","p":"[met-tea]" "g":"Read Text Extension","p":"reed text extension"
- Select a word that you want to change the pronunciation (i.e.: "Metis")
- Select Tools - Add Ons... - Read Text Extension
- Click About...
- On MacOS Command + Click the Tools Icon, on other supported platforms, right-click the Tools Icon
- In the Read with an external program (macos_say) field enter how you want to say the mispronounced word (i.e.: "[met-tea]")
- Click Apply.
- You can find an example of a lexicon table on GitHub
- To download an online lexicon table, Command + Click or right click the Open button and verify the URL.
- LibreOffice 7.5 allows you to download or create localized lexicons to specify how text to speech says local words or peoples' names.
- On Windows, no speech is changed until you manually change the pronunciation of at least one word.
- When using a supported release of MacOS, LibreOffice 7.5 allows you to download or create localized lexicons to specify how text to speech says local words or peoples' names.
LinuxDownload 0.8.72 Simplify first run. PLS lexicon export. Linux Piper replaces Larynx 6.4 Linux, Windows, macOS LGPL
- On supported platforms, the first time you select text and click the toolbar button, the extension reads the selected text aloud using default settings instead of showing a dialogue. This makes it quicker and easier for new users to get started.
- Bug fixes and performance improvements.
- On supported platforms, enable export of x-sampa or ipa International Phonetic data using an XML format. The World Wide Web Pronunciation Lexicon Specification (PLS) is a standard way to describe pronunciation. For example, accessible ePub books can use PLS files to help reading systems pronounce uncommon words, place names and personal names correctly.
- The PLS uses alias to refer to a sequence of words. For example, writers can use “W3C” to mean “World Wide Web Consortium”.
- The W3C Pronunication Lexicon Specification uses phoneme to refer to an alternate spelling that uses a phonetic code.
- Specific language models might only support phonemes that are widely used in the language. As a result, they might not be able to pronounce some words correctly.
- Specific language models might require a specific phonetic code - like IPA or X-SAMPA.
- Each exported XML file includes only one regional pronunciation. Editors and publishers can optionally edit the file to specify pronunciation of specific words for other regions using a code editor.
The MacOS system allowed access to the phoneme editor even when phoneme substitution was not available using the default AppleScript scripting language. Now the extension disables right-click accessto editing phonemes from the tools button of the About dialog if python3 is not enabled.
- MacOS only supports phonemic substitution if python3 is enabled in the main dialog. Some MacOS users might need to agree to the current “Xcode and Apple SDKs license” to use some features of this extension that use python code. You can view and agree or reject the Apple license agreement by entering the following in a terminal window: sudo xcodebuild -license.
- Editing and using phonemic substitution requires you to enable/usr/bin/python3 in the external program field of the main dialog of the extension dialog instead of the default /usr/bin/osascript.
- The file dialog for the saving a phoneme file did not suggest a file name. It now suggests a file name.
- The extension can use StarBasic to generate SAPI text to speech if the Windows system wscript.exe program is not available.
Make it easier to add and select piper-tts voice models. Linux Piper replaces Larynx, because Larynx contributors can no longer update Larynx code.
- The main menu includes some suggested voices for different languages.
- When piper-tts is available, the main menu includes a menu item to update piper-tts metadata to include new languages and voices.
- Bug fixes.
- Lexicon updates.
- Support for LibreOffice 7.6.0 AppImage
- Debian 12 and Fedora 38 clients use pw-cat from the pipewire-bin package to improve the latency of audio playback on low end systems.
- Speech toggling worked correctly with localhost speech servers on Ubuntu 22.04 LTS but not with Debian or Fedora. Now when using Debian 12 and Fedora 38 and related platforms, the click to toggle off function of the application works as expected with system packages and AppImage packages.
- Remove Festival voice support from the docker OpenTTS client, because the OpenTTS server does not work consistently with Festival across all supported platforms. OpenTTS Flite voices are a fast and reliable alternative.
- Change the client’s timeout terminal troubleshooting message when a speech server unexpectedly fails.
The Mimic 3 localhost client now supports changing the speech rate.
Piper TTS is a fast, private local neural text to speech engine. Users can create or refine voice models based on a recording of a voice.
This client uses the piper engine to read text aloud using Read Text Extension with your office program.
Read Selection... Dialog setup:
Use the first available voice.
"(PIPER_READ_TEXT_PY)" --rate 100% --language (SELECTION_LANGUAGE_CODE) "(TMP)"
Use a particular model (auto5) and speaker (45):
"(PIPER_READ_TEXT_PY)" --voice auto5#45 --rate 75% --language (SELECTION_LANGUAGE_CODE) "(TMP)"
If you are not online, then you cannot download voice models or configuration files. Once they are installed, piper handles speech locally.
The binary release is fast.
The most recent binary piper executable program included in a piper archive for your computer's specific processor type. For example, piper_amd64.tar.gz works with x86_64 processors.
For example, for the piper_amd64 1.2.0 release, use the following:
python3 -c "import os;os.makedirs(os.expanduser('~/.local/share/piper-tts/'))" wget -O ~/piper_amd64.tar.gz https://github.com/rhasspy/piper/releases/download/v1.2.0/piper_amd64.tar.gz tar -xf ~/piper_amd64.tar.gz -C ~/.local/share/piper-tts/ ln -s -T ~/.local/share/piper-tts/piper/piper ~/.local/bin/piper-cli ~/.local/bin/piper-cli --version
Use the following if you do not plan to also install the python release:
ln -s -T ~/.local/share/piper-tts/piper/piper ~/.local/bin/piper
The python pipx package has higher latency, but the piper script simplifies automating downloading the required onnx data and json configuration files. Some Linux platforms use python versions that are incompatible or only partially compatible with the pipx stable release of piper-tts.
Install the following packages:
Then use pipx to install piper-tts
pipx update-all pipx install piper-tts pipx ensurepath piper -h
Audition and download a voice model
You can check the voice models online.
Review the voice model samples.
The first time you use this client, it will set up a directory to store piper voice models (onnx) and configuration files (json).
You can download the voice and configuration files for various languages and regions following the link on the piper-samples web page. Move the onnx and json files to the local piper-voices directory.
Read the README file in the directory for more information about using voice models for other languages and regions.
If you want every account on a single computer to have access to piper then locate the contents of piper_amd64.tar.gz or the equivalent for your computer architecture in a directory that every account has read access to and link the piper application from the archive to a location that is in every user's PATH environment. For example,
sudo ln -s -T /opt/piper-tts/piper/piper /usr/local/bin/piper
If this piper client does not find user installed models and configuration files, it looks for global models and configuration files in:
Users can access the model in the directory from the client dialog using:
"(PIPER_READ_TEXT_PY)" --voice auto0#0 --rate 100% --language (SELECTION_LANGUAGE_CODE) "(TMP)"
If your Linux distribution includes packages to link speech-dispatcher with piper-tts, then you can configure the speech-dispatcher platform to use piper-tts:
"(SPD_READ_TEXT_PY)" --language "(SELECTION_LANGUAGE_CODE)" "(TMP)"
Piper TTS LinksDownload 0.8.68 Updated `localhost` network speech platforms, MacOS & Linux bug fixes 6.4 Linux, Windows, macOS LGPL
- Bug fixes and code readability improvements.
- Lexicon updates.
- Updated localhost network speech platforms.
- The Mimic3 python library includes a gender table for supported models. You can instruct the program to ignore gender by using auto as the voice in the place of male or female.
- Enable the OpenTTS network speech synthesis on supported platforms. OpenTTS can use a variety of Linux speech synthesis libraries. You can install OpenTTS using docker on supported Linux platforms. OpenTTS unifies access to multiple open source text to speech systems and voices for many languages.
- Handle out of range voice id more consistently across localhost speech engines using modulus math. (i. e.: handle
--language "(SELECTION_LANGUAGE_COUNTRY_CODE)" --voice "FEMALE10" when there are only 6 female voices currently available.)
- Fixed a python network speech synthesis regression, so python users can use network speech as a fallback for an unsupported language.
- Bug fixes
- Updated lexicons
- Support for pipx (python pip using a virtual environment manager)
- Better support for user installed pip3 libraries
- Support for pipx (python pip using a virtual environment manager). The pipxlibrary allows you to install and run python applications in isolated environments. The pipx program replaces pip3 in Debian 12 and its derivatives.
- Support for developer-oriented speech servers – Mycroft Mimic3 and CoquiAI TTS.
- You can tell if the speech server is installed correctly if you can open a sample speech synthesis page in your web browser.
- Use either server using an option that includes the string "(NETWORK_READ_TEXT_PY)" --language "(SELECTION_LANGUAGE_COUNTRY_CODE)" "(TMP)" in the Read Text Extension main dialog.
- You can install spacy with pipx to reduce latency when using a local speech server with a long text selection. The spacy python library can intelligently split up long text selections into sentences.
- The documentation tells how to set up a Mimic3 server using the Debian deb package manager or a docker.io application.
- To test it out, use mimic3-server
- Once installed you can test the server and install voice models by using a web browser to open a local webpage.
- If you use the Read Text Extension dialog as described above, then the extension will try using mimic3-server first.
- If you prefer normally the system’s speech-dispatcher voice as your main speech manager and Mimic for a secondary language, then use "(SPD_READ_TEXT_PY)" --language "(SELECTION_LANGUAGE_COUNTRY_CODE)" --voice "AUTO" "(TMP)" in the main menu. The "AUTO" voice name enables using the local mimic3-serverfor languages that the system’s speech-dispatcher does not support directly.
- The instructions for Mimic3 describe how to set up speech-dispatcher to use mimic3 by default. In this case, you can omit the AUTO voice (i. e.: "(SPD_READ_TEXT_PY)" --language "(SELECTION_LANGUAGE_COUNTRY_CODE)" "(TMP)")
CoquiAI TTS engine is a deep learning toolkit for Text-to-Speech, mainly intended for use in research and production services. It includes a tool called tts-server that uses a local http service to allow web browsers and other programs that can connect to a local http server to convert text to speech. With the Read Text Extension network client you can check how new TTS models work with real world text. See tts-server --help
A server instance only serves one model at a time, but you can specify the language by selecting a model that includes the iso language code for the language in the model name. See tts-server --list_models
If you do not specify a model, then the server uses a female en-US model by default.
Example server commands
- Default tts-server
- English tts-server --model_name tts_models/en/vctk/vits
- French tts-server --model_name tts_models/fr/css10/vits
Check the documentation for specific hardware and software requirements. Some voice models require system files that are not explicitly stated in the documentation. Best practice is to use TTS python libraries in a virtual environment by installing TTS using venv, pipx or docker.io tools. You can use the web page interface to test if the server works and if there are any problems with a particular voice model. If a model does not work at all, run the tts-server program in a command window and note any error messages that mention missing libraries or system packages.
Read Text Extension's python TTS client uses a few additional system packages - python3-bs4, python3-pip, pipx and espeak-ng. On supported Ubuntu distributions you can use:
sudo apt-get install python3-bs4 python3-pip pipx espeak-ng
To troubleshoot the server and the client, you can see information and error messages when you run the server and office program using separate terminal windows.
- Server tts-server --model_name tts_models/en/vctk/vits
- Client /usr/bin/libreoffice
Enable Coqui.ai TTS server in the office program using the main Read Text Extension dialog with
"(NETWORK_READ_TEXT_PY)" --language "(SELECTION_LANGUAGE_COUNTRY_CODE)" "(TMP)"
If you prefer normally the system’s speech-dispatcher voice as your main speech manager and tts-server for an unsupported secondary language, then use
"(SPD_READ_TEXT_PY)" --language "(SELECTION_LANGUAGE_COUNTRY_CODE)" --voice "AUTO" "(TMP)"`Download 0.8.62 Updates for MacOS 13.0.1 and Debian Linux 11.5 plus documentation updates and bug fixes 5.4 Linux, Windows LGPL
Clicking multiple times quickly on the main button on a legacy Windows system will not cause the application to open the Basic editor with an error message because of a request to delete a lock file that no longer exists.
- MacOS 13 (Ventura) includes many new multilingual voices. Now, if you use /usr/bin/python3 as the application in the main extension dialog, you can select different voice profiles like “male2” or “female1” that select a male or female profile for every language that has both male and female voices.
- On MacOS, python checks if Fiona and Lee are actually installed before allowing them as a voice option. These two voices appear in the say -v '?' response, but they are not installed by default in all regions.
Support the larynx-server speech synthesis platform.
- Since the larynx-server Application Programming Interface (API) uses the http network protocol, supported snap and flatpak versions of office software that block speech-dispatcher can now use high quality speech synthesis with Read Text Extension.
- The larynx package includes many high quality voices. You can manage languages and voices using a web browser pointed to a locally hosted web page.
- Supported languages include Dutch, English, French, German, Italian, Russian, Spanish, Swedish and Swahili.
- On Debian 11.5 compatible Linux platforms, you can use cinnamon-settings startup, gnome-tweaks or another similar application to set up larynx-server to automatically start up after 10-15 seconds when you log in. For testing purposes, you can also start the server by entering the larynx-server command in a terminal window.
Bug fixes and support. Supports more .wav to .mp3 converters.
- Fix VLC exports. Omit Flac export – sometimes created a file with length of zero. Do not ask for metadata with VLC because VLC does not include metadata.
- Python update readtexttools.py includes a command for Windows Media Player to play mp3 files.
- MacOS Monterey 12.6 uses python 3.9.6, so the release includes a compatibility update.
- Improved audio file export support for lame. Versions of LibreOffice released as appImages require ffmpeg or lame to be able to export .mp3 files. This release supports lame in addition to ffmpeg. If you install one of these programs, the main menu includes an option to include a poster image with the .mp3 audio file.
- Playback on Linux. Resolves Debian Linux GitHub Issue 21. When using plain single and double quotes with pico2wav or speech-dispatcher, the speaker would pronounce the character coding for the characters on some systems. This update resolves this issue.
Download 0.8.58 Bug fixes and performance improvements. 5.4 Linux, Windows, macOS LGPL
Bug fixes and performance improvements. Works on legacy i386 32 bit systems.
Download 0.8.56 Bug fixes for LibreOffice 7.3. Feature update for Ubuntu Linux 22.04 LTS. 3.3 Linux, Windows, macOS LGPL
This release includes bug fixes for LibreOffice 220.127.116.11 and current language frameworks for Ubuntu Linux and Fedora Linux.
- GitHub Issue 19 March 30, 2022 is resolved. LibreOffice 18.104.22.168 does not display a dialog saying “Argument not optional” and stop.
- Copyright information for on-line service providers is included.
- Ribbon Enabled - The extension can display buttons on the LibreOffice ribbon toolbar. Before you select View – User Interface… – Ribbon, note that if you choose to use the ribbon, you will have to perform two clicks to read text aloud; one to select the Extensions tab and one to click the Read Selection… button.
- You can add the ability to create compact audio files without personal metadata if you install the desktop version of VideoLan VLC. The Windows Store version of Apple iTunes also works now, but the files it creates are larger because they include metadata information and an image.
- You can add the ability to create compact audio files in open formats like ogg and opus without personal metadata if you install the desktop version of VideoLan VLC.
- File export works in both legacy and current versions of MacOS.
- Both Fedora and Ubuntu can read text aloud when using a current Try Ubuntu or Try Fedora USB stick or DVD.
- If you download an AppImage of LibreOffice to try out a different version, then you can probably use most functions of the extension, depending on the exact version of LibreOfficeyou install. It’s been verified with LibreOffice 22.214.171.124.
- The python script for Festival now lets you use Flite as an alternative to a full installation of Festival for a compact low latency English voice.
- If you have installed the necessary packages, the extension can play jtalk voices in Japanese.
- When you create a media file, a Fedora or Ubuntu Gnome desktop pops up an information message when the program finishes creating the file.
* Works on MacOS Big Sur
* Updated sample web links
Bug fixes for LibreOffice 126.96.36.199.
- Remove VLC from list of compatible players and convertors for Linux because the functions that the extension depended on no longer work.
- Improve readability of code and correct syntax errors.
- LibreOffice 6.2.3 for Windows, MacOS and Linux does not allow the extension script to restore the last displayed option for the dialogue; therefore the dialogue always defaults to the first available option.
- By disabling the festival option if the festival program is not installed, the dialogue defaults to External Program, the most commonly used option on Windows and MacOS.
- Windows and MacOS commonly can use multilingual system voices, therefore you do not need Festival unless you require a voice for a region that are not available in the system voices catalogue
- The scripts for setting up the dialogue use
withnotation to make the code more readable.
- The main dialog uses a compatible group tag for the option radio button and uses a tab order that groups the radio buttons together.
- Make compatible with the AppImage format (AppImage is a format for distributing portable software on Linux without needing superuser permissions to install the application.)
- Update help, links and comments.
- Bug fixes and performance improvements.
Bug fixes and appearance improvements.
- Redesign the toolbar icon for better appearance when using LibreOffice 6 for Windows.
- Make speech scripts compatible with Ubuntu 18.04 LTS Bionic Beaver.
- When reading XML code aloud on Linux speech platforms, read the text without the XML tags and attributes.
- Update the release version string.
Improved multilingual support on Windows 10.
Download 0.8.34 Bug fix 4.4 Linux, Windows, macOS GPL
Incorrect StarBASIC syntax: missing closing parenthesis
With a recent changes in LibreOffice StarBasic parser, it now doesn't silently accept a missing closing parenthesis anymore (as it did before).
This release adds missing closing parenthesis.Download 0.8.32 Update links; fix support for Gstreamer sound playing in Linux. 4.2 Linux, Windows, macOS GPL
Update links; fix support for Gstreamer sound playing in Linux.Download 0.8.32 Update links; fix support for Gstreamer sound playing in Linux. 4.2 Linux, Windows, macOS GPL
Update links; fix support for Gstreamer sound playing in Linux.Download