[1.45.45]

Fixed bug where SSML voice change didn't remember an initially specified Klatt variant.

Removed some unused variables and redundant initializations.

Patch to fix a spike from Klatt function setzeroabc()


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@275 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2011-10-07 12:47:46 +00:00
parent 9e73010621
commit d18532991a
33 changed files with 436 additions and 230 deletions
-43
View File
@@ -31,9 +31,6 @@
#include "synthesize.h"
#include "translate.h"
//#define OPT_FORMAT // format the text and write formatted copy to Log file
//#define OUTPUT_FORMAT
extern void Write4Bytes(FILE *f, int value);
int HashDictionary(const char *string);
@@ -390,13 +387,11 @@ static int compile_line(char *linebuf, char *dict_line, int *hash)
int all_upper_case;
char *mnemptr;
char *comment;
unsigned char flag_codes[100];
char encoded_ph[200];
unsigned char bad_phoneme[4];
static char nullstring[] = {0};
comment = NULL;
text_not_phonemes = 0;
phonetic = word = nullstring;
@@ -497,7 +492,6 @@ step=1; // TEST
if((c == '/') && (p[1] == '/') && (multiple_words==0))
{
c = '\n'; /* "//" treat comment as end of line */
comment = p;
}
switch(step)
@@ -591,12 +585,6 @@ step=1; // TEST
if(word[0] == 0)
{
#ifdef OPT_FORMAT
if(comment != NULL)
fprintf(f_log,"%s",comment);
else
fputc('\n',f_log);
#endif
return(0); /* blank line */
}
@@ -747,35 +735,6 @@ step=1; // TEST
}
dict_line[0] = length;
#ifdef OPT_FORMAT
spaces = 16;
for(ix=0; ix<n_flag_codes; ix++)
{
if(flag_codes[ix] >= 100)
{
fprintf(f_log,"?%d ",flag_codes[ix]-100);
spaces -= 3;
}
}
fprintf(f_log,"%s",word);
spaces -= strlen(word);
DecodePhonemes(encoded_ph,decoded_ph);
while(spaces-- > 0) fputc(' ',f_log);
spaces += (14 - strlen(decoded_ph));
fprintf(f_log," %s",decoded_ph);
while(spaces-- > 0) fputc(' ',f_log);
for(ix=0; ix<n_flag_codes; ix++)
{
if(flag_codes[ix] < 100)
fprintf(f_log," %s",lookup_mnem(mnem_flags,flag_codes[ix]));
}
if(comment != NULL)
fprintf(f_log," %s",comment);
else
fputc('\n',f_log);
#endif
return(length);
} /* end of compile_line */
@@ -1160,7 +1119,6 @@ static char *compile_rule(char *input)
int start;
int state=2;
int finish=0;
int pre_bracket=0;
char buf[80];
char output[150];
unsigned char bad_phoneme[4];
@@ -1183,7 +1141,6 @@ static char *compile_rule(char *input)
case ')': // end of prefix section
*p = 0;
state = 1;
pre_bracket = 1;
copy_rule_string(buf,state);
p = buf;
break;