Voices translation

From GCompris
Revision as of 11:37, 24 May 2008 by Bruno (talk | contribs)
Jump to: navigation, search

Get the voices

From the source code

First, grab the development tree and the voices with:

svn co http://svn.gnome.org/svn/gcompris/trunk gcompris
cd gcompris
make update-voices

The command make update-voices grab the voices from the subversion repository and put them under boards/voices.

Online

Alternatively, ou can get the voices online from the gnome svn online repository.

Direct subversion access

To just grab the English voice set, install subversion on your system and get the voices with the command:

svn co http://svn.gnome.org/svn/gcompris/voices/en

Create your voices directory

First copy the English voices as a template in a new directory with you locale name (e.g. my):

cd boards/voices
cp -r en my

Provide here voice translation in boards/voices/my for each English voice.

Recording / Encoding

It is best to choose somebody that speaks and articulate well your language.

  • Record with rec, grecord, bcast2000, gnoise, audacity. It is mandatory to use mono wav 16bit/44100Hz to get the best quality/size ratio and because this works for any sound card.
  • Save as WAV file
  • Apply loudness transform with sox if necessary. You may use a script like this if the sound is too low:
#!/bin/sh
for i; do
  sox $i modif/$i vol 5.0 amplitude 0.05
done
  • In the directory where WAV files are run do:
oggenc -q0 --downmix -a "(name of author) -d "date of recording" \
               -c "copyright=Copyright 2002 (name of author). This file is distributed under the terms of

 the GNU General Public License, either version 2 or ( at your option) any later version. See the file COPYING for details." \
               *.wav

The ogginfo command should display the comment.

  • Copy OGG files in the corresponding directory
  • Normalize them so that the all have the same volume level (replace ll by your locale)
cd boards/voices/
normalize-ogg ll/*/*.ogg

Alphabet

The English alphabet directory contains files named U0030.ogg. These are the voices for each single letter in your locale with a UTF-8 Unicode notation. For example U+0030 is the character 0. You can get the table for [ttp://www.utf8-chartable.de/ each subset.

Shipping

Once done, the easiest way is to tar all this files and send them to the GCompris maintainer.

cd boards/voices
tar -cvzf voices_my.tgz my

Integration

Nothing has to be done, just run 'make install' at GCompris to level. The voices will be installed in the proper directory and GCompris will play them. Run GCompris in your locale and you should ear your voices.

Checking

At top level, run:

./tools/check_missing_voices.pl <locale>

With for example locale being fr for French.