mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 21:39:47 +00:00
[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:
+14
-2
@@ -46,6 +46,7 @@ static int transpose_offset; // transpose character range for LookupDictList()
|
||||
static int transpose_min;
|
||||
static int transpose_max;
|
||||
static int text_mode = 0;
|
||||
static int debug_flag = 0;
|
||||
|
||||
int hash_counts[N_HASH_DICT];
|
||||
char *hash_chains[N_HASH_DICT];
|
||||
@@ -943,6 +944,15 @@ char *compile_rule(char *input)
|
||||
}
|
||||
strcpy(&output[len],rule_match);
|
||||
len += strlen(rule_match);
|
||||
|
||||
if(debug_flag)
|
||||
{
|
||||
output[len] = RULE_LINENUM;
|
||||
output[len+1] = (linenum % 255) + 1;
|
||||
output[len+2] = (linenum / 255) + 1;
|
||||
len+=3;
|
||||
}
|
||||
|
||||
if(rule_cond[0] != 0)
|
||||
{
|
||||
ix = -1;
|
||||
@@ -1437,9 +1447,10 @@ static int compile_dictrules(FILE *f_in, FILE *f_out, char *fname_temp)
|
||||
|
||||
|
||||
|
||||
int CompileDictionary(const char *dsource, const char *dict_name, FILE *log, char *fname_err)
|
||||
{//==========================================================================================
|
||||
int CompileDictionary(const char *dsource, const char *dict_name, FILE *log, char *fname_err, int flags)
|
||||
{//=====================================================================================================
|
||||
// fname: space to write the filename in case of error
|
||||
// flags: bit 0: include source line number information, for debug purposes.
|
||||
|
||||
FILE *f_in;
|
||||
FILE *f_out;
|
||||
@@ -1451,6 +1462,7 @@ int CompileDictionary(const char *dsource, const char *dict_name, FILE *log, cha
|
||||
char path[sizeof(path_home)+40]; // path_dsource+20
|
||||
|
||||
error_count = 0;
|
||||
debug_flag = flags & 1;
|
||||
|
||||
if(dsource == NULL)
|
||||
dsource = "";
|
||||
|
||||
Reference in New Issue
Block a user