mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Remove the now unused dictdialect functionality from the code.
This commit is contained in:
@@ -1191,23 +1191,8 @@ int SetTranslator2(const char *new_language)
|
||||
{
|
||||
// Set translator2 to a second language
|
||||
int new_phoneme_tab;
|
||||
const char *new_phtab_name;
|
||||
int bitmap;
|
||||
int dialect = 0;
|
||||
|
||||
new_phtab_name = new_language;
|
||||
if ((bitmap = translator->langopts.dict_dialect) != 0) {
|
||||
if ((bitmap & (1 << DICTDIALECT_EN_US)) && (strcmp(new_language, "en") == 0)) {
|
||||
new_phtab_name = "en-us";
|
||||
dialect = DICTDIALECT_EN_US;
|
||||
}
|
||||
if ((bitmap & (1 << DICTDIALECT_ES_LA)) && (strcmp(new_language, "es") == 0)) {
|
||||
new_phtab_name = "es-la";
|
||||
dialect = DICTDIALECT_ES_LA;
|
||||
}
|
||||
}
|
||||
|
||||
if ((new_phoneme_tab = SelectPhonemeTableName(new_phtab_name)) >= 0) {
|
||||
if ((new_phoneme_tab = SelectPhonemeTableName(new_language)) >= 0) {
|
||||
if ((translator2 != NULL) && (strcmp(new_language, translator2_language) != 0)) {
|
||||
// we already have an alternative translator, but not for the required language, delete it
|
||||
DeleteTranslator(translator2);
|
||||
@@ -1222,14 +1207,6 @@ int SetTranslator2(const char *new_language)
|
||||
SelectPhonemeTable(voice->phoneme_tab_ix); // revert to original phoneme table
|
||||
new_phoneme_tab = -1;
|
||||
translator2_language[0] = 0;
|
||||
} else {
|
||||
if (dialect == DICTDIALECT_EN_US) {
|
||||
// en-us
|
||||
translator2->dict_condition = 0x48; // bits 3, 6
|
||||
translator2->langopts.param[LOPT_REDUCE_T] = 1;
|
||||
}
|
||||
if (dialect == DICTDIALECT_ES_LA)
|
||||
translator2->dict_condition = 0x04; // bit 2
|
||||
}
|
||||
translator2->phoneme_tab_ix = new_phoneme_tab;
|
||||
}
|
||||
|
||||
@@ -576,10 +576,6 @@ typedef struct {
|
||||
int max_lengthmod;
|
||||
int lengthen_tonic; // lengthen the tonic syllable
|
||||
int suffix_add_e; // replace a suffix (which has the SUFX_E flag) with this character
|
||||
|
||||
#define DICTDIALECT_EN_US 1 // bit number
|
||||
#define DICTDIALECT_ES_LA 2
|
||||
int dict_dialect; // bitmap, use a dialect for foreign words
|
||||
} LANGUAGE_OPTIONS;
|
||||
|
||||
// a parameter of ChangePhonemes()
|
||||
|
||||
Reference in New Issue
Block a user