mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-29 14:01:04 +00:00
[1.40.11]
lang=fr: removed unstressed monosyllable option. lang=pt,it: fixed crash when speaking some numbers. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@218 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+1
-1
@@ -1111,7 +1111,7 @@ void SetWordStress(Translator *tr, char *output, unsigned int &dictionary_flags,
|
||||
|
||||
if((max_stress == 0) && (tr->langopts.stress_flags & 1) && (vowel_count == 2))
|
||||
{
|
||||
// option: don't stress monosyllables except at end-of-clause (lang=fr)
|
||||
// option: don't stress monosyllables except at end-of-clause
|
||||
vowel_stress[1] = 1;
|
||||
dictionary_flags |= FLAG_STRESS_END2;
|
||||
}
|
||||
|
||||
+1
-1
@@ -963,7 +963,7 @@ void ConvertToUtf8()
|
||||
int ix;
|
||||
FILE *f_in;
|
||||
FILE *f_out;
|
||||
char buf[80];
|
||||
char buf[200];
|
||||
|
||||
wxString fname = wxFileSelector(_T("Convert file to UTF8"),wxString(path_home,wxConvLocal),
|
||||
_T(""),_T(""),_T("*"),wxOPEN);
|
||||
|
||||
+1
-1
@@ -1033,7 +1033,7 @@ static int LookupNum2(Translator *tr, int value, int control, char *ph_out)
|
||||
if(tr->langopts.numbers & 0x200)
|
||||
{
|
||||
// remove vowel from the end of tens if units starts with a vowel (LANG=Italian)
|
||||
if((ix = strlen(ph_tens)-1) >= 0)
|
||||
if(((ix = strlen(ph_tens)-1) >= 0) && (ph_digits[0] != 0))
|
||||
{
|
||||
if((next_phtype = phoneme_tab[(unsigned int)(ph_digits[0])]->type) == phSTRESS)
|
||||
next_phtype = phoneme_tab[(unsigned int)(ph_digits[1])]->type;
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.40.10 12.Mar.09";
|
||||
const char *version_string = "1.40.11 13.Mar.09";
|
||||
const int version_phdata = 0x014000;
|
||||
|
||||
int option_device_number = -1;
|
||||
|
||||
@@ -380,7 +380,7 @@ Translator *SelectTranslator(const char *name)
|
||||
tr->langopts.unstressed_wd2 = 2;
|
||||
tr->langopts.param[LOPT_SONORANT_MIN] = 130; // limit the shortening of sonorants before short vowels
|
||||
|
||||
tr->langopts.numbers = 0x309;
|
||||
tr->langopts.numbers = 0x109;
|
||||
tr->langopts.numbers2 = 0x2; // variant form of numbers before thousands
|
||||
|
||||
if(name2 == L_grc)
|
||||
@@ -483,7 +483,7 @@ Translator *SelectTranslator(const char *name)
|
||||
|
||||
SetupTranslator(tr,stress_lengths_fr,stress_amps_fr);
|
||||
tr->langopts.stress_rule = 3; // stress on final syllable
|
||||
tr->langopts.stress_flags = 0x0024 + 0x1; // don't use secondary stress, monosyllables are unstressed
|
||||
tr->langopts.stress_flags = 0x0024; // don't use secondary stress
|
||||
tr->langopts.param[LOPT_IT_LENGTHEN] = 1; // remove lengthen indicator from unstressed syllables
|
||||
|
||||
tr->langopts.numbers = 0x1509 + 0x8000 + NUM_NOPAUSE | NUM_ROMAN | NUM_VIGESIMAL;
|
||||
@@ -807,7 +807,7 @@ SetLengthMods(tr,3); // all equal
|
||||
|
||||
tr->langopts.stress_rule = 3; // stress on final syllable
|
||||
tr->langopts.stress_flags = 0x6 | 0x10 | 0x20000;
|
||||
tr->langopts.numbers = 0x269 + 0x4000 + NUM_ROMAN;
|
||||
tr->langopts.numbers = 0x069 + 0x4000 + NUM_ROMAN;
|
||||
SetLetterVowel(tr,'y');
|
||||
ResetLetterBits(tr,0x2);
|
||||
SetLetterBits(tr,1,"bcdfgjkmnpqstvxz"); // B hard consonants, excluding h,l,r,w,y
|
||||
|
||||
@@ -1670,21 +1670,6 @@ static int TranslateWord2(Translator *tr, char *word, WORD_TAB *wtab, int pre_pa
|
||||
}
|
||||
else
|
||||
{
|
||||
if(ph_code == phonPAUSE_CLAUSE)
|
||||
{
|
||||
int j;
|
||||
for(j = n_ph_list2-1; j > 0; j--)
|
||||
{
|
||||
if(ph_list2[j].synthflags & SFLAG_PROMOTE_STRESS)
|
||||
{
|
||||
// lang=fr: stress monosyllables before conjunctions 'et' 'qui' etc
|
||||
ph_list2[j].stress = 4;
|
||||
}
|
||||
if(ph_list2[j].sourceix != 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(first_phoneme && tr->langopts.param[LOPT_IT_DOUBLING])
|
||||
{
|
||||
if(((tr->prev_dict_flags & FLAG_DOUBLING) && (tr->langopts.param[LOPT_IT_DOUBLING] & 1)) ||
|
||||
|
||||
Reference in New Issue
Block a user