mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-25 20:54:32 +00:00
[1.46.43]
language changes: da, pt git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@309 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -310,6 +310,11 @@ int LoadDictionary(Translator *tr, const char *name, int no_error)
|
||||
p++; // skip over the zero which terminates the list for this hash value
|
||||
}
|
||||
|
||||
if((tr->dict_min_size > 0) && (size < tr->dict_min_size))
|
||||
{
|
||||
fprintf(stderr, "Full dictionary is not installed for '%s'\n", name);
|
||||
}
|
||||
|
||||
return(0);
|
||||
} // end of LoadDictionary
|
||||
|
||||
|
||||
+2
-2
@@ -76,9 +76,9 @@ int LookupMnem(MNEM_TAB *table, const char *string);
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#define N_PATH_HOME 220
|
||||
#define N_PATH_HOME 230
|
||||
#else
|
||||
#define N_PATH_HOME 150
|
||||
#define N_PATH_HOME 160
|
||||
#endif
|
||||
|
||||
extern char path_home[N_PATH_HOME]; // this is the espeak-data directory
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.46.42 06.Mar.13";
|
||||
const char *version_string = "1.46.43 07.Mar.13";
|
||||
const int version_phdata = 0x014640;
|
||||
|
||||
int option_device_number = -1;
|
||||
|
||||
@@ -217,6 +217,7 @@ static const char transpose_map_latin[] = {
|
||||
tr->charset_a0 = charsets[1]; // ISO-8859-1, this is for when the input is not utf8
|
||||
dictionary_name[0] = 0;
|
||||
tr->dict_condition=0;
|
||||
tr->dict_min_size = 0;
|
||||
tr->data_dictrules = NULL; // language_1 translation rules file
|
||||
tr->data_dictlist = NULL; // language_2 dictionary lookup file
|
||||
|
||||
@@ -436,7 +437,7 @@ Translator *SelectTranslator(const char *name)
|
||||
int name2 = 0;
|
||||
Translator *tr;
|
||||
|
||||
static const short stress_lengths_equal[8] = {250, 250, 250, 250, 0, 0, 250, 250};
|
||||
static const short stress_lengths_equal[8] = {230, 230, 230, 230, 0, 0, 230, 230};
|
||||
static const unsigned char stress_amps_equal[8] = {18,18, 18,18, 18,18, 18,18 };
|
||||
|
||||
static const short stress_lengths_fr[8] = {190, 170, 190, 200, 0, 0, 190, 240};
|
||||
@@ -445,7 +446,7 @@ Translator *SelectTranslator(const char *name)
|
||||
static const unsigned char stress_amps_sk[8] = {17,16, 20,20, 20,22, 22,21 };
|
||||
static const short stress_lengths_sk[8] = {190,190, 210,210, 0,0, 210,210};
|
||||
|
||||
static const short stress_lengths_ta[8] = {240, 240, 250, 250, 0, 0, 270, 270};
|
||||
static const short stress_lengths_ta[8] = {200, 200, 210, 210, 0, 0, 230, 230};
|
||||
static const unsigned char stress_amps_ta[8] = {18,18, 18,18, 20,20, 22,22 };
|
||||
|
||||
// convert name string into a word of up to 4 characters, for the switch()
|
||||
|
||||
@@ -555,6 +555,7 @@ typedef struct
|
||||
unsigned char stress_amps_r[8];
|
||||
short stress_lengths[8];
|
||||
int dict_condition; // conditional apply some pronunciation rules and dict.lookups
|
||||
int dict_min_size;
|
||||
const unsigned short *charset_a0; // unicodes for characters 0xa0 to oxff
|
||||
const wchar_t *char_plus_apostrophe; // single chars + apostrophe treated as words
|
||||
const wchar_t *punct_within_word; // allow these punctuation characters within words
|
||||
|
||||
+1
-1
@@ -354,7 +354,7 @@ void TranslDlg::ReadVoice(int variant)
|
||||
wxString filename;
|
||||
char *p;
|
||||
char vname[40];
|
||||
char fname[sizeof(path_home)+10];
|
||||
char fname[sizeof(path_home)+30];
|
||||
|
||||
if(variant)
|
||||
{
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ typedef struct {
|
||||
int phoneme_tab_ix; // phoneme table number
|
||||
int pitch_base; // Hz<<12
|
||||
int pitch_range; // standard = 0x1000
|
||||
|
||||
|
||||
int speedf1;
|
||||
int speedf2;
|
||||
int speedf3;
|
||||
|
||||
+10
-1
@@ -106,6 +106,7 @@ enum {
|
||||
V_KLATT,
|
||||
V_FAST,
|
||||
V_SPEED,
|
||||
V_DICTMIN,
|
||||
|
||||
// these need a phoneme table to have been specified
|
||||
V_REPLACE,
|
||||
@@ -154,6 +155,7 @@ static MNEM_TAB keyword_tab[] = {
|
||||
{"klatt", V_KLATT},
|
||||
{"fast_test2", V_FAST},
|
||||
{"speed", V_SPEED},
|
||||
{"dict_min", V_DICTMIN},
|
||||
|
||||
// these just set a value in langopts.param[]
|
||||
{"l_dieresis", 0x100+LOPT_DIERESES},
|
||||
@@ -552,9 +554,10 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
char phonemes_name[40];
|
||||
char option_name[40];
|
||||
const char *language_type;
|
||||
char buf[200];
|
||||
char buf[sizeof(path_home)+30];
|
||||
char path_voices[sizeof(path_home)+12];
|
||||
|
||||
int dict_min = 0;
|
||||
int stress_amps[8];
|
||||
int stress_lengths[8];
|
||||
int stress_add[8];
|
||||
@@ -965,6 +968,10 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
SetSpeed(3);
|
||||
break;
|
||||
|
||||
case V_DICTMIN:
|
||||
sscanf(p,"%d",&dict_min);
|
||||
break;
|
||||
|
||||
default:
|
||||
if((key & 0xff00) == 0x100)
|
||||
{
|
||||
@@ -1007,6 +1014,7 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
}
|
||||
voice->phoneme_tab_ix = ix;
|
||||
new_translator->phoneme_tab_ix = ix;
|
||||
new_translator->dict_min_size = dict_min;
|
||||
LoadDictionary(new_translator, new_dictionary, control & 4);
|
||||
if(dictionary_name[0]==0)
|
||||
return(NULL); // no dictionary loaded
|
||||
@@ -1031,6 +1039,7 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
translator = new_translator;
|
||||
}
|
||||
|
||||
|
||||
// relative lengths of different stress syllables
|
||||
for(ix=0; ix<stress_lengths_set; ix++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user