mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-13 09:14:12 +00:00
cleanup: move stressAmp to LoadLanguageOptions()
This commit is contained in:
@@ -110,8 +110,21 @@ void LoadLanguageOptions(Translator *translator, int key, char *keyValue ) {
|
||||
|
||||
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: {
|
||||
if (CheckTranslator(translator, langopts_tab, key) != 0)
|
||||
break;
|
||||
|
||||
@@ -123,6 +123,7 @@ enum {
|
||||
const MNEM_TAB langopts_tab[] = {
|
||||
{ "lowercaseSentence", V_LOWERCASE_SENTENCE },
|
||||
{ "stressAdd", V_STRESSADD },
|
||||
{ "stressAmp", V_STRESSAMP },
|
||||
{ "stressLength", V_STRESSLENGTH },
|
||||
|
||||
{ "maintainer", V_MAINTAINER },
|
||||
@@ -141,7 +142,6 @@ static const MNEM_TAB keyword_tab[] = {
|
||||
{ "pitch", V_PITCH },
|
||||
{ "phonemes", V_PHONEMES },
|
||||
{ "dictionary", V_DICTIONARY },
|
||||
{ "stressAmp", V_STRESSAMP },
|
||||
{ "intonation", V_INTONATION },
|
||||
{ "tunes", V_TUNES },
|
||||
{ "dictrules", V_DICTRULES },
|
||||
@@ -715,21 +715,6 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
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
|
||||
sscanf(p, "%d", &option_tone_flags);
|
||||
if ((option_tone_flags & 0xff) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user