Extension:Wikispeech/zh

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.

Speechoid


Documentation



The extension uses a service for TTS operations, such as creating audio for utterances called Speechoid. Speechoid consists of a main server, a lexicon server, TTS engines and any additional components that may be required for certain languages.

To prepare an utterance for playing, the extension sends a request to the service. This request contains the utterance as text, which language it is in and which voice to use. The service processes the text using a lexicon and one of the installed TTS engines, depending on what voice is being used. Once the audio has been generated, a response is returned with audio data along with some information that will enable highlighting and skipping. This is then used by the extension to actually play the utterance to the user and the process is repeated for the following utterances as needed.

Main Wikispeech Server
资料库

The main server has a web API that includes an endpoint for generating speech. It handles internal communication between the underlying servers, listed below.

Pronlex
资料库

A lexicon server with its own API. Holds information about lexicon entries and has endpoints for lookup and manipulation of them. When processing an utterance, words are looked up in the lexicon and if there is a matching entry it is used for the pronunciation.

TTS engines
The server supports having multiple TTS engines. Which one is used for a certain utterance depends on which voice is given in the request.

MaryTTS
资料库

Comes with support for Arabic, English and Swedish.

Mishkal
资料库

Used to vocalize Arabic text.

Symbolset
资料库

Symbolset is a repository for handling phonetic symbol sets and mappers/converters between different symbol sets and languages.

Setting up Speechoid
The Wikispeech extension requires Speechoid to generate audio. Detailed instructions for installing Speechoid can be found on Installing Speechoid.



基本配置
For the Wikispeech extension to be able to communicate with Speechoid, you need to specify the service's URL. You can do this by adding the following line to :

where  is the URL to your Speechoid instance.

Running as producer
If you want use your wiki to enable Wikispeech on other wikis you can enable "producer mode". One use case for this is to run Wikispeech as a gadget on other wikis.

Normally Wikispeech gets the text to synthesise from pages on the wiki it's installed on. If  is   the   action can take the parameter. should be set to the script path of the consumer wiki, e.g. for this wiki. When the request is made Wikispeech will get the content from the consumer wiki and synthesise as normal. The utterance is stored with the extra parameter  in the database to keep track of which wiki it was generated from.

To enable Wikispeech with a gadget or user script see Help:Extension:Wikispeech.

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