Browse Source

[1.40.10]

SSML: Fix bug where <mark> was ignored before some punctuation characters.

Lang=fr:  Don't stress monosyllables, except at end-of-clause or before phoneme [_;_]


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@217 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 16 years ago
parent
commit
3869045b19
6 changed files with 27 additions and 11 deletions
  1. 0
    1
      dictsource/de_list
  2. 2
    2
      dictsource/de_rules
  3. 2
    2
      src/dictionary.cpp
  4. 1
    1
      src/readclause.cpp
  5. 1
    1
      src/synthdata.cpp
  6. 21
    4
      src/translate.cpp

+ 0
- 1
dictsource/de_list View File

minut $2 minut $2
mikrofiche maIk@-*o:fIS mikrofiche maIk@-*o:fIS
miteinander $1 miteinander $1
mitte mIt@
modell mo:d'El modell mo:d'El
monoton $3 monoton $3
monsun $2 monsun $2

+ 2
- 2
dictsource/de_rules View File

_) miet (C@P4 m'i:t _) miet (C@P4 m'i:t
_) mikro (@P5 m,i:k@-*o: _) mikro (@P5 m,i:k@-*o:
_) mit (P3 m'It _) mit (P3 m'It
mitt (eC mIt
mitt (l mIt
mitt mIt
mitt (eil mItt
_) mo (rb m%O _) mo (rb m%O
_) mono (@ m,o:no: _) mono (@ m,o:no:
_) motor m%o:to:* _) motor m%o:to:*

+ 2
- 2
src/dictionary.cpp View File



if((max_stress == 0) && (tr->langopts.stress_flags & 1) && (vowel_count == 2)) if((max_stress == 0) && (tr->langopts.stress_flags & 1) && (vowel_count == 2))
{ {
// option: don't stress monosyllables except at end-of-clause
// option: don't stress monosyllables except at end-of-clause (lang=fr)
vowel_stress[1] = 1; vowel_stress[1] = 1;
dictionary_flags |= FLAG_STRESS_END;
dictionary_flags |= FLAG_STRESS_END2;
} }


// heavy or light syllables // heavy or light syllables

+ 1
- 1
src/readclause.cpp View File

if(stressed_word) if(stressed_word)
{ {
stressed_word = 0; stressed_word = 0;
c1 = CHAR_EMPHASIS; // indicate this word is strtessed
c1 = CHAR_EMPHASIS; // indicate this word is stressed
UngetC(c2); UngetC(c2);
c2 = ' '; c2 = ' ';
} }

+ 1
- 1
src/synthdata.cpp View File

#include "translate.h" #include "translate.h"
#include "wave.h" #include "wave.h"


const char *version_string = "1.40.09 11.Mar.09";
const char *version_string = "1.40.10 12.Mar.09";
const int version_phdata = 0x014000; const int version_phdata = 0x014000;


int option_device_number = -1; int option_device_number = -1;

+ 21
- 4
src/translate.cpp View File

int clause_start_word; int clause_start_word;
int new_sentence; int new_sentence;
static int word_emphasis = 0; // set if emphasis level 3 or 4 static int word_emphasis = 0; // set if emphasis level 3 or 4
static int embedded_flag = 0; // there are embedded commands to be applied to the next phoneme, used in TranslateWord2()


static int prev_clause_pause=0; static int prev_clause_pause=0;
static int max_clause_pause = 0; static int max_clause_pause = 0;
p->phcode = phcode; p->phcode = phcode;
p->stress = 0; p->stress = 0;
p->tone_number = 0; p->tone_number = 0;
p->synthflags = 0;
p->synthflags = embedded_flag;
p->sourceix = 0; p->sourceix = 0;
embedded_flag = 0;
} }


static int CountSyllables(unsigned char *phonemes) static int CountSyllables(unsigned char *phonemes)
int next_tone=0; int next_tone=0;
unsigned char *p; unsigned char *p;
int srcix; int srcix;
int embedded_flag=0;
int embedded_cmd; int embedded_cmd;
int value; int value;
int found_dict_flag; int found_dict_flag;
} }
else 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(first_phoneme && tr->langopts.param[LOPT_IT_DOUBLING])
{ {
if(((tr->prev_dict_flags & FLAG_DOUBLING) && (tr->langopts.param[LOPT_IT_DOUBLING] & 1)) || if(((tr->prev_dict_flags & FLAG_DOUBLING) && (tr->langopts.param[LOPT_IT_DOUBLING] & 1)) ||
char *p; char *p;
int j, k; int j, k;
int n_digits; int n_digits;
int charix_top;
int charix_top=0;


short charix[N_TR_SOURCE+4]; short charix[N_TR_SOURCE+4];
WORD_TAB words[N_CLAUSE_WORDS]; WORD_TAB words[N_CLAUSE_WORDS];
p2 = &ph_list2[n_ph_list2 + ix]; p2 = &ph_list2[n_ph_list2 + ix];
p2->phcode = phonPAUSE; p2->phcode = phonPAUSE;
p2->stress = 0; p2->stress = 0;
p2->sourceix = 0;
p2->sourceix = source_index;
p2->synthflags = 0; p2->synthflags = 0;
} }
n_ph_list2 += 2; n_ph_list2 += 2;
option_sayas2 = 0; option_sayas2 = 0;
option_emphasis = 0; option_emphasis = 0;
word_emphasis = 0; word_emphasis = 0;
embedded_flag = 0;


InitText2(); InitText2();



Loading…
Cancel
Save