mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-19 10:58:30 +00:00
[1.28.04] Don't join [v][z] to a liquid [l][r][w][j] across a word boundary.
Changes voice variant file names in espeak_data/voices/!v from !variant12 etc to !varnt12 for DOS 8 character filename limit. Use a separate phoneme translation file for Swedish voice mbrola "sw2". Updates languages dictionaries "af", "sv" git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@73 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -2650,6 +2650,9 @@ int Translator::LookupDict2(char *word, char *word2, char *phonetic, unsigned in
|
||||
return(0);
|
||||
}
|
||||
|
||||
// Find the first entry in the list for this hash value which matches.
|
||||
// This corresponds to the last matching entry in the *_list file.
|
||||
|
||||
while(*p != 0)
|
||||
{
|
||||
next = p + p[0];
|
||||
|
||||
+2
-2
@@ -265,8 +265,8 @@ int GetFileLength(const char *filename)
|
||||
char *Alloc(int size)
|
||||
{//==================
|
||||
char *p;
|
||||
if((p = (char *)malloc(size)) == NULL)
|
||||
fprintf(stderr,"Can't allocate memory\n");
|
||||
if((p = (char *)malloc(size+1)) == NULL)
|
||||
fprintf(stderr,"Can't allocate memory\n"); // I was told that size+1 fixes a crash on 64-bit systems
|
||||
return(p);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.28.03 30.Jul.07";
|
||||
const char *version_string = "1.28.04 15.Aug.07";
|
||||
const int version_phdata = 0x012801;
|
||||
|
||||
int option_device_number = -1;
|
||||
|
||||
+9
-4
@@ -1087,6 +1087,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
|
||||
unsigned char *pitch_env=NULL;
|
||||
unsigned char *amp_env;
|
||||
PHONEME_TAB *ph;
|
||||
PHONEME_TAB *prev_ph;
|
||||
|
||||
#ifdef TEST_MBROLA
|
||||
if(mbrola_name[0] != 0)
|
||||
@@ -1263,7 +1264,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
|
||||
}
|
||||
}
|
||||
|
||||
if((next->type==phVOWEL) || (next->type==phLIQUID))
|
||||
if((next->type==phVOWEL) || ((next->type==phLIQUID)) && (next->newword==0)) // ?? test 14.Aug.2007
|
||||
{
|
||||
StartSyllable();
|
||||
if(p->synthflags & SFLAG_LENGTHEN)
|
||||
@@ -1317,6 +1318,10 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
|
||||
if(p->ph->phflags & phTRILL)
|
||||
modulation = 5;
|
||||
|
||||
prev_ph = prev->ph;
|
||||
// if(p->newword)
|
||||
// prev_ph = phoneme_tab[phonPAUSE]; // pronounce fully at the start of a word
|
||||
|
||||
if(!(p->synthflags & SFLAG_SEQCONTINUE))
|
||||
{
|
||||
DoAmplitude(p->amp,NULL);
|
||||
@@ -1331,16 +1336,16 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
|
||||
if(next->type==phVOWEL)
|
||||
{
|
||||
StartSyllable();
|
||||
DoSpect(p->ph,prev->ph,next->ph,1,p,modulation); // (,)r
|
||||
DoSpect(p->ph,prev_ph,next->ph,1,p,modulation); // (,)r
|
||||
}
|
||||
else
|
||||
if(prev->type==phVOWEL && (p->synthflags & SFLAG_SEQCONTINUE))
|
||||
{
|
||||
DoSpect(p->ph,prev->ph,next->ph,1,p,modulation);
|
||||
DoSpect(p->ph,prev_ph,next->ph,1,p,modulation);
|
||||
}
|
||||
else
|
||||
{
|
||||
DoSpect(p->ph,prev->ph,next->ph,1,p,modulation);
|
||||
DoSpect(p->ph,prev_ph,next->ph,1,p,modulation);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
+3
-3
@@ -231,7 +231,6 @@ static espeak_VOICE *ReadVoiceFile(FILE *f_in, const char *fname, const char*lea
|
||||
char vgender[80];
|
||||
char vlanguage[80];
|
||||
char languages[300]; // allow space for several alternate language names and priorities
|
||||
char fname_buf[sizeof(path_home)+15];
|
||||
|
||||
|
||||
unsigned int len;
|
||||
@@ -245,6 +244,7 @@ static espeak_VOICE *ReadVoiceFile(FILE *f_in, const char *fname, const char*lea
|
||||
int gender;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
char fname_buf[sizeof(path_home)+15];
|
||||
if(memcmp(leafname,"mb-",3) == 0)
|
||||
{
|
||||
// check whether the mbrola speech data is present for this voice
|
||||
@@ -924,7 +924,7 @@ voice_t *LoadVoiceVariant(const char *vname, int variant)
|
||||
v = LoadVoice(buf,0);
|
||||
if((v != NULL) && (variant > 0))
|
||||
{
|
||||
sprintf(buf,"!variant%d",variant);
|
||||
sprintf(buf,"!varnt%d",variant); // changed from !variant1 to !varnt1 to avoid 8 char filenames on DOS
|
||||
v = LoadVoice(buf,2);
|
||||
}
|
||||
return(v);
|
||||
@@ -1446,7 +1446,7 @@ espeak_ERROR SetVoiceByName(const char *name)
|
||||
if(variant > 0)
|
||||
{
|
||||
// apply a voice variant
|
||||
sprintf(variant_name,"!variant%d",variant);
|
||||
sprintf(variant_name,"!varnt%d",variant);
|
||||
LoadVoice(variant_name,2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user