Extension:Wikispeech

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
See Help:Extension:Wikispeech.

Download
For the General User:

For the Advanced User:

Setting up Wikispeech
These are the instructions to install the TTS server on wmflabs.org.

Creating an instance
Follow instructions on https://wikitech.wikimedia.org/wiki/Help:Instances#Creating_an_instance: To ssh to the new instance, see: https://wikitech.wikimedia.org/wiki/Help:Getting_Started#Project_Instances
 * 1) Log in to https://horizon.wikimedia.org and go to the wikispeech project (in top bar).
 * 2) Compute → Overview and check that there are instances available.
 * 3) Create a Security Group:
 * 4) * Compute → Access & Security → Create Security Group; Name: TTS-provider
 * 5) ** Manage Rules → Add Rule; Port: 10000, Remote: CIDR, CIDR: 0.0.0.0/0
 * 6) Open Launch Instance dialogue (Compute → Instances → Launch Instance):
 * 7) Details: only set Instance Name: wikispeech-tts
 * 8) Source: Select boot source: Image, under Available: add ubuntu-14.04-trusty
 * 9) Flavor: Under Available: add m1.medium (marytts uses ~ 1.1 GB on local machine)
 * 10) Security Groups: Under Available: add default, TTS-provider, web-server
 * 11) Make services accessible through proxy, DNS → Web proxies → Create proxy
 * 12) Hostname: wikispeech-tts, Backend instance: wikispeech-tts, Backend port: 10000
 * 13) Hostname: wikispeech-tts-audio, Backend Instance: wikispeech-tts, Backend port: 80

Install TTS server
The TTS server consists of three components: MaryTTS (TTS platform), pronlex (a pronunciation lexicon database) and wikispeech_mockup (wikispeech API).

Install MaryTTS

 * 1) Log into wikispeech-tts
 * 2) Install java:   (Java 8 is needed for Arabic. If it can't be installed the normal way, see https://askubuntu.com/questions/464755/how-to-install-openjdk-8-on-14-04-lts/464894#464894 under, Original Message)
 * 3) Create a user to run the server:
 * 4) Become this user:
 * 5) Clone marytts-installer repo:
 * 6) Follow instructions to install English voices
 * 7) To install Swedish and Arabic:

Install pronlex
Follow the instructions at https://github.com/stts-se/pronlex/tree/master/install/standalone

Install wikispeech_mockup
Following instruction at https://github.com/stts-se/wikispeech_mockup.

Install Mishkal (for Arabic)

 * 1) wget http://repo1.maven.org/maven2/org/glassfish/javax.json/1.0.4/javax.json-1.0.4.jar
 * 2) In mishkal/tashkeel/tashkeel.py, change line 385 from:
 * 3) * to:
 * 4) Run webserver with:
 * 1) In mishkal/tashkeel/tashkeel.py, change line 385 from:
 * 2) * to:
 * 3) Run webserver with:
 * 1) * to:
 * 2) Run webserver with:
 * 1) Run webserver with:

Make audio files accessible
Audio files generated by the TTS should now be accessible through: http://wikispeech-tts-audio.wmflabs.org/audio/.  Deny from all   Order deny,allow Allow from all 
 * 1) Install apache:
 * 2) Link the audio file directory in /var/www/html:
 * Disallow access to non-opus files by adding a .htaccess-file in ~/wikispeech_mockup/wikispeech_mockup/tmp/ with the following content
 * Remove directory listing by adding a index.html file in ~/wikispeech_mockup/wikispeech_mockup/tmp/ with something like the following content:
 * To also display this page in the root directory (instead of apache default):

Update the server with the new path
In ~/wikispeech_mockup/wikispeech_mockup/wikispeech.py, in, change:

to:

Start processes in
As user tts-agent: You can now detach the screen + ,  and resume with. Note that  is required to run   each time you become tts-agent.
 * , needed to get screen running (http://serverfault.com/a/116830)
 * 1) Start MaryTTS
 * 2) Create new window:  +  ,
 * 3) Start pronlex
 * 4) Create new window
 * 5) Start wikispeech.py
 * 1) Start pronlex
 * 2) Create new window
 * 3) Start wikispeech.py
 * 1) Create new window
 * 2) Start wikispeech.py

Setting Wikispeech up on shared hosting
See Extension:Wikispeech/Installation on a shared host