Instructions for implementing a new language "voice" for Speak on the XO
This page is linked from OLPC_Oceania/Languages
The Speak activity on the XO laptop uses the espeak text to speech synthesis software written by Jonathan Duddington (http://espeak.sourceforge.net/)
As a final project in June 2007, I asked two high school students at Moira Secondary School, Belleville, Ontario (http://www.hpedsb.on.ca/mss), to research and attempt to implement the Mohawk language on the XO laptop.
We started with espeak and espeakedit (available from the link above) The students, Eric Green and Aaron Basset developed a rules file for the Mohawk language. They were successful in compiling the rules file (moh_rules) into the dictionary file (moh_dict) that espeak uses. At this point we were using a Windows workstation.
We ran into difficulties attempting to port the Mohawk language on the XO Laptop. We received prompt assistance from both Jonathan Duddington (espeak creator) and Josh Minor (writer of the Speak sctivity). This assistance was invaluable.
When I finally got round to documenting my students' experiences, it occurred to me that it would be useful if the whole process could take place on an XO laptop, e.g. creating rules file, voice file and then compiling the dict file. After a little experimentation I discovered this was possible.
From Josh Minor (Speak activity creator)
I built Speak so that it would query the available list of languages by running "espeak --voices" from the command line. When you use the Terminal on your XO, try running that command to see if it lists the new language. If it does, then Speak should pick up the new language automatically.
What the above means is that no modification is required to the actual Speak activity. Additional language files just need to be in the right place.
If you copy the moh_dict file to the following directory:
Then copy the moh voice file to the following directory:
Then run the Speak Activity, Mohawk should appear as an option, and it should work.
What is in a voice file??
The moh voice file contains the following:
name mohawklanguage mohgender male
The moh_dict file is a compiled file (compiled from moh_rules, we used the Windows version of espeakedit to do this.
Compiling rules on the XO laptop.
If you want to create a new language using only the XO laptop, this is also possible. There is a simple editor call “vi” that can be used to create both the voice file and the rules file.
In the terminal, navigate to the following directory:
type: vi [nameOfNewFile]
a new file will open, follow the same format as used in the moh voice file (see above)
There are numerous on line references for 'vi'. For example:
All you really need is to be able to switch between 'insert' and 'command' mode.
To edit an existing file:
type: vi [nameOfExisitingFile]
To create new rules file you would navigate to the following directory:
type: vi [language_rules]
My students found that taking an existing rules file, renaming it and modifying it was much easier.
How to compile the lang_rules file into a lang_dict file on the XO laptop??
Once you have a rules file e.g moh_rules in the /usr/share/espeak-data/ directory you can execute the following command:
This will create the moh_dict file in the same folder.