Commit Graph
70 Commits
Author SHA1 Message Date
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
Juho Hiltunen 6042eb8d1e Move handling of SetLetterVowel() to language files
Contributes to:
Issue #218, https://github.com/espeak-ng/espeak-ng/issues/218

Changes:
language files have a new keyword letterVowel. It can be a latin alphabet from a-z or a hex value (used by bulgarian).
Errors in parsing the values are only reported, nothing is done about them.

About testing:
I haven't noticed any differences in the output audio with letterVowel set or unset in any tested language. The code seems to work and the correct bits seem to be set, but I don't know how to confirm from the final audio.

TODO:
1. Write better documentation in docs/voices.md
2. The code uses new_translator. Should it use translator instead?
2017-12-10 21:04:36 +02:00
Juho Hiltunen 4f56345fb5 Use stdbool instead of int (Issue #8)
See issue #8, https://github.com/espeak-ng/espeak-ng/issues/8

There might still be some ints that could be changed to boolean.

Possible regressions in fifo.c:
int fifo_is_busy() and int fifo_is_command_enabled() used to return an int. Now they return a boolean. This might cause problems on systems where stdbool true/false is something else than 1/0.
2017-12-09 17:34:05 +02:00
Juho Hiltunen 686a82f1b8 finnish: added pronunciation for letter q
Formerly, q was pronounced exactly like k. This is not the case in finnish.
2017-10-01 17:59:54 +03:00
Juho Hiltunen ddaf267aa9 Merge branch 'master' of https://github.com/espeak-ng/espeak-ng 2017-10-01 17:10:48 +03:00
Juho Hiltunen ef067a11fb finnish: ui sounds better than wi in all tested cases (subjective opinion). I haven't heard of any rule saying ui should be pronounced like wi. 2017-09-30 11:07:21 +03:00
Juho Hiltunen ec99b6ba48 Finnish: Move ruoan from pronunciation exception to a rule to include usage in compound words and inflections.
In general, most finnish exceptions should be inside rules since compound words and inflections are very common in finnish
2017-09-30 10:51:40 +03:00
Juho Hiltunen d9d498832e Compound word with the first word ending in -rg should also follow the swedish pronunciation.
This affects words familynames like Berglund and Bergholm and place names like Bergbackan.
2017-09-30 10:32:51 +03:00
Juho Hiltunen 780631845d finnish: pronunciation exception for "ruoan". Should be pronounced exactly like "ruuan" 2017-09-30 10:26:20 +03:00
Juho Hiltunen 418aadc2ba Finnish: clarification for -rg
This rule "CA) rg (_" only matches the place and family names, and exempts words like "org", in which the g should be pronounced.
2017-09-26 21:29:04 +03:00
Juho Hiltunen 411eec2b55 Follow swedish pronunciation for words ending in -rg.
In finnish these are almost exclusively swedish place names (Uleåborg) or family names (Lindberg)
2017-09-26 20:44:42 +03:00
Juho Hiltunen 265bee5e23 Added some common finnish abbreviations and foreign words
Mostly these are related to computers and internet (usb, ict and facebook) but there's others as well.
2017-09-25 20:04:54 +03:00