Espeak Plugin


Rockbox version available on this site contains a Espeak plugin, which allows you to read a plain text files in utf-8 encoding. It uses a free TTS, Espeak. A port of this speech synthesis for RB was created in 2007 by Rockbox developer Toni. His work was not accepted in RB because of license reasons (More information in Discussion board ). I edited this plugin at the end of last year, so now it can read a plain text files.

It contains version of Espeak from 2007, so there are limitations, which were in this version of Espeak.

How it works

When you click on the file with .txt extension, Espeak plugin will load this file. At the beginning, plugin will say "ready to read". Use the following buttons to control this plugin on Sansa Clip Plus player:

Speech parameters configuration

In the context menu there are a few commands to controll speech parameters: "select language", "set rate" and "set pitch", so you can set a language, rate and pitch of speech synthesis. Use arrow keys to choose a parameter and select it by pressing the select button. Afterthat use play and submenu buttons to select appropriate value and comfirm it by pressing the select button.


Use the "save bookmark" item to save a current position of the cursor. This position will be saved in file with .bmark extension, which will be stored in the same folder, as the folder where is the opened text file.

The "load bookmark" item loads the saved position. After activating this item, cursor will be moved to the saved position.

The "goto the begining of the file" item moves the cursor to the beginning of opened text file.

Automatic actions

In the plugin's menu you can set automatic actions, which will plugin do after opening a file, directly before the exiting of plugin or when the battery level will be lover than 2 percent. Brief description follows:

what to do after start:

What to do before exit:

What to do when battery reaches 2%:

Configuration saving

By activating the "save configuration" item you can save actual speech parameters (rate, pitch and language) to the file. File named espeak.config will be created in the same folder, where is the currently opened text file.

The configuration file is loaded immediately after plugin is launched and it works as follows:

Function, which is described above allows you to create special settings for text files in different languages so you create convenient folder structure and copy the configuration files to parent directoryes.

Example: We have a folder called txt. In this folder are subfolders: slovak, czech, and english. In every of this folder create any structure (magazines, books, articles,...). Now Open any txt file for example in folder txt/slovak/books. Set speech parameters to Slovak language, and maximum rate and save the configuration. Afterthat exit the plugin. Now, there is a espeak.config file in folder /txt/slovak/books. Now cut This file using the appropriate item in context menu, and in folder tree wiev move to the txt/slovak folder and paste configuration file here. When you open any file from txt/slovak folder or it's subfolders, Espeak plugin will automatically load configuration file which you created.

Adding a paragraph to notes

Use the function "add to notes.txt" to append currently selected paragraph to the notes.txt file.

In the first step, the plugin looks whether there exists a notes.txt file in the directory where is currently opened txt file located, or in the parrent directories (this is similar to config file loading - see abowe). If the file exists, then the plugin appends the paragraph to the end of the file.

If there is not a notes.txt file, then the plugin creates it automatically in the folder, where is currently opened txt file located and the selected paragraph is added to this file.