Skip to content

Commit

Permalink
Don't set stress_flags with language option "stressRule".
Browse files Browse the repository at this point in the history
Language option "stressOpt" already handles separate flags instead of a
single integer. There's no reason to have two ways of setting the same
option.
  • Loading branch information
jaacoppi committed Jul 27, 2021
1 parent 4f5f1e8 commit c28412d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions docs/voices.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,11 @@ language. (values are defined as bit numbers starting with "S_*" in [translate.h

### stressRule

stressRule <4 integer values>
stressRule <3 integer values>

Four integer parameters. These correspond to:
Three integer parameters. These correspond to:

1. langopts->stress_rule (values in [translate.h](../src/libespeak-ng/translate.h))
2. langopts->stress_flags
3. langopts->unstressed_wd1 (stress for $u word of 1 syllable)
4. langopts->unstressed_wd2 (stress for $u word of >1 syllable)

Expand Down
4 changes: 2 additions & 2 deletions espeak-ng-data/lang/itc/la
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name Latin
language la
stressRule 2 33 0 2
stressRule 2 0 2
// rule=penultimate
// flags=0100001 (no automatic secondary stress + don't stres monosyllables)
// unstressed_wd1=0
// unstressed_wd2=2
stressOpt 0 5 // flags=0100001 (no automatic secondary stress + don't stres monosyllables)

// short gap between words
words 2
Expand Down
3 changes: 1 addition & 2 deletions src/libespeak-ng/voices.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,7 @@ voice_t *LoadVoice(const char *vname, int control)
if (CheckTranslator(translator, keyword_tab, key) != 0)
break;

sscanf(p, "%d %d %d %d", &translator->langopts.stress_rule,
&translator->langopts.stress_flags,
sscanf(p, "%d %d %d", &translator->langopts.stress_rule,
&translator->langopts.unstressed_wd1,
&translator->langopts.unstressed_wd2);

Expand Down

0 comments on commit c28412d

Please sign in to comment.