Before this change, the clang compiler produced the following warning:
```
In file included from src/libespeak-ng/espeak_api.c:35:
src/libespeak-ng/event.h:65:28: warning: declaration of 'struct timespec' will
not be visible outside of this function [-Wvisibility]
void clock_gettime2(struct timespec *ts);
^
src/libespeak-ng/event.h:66:28: warning: declaration of 'struct timespec' will
not be visible outside of this function [-Wvisibility]
void add_time_in_ms(struct timespec *ts, int time_in_ms);
^
2 warnings generated.
```
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
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
Revert "Move most stress rule definitions from tr_languages.c to language files"
This reverts commit 0f55204522.
This breaks using voice files like mb-de5-en. It could also use
named values for the stress rules (e.g. 'first-syllable').
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
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?
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.