mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
cleanup: move stressOpt to LoadLanguageOptions()
This commit is contained in:
@@ -140,6 +140,15 @@ void LoadLanguageOptions(Translator *translator, int key, char *keyValue ) {
|
||||
break;
|
||||
}
|
||||
|
||||
case V_STRESSOPT: {
|
||||
if (CheckTranslator(translator, langopts_tab, key) != 0)
|
||||
break;
|
||||
|
||||
ReadNumbers(keyValue, &translator->langopts.stress_flags, 32, langopts_tab, key);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case V_MAINTAINER:
|
||||
case V_STATUS:
|
||||
break;
|
||||
|
||||
@@ -91,6 +91,7 @@ voice_t *LoadVoice(const char *voice_name, int control);
|
||||
voice_t *LoadVoiceVariant(const char *voice_name, int variant);
|
||||
espeak_ng_STATUS DoVoiceChange(voice_t *v);
|
||||
void WavegenSetVoice(voice_t *v);
|
||||
void ReadNumbers(char *p, int *flags, int maxValue, const MNEM_TAB *keyword_tab, int key);
|
||||
int Read8Numbers(char *data_in, int data[8]);
|
||||
void ReadTonePoints(char *string, int *tone_pts);
|
||||
void VoiceReset(int control);
|
||||
|
||||
@@ -125,6 +125,7 @@ const MNEM_TAB langopts_tab[] = {
|
||||
{ "stressAdd", V_STRESSADD },
|
||||
{ "stressAmp", V_STRESSAMP },
|
||||
{ "stressLength", V_STRESSLENGTH },
|
||||
{ "stressOpt", V_STRESSOPT },
|
||||
|
||||
{ "maintainer", V_MAINTAINER },
|
||||
{ "status", V_STATUS },
|
||||
@@ -146,7 +147,6 @@ static const MNEM_TAB keyword_tab[] = {
|
||||
{ "tunes", V_TUNES },
|
||||
{ "dictrules", V_DICTRULES },
|
||||
{ "stressRule", V_STRESSRULE },
|
||||
{ "stressOpt", V_STRESSOPT },
|
||||
{ "replace", V_REPLACE },
|
||||
{ "words", V_WORDGAP },
|
||||
{ "echo", V_ECHO },
|
||||
@@ -489,7 +489,7 @@ int Read8Numbers(char *data_in, int data[8])
|
||||
&data[0], &data[1], &data[2], &data[3], &data[4], &data[5], &data[6], &data[7]);
|
||||
}
|
||||
|
||||
static void ReadNumbers(char *p, int *flags, int maxValue, const MNEM_TAB *keyword_tab, int key) {
|
||||
void ReadNumbers(char *p, int *flags, int maxValue, const MNEM_TAB *keyword_tab, int key) {
|
||||
// read a list of numbers from string p
|
||||
// store them as flags in *flags
|
||||
// the meaning of the numbers is bit ordinals, not integer values
|
||||
@@ -748,12 +748,6 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
|
||||
ReadNumbers(p, &translator->dict_condition, 32, keyword_tab, key);
|
||||
break;
|
||||
case V_STRESSOPT:
|
||||
if (CheckTranslator(translator, keyword_tab, key) != 0)
|
||||
break;
|
||||
|
||||
ReadNumbers(p, &translator->langopts.stress_flags, 32, keyword_tab, key);
|
||||
break;
|
||||
|
||||
case V_NUMBERS:
|
||||
if (CheckTranslator(translator, keyword_tab, key) != 0)
|
||||
|
||||
Reference in New Issue
Block a user