Extension:Wikispeech

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Wikispeech

Release status:Extension status beta

Wikispeech logo.svg
ImplementationTemplate:Extension#type other (invalid type)
DescriptionTemplate:Extension#description Integrates Wikispeech into MediaWiki for text-to-speech functionality
Author(s)Template:Extension#username
  • Sebastian Berlin
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download
[ README]
ParametersTemplate:Extension#parameters
  • $wgWikispeechServerUrl
  • $wgWikispeechRemoveTags
  • $wgWikispeechNamespaces
  • $wgWikispeechKeyboardShortcuts
  • $wgWikispeechSkipBackRewindsThreshold
Hooks usedTemplate:Extension#hook
ResourceLoaderTestModulesManual:Hooks/ResourceLoaderTestModules
ParserAfterTidyManual:Hooks/ParserAfterTidy
BeforePageDisplayManual:Hooks/BeforePageDisplay
ResourceLoaderGetConfigVarsManual:Hooks/ResourceLoaderGetConfigVars

Translate the Wikispeech extension if it is available at translatewiki.net

Check usage and version matrix.
Vagrant roleMediaWiki-Vagrant#Using roles wikispeech

IssuesPhabricator

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. Stable release is planned for 2017.

User guide[edit]

See Help:Extension:Wikispeech.

Download[edit]

For the General User:

For the Advanced User:

Setting up Wikispeech[edit]

Basic configuration for MediaWiki-Wikispeech[edit]

Complete list of configuration options[edit]

Option Default value Documentation
WikispeechServerUrl
"https://morf.se/wikispeech/"
The URL for the TTS server to use.
WikispeechRemoveTags
{
    "editsection": true, 
    "toc": true, 
    "table": true, 
    "sup": {
        "class": "reference"
    }, 
    "div": {
        "class": "thumb"
    }, 
    "ul": true, 
    "ol": true
}
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 object (array in LocalSetting.php) containing the "class" key, only tags that also have the value of "class" as class will be removed.
  • If false, tags of that type will not be removed. This can be used in LocalSetting.php to override default criteria.
WikispeechNamespaces
[
    "NS_MAIN"
]
List of the namespaces, for which Wikispeech is activated, using constant names.
WikispeechKeyboardShortcuts
{
    "playStop": {
        "key": 32,
        "modifiers": [
            "alt",
            "shift"
        ]
    },
    "skipAheadSentence": {
        "key": 39,
        "modifiers": [
            "alt",
            "shift"
        ]
    },
    "skipBackSentence": {
        "key": 37,
        "modifiers": [
            "alt",
            "shift"
        ]
    },
    "skipAheadWord": {
        "key": 40,
        "modifiers": [
            "alt",
            "shift"
        ]
    },
    "skipBackWord": {
        "key": 38,
        "modifiers": [
            "alt",
            "shift"
        ]
    }
}
Shortcuts for Wikispeech commands. Each shortcut defines the key pressed (as key code[1]) and any modifier keys (ctrl, alt or shift).
WikispeechSkipBackRewindsThreshold
3.0
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.

CSS[edit]

Selector Default values Documentation
.ext-wikispeech-highlight-sentence
background-color: rgb(0, 200, 0);
background-color: rgba(0, 200, 0, 0.5)
The visual highlighting for the sentence that is currently being recited.

Setting Wikispeech up on shared hosting[edit]

See Extension:Wikispeech/Installation on a shared host

Troubleshooting[edit]

See also[edit]