Browse Source

[1.36.01]

Bug fixes.

git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@166 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 17 years ago
parent
commit
ed8d0c5bfc
9 changed files with 49 additions and 33 deletions
  1. 2
    1
      dictsource/en_list
  2. 8
    6
      dictsource/fr_rules
  3. 2
    2
      dictsource/pt_list
  4. 1
    1
      src/numbers.cpp
  5. 2
    2
      src/readclause.cpp
  6. 1
    1
      src/synthdata.cpp
  7. 12
    2
      src/synthesize.cpp
  8. 1
    1
      src/synthesize.h
  9. 20
    17
      src/translate.cpp

+ 2
- 1
dictsource/en_list View File

@@ -306,7 +306,7 @@ eur jU@
hmm h@m
(http ://) eItSti:ti:'pi:_
ibm $abbrev
ie aIi:_! $pause
ie aIi:_! $pause $only
i.e aIi:_! $pause
irc $abbrev
lbs paUndz
@@ -1103,6 +1103,7 @@ heroic hI2roUIk
heroin hEroUIn
heroism hEroUIz@m
heroine hEroUIn
heron hEr@n
herpes h3:pi:z
hideout haIdaUt
hindu hIndu:

+ 8
- 6
dictsource/fr_rules View File

@@ -4,7 +4,7 @@

// 2006-11-18 Gilles Casse <[email protected]>
//
// Updated: 2008-03-05 Michel Such <[email protected]>
// Updated: 2008-03-10 Michel Such <[email protected]>
//
// * The rules are based on Cicero TTS.
// Y
@@ -256,7 +256,7 @@
ontin) en (t_ A~ // continent, incontinent
erm) en (t_ A~ // ferment, serment
Vferm) en (t_ // ferment, referment (verbe)
Arp) en (t_ A~ // arpent, serpent
XArp) en (t_ A~ // arpent, serpent
CArr) en (t_ A~ // conncurrent, torrent
_appar) en (t_ A~ // apparent
spar) en (t_ A~ // transparent
@@ -274,6 +274,7 @@
xcell) en (t_ A~ // excellent
nn) en (t_ t2 // prennent, viennent, sonnent

iCam) en (t_ A~
mm) en (t_ A~
em) en (t_ A~ // vitement
mom) en (t_ A~ // moment
@@ -281,6 +282,7 @@
Caim) en (t_ A~
dum) en (t_ A~
gum) en (t_ A~
jum) en (t_ A~
oCum) en (t_ A~
rum) en (t_ A~

@@ -693,16 +695,12 @@ _) half _^_en
.group j
j Z // adjoint joujoux

// group j: English section
ject (_ _^_en


.group k
k k // kafka


// group k: English section
AC) k _^_en // blank, black, dark
ke (X _^_en // basket, make, take
key _^_en
ky (_ _^_en
@@ -1046,6 +1044,9 @@ C) te (_ t@- // patte

// group t: English section
C) th (_ _^_en // month
_) th (eX _^_en // the, then
_) th (aX _^_en // than, that
_) th (As _^_en // these those there
_) time _^_en
tle (_ _^_en
too _^_en
@@ -1224,3 +1225,4 @@ C) te (_ t@- // patte





+ 2
- 2
dictsource/pt_list View File

@@ -116,7 +116,7 @@ _" 'abRi;'asp&||d'upl&s#
?1 _1 'um
?2 _1 'uN
_2 d'oIs#
_3 tr'es#
_3 tR'es#
?1 _4 kw'atru
?2 _4 kw'atRu
_5 s'iNku
@@ -145,7 +145,7 @@ _15 k'iNzy
?2_19 dezen'Ovi
?1_2X v'iNty
?2_2X v'iNtSi
_3X tr'iNt&
_3X tR'iNt&

?1_4X kw&*'eNt&
?2_4X kwa*'eINt&

+ 1
- 1
src/numbers.cpp View File

@@ -66,7 +66,7 @@
#define M_IMPLOSIVE M_HOOK

typedef struct {
char *name;
const char *name;
int flags;
} ACCENTS;


+ 2
- 2
src/readclause.cpp View File

@@ -54,7 +54,7 @@ int ungot_char2 = 0;
char *p_textinput;
wchar_t *p_wchar_input;
int ungot_char;
char *ungot_word = NULL;
const char *ungot_word = NULL;
int end_of_input;

int ignore_text=0; // set during <sub> ... </sub> to ignore text which has been replaced by an alias
@@ -528,7 +528,7 @@ const char *Translator::LookupCharName(int c)
char single_letter[24];
char phonemes[60];
char phonemes2[60];
char *lang_name = NULL;
const char *lang_name = NULL;
char *string;
static char buf[60];


+ 1
- 1
src/synthdata.cpp View File

@@ -35,7 +35,7 @@
#include "translate.h"
#include "wave.h"

const char *version_string = "1.36 09.Mar.08";
const char *version_string = "1.36.01 11.Mar.08";
const int version_phdata = 0x013400;

int option_device_number = -1;

+ 12
- 2
src/synthesize.cpp View File

@@ -1093,6 +1093,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
int stress;
int modulation;
int pre_voiced;
int free_min;
unsigned char *pitch_env=NULL;
unsigned char *amp_env;
PHONEME_TAB *ph;
@@ -1125,11 +1126,20 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)

while(ix < (*n_ph))
{
if(WcmdqFree() <= MIN_WCMDQ)
p = &phoneme_list[ix];

if(p->type == phPAUSE)
free_min = 5;
else
if(p->type != phVOWEL)
free_min = 10; // we need less Q space for non-vowels, and we need to generate phonemes after a vowel so that the pitch_length is filled in
else
free_min = MIN_WCMDQ; // 22

if(WcmdqFree() <= free_min)
return(1); // wait

prev = &phoneme_list[ix-1];
p = &phoneme_list[ix];
next = &phoneme_list[ix+1];
next2 = &phoneme_list[ix+2];


+ 1
- 1
src/synthesize.h View File

@@ -189,7 +189,7 @@ extern unsigned char pitch_adjust_tab[MAX_PITCH_VALUE+1];


#define N_WCMDQ 160
#define MIN_WCMDQ 20 // need this many free entries before adding new phoneme
#define MIN_WCMDQ 22 // need this many free entries before adding new phoneme

extern long wcmdq[N_WCMDQ][4];
extern int wcmdq_head;

+ 20
- 17
src/translate.cpp View File

@@ -864,7 +864,7 @@ if((wmark > 0) && (wmark < 8))
if((word_length == 1) && IsAlpha(wc))
{
posn = 0;
while(*wordx != ' ')
while((*wordx != ' ') && (*wordx != 0))
{
wordx += TranslateLetter(wordx, phonemes, 4, word_length);
posn++;
@@ -1439,8 +1439,9 @@ int Translator::TranslateWord2(char *word, WORD_TAB *wtab, int pre_pause, int ne
}
else
{
int c2;
ix = 0;
while((word_copy[ix] = word[ix]) != ' ') ix++;
while(((c2 = word_copy[ix] = word[ix]) != ' ') && (c2 != 0)) ix++;
word_copy_len = ix;

flags = translator->TranslateWord(word, next_pause, wtab);
@@ -1471,24 +1472,27 @@ int Translator::TranslateWord2(char *word, WORD_TAB *wtab, int pre_pause, int ne
ok =0;
}

if(sylimit & 0x100)
if(ok != 0)
{
// only if the second word has $alt attribute
strcpy(ph_buf,word_phonemes);
flags2 = translator->TranslateWord(p2+1, 0, wtab+1);
if((flags2 & FLAG_ALT_TRANS) == 0)
if(sylimit & 0x100)
{
// only if the second word has $alt attribute
strcpy(ph_buf,word_phonemes);
flags2 = translator->TranslateWord(p2+1, 0, wtab+1);
if((flags2 & FLAG_ALT_TRANS) == 0)
{
ok = 0;
strcpy(word_phonemes,ph_buf);
}
}
if((sylimit & 0x200) && ((wtab+1)->flags & FLAG_LAST_WORD))
{
// not if the next word is end-of-sentence
ok = 0;
strcpy(word_phonemes,ph_buf);
}
}

if((sylimit & 0x200) && ((wtab+1)->flags & FLAG_LAST_WORD))
{
// not if the next word is end-of-sentence
ok = 0;
}

if(ok)
{
*p2 = '-'; // replace next space by hyphen
@@ -1995,10 +1999,9 @@ void *Translator::TranslateClause(FILE *f_text, const void *vp_input, int *tone_
}
}

memset(&ph_list2[0],0,sizeof(ph_list2[0]));
ph_list2[0].phcode = phonPAUSE_SHORT;
ph_list2[0].stress = 0;
ph_list2[0].tone_number = 0;
ph_list2[0].sourceix = 0;

n_ph_list2 = 1;
prev_last_stress = 0;
prepause_timeout = 0;

Loading…
Cancel
Save