Browse Source

cleanup: moved dictrules to LoadLanguageOptions()

master
Juho Hiltunen 2 years ago
parent
commit
e1d936dc52
2 changed files with 8 additions and 7 deletions
  1. 7
    0
      src/libespeak-ng/langopts.c
  2. 1
    7
      src/libespeak-ng/voices.c

+ 7
- 0
src/libespeak-ng/langopts.c View File

@@ -92,6 +92,13 @@ void LoadLanguageOptions(Translator *translator, int key, char *keyValue ) {
int n;

switch (key) {
case V_DICTRULES: { // conditional dictionary rules and list entries
if (CheckTranslator(translator, langopts_tab, key) != 0)
break;

ReadNumbers(keyValue, &translator->dict_condition, 32, langopts_tab, key);
break;
}
case V_INTONATION: {
sscanf(keyValue, "%d", &option_tone_flags);
if ((option_tone_flags & 0xff) != 0) {

+ 1
- 7
src/libespeak-ng/voices.c View File

@@ -121,6 +121,7 @@ enum {
};

const MNEM_TAB langopts_tab[] = {
{ "dictrules", V_DICTRULES },
{ "intonation", V_INTONATION },
{ "lowercaseSentence", V_LOWERCASE_SENTENCE },
{ "stressAdd", V_STRESSADD },
@@ -146,7 +147,6 @@ static const MNEM_TAB keyword_tab[] = {
{ "pitch", V_PITCH },
{ "phonemes", V_PHONEMES },
{ "dictionary", V_DICTIONARY },
{ "dictrules", V_DICTRULES },
{ "replace", V_REPLACE },
{ "words", V_WORDGAP },
{ "echo", V_ECHO },
@@ -705,12 +705,6 @@ voice_t *LoadVoice(const char *vname, int control)



case V_DICTRULES: // conditional dictionary rules and list entries
if (CheckTranslator(translator, keyword_tab, key) != 0)
break;

ReadNumbers(p, &translator->dict_condition, 32, keyword_tab, key);
break;

case V_NUMBERS:
if (CheckTranslator(translator, keyword_tab, key) != 0)

Loading…
Cancel
Save