Documentation: fixes for phontab.md

This commit is contained in:
Valdis Vitolins
2016-01-04 23:01:49 +02:00
35 changed files with 99 additions and 92 deletions
+15 -18
View File
@@ -1,14 +1,12 @@
# Adding or Improving a Language
# Table of contents
- [Language Code](#language-code)
- [Language Files](#language-files)
- [Voice File](#voice-file)
- [Phoneme Definition File](#phoneme-definition-file)
- [Dictionary Files](#dictionary-files)
- [Program Code](#program-code)
- [Compiling rules file for debugging](#compiling-rules-file-for-debugging)
- [Compiling Rules File for Debugging](#compiling-rules-file-for-debugging)
- [Improving a Language](#improving-a-language)
----------
@@ -166,7 +164,7 @@ required options in `SetTranslator()`. However, this may not be necessary
during testing because most of the options can also be set in the voice
file in espeak-data/voices (see [Voice Files](voices.md)).
## Compiling rules file for debugging
## Compiling Rules File for Debugging
When `espeak-ng` is invoked with `-X` parameter, it shows more detailed trace of
chosen language rules for pronunciation. This trace can show line numbers also,
@@ -174,26 +172,25 @@ if language is compiled with `--compile-debug` option.
To do this, go to `espeak-ng` project root folder, then:
cd dictsource/
../src/espeak-ng --compile-debug=en
cd dictsource
../src/espeak-ng --compile-debug=en
When invoked in following way:
es -ven -X "Test."
espeak-ng -ven -X "Test."
It will show:
--------------
Translate 'test'
1 5965: t [t]
1 2104: e [E]
1 5725: s [s]
1 5965: t [t]
t'Est
Translate 'test'
1 5965: t [t]
1 2104: e [E]
1 5725: s [s]
1 5965: t [t]
t'Est
## Improving a Language
+17 -14
View File
@@ -229,16 +229,16 @@ Phoneme Instructions may be included within conditional statements.
During the first phase of phoneme interpretation, an instruction which
causes a change to a different phoneme will terminate the instructions.
During the second phase, FMT() and WAV() instructions will terminate the
During the second phase, `FMT()` and `WAV()` instructions will terminate the
instructions.
### length
length <length>
The relative length of the phoneme, typically about 140 for a short vowel and
from 200 to 300 for a long vowel or diphong. A `length()` instruction is
needed for vowels. It is optional for consonants.
The relative length of the phoneme in miliseconds. Typical values are about
140 for a short vowel and from 200 to 300 for a long vowel or diphong.
A `length()` instruction is needed for vowels. It is optional for consonants.
### ipa
@@ -263,6 +263,7 @@ the file to which it refers may or may not have one.
\<amplitude\> is optional. It is a percentage change to the amplitude of the
WAV file. So, `WAV(ufric/s, 50)` means: play file 'ufric/s.wav' at 50% amplitude.
Default value is 100.
### FMT
@@ -270,10 +271,11 @@ WAV file. So, `WAV(ufric/s, 50)` means: play file 'ufric/s.wav' at 50% amplitude
\<vowel file\> is a path to a file (within `phsource/`) which defines how to
generate the sound (a vowel or voiced consonant) from a sequence of formant
values. Vowel files are made using the espeakedit program.
values. Vowel files are made using the `espeakedit` program which is not part
of this project.
\<amplitude\> is optional. It is a percentage change to the amplitude of the
sound which is synthesized from the `FMT()` instruction.
sound which is synthesized from the `FMT()` instruction. Default value is 100.
FMT(<vowel file>, <amplitude>) addWav(<wav file>, <amplitude>)
@@ -285,7 +287,7 @@ WAV file is mixed with the sound which is synthesized from the `FMT()` instructi
VowelStart(<vowel file>, <length adjust>)
This is used to modify the start of a vowel when it follows a sonorant consonant
This is used to modify the start of a vowel when it follows after a sonorant consonant
(such as `[l]` or `[j]`). It replaces the first frame of the \<vowel file\> which
is specified in a `FMT()` instruction by this \<vowel file\>, and adjusts the
length of the original by a signed value \<length adjust\>. The `VowelStart()`
@@ -310,14 +312,14 @@ The former takes precedence.
Vowelin <vowel transition data>
(C) Specifies the effects of this consonant on the formants of a following
vowel. See "vowel transitions", below.
vowel. See [vowel transitions](#vowel-transitions).
### Vowelout
Vowelout <vowel transition data>
(C) Specifies the effects of this consonant on the formants of a preceding
vowel. See "vowel transitions", below.
vowel. See [vowel transitions](#vowel-transitions).
### ChangePhoneme
@@ -356,7 +358,8 @@ Change to the specified phoneme if this syllable has "primary" stress.
IfNextVowelAppend(<phoneme>)
If the following phoneme is a vowel then this additional phoneme will be
inserted before it.
inserted before it. Usually it is short pause to distinguish two vowels from
diphthongs.
### RETURN
@@ -544,9 +547,9 @@ True if this is the highest stressed syllable in the word.
There are three ways to produce sounds:
* Playing a WAV file, by using a `WAV()` instruction. This is used for unvoiced
consonants such as `[p]`, `[t]` and [s]`.
consonants such as `[p]`, `[t]` and `[s]`.
* Generating a wave from a sequence of formant parameters, by using a `FMT()`
instruction. This is used for vowels and also for sonorants such as ``[l]`,
instruction. This is used for vowels and also for sonorants such as `[l]`,
`[j]` and `[n]`.
* A mixture of these. A stored `WAV` file is mixed with a wave generated from
formant parameters. Use a `FMT()` instruction followed by `addWav()`. This is
@@ -562,7 +565,7 @@ is limited by the program.
len=<integer>
Nominal length of the transition in mS. If omitted a default value is used.
Nominal length of the transition in miliseconds. If omitted a default value is used.
rms=<integer>
@@ -587,7 +590,7 @@ a default value is used.
f3=<change> <amplitude>
\<change\>: Signed integer (Hz). Frequence change of f3, f4, and f5 formants.
\<change\>: Signed integer (Hz). Frequency change of f3, f4, and f5 formants.
\<amplitude\>: Amplitude of the f3, f4, and f5 formants at the end of the
transition. 100 = no change.