diff --git a/Makefile.am b/Makefile.am index 0bea26d1..24611c9e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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: diff --git a/configure.ac b/configure.ac index 8df45b73..08ecfa15 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,7 @@ dnl ================================================================ AC_PROG_CC AC_PROG_MAKE_SET AC_PROG_LIBTOOL +AC_PROG_LN_S dnl ================================================================ dnl C99 compiler checks. diff --git a/docs/add_language.md b/docs/add_language.md index f58eb9aa..aa16bd52 100644 --- a/docs/add_language.md +++ b/docs/add_language.md @@ -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 diff --git a/docs/phontab.md b/docs/phontab.md index 40ac5e29..601ac19e 100644 --- a/docs/phontab.md +++ b/docs/phontab.md @@ -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 -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. \ 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 \ 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. \ 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(, ) addWav(, ) @@ -285,7 +287,7 @@ WAV file is mixed with the sound which is synthesized from the `FMT()` instructi VowelStart(, ) -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 \ which is specified in a `FMT()` instruction by this \, and adjusts the length of the original by a signed value \. The `VowelStart()` @@ -310,14 +312,14 @@ The former takes precedence. Vowelin (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 (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() 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= -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= @@ -587,7 +590,7 @@ a default value is used. f3= -\: Signed integer (Hz). Frequence change of f3, f4, and f5 formants. +\: Signed integer (Hz). Frequency change of f3, f4, and f5 formants. \: Amplitude of the f3, f4, and f5 formants at the end of the transition. 100 = no change. diff --git a/src/espeak-ng.c b/src/espeak-ng.c index ef27493a..f67356a4 100644 --- a/src/espeak-ng.c +++ b/src/espeak-ng.c @@ -28,8 +28,8 @@ #include #include -#include "speak_lib.h" -#include "espeak_ng.h" +#include +#include extern void strncpy0(char *to, const char *from, int size); extern int utf8_in(int *c, const char *buf); diff --git a/src/include/espeak-ng/espeak_ng.h b/src/include/espeak-ng/espeak_ng.h index e270fcb2..149001ac 100644 --- a/src/include/espeak-ng/espeak_ng.h +++ b/src/include/espeak-ng/espeak_ng.h @@ -19,7 +19,7 @@ #ifndef ESPEAK_NG_H #define ESPEAK_NG_H -#include "speak_lib.h" +#include #ifdef __cplusplus extern "C" diff --git a/src/include/espeak-ng/speak_lib.h b/src/include/espeak/speak_lib.h similarity index 100% rename from src/include/espeak-ng/speak_lib.h rename to src/include/espeak/speak_lib.h diff --git a/src/libespeak-ng/compiledata.c b/src/libespeak-ng/compiledata.c index dac100d6..7fe31089 100644 --- a/src/libespeak-ng/compiledata.c +++ b/src/libespeak-ng/compiledata.c @@ -30,8 +30,8 @@ #include #endif -#include "speak_lib.h" -#include "espeak_ng.h" +#include +#include #include "error.h" #include "speech.h" diff --git a/src/libespeak-ng/compiledict.c b/src/libespeak-ng/compiledict.c index 237af92d..3de555d2 100644 --- a/src/libespeak-ng/compiledict.c +++ b/src/libespeak-ng/compiledict.c @@ -30,8 +30,8 @@ #include #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "error.h" #include "speech.h" diff --git a/src/libespeak-ng/compilembrola.c b/src/libespeak-ng/compilembrola.c index 24a93643..bac34120 100644 --- a/src/libespeak-ng/compilembrola.c +++ b/src/libespeak-ng/compilembrola.c @@ -27,8 +27,8 @@ #include #endif -#include "speak_lib.h" -#include "espeak_ng.h" +#include +#include #include "error.h" #include "phoneme.h" diff --git a/src/libespeak-ng/dictionary.c b/src/libespeak-ng/dictionary.c index 1a03c17e..1784eb7e 100644 --- a/src/libespeak-ng/dictionary.c +++ b/src/libespeak-ng/dictionary.c @@ -30,8 +30,8 @@ #include #include -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "phoneme.h" diff --git a/src/libespeak-ng/error.c b/src/libespeak-ng/error.c index 662c85e7..467cbac0 100644 --- a/src/libespeak-ng/error.c +++ b/src/libespeak-ng/error.c @@ -26,7 +26,7 @@ #include #include -#include "espeak_ng.h" +#include #include "error.h" #include "speech.h" diff --git a/src/libespeak-ng/espeak_api.c b/src/libespeak-ng/espeak_api.c index c6ce7b39..50b3704b 100644 --- a/src/libespeak-ng/espeak_api.c +++ b/src/libespeak-ng/espeak_api.c @@ -20,8 +20,8 @@ #include "config.h" -#include "speak_lib.h" -#include "espeak_ng.h" +#include +#include #include #if HAVE_STDINT_H diff --git a/src/libespeak-ng/espeak_command.c b/src/libespeak-ng/espeak_command.c index 90d7b965..67355a95 100644 --- a/src/libespeak-ng/espeak_command.c +++ b/src/libespeak-ng/espeak_command.c @@ -18,7 +18,7 @@ #include "config.h" -#include "espeak_ng.h" +#include #include "speech.h" #include "espeak_command.h" diff --git a/src/libespeak-ng/espeak_command.h b/src/libespeak-ng/espeak_command.h index f8cd94ca..aa710672 100644 --- a/src/libespeak-ng/espeak_command.h +++ b/src/libespeak-ng/espeak_command.h @@ -22,7 +22,6 @@ #ifndef PLATFORM_WINDOWS #include #endif -#include "speak_lib.h" #ifdef __cplusplus extern "C" diff --git a/src/libespeak-ng/event.c b/src/libespeak-ng/event.c index 15a960a4..18d30dd8 100644 --- a/src/libespeak-ng/event.c +++ b/src/libespeak-ng/event.c @@ -32,9 +32,10 @@ #include #include +#include +#include + #include "speech.h" -#include "espeak_ng.h" -#include "speak_lib.h" #include "event.h" #include "wave.h" diff --git a/src/libespeak-ng/event.h b/src/libespeak-ng/event.h index c80ecf5c..0cf43a67 100644 --- a/src/libespeak-ng/event.h +++ b/src/libespeak-ng/event.h @@ -39,8 +39,6 @@ */ -#include "speak_lib.h" - #ifdef __cplusplus extern "C" { diff --git a/src/libespeak-ng/fifo.c b/src/libespeak-ng/fifo.c index a01104c6..4f48c37d 100644 --- a/src/libespeak-ng/fifo.c +++ b/src/libespeak-ng/fifo.c @@ -33,7 +33,7 @@ #include #include -#include "espeak_ng.h" +#include #include "speech.h" #include "fifo.h" diff --git a/src/libespeak-ng/fifo.h b/src/libespeak-ng/fifo.h index 7fcab180..a1e5937c 100644 --- a/src/libespeak-ng/fifo.h +++ b/src/libespeak-ng/fifo.h @@ -23,7 +23,6 @@ // and run them asynchronously. #include "espeak_command.h" -#include "speak_lib.h" #ifdef __cplusplus extern "C" diff --git a/src/libespeak-ng/intonation.c b/src/libespeak-ng/intonation.c index 8b4d99ec..1fcc9b47 100644 --- a/src/libespeak-ng/intonation.c +++ b/src/libespeak-ng/intonation.c @@ -27,8 +27,8 @@ #include #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "phoneme.h" diff --git a/src/libespeak-ng/klatt.c b/src/libespeak-ng/klatt.c index 87656923..0799f7da 100644 --- a/src/libespeak-ng/klatt.c +++ b/src/libespeak-ng/klatt.c @@ -33,8 +33,8 @@ #include #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "klatt.h" diff --git a/src/libespeak-ng/numbers.c b/src/libespeak-ng/numbers.c index dfa0447a..2a3029cd 100644 --- a/src/libespeak-ng/numbers.c +++ b/src/libespeak-ng/numbers.c @@ -31,8 +31,8 @@ #include #include -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "phoneme.h" diff --git a/src/libespeak-ng/phonemelist.c b/src/libespeak-ng/phonemelist.c index f163fd91..97d107b5 100644 --- a/src/libespeak-ng/phonemelist.c +++ b/src/libespeak-ng/phonemelist.c @@ -26,8 +26,8 @@ #include #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "phoneme.h" diff --git a/src/libespeak-ng/readclause.c b/src/libespeak-ng/readclause.c index 8e3288a3..0aab3188 100644 --- a/src/libespeak-ng/readclause.c +++ b/src/libespeak-ng/readclause.c @@ -30,8 +30,8 @@ #include #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "phoneme.h" diff --git a/src/libespeak-ng/setlengths.c b/src/libespeak-ng/setlengths.c index 1f8b802e..7ba51e3b 100644 --- a/src/libespeak-ng/setlengths.c +++ b/src/libespeak-ng/setlengths.c @@ -27,8 +27,8 @@ #include #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "phoneme.h" diff --git a/src/libespeak-ng/spect.c b/src/libespeak-ng/spect.c index 18172c70..183e668c 100644 --- a/src/libespeak-ng/spect.c +++ b/src/libespeak-ng/spect.c @@ -25,8 +25,8 @@ #include #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "phoneme.h" diff --git a/src/libespeak-ng/speech.c b/src/libespeak-ng/speech.c index e23544c0..a130d9a2 100644 --- a/src/libespeak-ng/speech.c +++ b/src/libespeak-ng/speech.c @@ -41,8 +41,8 @@ #include #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "phoneme.h" #include "synthesize.h" diff --git a/src/libespeak-ng/synth_mbrola.c b/src/libespeak-ng/synth_mbrola.c index 6716757d..d6a39f83 100644 --- a/src/libespeak-ng/synth_mbrola.c +++ b/src/libespeak-ng/synth_mbrola.c @@ -30,8 +30,8 @@ #include #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "phoneme.h" diff --git a/src/libespeak-ng/synthdata.c b/src/libespeak-ng/synthdata.c index 1ab8943f..e916fd20 100644 --- a/src/libespeak-ng/synthdata.c +++ b/src/libespeak-ng/synthdata.c @@ -30,8 +30,8 @@ #include #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "error.h" #include "speech.h" diff --git a/src/libespeak-ng/synthesize.c b/src/libespeak-ng/synthesize.c index 0692cca3..71418384 100644 --- a/src/libespeak-ng/synthesize.c +++ b/src/libespeak-ng/synthesize.c @@ -29,8 +29,8 @@ #include #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "phoneme.h" diff --git a/src/libespeak-ng/tr_languages.c b/src/libespeak-ng/tr_languages.c index 59169c4c..adad2942 100644 --- a/src/libespeak-ng/tr_languages.c +++ b/src/libespeak-ng/tr_languages.c @@ -31,8 +31,8 @@ #include -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "phoneme.h" diff --git a/src/libespeak-ng/translate.c b/src/libespeak-ng/translate.c index 74a98c8c..7cf1b72f 100644 --- a/src/libespeak-ng/translate.c +++ b/src/libespeak-ng/translate.c @@ -30,8 +30,8 @@ #include #include -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "phoneme.h" diff --git a/src/libespeak-ng/voices.c b/src/libespeak-ng/voices.c index 6cbd26ba..9340505b 100644 --- a/src/libespeak-ng/voices.c +++ b/src/libespeak-ng/voices.c @@ -36,8 +36,8 @@ #include "dirent.h" #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "phoneme.h" #include "synthesize.h" diff --git a/src/libespeak-ng/wavegen.c b/src/libespeak-ng/wavegen.c index 6809f28e..73412748 100644 --- a/src/libespeak-ng/wavegen.c +++ b/src/libespeak-ng/wavegen.c @@ -30,8 +30,8 @@ #include #endif -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "speech.h" #include "phoneme.h" diff --git a/src/speak-ng.c b/src/speak-ng.c index c717f562..60f89de6 100644 --- a/src/speak-ng.c +++ b/src/speak-ng.c @@ -46,8 +46,8 @@ #include #include -#include "espeak_ng.h" -#include "speak_lib.h" +#include +#include #include "phoneme.h" #include "synthesize.h"