Juho Hiltunen
673c12a54e
docs: add an explanation to $pause, $brk, $verbextend and $nounf
2021-01-26 20:57:42 +02:00
Juho Hiltunen
a36f5573d2
Tests: new test collection for dictionary files.
...
The file is intended for everything mentioned in docs/dictionary.md.
2021-01-26 20:57:34 +02:00
Juho Hiltunen
5f1a4f9cbd
Revert "maintainability: pass n_ph_list2 and ph_list2 to MakePhonemeList() and SubstitutePhonemes() instead of using globals"
...
This reverts commit f0c345eb6a .
Fixes #824 .
2020-12-30 12:02:02 +02:00
Juho Hiltunen
30214437fc
test for #824
2020-12-30 12:01:56 +02:00
Juho Hiltunen
aafa55cbbc
code cleanup: remove unnecessary code related to LOPT_CAPS_IN_WORD
...
translate.h gives two settings to LOPT_CAPS_IN_WORD, but only one of them is actually ever used.
2020-12-28 11:30:08 +02:00
Juho Hiltunen
23172c4f74
jbo: add a test for capitals within words (LOPT_CAPS_IN_WORD)
2020-12-28 11:24:26 +02:00
Juho Hiltunen
2636583e31
Update changelog
2020-12-26 20:10:04 +02:00
Juho Hiltunen
07c8ad3f7b
jbo: remove unnecessary lojban related code in ReadClause()
...
It is enough to have the logic in dictsource/jbo_*.
Thanks to xunsku @ irc.freenode.org
2020-12-26 20:07:40 +02:00
Juho Hiltunen
597a8a4555
jbo: Multiple pronunciation fixes.
...
Thanks to xunsku @ irc.freenode.org
2020-12-26 20:06:45 +02:00
Juho Hiltunen
55eb89ae5d
jbo: fix pronunciation of " i" and " .i".
...
This test is related to the next two lojban commits. Thanks to xunsku @ irc.freenode.org
2020-12-26 20:04:54 +02:00
Juho Hiltunen
c9dee003bf
better explanation and nicer formatting for the ssml reference test.
2020-08-27 06:12:25 +03:00
Juho Hiltunen
54d93cf2b4
code cleanup: move ssml reference handling logic to a new function ParseSsmlReference()
...
It's unclear why c2 needs to be set after an entity reference.
2020-08-23 20:43:29 +03:00
Juho Hiltunen
959bf26b6b
Add a test for XML/SSML character and entity references
2020-08-23 20:42:47 +03:00
Juho Hiltunen
34657e7ea4
code cleanup: move check for SSML comments and declarations to
...
ProcessSsmlTag()
Note the line in readclause.c:
if ((c2 == '/') || iswalpha(c2) || c2 == '!' || c2 == '?') {
It might be enough to pass everything to ProcessSsmlTag. What are the
cases that are skipped because of this?
2020-08-23 20:42:24 +03:00
Juho Hiltunen
75d66c89d0
code cleanup: Move self_closing checks to ProcessSsmlTag()
...
This is a bit slower since we don't pass n_xml_buf as an argument but
rather get it with a call to wcslen. It is much cleaner though, since
the name ProcessSsmlTag() implies that all processing should be done
there.
2020-08-23 20:41:52 +03:00
Juho Hiltunen
50f58168e1
code cleanup: remove unused *constcharptr and MakeWawe2()
2020-08-23 20:41:28 +03:00
Juho Hiltunen
0352616de9
code cleanup: remove ununsed ctrl_embedded
...
It's a duplicate of CTRL_EMBEDDED.
2020-07-24 15:44:03 +03:00
Juho Hiltunen
725bdda564
code cleanup: remove unused variables
...
this_ph_data, N_WAV_BUF, option.device, harm_sqrt_n, max_hval, next_pause
2020-07-24 07:29:59 +03:00
Juho Hiltunen
68874a06f1
code cleanup: make NumInstnWords() static
2020-07-24 07:29:59 +03:00
Juho Hiltunen
ee944700f8
code cleanup: Check all local includes with include-what-you-use
...
Going through files in src/libespeak-ng/, include-what-you-use removed a
few unnecessary includes and included explanations on why a certain
header should be included. This makes tracking globals and dependencies easier.
Running the codebase through IWYU should be repeated after each major
code restIncludes to standard c library weren't checked to avoid
breaking builds with other platforms.
See https://github.com/include-what-you-use/include-what-you-use
2020-07-24 07:29:47 +03:00
Juho Hiltunen
5d03047c19
code cleanup: remove unused int vowel_transition[4]
...
There's two variables with the same name:
1) in struct PHONEME_DATA, used by *phdata, *phdata_next and *phdata_prev
2) an unnecessary one that's only being memset() twice but never used
for anything
2020-07-21 16:14:25 +03:00
Juho Hiltunen
a4041952c5
code cleanup: remove unused references to f_log
...
f_log is only used in compiledict.c.
2020-07-21 15:50:39 +03:00
Juho Hiltunen
713e8a9e2c
code cleanup: remove unused parameter from SetUpPhonemeTable.
...
See commit 65847bd251 . Bool recursing is not used for
anything anymore. Fixes a (compiler warning.
2020-07-21 15:50:29 +03:00
Juho Hiltunen
65847bd251
code cleanup: remove phoneme_tab_flags
...
It is memset and set once, but never checked or used for anything.
2020-07-21 12:39:59 +03:00
Juho Hiltunen
c0ff3696b9
code cleanup: change global int current_phoneme table to static
...
It's only used in SpeakNextClause() and related to SelectPhonemeTable().
Another solution void be to keep SelectPhonemeTable() as a void function
and do a current_phoneme_table = voice->phoneme_tab_ix after the call to
SelectPhonemeTable().
2020-07-21 12:39:51 +03:00
Juho Hiltunen
992745508e
code cleanup: pass voice_t wvoice as a parameter to Wavegen() instead of using a
...
global
2020-07-21 12:39:41 +03:00
Juho Hiltunen
3b4cca4832
code cleanup: combine Wavegen() and Wavegen2().
...
Wavegen2() only had one if-statement and then called
Wavegen(). Wavegen() was never called directly.
2020-07-21 12:39:28 +03:00
Juho Hiltunen
9232f1911e
code cleanup: remove unnecessary references to out_start.
...
Unsigned char *out_start is a global only used in speech.c.
2020-07-21 12:39:20 +03:00
Juho Hiltunen
388be80da7
code cleanup: pass voice_t wvoice as a parameter instead of using a global
...
SetSynth_Klatt() was using wvoice in two ways:
1) global wvoice was used directly
2) global wvoice was also passed in Wavegen_Klatt() as an argument "v"
Now the code only uses the function argument wvoice
Contributes to #68 .
2020-07-21 12:39:12 +03:00
Juho Hiltunen
1b7c3303ef
code cleanup: pass WGEN_DATA wdata as a parameter instead of using a global
...
Contributes to #68 .
2020-07-21 12:39:03 +03:00
Juho Hiltunen
516144d63a
code cleanup: combine Wavegen_Klatt() and Wavegen_Klatt2().
...
Wavegen_Klatt2() only had one if-statement and then called
Wavegen_Klatt(). Wavegen_Klatt() was never called directly.
2020-07-21 12:38:54 +03:00
Juho Hiltunen
520a30e0b0
code cleanup: use existing defines espeakRATE_MINIMUM, espeakRATE_NORMAL and espeakRATE_MAXIMUM.
2018-10-06 11:34:25 +03:00
Juho Hiltunen
3da5af52aa
man: fix incorrect default speed value
...
Fixes #555 .
2018-10-06 11:00:08 +03:00
Juho Hiltunen
fe60e0e9b3
fr: change pronunciation of some words ending in -us.
2018-07-20 12:42:35 +03:00
Juho Hiltunen
bafc8e0f24
Emoji: skip multi-word replacements.
...
Fixes #511 .
2018-06-30 15:33:15 +03:00
Juho Hiltunen
08e27a145d
tr: add pronunciation rules for vowels â, ô, û.
...
Related to #500 .
2018-06-02 23:57:55 +03:00
Juho Hiltunen
6d751c93bf
wavegen.c: Fix -Wunused-but-set-variable warning.
2018-05-01 19:02:32 +01:00
Juho Hiltunen
f4aec775cf
compiledata.c: Fix -Wunused-result warning.
2018-05-01 19:02:21 +01:00
Juho Hiltunen
dd7f788dcf
remove unused ints testing and phoneme_change
2018-04-22 12:26:15 +03:00
Juho Hiltunen
8904700ad3
remove unused wmark and all related code
2018-04-22 12:26:14 +03:00
Juho Hiltunen
cd35a6fd07
refactor setting tone_out in TranslateClause
2018-04-22 12:26:14 +03:00
Juho Hiltunen
b7c2ad604b
refactor and remove redundant call to towlower2()
2018-04-15 19:36:40 +03:00
Juho Hiltunen
8ac2a29199
Don't build or install test programs with make and make install.
...
Using make check builds but does not install them.
2018-03-31 11:55:55 +03:00
Juho Hiltunen
52b999ab4e
Don't build or install test libraries with make and make install.
...
Using make check builds but does not install them.
2018-03-31 11:55:41 +03:00
Juho Hiltunen
4e8d47d2cc
portability: use suffix rules instead of pattern rules.
...
Closes #396 .
2018-03-30 19:32:05 +03:00
Juho Hiltunen
fb175ec600
Print an error message if voice is not specified with --compile
...
Prevents a segfault.
2018-03-30 10:24:46 +03:00
Juho Hiltunen
839f727a24
headers: move WordToString() to synthesize.h
2018-03-25 12:41:26 +03:00
Juho Hiltunen
9174a2045e
maintainability: remove unused externs
2018-03-25 12:41:11 +03:00
Juho Hiltunen
f0c345eb6a
maintainability: pass n_ph_list2 and ph_list2 to MakePhonemeList() and SubstitutePhonemes() instead of using globals
2018-03-25 12:41:05 +03:00
Juho Hiltunen
d08b8e43ca
maintainability: pass seq_len_adjust to LookupSpect() instead of using globals
2018-03-25 12:41:01 +03:00
Juho Hiltunen
b23e8a7269
maintainability: pass Translator as to towlower2() instead of using a global
2018-03-25 12:40:57 +03:00
Juho Hiltunen
f73ebfd126
maintainability: pass current_alphabet as argument to TranslateLetter() instead of using global
2018-03-24 15:05:53 +02:00
Juho Hiltunen
d196d93ed5
maintainability: move variables to files where they are used, allowing removal of unnecessary extern declarations
2018-03-24 15:05:23 +02:00
Juho Hiltunen
1bad240de8
maintainability: remove some unused variables and unnecessary extern declarations
2018-03-24 15:03:48 +02:00
Juho Hiltunen
c4ec7bfe34
remove option_phoneme_variants that is never set and always evaluates true
2018-03-24 15:03:12 +02:00
Juho Hiltunen
7ee0d7905c
remove unused int option_tone2
...
It is set in voices.c but never used. docs/voices.md indicates that the keyword intonation only takes one parameter, confirming that option_tone2 is unused.
2018-03-24 14:25:50 +02:00
Juho Hiltunen
29cba35a9e
headers: add new file mbrola.h with declarations of functions in compilembrola.c and synth_mbrola.c
2018-03-11 11:44:48 +02:00
Juho Hiltunen
f00ff91fe4
headers: add new file wavegen.h with declarations of functions in wavegen.c
2018-03-11 11:27:56 +02:00
Juho Hiltunen
9012f3f0bf
headers: continue with synthdata.h
2018-03-10 13:54:58 +02:00
Juho Hiltunen
246d1006e9
include readclause.h in tests
2018-03-10 13:20:38 +02:00
Juho Hiltunen
e04ae259e0
headers: add new file compiledict.h with declarations of functions in compiledict.c
2018-03-10 12:51:24 +02:00
Juho Hiltunen
655dbf6b7a
remove unnecessary include of synthesize.h
2018-03-10 12:47:08 +02:00
Juho Hiltunen
231a1d0944
headers: add new file dictionary.h with declarations of functions in dictionary.c
2018-03-10 12:47:02 +02:00
Juho Hiltunen
cd991bd2c9
headers: add new file numbers.h with declarations of functions in numbers.c
2018-03-10 09:27:23 +02:00
Juho Hiltunen
07160f9286
headers: add new file synthdata.h with declarations of functions in synthdata.c
2018-03-10 08:23:24 +02:00
Juho Hiltunen
d395efa481
headers: add new file phonemelist.h with declarations of functions in phonemelist.c
2018-03-10 08:02:24 +02:00
Juho Hiltunen
098904dfe0
headers: add new file setlengths.h with declarations of functions in setlengths.c
2018-03-10 08:02:17 +02:00
Juho Hiltunen
9d12d23d2a
headers: add new file intonation.h with declarations of functions in intonation.c
2018-03-10 07:49:04 +02:00
Juho Hiltunen
706df97b20
headers: add new file readclause.h with declarations of functions in readclause.c
2018-03-10 07:18:07 +02:00
Juho Hiltunen
079d5a92c5
remove more unnecessary speech.h includes
2018-03-09 21:08:38 +02:00
Juho Hiltunen
30ad5c39f6
move struct MatchRecord to dictionary.c since it's the only file that uses it
2018-03-09 21:08:38 +02:00
Juho Hiltunen
342f077755
remove unused declarations of ChangePhonemes_ru() and struct CHANGEPH
...
these are the only references in the code.
2018-03-09 21:08:38 +02:00
Juho Hiltunen
d1fd650219
Replace references to USHORT, DOUBLEX and UCHAR with unsigned short, double and unsigned char.
...
This makes the codebase more consistent. Including speech.h is not necessary anymore in some files. Includes have been removed.
2018-03-09 21:08:38 +02:00
Juho Hiltunen
738492100a
make all headers (almost) self-contained by using include guards and #include statements within headers
2018-03-09 21:08:15 +02:00
Juho Hiltunen
985e7d5b39
set functions in ssml.c static.
...
The only entry point in the file is ProcessSsmlTags().
2018-03-03 23:46:58 +02:00
Juho Hiltunen
ace9bc087a
fix syntax for pointer incrementation
...
previous syntax was a quick fix when changing from globals to pointers.
2018-03-03 23:45:42 +02:00
Juho Hiltunen
a47ff4f41d
move ProcessSsmlTag() from readclause.to to ssml.c
...
use parameters instead of globals
2018-03-03 23:45:03 +02:00
Juho Hiltunen
a6b1896ce3
move SetProsodyParameter()
2018-03-03 23:44:16 +02:00
Juho Hiltunen
6c4d22b6d2
move ReplaceKeyName()
2018-03-03 23:43:48 +02:00
Juho Hiltunen
21e391b631
move GetSsmlAttributes()
2018-03-03 23:43:14 +02:00
Juho Hiltunen
d6ed3a3320
move PopParamStack()
2018-03-03 23:42:58 +02:00
Juho Hiltunen
b793920ff7
move PushParamStack()
2018-03-03 23:41:55 +02:00
Juho Hiltunen
2b10dba10f
move ProcessParamStack()
2018-03-03 23:40:52 +02:00
Juho Hiltunen
da125f1a1b
move GetVoiceFromStack()
2018-03-03 23:39:09 +02:00
Juho Hiltunen
16a5b5d15c
move attr_prosody_value()
2018-03-03 23:38:52 +02:00
Juho Hiltunen
fdc2bb06d9
move GetVoiceAttributes()
2018-03-03 23:38:34 +02:00
Juho Hiltunen
f00d5798de
add ssml.h for defines
2018-03-03 23:38:09 +02:00
Juho Hiltunen
a4eca79304
moved attrcopy_utf8()
2018-03-03 23:31:13 +02:00
Juho Hiltunen
07a19b3208
moved attrnumber() from readclause.c to ssml.c
2018-03-03 23:30:16 +02:00
Juho Hiltunen
a8239c4502
start moving SSML related parsing to ssml.c
...
move: attrcmp() and attrlookup()
new file ssml.c added to Makefile.am
2018-03-03 23:29:10 +02:00
Juho Hiltunen
8999a3b8fb
when end_clause_after_tag is set: end clause after the tag, not before the tag
...
Fixes #401 .
2018-02-19 20:51:29 +02:00
Juho Hiltunen
78749f14f8
readability fix: use boolean instead of 0 and 1 for loop control
2018-02-17 18:17:00 +02:00
Juho Hiltunen
b69a8eab32
fi: double the initial consonant of enclitics following a word in allative case
...
allative case has a suffix of -lle. Normally it causes the doubling of the next word. However, enclitics should be treated like words in this case, so double the enclitic instead of the next word.
Sources for grammar rule:
http://scripta.kotus.fi/visk/sisallys.php?p=127
http://scripta.kotus.fi/visk/sisallys.php?p=34
2018-02-06 20:43:40 +02:00
Juho Hiltunen
45e424394d
my: Comment out the emoji translation that was breaking the pronunciation of '7'.
2018-01-25 21:43:42 +02:00
Juho Hiltunen
da287fb851
Unify terminology for stress
...
synthesize.h now contains the definitions STRESS_IS_... that should be used with code related to syllable stress.
Note that isBreak and other defines were renumbered so that stress definitions could have values 0-6.
Possible TODOs:
1. Unify with terms used with phonemes, i.e. keywords like isDiminished in compiledata.c and stress_type in phsource/phonemes
2. Add functionality and documentation about STRESS_IS_PRIORITY and STRESS_IS_EMPHASIZED
2018-01-14 15:26:03 +02:00
Juho Hiltunen
88315250ff
readability fix: use boolean instead of 0 and 1 for loop control
2018-01-14 15:22:37 +02:00
Juho Hiltunen
afb4fe75e2
fi: fix behaviour of S_2_TO_HEAVY (adding secondary stress)
...
Stress flag S_2_TO_HEAVY is currently only used by finnish.
Current behaviour skips adding secondary stress if the following syllable is heavy. The behaviour should be to skip adding secondary stress if the rest of the word (excluding last syllable) contains a heavy syllable.
Source of grammar rule and examples of expected behaviour: http://scripta.kotus.fi/visk/sisallys.php?p=13
2018-01-14 14:48:36 +02:00
Juho Hiltunen
3a8e234fa3
fi: improve stress for numerals
...
Source: http://scripta.kotus.fi/visk/sisallys.php?p=13
2018-01-14 14:39:42 +02:00
Juho Hiltunen
0f55204522
Move most stress rule definitions from tr_languages.c to language files
...
Keyword stressRule in voices.c handles setting langopts->stress_rule.
tr_languages.c still contains the setting for some languages that don't have a language file yet.
Contributes to:
Issue #218 , https://github.com/espeak-ng/espeak-ng/issues/218
2017-12-10 21:05:21 +02:00
Juho Hiltunen
2ec4ad38ea
Use stressRule instead of stressrule for consistency
2017-12-10 21:05:20 +02:00