mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-14 01:32:29 +00:00
cleanup: move words to LoadLanguageOptions()
This commit is contained in:
@@ -230,6 +230,14 @@ void LoadLanguageOptions(Translator *translator, int key, char *keyValue ) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case V_WORDGAP: {
|
||||
if (CheckTranslator(translator, langopts_tab, key) != 0)
|
||||
break;
|
||||
|
||||
|
||||
sscanf(keyValue, "%d %d", &translator->langopts.word_gap, &translator->langopts.vowel_pause);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case V_MAINTAINER:
|
||||
@@ -247,3 +255,4 @@ static int LookupTune(const char *name) {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ const MNEM_TAB langopts_tab[] = {
|
||||
{ "stressOpt", V_STRESSOPT },
|
||||
{ "stressRule", V_STRESSRULE },
|
||||
{ "tunes", V_TUNES },
|
||||
{ "words", V_WORDGAP },
|
||||
|
||||
{ "maintainer", V_MAINTAINER },
|
||||
{ "status", V_STATUS },
|
||||
@@ -149,7 +150,6 @@ static const MNEM_TAB keyword_tab[] = {
|
||||
{ "phonemes", V_PHONEMES },
|
||||
{ "dictionary", V_DICTIONARY },
|
||||
{ "replace", V_REPLACE },
|
||||
{ "words", V_WORDGAP },
|
||||
{ "echo", V_ECHO },
|
||||
{ "flutter", V_FLUTTER },
|
||||
{ "roughness", V_ROUGHNESS },
|
||||
@@ -524,7 +524,6 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
char *p;
|
||||
int key;
|
||||
int ix;
|
||||
int n;
|
||||
int value;
|
||||
int langix = 0;
|
||||
int tone_only = control & 2;
|
||||
@@ -715,12 +714,7 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
}
|
||||
PhonemeReplacement(p);
|
||||
break;
|
||||
case V_WORDGAP: // words
|
||||
if (CheckTranslator(translator, keyword_tab, key) != 0)
|
||||
break;
|
||||
|
||||
sscanf(p, "%d %d", &translator->langopts.word_gap, &translator->langopts.vowel_pause);
|
||||
break;
|
||||
case V_ECHO:
|
||||
// echo. suggest: 135mS 11%
|
||||
value = 0;
|
||||
|
||||
Reference in New Issue
Block a user