mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-14 17:47:19 +00:00
eu: Updated Basque phonetics and stress rule
This commit is contained in:
committed by
Juho Hiltunen
parent
6dd5fad143
commit
2fb981855b
@@ -1327,6 +1327,20 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,
|
||||
max_stress = STRESS_IS_PRIMARY;
|
||||
}
|
||||
break;
|
||||
case 15: // LANG=eu. If more than 2 syllables: primary stress in second syllable and secondary on last.
|
||||
if ((stressed_syllable == 0) && (vowel_count > 2)) {
|
||||
for (ix = 1; ix < vowel_count; ix++) {
|
||||
vowel_stress[ix] = STRESS_IS_DIMINISHED;
|
||||
}
|
||||
stressed_syllable = 2;
|
||||
if (max_stress == STRESS_IS_DIMINISHED)
|
||||
vowel_stress[stressed_syllable] = STRESS_IS_PRIMARY;
|
||||
max_stress = STRESS_IS_PRIMARY;
|
||||
if (vowel_count > 3) {
|
||||
vowel_stress[vowel_count - 1] = STRESS_IS_SECONDARY;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ((stressflags & S_FINAL_VOWEL_UNSTRESSED) && ((control & 2) == 0) && (vowel_count > 2) && (max_stress_input < STRESS_IS_SECONDARY) && (vowel_stress[vowel_count - 1] == STRESS_IS_PRIMARY)) {
|
||||
|
||||
@@ -762,8 +762,8 @@ Translator *SelectTranslator(const char *name)
|
||||
static const short stress_lengths_eu[8] = { 200, 200, 200, 200, 0, 0, 210, 230 }; // very weak stress
|
||||
static const unsigned char stress_amps_eu[8] = { 16, 16, 18, 18, 18, 18, 18, 18 };
|
||||
SetupTranslator(tr, stress_lengths_eu, stress_amps_eu);
|
||||
tr->langopts.stress_rule = STRESSPOSN_2L; // ?? second syllable, but not on a word-final vowel
|
||||
tr->langopts.stress_flags = S_FINAL_VOWEL_UNSTRESSED;
|
||||
tr->langopts.stress_rule = 15;
|
||||
tr->langopts.stress_flags = S_FINAL_VOWEL_UNSTRESSED | S_MID_DIM;
|
||||
tr->langopts.param[LOPT_SUFFIX] = 1;
|
||||
tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_HUNDRED_AND | NUM_OMIT_1_HUNDRED | NUM_OMIT_1_THOUSAND | NUM_VIGESIMAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user