mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-07 15:24:02 +00:00
Merge branch 'development'
This commit is contained in:
+2
-2
@@ -1495,8 +1495,8 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,
|
||||
else
|
||||
{
|
||||
// no long vowels or consonant clusters
|
||||
if(vowel_count > 4)
|
||||
stressed_syllable = vowel_count - 3;
|
||||
if(vowel_count > 5)
|
||||
stressed_syllable = vowel_count - 3; // more than 4 syllables
|
||||
else
|
||||
stressed_syllable = vowel_count - 1;
|
||||
}
|
||||
|
||||
+7
-4
@@ -124,6 +124,7 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence)
|
||||
int alternative;
|
||||
int delete_count;
|
||||
int word_start;
|
||||
int inserted;
|
||||
PHONEME_DATA phdata;
|
||||
|
||||
int n_ph_list3;
|
||||
@@ -341,9 +342,7 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence)
|
||||
{
|
||||
plist3 = &ph_list3[j];
|
||||
|
||||
if(plist3->sourceix != 0)
|
||||
word_start = j;
|
||||
|
||||
inserted = 0;
|
||||
if(insert_ph != 0)
|
||||
{
|
||||
// we have a (linking) phoneme which we need to insert here
|
||||
@@ -374,10 +373,14 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence)
|
||||
ph = phoneme_tab[insert_ph];
|
||||
plist3->ph = ph;
|
||||
insert_ph = 0;
|
||||
inserted = 1; // don't insert the same phoneme repeatedly
|
||||
}
|
||||
else
|
||||
{
|
||||
// otherwise get the next phoneme from the list
|
||||
if(plist3->sourceix != 0)
|
||||
word_start = j;
|
||||
|
||||
ph = phoneme_tab[plist3->phcode];
|
||||
plist3[0].ph = ph;
|
||||
|
||||
@@ -394,7 +397,7 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence)
|
||||
|
||||
InterpretPhoneme(tr, 0x100, plist3, &phdata, &worddata);
|
||||
|
||||
if((alternative = phdata.pd_param[pd_INSERTPHONEME]) > 0)
|
||||
if(((alternative = phdata.pd_param[pd_INSERTPHONEME]) > 0) && (inserted == 0))
|
||||
{
|
||||
// PROBLEM: if we insert a phoneme before a vowel then we loose the stress.
|
||||
PHONEME_TAB *ph2;
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.47.01 18.Mar.13";
|
||||
const char *version_string = "1.47.02 19.Mar.13";
|
||||
const int version_phdata = 0x014701;
|
||||
|
||||
int option_device_number = -1;
|
||||
|
||||
@@ -1084,6 +1084,7 @@ SetLengthMods(tr,3); // all equal
|
||||
|
||||
case L('k','l'): // Greenlandic
|
||||
{
|
||||
SetupTranslator(tr,stress_lengths_equal,stress_amps_equal);
|
||||
tr->langopts.stress_rule = 12;
|
||||
tr->langopts.stress_flags = S_NO_AUTO_2;
|
||||
tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_SWAP_TENS | NUM_HUNDRED_AND | NUM_OMIT_1_HUNDRED | NUM_ORDINAL_DOT | NUM_1900 | NUM_ROMAN | NUM_ROMAN_CAPITALS | NUM_ROMAN_ORDINAL;
|
||||
|
||||
Reference in New Issue
Block a user