From 54723e8492d9cd56b624ceb6154399edd4cff6ef Mon Sep 17 00:00:00 2001 From: Valdis Vitolins Date: Mon, 13 Apr 2020 17:52:27 +0300 Subject: [PATCH] docs: move creation of language definition up --- docs/add_language.md | 54 ++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/add_language.md b/docs/add_language.md index 35bd573f..77faf785 100644 --- a/docs/add_language.md +++ b/docs/add_language.md @@ -100,12 +100,12 @@ To add new language, you have to create or edit following files: |path/file |action | |------------------------------|-----------------------------| | Makefile.am |[edit](#makefileam-file) | +| espeak-ng-data/lang/roa/fr |[create](#language-file) | | phsource/phonemes |[edit](#phonemes-file) | | phsource/ph_french |[create](#phoneme-definition-file) (optional) | | dictsource/fr_list |[create](#dictionary-files) | | dictsource/fr_rules |[create](#dictionary-files) | | dictsource/fr_extra |create (optional) | -| espeak-ng-data/lang/roa/fr |[create](#language-file) | where: @@ -140,6 +140,32 @@ Optionally, if you have [phoneme definition file](#phoneme-definition-file), fol 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 Open file `phsource/phonemes` and add following lines @@ -183,32 +209,6 @@ it defines a phoneme table `fr` which inherits phoneme definitions from `base` table and adds new definitions or overrides existing 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 If you decide to customize definitions of phonemes (vowel and consonant