Merge branch 'upstream' into development

Conflicts:
	dictsource/dict_phonemes
	phsource/compile_report
This commit is contained in:
Reece H. Dunn
2014-07-15 12:31:57 +01:00
28 changed files with 1694 additions and 1104 deletions
+4
View File
@@ -323,6 +323,7 @@ static keywtab_t keywords[] = {
{"vowel2", tPHONEME_FLAG, phVOWEL2},
{"palatal", tPHONEME_FLAG, phPALATAL},
{"long", tPHONEME_FLAG, phLONG},
{"dontlist", tPHONEME_FLAG, phDONTLIST},
{"brkafter", tPHONEME_FLAG, phBRKAFTER},
{"rhotic", tPHONEME_FLAG, phRHOTIC},
{"nonsyllabic",tPHONEME_FLAG, phNONSYLLABIC},
@@ -925,6 +926,9 @@ static void PrintPhonemesUsed(FILE *f, const char *dsource, const char *dictname
{
ph = ph_tab[ix];
if(ph->phflags & phDONTLIST) // "dontlist" attribute
continue;
if(ph->type > 1)
{
if((ph->type > phVOWEL) && (section == 0))
+1
View File
@@ -108,6 +108,7 @@ MNEM_TAB mnem_flags[] = {
{"$alt4", 18},
{"$alt5", 19},
{"$alt6", 20},
{"$alt7", 21},
{"$combine", 23}, // Combine with the next word
+7 -1
View File
@@ -1357,6 +1357,12 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,
stressed_syllable = vowel_count - 1; // stress on last syllable
}
else
if(tr->translator_name == L('i','a'))
{
if((mnem != 's') || phoneme_tab[final_ph2]->type != phVOWEL)
stressed_syllable = vowel_count - 1; // stress on last syllable
}
else
{
if((mnem == 's') && (phoneme_tab[final_ph2]->type == phNASAL))
{
@@ -3311,7 +3317,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
if(tr->expect_verb || (tr->expect_verb_s && (end_flags & FLAG_SUFX_S)))
{
// OK, we are expecting a verb
if((tr->translator_name == L('e','n')) && (tr->prev_dict_flags[0] & FLAG_ALT6_TRANS) && (end_flags & FLAG_SUFX_S))
if((tr->translator_name == L('e','n')) && (tr->prev_dict_flags[0] & FLAG_ALT7_TRANS) && (end_flags & FLAG_SUFX_S))
{
// lang=en, don't use verb form after 'to' if the word has 's' suffix
continue;
+1
View File
@@ -47,6 +47,7 @@
#define phVOWEL2 0x100 // liquid that is considered a vowel
#define phPALATAL 0x200
#define phSINGLE_INSTN 0x1000 // this phoneme has a single instruction program, with an implicit Return
#define phDONTLIST 0x2000 // don't list in dict_phonemes
#define phBRKAFTER 0x4000 // [*] add a post-pause
#define phNONSYLLABIC 0x100000 // don't count this vowel as a syllable when finding the stress position
+1 -1
View File
@@ -35,7 +35,7 @@
#include "translate.h"
#include "wave.h"
const char *version_string = "1.48.06 30.May.14";
const char *version_string = "1.48.08 15.Jul.14";
const int version_phdata = 0x014801;
int option_device_number = -1;
+14 -2
View File
@@ -1351,6 +1351,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
PHONEME_TAB *ph;
int use_ipa=0;
int done_phoneme_marker;
int vowelstart_prev;
char phoneme_name[16];
static int sourceix=0;
@@ -1710,6 +1711,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
InterpretPhoneme(NULL, 0, p, &phdata, &worddata);
fmtp.std_length = phdata.pd_param[i_SET_LENGTH] * 2;
vowelstart_prev = 0;
if(((fmtp.fmt_addr = phdata.sound_addr[pd_VWLSTART]) != 0) && ((phdata.pd_control & pd_FORNEXTPH) == 0))
{
@@ -1721,9 +1723,10 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
{
// check the previous phoneme
InterpretPhoneme(NULL, 0, prev, &phdata_prev, NULL);
if((fmtp.fmt_addr = phdata_prev.sound_addr[pd_VWLSTART]) != 0)
if(((fmtp.fmt_addr = phdata_prev.sound_addr[pd_VWLSTART]) != 0) && (phdata_prev.pd_control & pd_FORNEXTPH))
{
// a vowel start has been specified by the Vowel program
// a vowel start has been specified by the previous phoneme
vowelstart_prev = 1;
fmtp.fmt2_lenadj = phdata_prev.sound_param[pd_VWLSTART];
}
fmtp.transition0 = phdata_prev.vowel_transition[0];
@@ -1773,6 +1776,15 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
DoPitch(pitch_env,p->pitch1,p->pitch2);
}
else
if(vowelstart_prev)
{
// VowelStart from the previous phoneme, but not phLIQUID or phNASAL
DoPitch(envelope_data[PITCHrise], p->pitch2 - 15, p->pitch2);
DoAmplitude(p->amp-1,amp_env);
DoSpect2(ph, 1, &fmtp, p, modulation); // continue with pre-vocalic rising tone
DoPitch(pitch_env,p->pitch1,p->pitch2);
}
else
{
if(!(p->synthflags & SFLAG_SEQCONTINUE))
{
+7
View File
@@ -732,6 +732,7 @@ Translator *SelectTranslator(const char *name)
case L('e','s'): // Spanish
case L('a','n'): // Aragonese
case L('c','a'): // Catalan
case L('i','a'): // Interlingua
case L_pap: // Papiamento
{
static const short stress_lengths_es[8] = {180, 190, 230, 180, 0, 0, 240, 270};
@@ -760,6 +761,12 @@ Translator *SelectTranslator(const char *name)
tr->langopts.stress_flags = S_FINAL_SPANISH | S_FINAL_DIM_ONLY | S_FINAL_NO_2 | S_NO_AUTO_2;
}
else
if(name2 == L('i','a'))
{
tr->langopts.stress_flags = S_FINAL_SPANISH | S_FINAL_DIM_ONLY | S_FINAL_NO_2;
tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_OMIT_1_HUNDRED | NUM_OMIT_1_THOUSAND | NUM_ROMAN | NUM_ROMAN_AFTER;
}
else
if(name2 == L('a','n'))
{
tr->langopts.stress_flags = S_FINAL_SPANISH | S_FINAL_DIM_ONLY | S_FINAL_NO_2;
+2 -1
View File
@@ -55,6 +55,7 @@
#define FLAG_ALT4_TRANS 0x40000 // language specific
#define FLAG_ALT5_TRANS 0x80000 // language specific
#define FLAG_ALT6_TRANS 0x100000 // language specific
#define FLAG_ALT7_TRANS 0x200000 // language specific
#define FLAG_COMBINE 0x800000 // combine with the next word
#define FLAG_ALLOW_DOT 0x01000000 // ignore '.' after word (abbreviation)
@@ -525,7 +526,7 @@ typedef struct {
#define NUM2_PERCENT_BEFORE 0x10000
#define NUM2_OMIT_1_HUNDRED_ONLY 0x20000
#define NUM2_ORDINAL_AND_THOUSANDS 0x40000
#define NUM2_ORDINAL_DROP_VOWEL 0x80000
#define NUM2_ORDINAL_DROP_VOWEL 0x80000 // currently only for tens and units
// bits 1-4 use variant form of numbers before thousands,millions,etc.
// bits 6-8 use different forms of thousand, million, etc (M MA MB)
// bit9=(LANG=rw) say "thousand" and "million" before its number, not after