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

@@ -623,7 +623,6 @@ menuette mEnu:'Et
minut $2
mikrofiche maIk@-*o:fIS
miteinander $1
mitte mIt@
modell mo:d'El
monoton $3
monsun $2

+ 2
- 2
dictsource/de_rules View File

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

+ 2
- 2
src/dictionary.cpp View File

@@ -1111,9 +1111,9 @@ 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
// option: don't stress monosyllables except at end-of-clause (lang=fr)
vowel_stress[1] = 1;
dictionary_flags |= FLAG_STRESS_END;
dictionary_flags |= FLAG_STRESS_END2;
}

// heavy or light syllables

+ 1
- 1
src/readclause.cpp View File

@@ -2182,7 +2182,7 @@ f_input = f_in; // for GetC etc
if(stressed_word)
{
stressed_word = 0;
c1 = CHAR_EMPHASIS; // indicate this word is strtessed
c1 = CHAR_EMPHASIS; // indicate this word is stressed
UngetC(c2);
c2 = ' ';
}

+ 1
- 1
src/synthdata.cpp View File

@@ -35,7 +35,7 @@
#include "translate.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;

int option_device_number = -1;

+ 21
- 4
src/translate.cpp View File

@@ -71,6 +71,7 @@ int clause_start_char;
int clause_start_word;
int new_sentence;
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 max_clause_pause = 0;
@@ -1212,8 +1213,9 @@ static void SetPlist2(PHONEME_LIST2 *p, unsigned char phcode)
p->phcode = phcode;
p->stress = 0;
p->tone_number = 0;
p->synthflags = 0;
p->synthflags = embedded_flag;
p->sourceix = 0;
embedded_flag = 0;
}

static int CountSyllables(unsigned char *phonemes)
@@ -1269,7 +1271,6 @@ static int TranslateWord2(Translator *tr, char *word, WORD_TAB *wtab, int pre_pa
int next_tone=0;
unsigned char *p;
int srcix;
int embedded_flag=0;
int embedded_cmd;
int value;
int found_dict_flag;
@@ -1669,6 +1670,21 @@ 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)) ||
@@ -1962,7 +1978,7 @@ void *TranslateClause(Translator *tr, FILE *f_text, const void *vp_input, int *t
char *p;
int j, k;
int n_digits;
int charix_top;
int charix_top=0;

short charix[N_TR_SOURCE+4];
WORD_TAB words[N_CLAUSE_WORDS];
@@ -2708,7 +2724,7 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
p2 = &ph_list2[n_ph_list2 + ix];
p2->phcode = phonPAUSE;
p2->stress = 0;
p2->sourceix = 0;
p2->sourceix = source_index;
p2->synthflags = 0;
}
n_ph_list2 += 2;
@@ -2782,6 +2798,7 @@ void InitText(int control)
option_sayas2 = 0;
option_emphasis = 0;
word_emphasis = 0;
embedded_flag = 0;

InitText2();


Loading…
Cancel
Save