Browse Source

cleanup: move stressAmp to LoadLanguageOptions()

master
Juho Hiltunen 2 years ago
parent
commit
46bc25e173
2 changed files with 14 additions and 16 deletions
  1. 13
    0
      src/libespeak-ng/langopts.c
  2. 1
    16
      src/libespeak-ng/voices.c

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



break; break;
} }
case V_STRESSAMP: {
if (CheckTranslator(translator, langopts_tab, key) != 0)
break;


int stress_amps_set = 0;
int stress_amps[8];


stress_amps_set = Read8Numbers(keyValue, stress_amps);

for (ix = 0; ix < stress_amps_set; ix++) {
translator->stress_amps[ix] = stress_amps[ix];
}

break;
}
case V_STRESSLENGTH: { case V_STRESSLENGTH: {
if (CheckTranslator(translator, langopts_tab, key) != 0) if (CheckTranslator(translator, langopts_tab, key) != 0)
break; break;

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

const MNEM_TAB langopts_tab[] = { const MNEM_TAB langopts_tab[] = {
{ "lowercaseSentence", V_LOWERCASE_SENTENCE }, { "lowercaseSentence", V_LOWERCASE_SENTENCE },
{ "stressAdd", V_STRESSADD }, { "stressAdd", V_STRESSADD },
{ "stressAmp", V_STRESSAMP },
{ "stressLength", V_STRESSLENGTH }, { "stressLength", V_STRESSLENGTH },


{ "maintainer", V_MAINTAINER }, { "maintainer", V_MAINTAINER },
{ "pitch", V_PITCH }, { "pitch", V_PITCH },
{ "phonemes", V_PHONEMES }, { "phonemes", V_PHONEMES },
{ "dictionary", V_DICTIONARY }, { "dictionary", V_DICTIONARY },
{ "stressAmp", V_STRESSAMP },
{ "intonation", V_INTONATION }, { "intonation", V_INTONATION },
{ "tunes", V_TUNES }, { "tunes", V_TUNES },
{ "dictrules", V_DICTRULES }, { "dictrules", V_DICTRULES },
break; break;




case V_STRESSAMP: { // stressAmp
if (CheckTranslator(translator, keyword_tab, key) != 0)
break;

int stress_amps_set = 0;
int stress_amps[8];
stress_amps_set = Read8Numbers(p, stress_amps);
for (ix = 0; ix < stress_amps_set; ix++) {
translator->stress_amps[ix] = stress_amps[ix];
}

break;
}


case V_INTONATION: // intonation case V_INTONATION: // intonation
sscanf(p, "%d", &option_tone_flags); sscanf(p, "%d", &option_tone_flags);
if ((option_tone_flags & 0xff) != 0) { if ((option_tone_flags & 0xff) != 0) {

Loading…
Cancel
Save