mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-14 09:37:47 +00:00
[1.47.11b]
Language updates: en, ga, hy, pt, sl, ta, vi git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@360 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -1246,10 +1246,24 @@ void CalcPitches(Translator *tr, int clause_type)
|
||||
}
|
||||
|
||||
count_pitch_vowels(st_start, ix, n_st);
|
||||
if((ix < n_st) || (clause_type == 0))
|
||||
{
|
||||
calc_pitches(option, st_start, ix, group_tone); // split into > 1 tone groups
|
||||
|
||||
if((clause_type==1) || (clause_type==2))
|
||||
group_tone = tr->langopts.tunes[1]; // , or ? remainder has comma-tone
|
||||
else
|
||||
group_tone = tr->langopts.tunes[0]; // . or ! remainder has statement tone
|
||||
}
|
||||
else
|
||||
calc_pitches(option, st_start, ix, group_tone);
|
||||
|
||||
#ifdef deleted
|
||||
if((ix < n_st) || (clause_type == 0))
|
||||
calc_pitches(option, st_start, ix, group_tone_emph); // split into > 1 tone groups, use emphatic tone
|
||||
else
|
||||
calc_pitches(option, st_start, ix, group_tone);
|
||||
#endif
|
||||
|
||||
st_start = ix;
|
||||
}
|
||||
|
||||
+5
-2
@@ -1596,6 +1596,7 @@ static int GetVoiceAttributes(wchar_t *pw, int tag_type)
|
||||
wchar_t *name;
|
||||
wchar_t *age;
|
||||
wchar_t *variant;
|
||||
int value;
|
||||
const char *new_voice_id;
|
||||
SSML_STACK *ssml_sp;
|
||||
|
||||
@@ -1641,7 +1642,9 @@ static int GetVoiceAttributes(wchar_t *pw, int tag_type)
|
||||
|
||||
attrcopy_utf8(ssml_sp->language,lang,sizeof(ssml_sp->language));
|
||||
attrcopy_utf8(ssml_sp->voice_name,name,sizeof(ssml_sp->voice_name));
|
||||
ssml_sp->voice_variant_number = attrnumber(variant,1,0)-1;
|
||||
if((value = attrnumber(variant,1,0)) > 0)
|
||||
value--; // variant='0' and variant='1' the same
|
||||
ssml_sp->voice_variant_number = value;
|
||||
ssml_sp->voice_age = attrnumber(age,0,0);
|
||||
ssml_sp->voice_gender = attrlookup(gender,mnem_gender);
|
||||
ssml_sp->tag_type = tag_type;
|
||||
@@ -2288,7 +2291,7 @@ f_input = f_in; // for GetC etc
|
||||
return(CLAUSE_EOF);
|
||||
}
|
||||
|
||||
if((skip_characters > 0) && (count_characters > skip_characters))
|
||||
if((skip_characters > 0) && (count_characters >= skip_characters))
|
||||
{
|
||||
// reached the specified start position
|
||||
// don't break a word
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.47.11a 18.May.13";
|
||||
const char *version_string = "1.47.11b 28.May.13";
|
||||
const int version_phdata = 0x014709;
|
||||
|
||||
int option_device_number = -1;
|
||||
|
||||
@@ -965,7 +965,8 @@ SetLengthMods(tr,3); // all equal
|
||||
static const short stress_lengths_hy[8] = {250, 200, 250, 250, 0, 0, 250, 250};
|
||||
static const char hy_vowels[] = {0x31, 0x35, 0x37, 0x38, 0x3b, 0x48, 0x55, 0};
|
||||
static const char hy_consonants[] = {0x32,0x33,0x34,0x36,0x39,0x3a,0x3c,0x3d,0x3e,0x3f,
|
||||
0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x56,0};
|
||||
0x40,0x41,0x42,0x43,0x44, 0x46,0x47,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x56,0};
|
||||
static const char hy_consonants2[] = {0x45,0};
|
||||
|
||||
SetupTranslator(tr,stress_lengths_hy,NULL);
|
||||
tr->langopts.stress_rule = STRESSPOSN_1R; // default stress on final syllable
|
||||
@@ -974,7 +975,9 @@ SetLengthMods(tr,3); // all equal
|
||||
memset(tr->letter_bits,0,sizeof(tr->letter_bits));
|
||||
SetLetterBits(tr,LETTERGP_A,hy_vowels);
|
||||
SetLetterBits(tr,LETTERGP_VOWEL2,hy_vowels);
|
||||
SetLetterBits(tr,LETTERGP_B,hy_consonants); // not including 'j'
|
||||
SetLetterBits(tr,LETTERGP_C,hy_consonants);
|
||||
SetLetterBits(tr,LETTERGP_C,hy_consonants2); // add 'j'
|
||||
tr->langopts.max_initial_consonants = 6;
|
||||
tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_OMIT_1_HUNDRED;
|
||||
// tr->langopts.param[LOPT_UNPRONOUNCABLE] = 1; // disable check for unpronouncable words
|
||||
|
||||
+7
-3
@@ -2559,6 +2559,7 @@ void *TranslateClause(Translator *tr, FILE *f_text, const void *vp_input, int *t
|
||||
int dict_flags = 0; // returned from dictionary lookup
|
||||
int word_flags; // set here
|
||||
int next_word_flags;
|
||||
int new_sentence2;
|
||||
int embedded_count = 0;
|
||||
int letter_count = 0;
|
||||
int space_inserted = 0;
|
||||
@@ -2639,16 +2640,19 @@ void *TranslateClause(Translator *tr, FILE *f_text, const void *vp_input, int *t
|
||||
if(clause_pause < 0)
|
||||
clause_pause = 0;
|
||||
|
||||
terminator &= ~CLAUSE_BIT_SENTENCE; // clear sentence bit
|
||||
if(new_sentence)
|
||||
terminator |= CLAUSE_BIT_SENTENCE; // carry forward an end-of-sentence indicator
|
||||
max_clause_pause += clause_pause;
|
||||
new_sentence2 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
max_clause_pause = clause_pause;
|
||||
new_sentence2 = new_sentence;
|
||||
}
|
||||
tr->clause_terminator = terminator;
|
||||
|
||||
if(new_sentence)
|
||||
if(new_sentence2)
|
||||
{
|
||||
count_sentences++;
|
||||
if(skip_sentences > 0)
|
||||
@@ -3459,7 +3463,7 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
|
||||
clause_pause = 10;
|
||||
}
|
||||
|
||||
MakePhonemeList(tr, clause_pause, new_sentence);
|
||||
MakePhonemeList(tr, clause_pause, new_sentence2);
|
||||
phoneme_list[N_PHONEME_LIST].ph = NULL; // recognize end of phoneme_list array, in Generate()
|
||||
phoneme_list[N_PHONEME_LIST].sourceix = 1;
|
||||
|
||||
|
||||
+3
-2
@@ -177,7 +177,7 @@ static MNEM_TAB keyword_tab[] = {
|
||||
|
||||
#define N_VOICE_VARIANTS 12
|
||||
const char variants_either[N_VOICE_VARIANTS] = {1,2,12,3,13,4,14,5,11,0};
|
||||
const char variants_male[N_VOICE_VARIANTS] = {1,2,3,4,5,0};
|
||||
const char variants_male[N_VOICE_VARIANTS] = {1,2,3,4,5,6,7,0};
|
||||
const char variants_female[N_VOICE_VARIANTS] = {11,12,13,14,0};
|
||||
const char *variant_lists[3] = {variants_either, variants_male, variants_female};
|
||||
|
||||
@@ -300,7 +300,7 @@ static espeak_VOICE *ReadVoiceFile(FILE *f_in, const char *fname, const char*lea
|
||||
espeak_VOICE *voice_data;
|
||||
int priority;
|
||||
int age;
|
||||
int n_variants = 3; // default, number of variants of this voice before using another voice
|
||||
int n_variants = 4; // default, number of variants of this voice before using another voice
|
||||
int gender;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
@@ -1067,6 +1067,7 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
if((ix = SelectPhonemeTableName(phonemes_name)) < 0)
|
||||
{
|
||||
fprintf(stderr,"Unknown phoneme table: '%s'\n",phonemes_name);
|
||||
ix = 0;
|
||||
}
|
||||
voice->phoneme_tab_ix = ix;
|
||||
new_translator->phoneme_tab_ix = ix;
|
||||
|
||||
Reference in New Issue
Block a user