[1.40.01]

Fix mbrola translation for "r" in Spanish and some other languages.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@214 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2008-12-23 10:45:33 +00:00
parent 3d02bd19d4
commit 718b955bfc
30 changed files with 473 additions and 291 deletions
+65 -65
View File
@@ -1,65 +1,65 @@
/***************************************************************************
* Copyright (C) 2005,2006 by Jonathan Duddington *
* jsd@clara.co.uk *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
// speech.h file for the Windows SAPI5 version of eSpeak
// conditional compilation options
#define PLATFORM_WINDOWS
#define __WIN32__
#define NEED_WCSTOF
#define NEED_GETOPT
#define USE_MBROLA_LIB
#define ESPEAK_API
#define PATHSEP '\\'
//#define PLATFORM_POSIX
//#define __cdecl // define as null, needed for Borland compiler ?
//#define USE_PORTAUDIO
//#define USE_NANOSLEEP
#define INCLUDE_KLATT
// will look for espeak_data directory here, and also in user's home directory
#define PATH_ESPEAK_DATA "/usr/share/espeak-data"
typedef unsigned short USHORT;
typedef unsigned char UCHAR;
typedef double DOUBLEX;
typedef struct {
const char *mnem;
int value;
} MNEM_TAB;
int LookupMnem(MNEM_TAB *table, char *string);
#define N_PATH_HOME 220
extern char path_home[N_PATH_HOME]; // this is the espeak-data directory
extern void strncpy0(char *to,const char *from, int size);
int GetFileLength(const char *filename);
char *Alloc(int size);
void Free(void *ptr);
/***************************************************************************
* Copyright (C) 2005,2006 by Jonathan Duddington *
* jsd@clara.co.uk *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
// speech.h file for the Windows SAPI5 version of eSpeak
// conditional compilation options
#define PLATFORM_WINDOWS
#define __WIN32__
#define NEED_WCSTOF
#define NEED_GETOPT
#define USE_MBROLA_LIB
#define ESPEAK_API
#define PATHSEP '\\'
//#define PLATFORM_POSIX
//#define __cdecl // define as null, needed for Borland compiler ?
//#define USE_PORTAUDIO
//#define USE_NANOSLEEP
//#define INCLUDE_KLATT
// will look for espeak_data directory here, and also in user's home directory
#define PATH_ESPEAK_DATA "/usr/share/espeak-data"
typedef unsigned short USHORT;
typedef unsigned char UCHAR;
typedef double DOUBLEX;
typedef struct {
const char *mnem;
int value;
} MNEM_TAB;
int LookupMnem(MNEM_TAB *table, char *string);
#define N_PATH_HOME 220
extern char path_home[N_PATH_HOME]; // this is the espeak-data directory
extern void strncpy0(char *to,const char *from, int size);
int GetFileLength(const char *filename);
char *Alloc(int size);
void Free(void *ptr);
+8 -8
View File
@@ -124,6 +124,10 @@ SOURCE=.\src\intonation.cpp
# End Source File
# Begin Source File
SOURCE=.\src\klatt.cpp
# End Source File
# Begin Source File
SOURCE=.\src\numbers.cpp
# End Source File
# Begin Source File
@@ -162,10 +166,6 @@ SOURCE=.\src\synthesize.cpp
# End Source File
# Begin Source File
SOURCE=.\src\tr_english.cpp
# End Source File
# Begin Source File
SOURCE=.\src\tr_languages.cpp
# End Source File
# Begin Source File
@@ -209,6 +209,10 @@ SOURCE=.\src\wavegen.cpp
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\src\klatt.h
# End Source File
# Begin Source File
SOURCE=.\src\phoneme.h
# End Source File
# Begin Source File
@@ -249,10 +253,6 @@ SOURCE=.\src\synthesize.h
# End Source File
# Begin Source File
SOURCE=.\src\tr_languages.h
# End Source File
# Begin Source File
SOURCE=.\src\translate.h
# End Source File
# Begin Source File
@@ -68,6 +68,47 @@ int frag_count=0;
FRAG_OFFSET *frag_offsets = NULL;
//#define TEST_INPUT // printf input text received from SAPI to espeak_text_log.txt
#ifdef TEST_INPUT
static int utf8_out(unsigned int c, char *buf)
{//====================================
// write a unicode character into a buffer as utf8
// returns the number of bytes written
int n_bytes;
int j;
int shift;
static char unsigned code[4] = {0,0xc0,0xe0,0xf0};
if(c < 0x80)
{
buf[0] = c;
return(1);
}
if(c >= 0x110000)
{
buf[0] = ' '; // out of range character code
return(1);
}
if(c < 0x0800)
n_bytes = 1;
else
if(c < 0x10000)
n_bytes = 2;
else
n_bytes = 3;
shift = 6*n_bytes;
buf[0] = code[n_bytes] | (c >> shift);
for(j=0; j<n_bytes; j++)
{
shift -= 6;
buf[j+1] = 0x80 + ((c >> shift) & 0x3f);
}
return(n_bytes+1);
} // end of utf8_out
#endif
int VisemeCode(unsigned int phoneme_name)
{//======================================
// Convert eSpeak phoneme name into a SAPI viseme code
@@ -589,8 +630,32 @@ int CTTSEngObj::ProcessFragList(const SPVTEXTFRAG* pTextFragList, wchar_t *pW_st
frag_offsets[frag_count].bufix = pW - pW_start;
frag_offsets[frag_count].cmdlen = len;
#ifdef TEST_INPUT
{
FILE *f;
unsigned int c;
int n;
char buf[10];
f = fopen("C:\\espeak_text_log.txt","a");
if(f != NULL)
{
fprintf(f,"----------\n");
for(ix=0; ix<pTextFragList->ulTextLen; ix++)
{
c = pTextFragList->pTextStart[ix];
n = utf8_out(c,buf);
buf[n] = 0;
fprintf(f,"%s",buf);
}
fprintf(f,"\n");
fclose(f);
}
}
#endif
for(ix=0; ix<pTextFragList->ulTextLen; ix++)
{
*pW++ = pTextFragList->pTextStart[ix];
}
if(pTextFragList->ulTextLen > 0)
+5 -5
View File
@@ -5,8 +5,8 @@
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,38,00
PRODUCTVERSION 1,0,38,00
FILEVERSION 1,0,40,00
PRODUCTVERSION 1,0,40,00
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -24,14 +24,14 @@ BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "Jonathan Duddington\0"
VALUE "FileDescription", "Text to Speech\0"
VALUE "FileVersion", "1, 0,38,00\0"
VALUE "InternalName", "espeak1.38\0"
VALUE "FileVersion", "1, 0,40,00\0"
VALUE "InternalName", "espeak1.40\0"
VALUE "LegalCopyright", "Copyright (c) Jonathan Duddington\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "espeak_sapi.dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "espeak TTS\0"
VALUE "ProductVersion", "1, 0, 38, 00\0"
VALUE "ProductVersion", "1, 0, 40, 00\0"
VALUE "SpecialBuild", "\0"
END
END