|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* Copyright (C) 2005 to 2015 by Jonathan Duddington |
|
|
* Copyright (C) 2005 to 2015 by Jonathan Duddington |
|
|
* email: [email protected] |
|
|
* email: [email protected] |
|
|
|
|
|
|
|
|
{ "pitch", V_PITCH }, |
|
|
{ "pitch", V_PITCH }, |
|
|
{ "phonemes", V_PHONEMES }, |
|
|
{ "phonemes", V_PHONEMES }, |
|
|
{ "dictionary", V_DICTIONARY }, |
|
|
{ "dictionary", V_DICTIONARY }, |
|
|
{ "stressLength", V_STRESSLENGTH }, |
|
|
|
|
|
{ "stressAmp", V_STRESSAMP }, |
|
|
{ "stressAmp", V_STRESSAMP }, |
|
|
{ "stressAdd", V_STRESSADD }, |
|
|
{ "stressAdd", V_STRESSADD }, |
|
|
|
|
|
{ "stressLength", V_STRESSLENGTH }, |
|
|
{ "intonation", V_INTONATION }, |
|
|
{ "intonation", V_INTONATION }, |
|
|
{ "tunes", V_TUNES }, |
|
|
{ "tunes", V_TUNES }, |
|
|
{ "dictrules", V_DICTRULES }, |
|
|
{ "dictrules", V_DICTRULES }, |
|
|
|
|
|
|
|
|
replace_phonemes[n_replace_phonemes++].type = flags; |
|
|
replace_phonemes[n_replace_phonemes++].type = flags; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int Read8Numbers(char *data_in, int data[8]) |
|
|
|
|
|
|
|
|
int Read8Numbers(char *data_in, int data[8]) |
|
|
{ |
|
|
{ |
|
|
// Read 8 integer numbers |
|
|
// Read 8 integer numbers |
|
|
memset(data, 0, 8*sizeof(int)); |
|
|
memset(data, 0, 8*sizeof(int)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
key = LookupMnem(keyword_tab, buf); |
|
|
key = LookupMnem(keyword_tab, buf); |
|
|
|
|
|
|
|
|
LoadLanguageOptions(translator, key); |
|
|
|
|
|
|
|
|
LoadLanguageOptions(translator, key, p); |
|
|
|
|
|
|
|
|
switch (key) |
|
|
switch (key) |
|
|
{ |
|
|
{ |
|
|
case V_LANGUAGE: |
|
|
case V_LANGUAGE: |
|
|
|
|
|
|
|
|
voice->formant_factor = (int)((1+factor/4) * 256); // nominal formant shift for a different voice pitch |
|
|
voice->formant_factor = (int)((1+factor/4) * 256); // nominal formant shift for a different voice pitch |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case V_STRESSLENGTH: {// stressLength |
|
|
|
|
|
if (CheckTranslator(translator, keyword_tab, key) != 0) |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
int stress_lengths_set = 0; |
|
|
|
|
|
int stress_lengths[8]; |
|
|
|
|
|
stress_lengths_set = Read8Numbers(p, stress_lengths); |
|
|
|
|
|
|
|
|
|
|
|
for (ix = 0; ix < stress_lengths_set; ix++) { |
|
|
|
|
|
translator->stress_lengths[ix] = stress_lengths[ix]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
case V_STRESSAMP: { // stressAmp |
|
|
case V_STRESSAMP: { // stressAmp |
|
|
if (CheckTranslator(translator, keyword_tab, key) != 0) |
|
|
if (CheckTranslator(translator, keyword_tab, key) != 0) |
|
|
break; |
|
|
break; |