Open main menu


This is the documentation for installing and configuring Wikispeech. If you are looking for help on how to use it, see Help:Extension:Wikispeech.
MediaWiki extensions manual
OOjs UI icon advanced.svg
Release status: beta
Wikispeech logo.svg
Implementation Ajax, API
Description Reads page text out loud using text-to-speech
Author(s) Sebastian Berlin, André Costa and Igor Leturia
Latest version 0.1.2 (2018-10-19)
Database changes No
License GNU General Public License 2.0 or later
  • $wgWikispeechServerUrl
  • $wgWikispeechRemoveTags
  • $wgWikispeechSegmentBreakingTags
  • $wgWikispeechNamespaces
  • $wgWikispeechKeyboardShortcuts
  • $wgWikispeechSkipBackRewindsThreshold
  • $wgWikispeechHelpPage
  • $wgWikispeechFeedbackPage
  • $wgWikispeechContentSelector
  • $wgWikispeechVoices
Translate the Wikispeech extension if it is available at
Check usage and version matrix.
Vagrant role wikispeech
Issues Open tasks · Report a bug

The Wikispeech project aims to create an open source text-to-speech tool to make Wikimedia's projects more accessible for people that have difficulties reading for different reasons. Wikispeech will be available as a MediaWiki extension. More information can be found on the project page; this page is just about the Wikispeech extension itself.

User guideEdit

For an end user guide to Wikispeech, see Help:Extension:Wikispeech.


  • Download and place the file(s) in a directory called Wikispeech in your extensions/ folder.
  • Run Composer to install PHP dependencies, by issuing composer install in the extension directory. (See T173141 for potential complications.)
  • Add the following code at the bottom of your LocalSettings.php: wfLoadExtension( 'Wikispeech' );
  • Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Setting up TTS-serverEdit

Wikispeech requires a TTS-server to generate audio. The easiest way to install this is to use the Docker Compose version. The installation instructions can be found at For other ways to install the server, see Ports 80 and 10000 need to be opened for accessing audio files and sending requests to the server respectively. Detailed instructions for installing the TTS-server on Cloud VPS can be found on /TTS-server on wmflabs.

Basic configurationEdit

For Wikispeech to be able to communicate with the TTS-server, you need to specify the server's URL. You can do this by adding the following line to LocalSettings.php:

$wgWikispeechServerUrl = 'URL';

where URL is the URL to your TTS-server.

Complete list of configuration optionsEdit

Option Default value Documentation
The URL for the TTS server to use.
    "span": "mw-editsection",
    "table": true,
    "sup": "reference",
    "div": [
Map of HTML tags that should be removed completely, i.e. including any content. Keys are tag names and the values determine whether a tag should be removed, as follows:
  • If true, remove all tags of that type.
  • If an array, remove tags whose class matches any of the strings in the array.
  • If false, tags of that type will not be removed. This can be used in LocalSetting.php to override default criteria.
As the text is segmented, segment breaks are added when these tags are encountered. This is useful e.g. for headings, that usually don't trigger segmentation since they're not complete sentences.
List of the namespace indices, for which Wikispeech is activated.
    "playStop": {
        "key": 32,
        "modifiers": [
    "skipAheadSentence": {
        "key": 39,
        "modifiers": [
    "skipBackSentence": {
        "key": 37,
        "modifiers": [
    "skipAheadWord": {
        "key": 40,
        "modifiers": [
    "skipBackWord": {
        "key": 38,
        "modifiers": [
Shortcuts for Wikispeech commands. Each shortcut defines the key pressed (as key code[1]) and any modifier keys (ctrl, alt or shift).
If an utterance has played longer than this (in seconds), skipping back will rewind to the start of the current utterance, instead of skipping to previous utterance.
Help page for Wikispeech. If defined, a button that takes the user here is added next to the player buttons.
"Wikispeech feedback"
Feedback page for Wikispeech. If defined, a button that takes the user here is added next to the player buttons.
The selector for the element that contains the text of the page. Used internally, but may change with MediaWiki version.
    "ar": [
    "en": [
    "sv": [
The voices that will show up in the user settings. Available voices can be found at the /synthesis/voices on the TTS-server.


This is a subset the CSS rules that are most interesting for a non-developer.

Selector Default values Documentation
background-color: rgb( 200, 170, 255 );
The visual highlighting for the sentence that is currently being recited.
background-color: rgb( 255, 200, 140 );
The visual highlighting for the word that is currently being recited.