Browse Source

code cleanup: remove unnecessary voice option translator

See commit message for 23a4d88f.

This commit fixes cmn and yue.
CalcPitches_Tone() now accepts cmn for translator_name.
SelectTranslator() now has a case for yue instead of zhy.
master
Juho Hiltunen 4 years ago
parent
commit
bda8b6f76a

+ 0
- 1
espeak-ng-data/lang/bat/ltg View File

language ltg language ltg
maintainer Valdis Vitolins <[email protected]> maintainer Valdis Vitolins <[email protected]>
status testing status testing
translator lv // Reuse pronunciation rules from Latvian
phonemes lv phonemes lv
dictionary lv dictionary lv
dictrules 2 // Setting for Latgalian pronunciation dictrules 2 // Setting for Latgalian pronunciation

+ 0
- 2
espeak-ng-data/lang/poz/ms View File

language ms language ms
phonemes id phonemes id


translator id

stressLength 160 200 180 180 0 0 220 240 stressLength 160 200 180 180 0 0 220 240
stressAmp 16 18 18 18 0 0 22 21 stressAmp 16 18 18 18 0 0 22 21
intonation 3 // Less intonation, and comma does not raise the pitch. intonation 3 // Less intonation, and comma does not raise the pitch.

+ 0
- 1
espeak-ng-data/lang/sit/cmn View File

language zh-cmn language zh-cmn
language zh language zh


translator zh
phonemes zh phonemes zh
dictionary zh dictionary zh
words 1 words 1

+ 0
- 1
espeak-ng-data/lang/sit/hak View File

language hak language hak
maintainer Chen Chien-ting <[email protected]> maintainer Chen Chien-ting <[email protected]>
status testing status testing
translator hak
phonemes hak phonemes hak
dictionary hak dictionary hak

+ 0
- 1
espeak-ng-data/lang/sit/yue View File

language zh-yue language zh-yue
language zh 8 language zh 8


translator zhy
phonemes zhy phonemes zhy
dictionary zhy dictionary zhy



+ 0
- 1
espeak-ng-data/voices/mb/mb-ma1 View File

gender female gender female
pitch 140 260 pitch 140 260
phonemes id phonemes id
translator id
mbrola ma1 ma1_phtrans mbrola ma1 ma1_phtrans



+ 1
- 1
src/libespeak-ng/intonation.c View File

} }
} }
// Mandarin // Mandarin
if (tr->translator_name == L('z', 'h')) {
if (tr->translator_name == L('z', 'h') || tr->translator_name == L3('c', 'm', 'n')) {
if (tone_ph == 0) { if (tone_ph == 0) {
if (pause || tone_promoted) { if (pause || tone_promoted) {
tone_ph = PhonemeCode2('5', '5'); // no previous vowel, use tone 1 tone_ph = PhonemeCode2('5', '5'); // no previous vowel, use tone 1

+ 3
- 2
src/libespeak-ng/tr_languages.c View File

} }
break; break;
case L('l', 'v'): // latvian case L('l', 'v'): // latvian
case L3('l', 't', 'g'): // latgalian
{ {
static const unsigned char stress_amps_lv[8] = { 14, 10, 10, 8, 0, 0, 20, 15 }; static const unsigned char stress_amps_lv[8] = { 14, 10, 10, 8, 0, 0, 20, 15 };
static const short stress_lengths_lv[8] = { 180, 180, 180, 160, 0, 0, 230, 180 }; static const short stress_lengths_lv[8] = { 180, 180, 180, 160, 0, 0, 230, 180 };
tr->langopts.break_numbers = BREAK_INDIVIDUAL; tr->langopts.break_numbers = BREAK_INDIVIDUAL;
break; break;
case L3('c', 'm', 'n'): // no break, just go to 'zh' case case L3('c', 'm', 'n'): // no break, just go to 'zh' case
case L3('z', 'h', 'y'): // just go to 'zh' case
case L3('y', 'u', 'e'):
case L('z','h'): case L('z','h'):
{ {
static const short stress_lengths_zh[8] = { 230, 150, 230, 230, 230, 0, 240, 250 }; // 1=tone5. end-of-sentence, 6=tone 1&4, 7=tone 2&3 static const short stress_lengths_zh[8] = { 230, 150, 230, 230, 230, 0, 240, 250 }; // 1=tone5. end-of-sentence, 6=tone 1&4, 7=tone 2&3
tr->langopts.ideographs = 1; tr->langopts.ideographs = 1;
tr->langopts.our_alphabet = 0x3100; tr->langopts.our_alphabet = 0x3100;
tr->langopts.word_gap = 0x21; // length of a final vowel is less dependent on the next consonant, don't merge consonant with next word tr->langopts.word_gap = 0x21; // length of a final vowel is less dependent on the next consonant, don't merge consonant with next word
if (name2 == L3('z', 'h', 'y')) {
if (name2 == L3('y', 'u', 'e')) {
tr->langopts.textmode = true; tr->langopts.textmode = true;
tr->langopts.listx = 1; // compile zh_listx after zh_list tr->langopts.listx = 1; // compile zh_listx after zh_list
tr->langopts.numbers = NUM_DEFAULT; tr->langopts.numbers = NUM_DEFAULT;

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

V_NAME = 1, V_NAME = 1,
V_LANGUAGE, V_LANGUAGE,
V_GENDER, V_GENDER,
V_TRANSLATOR,
V_PHONEMES, V_PHONEMES,
V_DICTIONARY, V_DICTIONARY,
V_VARIANTS, V_VARIANTS,
{ "formant", V_FORMANT }, { "formant", V_FORMANT },
{ "pitch", V_PITCH }, { "pitch", V_PITCH },
{ "phonemes", V_PHONEMES }, { "phonemes", V_PHONEMES },
{ "translator", V_TRANSLATOR },
{ "dictionary", V_DICTIONARY }, { "dictionary", V_DICTIONARY },
{ "stressLength", V_STRESSLENGTH }, { "stressLength", V_STRESSLENGTH },
{ "stressAmp", V_STRESSAMP }, { "stressAmp", V_STRESSAMP },
current_voice_selected.age = age; current_voice_selected.age = age;
} }
break; break;
case V_TRANSLATOR:
if (tone_only) break;

sscanf(p, "%s", translator_name);

if (new_translator != NULL)
DeleteTranslator(new_translator);

new_translator = SelectTranslator(translator_name);
langopts = &new_translator->langopts;
break;
case V_DICTIONARY: // dictionary case V_DICTIONARY: // dictionary
sscanf(p, "%s", new_dictionary); sscanf(p, "%s", new_dictionary);
break; break;

Loading…
Cancel
Save