mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-11 08:30:31 +00:00
Merge branch 'upstream' into development
Conflicts: dictsource/dict_phonemes phsource/compile_report
This commit is contained in:
+4
-2
@@ -1191,6 +1191,7 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,
|
||||
If 'tonic' is set (>= 0), replace highest stress by this value.
|
||||
|
||||
control: bit 0 This is an individual symbol, not a word
|
||||
bit 1 Suffix phonemes are still to be added
|
||||
*/
|
||||
|
||||
unsigned char phcode;
|
||||
@@ -1577,11 +1578,12 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,
|
||||
break;
|
||||
}
|
||||
|
||||
if((stressflags & S_FINAL_VOWEL_UNSTRESSED) && (vowel_count > 2) && (max_stress_input < 3) && (vowel_stress[vowel_count - 1] == 4))
|
||||
if((stressflags & S_FINAL_VOWEL_UNSTRESSED) && ((control & 2) == 0) && (vowel_count > 2) && (max_stress_input < 3) && (vowel_stress[vowel_count - 1] == 4))
|
||||
{
|
||||
// Don't allow stress on a word-final vowel
|
||||
// Only do this if there is no suffix phonemes to be added, and if a stress position was not given explicitly
|
||||
if(phoneme_tab[final_ph]->type == phVOWEL)
|
||||
{
|
||||
// don't allow stress on a word-final vowel
|
||||
vowel_stress[vowel_count - 1] = 1;
|
||||
vowel_stress[vowel_count - 2] = 4;
|
||||
}
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.48.12 01.Nov.14";
|
||||
const char *version_string = "1.48.13 04.Nov.14";
|
||||
const int version_phdata = 0x014801;
|
||||
|
||||
int option_device_number = -1;
|
||||
|
||||
@@ -1076,6 +1076,7 @@ SetLengthMods(tr,3); // all equal
|
||||
tr->langopts.param[LOPT_REDUCE] = 1; // reduce vowels even if phonemes are specified in it_list
|
||||
tr->langopts.param[LOPT_ALT] = 2; // call ApplySpecialAttributes2() if a word has $alt or $alt2
|
||||
tr->langopts.numbers = NUM_SINGLE_VOWEL | NUM_OMIT_1_HUNDRED |NUM_DECIMAL_COMMA | NUM_ROMAN | NUM_DFRACTION_1 | NUM_ROMAN_CAPITALS | NUM_ROMAN_AFTER;
|
||||
tr->langopts.numbers2 = NUM2_NO_TEEN_ORDINALS;
|
||||
tr->langopts.accents = 2; // Say "Capital" after the letter.
|
||||
SetLetterVowel(tr,'y');
|
||||
}
|
||||
|
||||
+9
-2
@@ -861,6 +861,7 @@ int TranslateWord(Translator *tr, char *word_start, int next_pause, WORD_TAB *wt
|
||||
int wmark;
|
||||
int was_unpronouncable = 0;
|
||||
int loopcount;
|
||||
int add_suffix_phonemes = 0;
|
||||
WORD_TAB wtab_null[8];
|
||||
|
||||
// translate these to get pronunciations of plural 's' suffix (different forms depending on
|
||||
@@ -1465,6 +1466,12 @@ if(end_type & SUFX_UNPRON)
|
||||
|
||||
/* determine stress pattern for this word */
|
||||
/******************************************/
|
||||
add_suffix_phonemes = 0;
|
||||
if(end_phonemes[0] != 0)
|
||||
{
|
||||
add_suffix_phonemes = 2;
|
||||
}
|
||||
|
||||
prefix_stress = 0;
|
||||
for(p = prefix_phonemes; *p != 0; p++)
|
||||
{
|
||||
@@ -1516,9 +1523,9 @@ if(end_type & SUFX_UNPRON)
|
||||
else
|
||||
{
|
||||
if(prefix_phonemes[0] == 0)
|
||||
SetWordStress(tr, phonemes, dictionary_flags, -1, 0);
|
||||
SetWordStress(tr, phonemes, dictionary_flags, -1, add_suffix_phonemes);
|
||||
else
|
||||
SetWordStress(tr, phonemes, dictionary_flags, -1, 0);
|
||||
SetWordStress(tr, phonemes, dictionary_flags, -1, add_suffix_phonemes);
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
sprintf(word_phonemes, "%s%s%s", unpron_phonemes, prefix_phonemes, phonemes);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user