Updates to Github #github


espeak-ng@groups.io Integration <espeak-ng@...>
 

[espeak-ng:master] New Comment on Issue #793 There needs to be a way to explicitly set stress only via rules to support unstressed languages and other non-European languages.
By jaacoppi:

This diff: `diff --git a/espeak-ng-data/lang/iro/chr b/espeak-ng-data/lang/iro/chr index abe29382..9c94836c 100644 --- a/espeak-ng-data/lang/iro/chr +++ b/espeak-ng-data/lang/iro/chr @@ -17,7 +17,7 @@ words 2 1 phonemes chr

//stress on all syllables to simulate stress on no syllables -stressRule 9 +stressRule 0 stressLength 175 175 175 175 175 175 175 175 //all vowels the same length regardless of stress stressAmp 10 10 10 10 10 10 10 10 //all vowels the same strength regardless of marked stress

diff --git a/src/libespeak-ng/dictionary.c b/src/libespeak-ng/dictionary.c index bd144fa8..4f220c87 100644 --- a/src/libespeak-ng/dictionary.c +++ b/src/libespeak-ng/dictionary.c @@ -1119,6 +1119,9 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,

    switch (tr->langopts.stress_rule)
    {
  • case 0: // no stress except what's in the language rules and dictionary
  • return; + case 8: // stress on first syllable, unless it is a light syllable followed by a heavy syllable if ((syllable_weight[1] > 0) || (syllable_weight[2] == 0))`

produces: _espeak-ng -X -v chr+f2 -x "U²no¹de⁴na hạ²wi²ya hạ²wi²ya hạ²wi²ya." _ u:2no~:1de:4n0~43_ h02wi:2j0~43_ h02wi:2j0~43_ h02wi:2j'0~43_

My solution simply skips making any stress changes and returns from the function. The word "hạ²wi²ya" is handled correctly two out of three times. However, there's still a stress at the end of the sentence. The same effect happens with "hạ²wi²ya!" and "hạ²wi²ya?". It's added somewhere else. My guess is S_NO_EOC_LENGTHEN in setlengths.c. Kazakh has it implemented in tr_languages.c.


[espeak-ng:master] New Comment on Issue #793 There needs to be a way to explicitly set stress only via rules to support unstressed languages and other non-European languages.
By jaacoppi:

This diff: `diff --git a/espeak-ng-data/lang/iro/chr b/espeak-ng-data/lang/iro/chr index abe29382..9c94836c 100644 --- a/espeak-ng-data/lang/iro/chr +++ b/espeak-ng-data/lang/iro/chr @@ -17,7 +17,7 @@ words 2 1 phonemes chr

//stress on all syllables to simulate stress on no syllables -stressRule 9 +stressRule 0 stressLength 175 175 175 175 175 175 175 175 //all vowels the same length regardless of stress stressAmp 10 10 10 10 10 10 10 10 //all vowels the same strength regardless of marked stress

diff --git a/src/libespeak-ng/dictionary.c b/src/libespeak-ng/dictionary.c index bd144fa8..4f220c87 100644 --- a/src/libespeak-ng/dictionary.c +++ b/src/libespeak-ng/dictionary.c @@ -1119,6 +1119,9 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,

    switch (tr->langopts.stress_rule)
    {
  • case 0: // no stress except what's in the language rules and dictionary
  • return; + case 8: // stress on first syllable, unless it is a light syllable followed by a heavy syllable if ((syllable_weight[1] > 0) || (syllable_weight[2] == 0))`

produces: _espeak-ng -X -v chr+f2 -x "U²no¹de⁴na hạ²wi²ya hạ²wi²ya hạ²wi²ya." _ u:2no~:1de:4n0~43_ h02wi:2j0~43_ h02wi:2j0~43_ h02wi:2j'0~43_

My solution simply skips making any stress changes and returns from the function. The word "hạ²wi²ya" is handled correctly two out of three times. However, there's still a stress at the end of the sentence. The same effect happens with "hạ²wi²ya!" and "hạ²wi²ya?". It's added somewhere else. My guess is S_NO_EOC_LENGTHEN in setlengths.c. Kazakh has it implemented in tr_languages.c.

Edit: S_NO_EOC_LENGTHEN should be moved from tr_languages.c to a keyword in the language definition file lang/iro/chr. See #218. So when making a solution, don't add anything to tr_languages.c.

Join espeak-ng@groups.io to automatically receive all group messages.