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

int n; int n;


switch (key) { 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: { case V_INTONATION: {
sscanf(keyValue, "%d", &option_tone_flags); sscanf(keyValue, "%d", &option_tone_flags);
if ((option_tone_flags & 0xff) != 0) { if ((option_tone_flags & 0xff) != 0) {

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

}; };


const MNEM_TAB langopts_tab[] = { const MNEM_TAB langopts_tab[] = {
{ "dictrules", V_DICTRULES },
{ "intonation", V_INTONATION }, { "intonation", V_INTONATION },
{ "lowercaseSentence", V_LOWERCASE_SENTENCE }, { "lowercaseSentence", V_LOWERCASE_SENTENCE },
{ "stressAdd", V_STRESSADD }, { "stressAdd", V_STRESSADD },
{ "pitch", V_PITCH }, { "pitch", V_PITCH },
{ "phonemes", V_PHONEMES }, { "phonemes", V_PHONEMES },
{ "dictionary", V_DICTIONARY }, { "dictionary", V_DICTIONARY },
{ "dictrules", V_DICTRULES },
{ "replace", V_REPLACE }, { "replace", V_REPLACE },
{ "words", V_WORDGAP }, { "words", V_WORDGAP },
{ "echo", V_ECHO }, { "echo", V_ECHO },






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: case V_NUMBERS:
if (CheckTranslator(translator, keyword_tab, key) != 0) if (CheckTranslator(translator, keyword_tab, key) != 0)

Loading…
Cancel
Save