|
41 | 41 | #include "voice.h" // for voice_t, DoVoiceChange, N_PEAKS |
42 | 42 | #include "common.h" // for GetFileLength, strncpy0 |
43 | 43 | #include "dictionary.h" // for LoadDictionary |
| 44 | +#include "langopts.h" // for LoadLanguageOptions |
44 | 45 | #include "mnemonics.h" // for LookupMnemName, MNEM_TAB |
45 | 46 | #include "phoneme.h" // for REPLACE_PHONEMES, n_replace_pho... |
46 | 47 | #include "speech.h" // for PATHSEP |
|
50 | 51 | #include "translate.h" // for LANGUAGE_OPTIONS, DeleteTranslator |
51 | 52 | #include "wavegen.h" // for InitBreath |
52 | 53 |
|
| 54 | + |
| 55 | + |
53 | 56 | static const MNEM_TAB genders[] = { |
54 | 57 | { "male", ENGENDER_MALE }, |
55 | 58 | { "female", ENGENDER_FEMALE }, |
@@ -501,7 +504,7 @@ static void ReadNumbers(char *p, int *flags, int maxValue, const MNEM_TAB *keyw |
501 | 504 | } |
502 | 505 | } |
503 | 506 |
|
504 | | -static int CheckTranslator(Translator *tr, const MNEM_TAB *keyword_tab, int key) |
| 507 | +int CheckTranslator(Translator *tr, const MNEM_TAB *keyword_tab, int key) |
505 | 508 | { |
506 | 509 | // Return 0 if translator is set. |
507 | 510 | // Return 1 and print an error message for specified key if not |
@@ -629,6 +632,7 @@ voice_t *LoadVoice(const char *vname, int control) |
629 | 632 |
|
630 | 633 | key = LookupMnem(keyword_tab, buf); |
631 | 634 |
|
| 635 | + LoadLanguageOptions(translator, key); |
632 | 636 | switch (key) |
633 | 637 | { |
634 | 638 | case V_LANGUAGE: |
@@ -693,14 +697,6 @@ voice_t *LoadVoice(const char *vname, int control) |
693 | 697 | case V_FORMANT: |
694 | 698 | VoiceFormant(p); |
695 | 699 | break; |
696 | | - case V_LOWERCASE_SENTENCE: { |
697 | | - if (CheckTranslator(translator, keyword_tab, key) != 0) |
698 | | - break; |
699 | | - |
700 | | - translator->langopts.lowercase_sentence = true; |
701 | | - break; |
702 | | - } |
703 | | - |
704 | 700 | case V_PITCH: |
705 | 701 | // default is pitch 82 118 |
706 | 702 | if (sscanf(p, "%d %d", &pitch1, &pitch2) == 2) { |
|
0 commit comments