Browse Source

docs: move creation of language definition up

master
Valdis Vitolins 5 years ago
parent
commit
54723e8492
1 changed files with 27 additions and 27 deletions
  1. 27
    27
      docs/add_language.md

+ 27
- 27
docs/add_language.md View File

|path/file |action | |path/file |action |
|------------------------------|-----------------------------| |------------------------------|-----------------------------|
| Makefile.am |[edit](#makefileam-file) | | Makefile.am |[edit](#makefileam-file) |
| espeak-ng-data/lang/roa/fr |[create](#language-file) |
| phsource/phonemes |[edit](#phonemes-file) | | phsource/phonemes |[edit](#phonemes-file) |
| phsource/ph_french |[create](#phoneme-definition-file) (optional) | | phsource/ph_french |[create](#phoneme-definition-file) (optional) |
| dictsource/fr_list |[create](#dictionary-files) | | dictsource/fr_list |[create](#dictionary-files) |
| dictsource/fr_rules |[create](#dictionary-files) | | dictsource/fr_rules |[create](#dictionary-files) |
| dictsource/fr_extra |create (optional) | | dictsource/fr_extra |create (optional) |
| espeak-ng-data/lang/roa/fr |[create](#language-file) |


where: where:


phsource/ph_french \ phsource/ph_french \
... ...


### Language File

E.g. `espeak-ng-data/lang/roa/fr` is the language file for French.
This gives the language name and may set some options.

Each language needs a language file in `espeak-ng-data/lang` grouped by the
[language family](#language-family). The filename of the default voice for a
language should be the same as the language code (e.g. `fr` for French).

The simplest voice file would contain just 2 lines to give the language
name (from the
[IANA Language Subtag Registry](https://github.com/rhdunn/bcp47-data/blob/master/language-subtag-registry)
and language code, e.g.:

name French
language fr

This language code specifies which phoneme table and dictionary to use
(i.e. `phonemetable fr` and `espeak-ng-data/fr_dict`) to be used. If
needed, these can be overridden by `phonemes` and `dictionary`
attributes in the voice file. For example you may want to start the
implementation of a new language by using the phoneme table of an
existing language.

Details of the contents of language files are given in [Voices](voices.md).

### Phonemes File ### Phonemes File


Open file `phsource/phonemes` and add following lines Open file `phsource/phonemes` and add following lines
`base` table and adds new definitions or overrides existing `base` table and adds new definitions or overrides existing
definitions of `base` phonemes from the `phonemes/ph_french` file. definitions of `base` phonemes from the `phonemes/ph_french` file.


### Language File

E.g. `espeak-ng-data/lang/roa/fr` is the language file for French.
This gives the language name and may set some options.

Each language needs a language file in `espeak-ng-data/lang` grouped by the
[language family](#language-family). The filename of the default voice for a
language should be the same as the language code (e.g. `fr` for French).

The simplest voice file would contain just 2 lines to give the language
name (from the
[IANA Language Subtag Registry](https://github.com/rhdunn/bcp47-data/blob/master/language-subtag-registry)
and language code, e.g.:

name French
language fr

This language code specifies which phoneme table and dictionary to use
(i.e. `phonemetable fr` and `espeak-ng-data/fr_dict`) to be used. If
needed, these can be overridden by `phonemes` and `dictionary`
attributes in the voice file. For example you may want to start the
implementation of a new language by using the phoneme table of an
existing language.

Details of the contents of language files are given in [Voices](voices.md).

### Phoneme Definition File ### Phoneme Definition File


If you decide to customize definitions of phonemes (vowel and consonant If you decide to customize definitions of phonemes (vowel and consonant

Loading…
Cancel
Save