[1.30.05]

Fix an error where vowels start too loud (too strong attack).

Added command-line option  --compile-debug, which is like --compile but it includes source line information from the *_rules file, which is displayed with the -X option. 

espeakedit: Added  Compile->Compile_dictionary(debug),

Fixed <emphasis> which was broken in the previous version(s).
<emphasis> now reduces the previous stressed syllable to secondary stress.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@119 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2008-01-11 00:36:01 +00:00
parent af575bc1db
commit dd9fd5f27a
22 changed files with 125 additions and 44 deletions
+19 -5
View File
@@ -1455,6 +1455,7 @@ char *Translator::DecodeRule(const char *group, char *rule)
int match_type;
int finished=0;
int value;
int linenum=0;
int flags;
int suffix_char;
int condition_num=0;
@@ -1476,7 +1477,7 @@ char *Translator::DecodeRule(const char *group, char *rule)
{
rb = *rule++;
if(rb <= 5)
if(rb <= RULE_LINENUM)
{
switch(rb)
{
@@ -1501,6 +1502,11 @@ char *Translator::DecodeRule(const char *group, char *rule)
/* conditional rule, next byte gives condition number */
condition_num = *rule++;
break;
case RULE_LINENUM:
value = (rule[1] & 0xff) - 1;
linenum = (rule[0] & 0xff) - 1 + (value * 255);
rule+=2;
break;
}
continue;
}
@@ -1557,10 +1563,15 @@ char *Translator::DecodeRule(const char *group, char *rule)
*p = 0;
p = output;
if(linenum > 0)
{
sprintf(p,"%5d:\t",linenum);
p += 7;
}
if(condition_num > 0)
{
sprintf(output,"?%d ",condition_num);
p = &output[strlen(output)];
sprintf(p,"?%d ",condition_num);
p = &p[strlen(p)];
}
if((ix = strlen(buf_pre)) > 0)
{
@@ -1727,7 +1738,7 @@ void Translator::MatchRule(char *word[], const char *group, char *rule, MatchRec
{
rb = *rule++;
if(rb <= 5)
if(rb <= RULE_LINENUM)
{
switch(rb)
{
@@ -1779,6 +1790,9 @@ void Translator::MatchRule(char *word[], const char *group, char *rule, MatchRec
if(!failed)
match.points++; // add one point for a matched conditional rule
break;
case RULE_LINENUM:
rule+=2;
break;
}
continue;
}
@@ -2173,7 +2187,7 @@ void Translator::MatchRule(char *word[], const char *group, char *rule, MatchRec
if(group_length > 1)
pts += 35; // to account for an extra letter matching
DecodePhonemes(match.phonemes,decoded_phonemes);
fprintf(f_trans,"%3d %s [%s]\n",pts,DecodeRule(group,rule_start),decoded_phonemes);
fprintf(f_trans,"%3d\t%s [%s]\n",pts,DecodeRule(group,rule_start),decoded_phonemes);
}
#endif