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 -6
View File
@@ -44,6 +44,11 @@ install-data-hook: uninstall-hook
$(MKDIR) $(DESTDIR)$(DATADIR)
cp -prf espeak-data/* $(DESTDIR)$(DATADIR)
install-exec-hook:
cd $(DESTDIR)$(BINDIR) && rm -f espeak && $(LN_S) espeak-ng espeak
cd $(DESTDIR)$(BINDIR) && rm -f speak && $(LN_S) speak-ng speak
cd $(DESTDIR)$(LIBDIR) && rm -f libespeak.la && $(LN_S) libespeak-ng.la libespeak.la
clean-local:
cd src && rm -f *.o *~ && cd ..
@@ -84,14 +89,18 @@ docs: docs/index.html \
##### build targets:
libespeak_ng_includedir = $(includedir)/espeak-ng
libespeak_ng_include_HEADERS = \
src/include/espeak-ng/speak_lib.h
espeak_includedir = $(includedir)/espeak
espeak_include_HEADERS = \
src/include/espeak/speak_lib.h
espeak_ng_includedir = $(includedir)/espeak-ng
espeak_ng_include_HEADERS = \
src/include/espeak-ng/espeak_ng.h
lib_LTLIBRARIES += src/libespeak-ng.la
src_libespeak_ng_la_LDFLAGS = -version-info $(SHARED_VERSION) -lpthread -lm
src_libespeak_ng_la_CFLAGS = -Isrc/include/espeak-ng \
src_libespeak_ng_la_CFLAGS = -Isrc/include \
-fPIC -fvisibility=hidden -D _BSD_SOURCE -D _POSIX_C_SOURCE=200112L \
-pedantic -fno-exceptions -D PATH_ESPEAK_DATA=\"$(DATADIR)\"
src_libespeak_ng_la_SOURCES = \
@@ -170,7 +179,7 @@ endif
src_speak_ng_LDADD = src/libespeak-ng.la
src_speak_ng_LDFLAGS = -static
src_speak_ng_CFLAGS = -Isrc/libespeak-ng -Isrc/include/espeak-ng -D _POSIX_C_SOURCE=200112L
src_speak_ng_CFLAGS = -Isrc/libespeak-ng -Isrc/include -D _POSIX_C_SOURCE=200112L
src_speak_ng_SOURCES = src/speak-ng.c
bin_PROGRAMS += src/espeak-ng
@@ -180,7 +189,7 @@ man1_MANS += src/espeak-ng.1
endif
src_espeak_ng_LDADD = src/libespeak-ng.la
src_espeak_ng_CFLAGS = -Isrc/include/espeak-ng
src_espeak_ng_CFLAGS = -Isrc/include
src_espeak_ng_SOURCES = src/espeak-ng.c
##### phoneme data:
+1
View File
@@ -17,6 +17,7 @@ dnl ================================================================
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AC_PROG_LN_S
dnl ================================================================
dnl C99 compiler checks.
+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.
+2 -2
View File
@@ -28,8 +28,8 @@
#include <time.h>
#include <sys/stat.h>
#include "speak_lib.h"
#include "espeak_ng.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
extern void strncpy0(char *to, const char *from, int size);
extern int utf8_in(int *c, const char *buf);
+1 -1
View File
@@ -19,7 +19,7 @@
#ifndef ESPEAK_NG_H
#define ESPEAK_NG_H
#include "speak_lib.h"
#include <espeak/speak_lib.h>
#ifdef __cplusplus
extern "C"
+2 -2
View File
@@ -30,8 +30,8 @@
#include <stdint.h>
#endif
#include "speak_lib.h"
#include "espeak_ng.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "error.h"
#include "speech.h"
+2 -2
View File
@@ -30,8 +30,8 @@
#include <stdint.h>
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "error.h"
#include "speech.h"
+2 -2
View File
@@ -27,8 +27,8 @@
#include <stdint.h>
#endif
#include "speak_lib.h"
#include "espeak_ng.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "error.h"
#include "phoneme.h"
+2 -2
View File
@@ -30,8 +30,8 @@
#include <wctype.h>
#include <wchar.h>
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "phoneme.h"
+1 -1
View File
@@ -26,7 +26,7 @@
#include <string.h>
#include <malloc.h>
#include "espeak_ng.h"
#include <espeak-ng/espeak_ng.h>
#include "error.h"
#include "speech.h"
+2 -2
View File
@@ -20,8 +20,8 @@
#include "config.h"
#include "speak_lib.h"
#include "espeak_ng.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include <stdlib.h>
#if HAVE_STDINT_H
+1 -1
View File
@@ -18,7 +18,7 @@
#include "config.h"
#include "espeak_ng.h"
#include <espeak-ng/espeak_ng.h>
#include "speech.h"
#include "espeak_command.h"
-1
View File
@@ -22,7 +22,6 @@
#ifndef PLATFORM_WINDOWS
#include <unistd.h>
#endif
#include "speak_lib.h"
#ifdef __cplusplus
extern "C"
+3 -2
View File
@@ -32,9 +32,10 @@
#include <errno.h>
#include <stdbool.h>
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "espeak_ng.h"
#include "speak_lib.h"
#include "event.h"
#include "wave.h"
-2
View File
@@ -39,8 +39,6 @@
*/
#include "speak_lib.h"
#ifdef __cplusplus
extern "C"
{
+1 -1
View File
@@ -33,7 +33,7 @@
#include <sys/time.h>
#include <time.h>
#include "espeak_ng.h"
#include <espeak-ng/espeak_ng.h>
#include "speech.h"
#include "fifo.h"
-1
View File
@@ -23,7 +23,6 @@
// and run them asynchronously.
#include "espeak_command.h"
#include "speak_lib.h"
#ifdef __cplusplus
extern "C"
+2 -2
View File
@@ -27,8 +27,8 @@
#include <stdint.h>
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "phoneme.h"
+2 -2
View File
@@ -33,8 +33,8 @@
#include <stdint.h>
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "klatt.h"
+2 -2
View File
@@ -31,8 +31,8 @@
#include <wctype.h>
#include <wchar.h>
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "phoneme.h"
+2 -2
View File
@@ -26,8 +26,8 @@
#include <stdint.h>
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "phoneme.h"
+2 -2
View File
@@ -30,8 +30,8 @@
#include <stdint.h>
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "phoneme.h"
+2 -2
View File
@@ -27,8 +27,8 @@
#include <stdint.h>
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "phoneme.h"
+2 -2
View File
@@ -25,8 +25,8 @@
#include <stdint.h>
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "phoneme.h"
+2 -2
View File
@@ -41,8 +41,8 @@
#include <unistd.h>
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "phoneme.h"
#include "synthesize.h"
+2 -2
View File
@@ -30,8 +30,8 @@
#include <stdint.h>
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "phoneme.h"
+2 -2
View File
@@ -30,8 +30,8 @@
#include <stdint.h>
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "error.h"
#include "speech.h"
+2 -2
View File
@@ -29,8 +29,8 @@
#include <stdint.h>
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "phoneme.h"
+2 -2
View File
@@ -31,8 +31,8 @@
#include <wctype.h>
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "phoneme.h"
+2 -2
View File
@@ -30,8 +30,8 @@
#include <wctype.h>
#include <wchar.h>
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "phoneme.h"
+2 -2
View File
@@ -36,8 +36,8 @@
#include "dirent.h"
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "phoneme.h"
#include "synthesize.h"
+2 -2
View File
@@ -30,8 +30,8 @@
#include <stdint.h>
#endif
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "speech.h"
#include "phoneme.h"
+2 -2
View File
@@ -46,8 +46,8 @@
#include <locale.h>
#include <sys/stat.h>
#include "espeak_ng.h"
#include "speak_lib.h"
#include <espeak-ng/espeak_ng.h>
#include <espeak/speak_lib.h>
#include "phoneme.h"
#include "synthesize.h"