mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-29 22:04:55 +00:00
[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:
@@ -9,7 +9,6 @@ copy <obey$dir>.^.src.synthdata/cpp <obey$dir>.cpp.synthdata fq~c
|
||||
copy <obey$dir>.^.src.synth_mbrola/cpp <obey$dir>.cpp.synth_mbrola fq~c
|
||||
copy <obey$dir>.^.src.synthesize/cpp <obey$dir>.cpp.synthesize fq~c
|
||||
copy <obey$dir>.^.src.translate/cpp <obey$dir>.cpp.translate fq~c
|
||||
copy <obey$dir>.^.src.tr_english/cpp <obey$dir>.cpp.tr_english fq~c
|
||||
copy <obey$dir>.^.src.tr_languages/cpp <obey$dir>.cpp.tr_languages fq~c
|
||||
copy <obey$dir>.^.src.voices/cpp <obey$dir>.cpp.voices fq~c
|
||||
copy <obey$dir>.^.src.wavegen/cpp <obey$dir>.cpp.wavegen fq~c
|
||||
|
||||
@@ -357,7 +357,7 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W4 /GR /O2 /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /Fd"vc_mswu\minimal.pdb" /FD /EHsc /c
|
||||
# ADD CPP /nologo /MD /W4 /GR /O2 /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /Fd"vc_mswu\minimal.pdb" /FD /EHsc /c
|
||||
# ADD CPP /nologo /MD /W3 /GR /O2 /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /Fd"vc_mswu\minimal.pdb" /FD /EHsc /c
|
||||
# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /i ".\..\..\samples" /d "__WXMSW__" /d "_UNICODE" /d "_WINDOWS" /d "NOPCH"
|
||||
@@ -541,6 +541,14 @@ SOURCE=.\src\intonation.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\klatt.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\klatt.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\main.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -653,18 +661,10 @@ SOURCE=.\src\synthesize.h
|
||||
# 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
|
||||
|
||||
SOURCE=.\src\tr_languages.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\translate.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -1,62 +1,63 @@
|
||||
/***************************************************************************
|
||||
* 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. *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#define LOG_FRAMES // write keyframe info to src/log
|
||||
|
||||
|
||||
// comment this out when compiling the "speak" process
|
||||
//#define SPECT_EDITOR
|
||||
|
||||
#include <windows.h>
|
||||
#define PLATFORM_WINDOWS
|
||||
#define __WIN32__
|
||||
#define mkdir(p1,p2) mkdir(p1)
|
||||
|
||||
#define PATHSEP '\\'
|
||||
#define USE_PORTAUDIO
|
||||
//#define USE_NANOSLEEP
|
||||
#define __cdecl
|
||||
#define ESPEAK_API
|
||||
#define PATH_ESPEAK_DATA "C:\\Program files\\espeak\\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 120
|
||||
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. *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#define LOG_FRAMES // write keyframe info to src/log
|
||||
|
||||
|
||||
// comment this out when compiling the "speak" process
|
||||
//#define SPECT_EDITOR
|
||||
#define INCLUDE_KLATT
|
||||
|
||||
#include <windows.h>
|
||||
#define PLATFORM_WINDOWS
|
||||
#define __WIN32__
|
||||
#define mkdir(p1,p2) mkdir(p1)
|
||||
|
||||
#define PATHSEP '\\'
|
||||
#define USE_PORTAUDIO
|
||||
//#define USE_NANOSLEEP
|
||||
#define __cdecl
|
||||
#define ESPEAK_API
|
||||
#define PATH_ESPEAK_DATA "C:\\Program files\\espeak\\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 120
|
||||
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);
|
||||
|
||||
|
||||
@@ -1,62 +1,63 @@
|
||||
/***************************************************************************
|
||||
* 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. *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#define LOG_FRAMES // write keyframe info to src/log
|
||||
|
||||
|
||||
// comment this out when compiling the "speak" process
|
||||
//#define SPECT_EDITOR
|
||||
|
||||
#include <windows.h>
|
||||
#define PLATFORM_WINDOWS
|
||||
#define __WIN32__
|
||||
#define mkdir(p1,p2) mkdir(p1)
|
||||
|
||||
#define PATHSEP '\\'
|
||||
#define USE_PORTAUDIO
|
||||
//#define USE_NANOSLEEP
|
||||
#define __cdecl
|
||||
#define ESPEAK_API
|
||||
#define PATH_ESPEAK_DATA "C:\\Program files\\espeak\\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 120
|
||||
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. *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#define LOG_FRAMES // write keyframe info to src/log
|
||||
|
||||
|
||||
// comment this out when compiling the "speak" process
|
||||
//#define SPECT_EDITOR
|
||||
#define INCLUDE_KLATT
|
||||
|
||||
#include <windows.h>
|
||||
#define PLATFORM_WINDOWS
|
||||
#define __WIN32__
|
||||
#define mkdir(p1,p2) mkdir(p1)
|
||||
|
||||
#define PATHSEP '\\'
|
||||
#define USE_PORTAUDIO
|
||||
//#define USE_NANOSLEEP
|
||||
#define __cdecl
|
||||
#define ESPEAK_API
|
||||
#define PATH_ESPEAK_DATA "C:\\Program files\\espeak\\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 120
|
||||
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);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[Setup]
|
||||
AppName=eSpeak
|
||||
AppVerName=eSpeak version 1.38
|
||||
AppVerName=eSpeak version 1.40
|
||||
AppCopyright=Licensed under GNU General Public License version 3. (See file License.txt for details).
|
||||
WindowVisible=yes
|
||||
|
||||
@@ -15,6 +15,7 @@ ShowLanguageDialog=auto
|
||||
|
||||
[InstallDelete]
|
||||
Type: files; Name: "{app}\espeak.dll"
|
||||
Type: filesandordirs; Name: "{app}\espeak-data\voices\test"
|
||||
|
||||
[Dirs]
|
||||
Name: "{app}\espeak-data\soundicons"
|
||||
@@ -31,12 +32,7 @@ Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
|
||||
Source: "License.txt"; DestDir: "{app}";
|
||||
|
||||
[Registry]
|
||||
Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak"; Flags: deletekey uninsdeletekey
|
||||
Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_1"; Flags: deletekey uninsdeletekey
|
||||
Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_2"; Flags: deletekey uninsdeletekey
|
||||
Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_3"; Flags: deletekey uninsdeletekey
|
||||
Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_4"; Flags: deletekey uninsdeletekey
|
||||
Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_5"; Flags: deletekey uninsdeletekey
|
||||
;Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_5"; Flags: deletekey uninsdeletekey
|
||||
Root: HKLM; Subkey: "Software\Microsoft\Speech\PhoneConverters\Tokens\eSpeak"; Flags: deletekey uninsdeletekey
|
||||
|
||||
|
||||
@@ -52,7 +48,9 @@ Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl"
|
||||
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
|
||||
Name: "hr"; MessagesFile: "compiler:Languages\Croatian.isl"
|
||||
Name: "hu"; MessagesFile: "compiler:Languages\Hungarian.isl"
|
||||
Name: "id"; MessagesFile: "compiler:Languages\Indonesian-5.1.11.isl"
|
||||
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl"
|
||||
Name: "lv"; MessagesFile: "compiler:Languages\Latvian-1-5.1.11.isl"
|
||||
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl"
|
||||
Name: "no"; MessagesFile: "compiler:Languages\Norwegian.isl"
|
||||
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"
|
||||
@@ -60,8 +58,10 @@ Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.isl"
|
||||
Name: "ro"; MessagesFile: "compiler:Languages\Romanian.isl"
|
||||
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
|
||||
Name: "sk"; MessagesFile: "compiler:Languages\Slovak.isl"
|
||||
Name: "sq"; MessagesFile: "compiler:Languages\Albanian-2-5.1.11.isl"
|
||||
Name: "sr"; MessagesFile: "compiler:Languages\Serbian.isl"
|
||||
Name: "tr"; MessagesFile: "compiler:Languages\Turkish.isl"
|
||||
Name: "zh"; MessagesFile: "compiler:Languages\ChineseSimp-12-5.1.11.isl"
|
||||
|
||||
[CustomMessages]
|
||||
v1=Select which voices to install
|
||||
@@ -111,6 +111,7 @@ begin
|
||||
|
||||
// translation from microsoft codes to language codes
|
||||
case lang_main of
|
||||
$03: Result := 'ca';
|
||||
$04: Result := 'zh';
|
||||
$05: Result := 'cs';
|
||||
$06: Result := 'da';
|
||||
@@ -132,16 +133,21 @@ begin
|
||||
$19: Result := 'ru';
|
||||
$1a: Result := 'hr';
|
||||
$1b: Result := 'sk';
|
||||
$1c: Result := 'sq';
|
||||
$1d: Result := 'sv';
|
||||
$1f: Result := 'tr';
|
||||
$21: Result := 'id';
|
||||
$26: Result := 'lv';
|
||||
$2a: Result := 'vi';
|
||||
$2b: Result := 'hy';
|
||||
$2f: Result := 'mk';
|
||||
$36: Result := 'af';
|
||||
$39: Result := 'hi';
|
||||
$41: Result := 'sw';
|
||||
$49: Result := 'ta';
|
||||
$4b: Result := 'kn';
|
||||
$52: Result := 'cy';
|
||||
$61: Result := 'ne';
|
||||
$87: Result := 'rw';
|
||||
end;
|
||||
|
||||
@@ -178,6 +184,7 @@ begin
|
||||
case lang1 of
|
||||
'af': value := $436;
|
||||
'bs': value := $41a; // should be $141a but Jaws crashes on startup
|
||||
'ca': value := $403;
|
||||
'cs': value := $405;
|
||||
'cy': value := $452;
|
||||
'da': value := $406;
|
||||
@@ -190,11 +197,15 @@ begin
|
||||
'hi': value := $439;
|
||||
'hr': value := $41a;
|
||||
'hu': value := $40e;
|
||||
'hy': value := $42b;
|
||||
'id': value := $421;
|
||||
'is': value := $40f;
|
||||
'it': value := $410;
|
||||
'kn': value := $44b;
|
||||
'ko': value := $412;
|
||||
'lv': value := $426;
|
||||
'mk': value := $42f;
|
||||
'ne': value := $461;
|
||||
'nl': value := $413;
|
||||
'no': value := $414;
|
||||
'pl': value := $415;
|
||||
@@ -203,6 +214,7 @@ begin
|
||||
'ru': value := $419;
|
||||
'rw': value := $487;
|
||||
'sk': value := $41b;
|
||||
'sq': value := $41c;
|
||||
'sr': value := $81a;
|
||||
'sv': value := $41d;
|
||||
'sw': value := $441;
|
||||
@@ -311,13 +323,16 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure SetupVoice(Voice, Lcode: String; Index: Integer);
|
||||
procedure SetupVoice(Voice: String; Index: Integer);
|
||||
var
|
||||
RegVoice2: String;
|
||||
RegVoice2a: String;
|
||||
VoiceUC: String;
|
||||
Lcode: String;
|
||||
|
||||
begin
|
||||
Lcode := LanguageFromVoice(Voice);
|
||||
|
||||
if Index = 0 then
|
||||
RegVoice2 := RegVoice1
|
||||
else
|
||||
@@ -339,7 +354,7 @@ begin
|
||||
RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Gender','Male');
|
||||
RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Age','Adult');
|
||||
RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Language',Lcode);
|
||||
RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Vendor','Jonathan Duddington');
|
||||
RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Vendor','http://espeak.sf.net');
|
||||
|
||||
SetPhoneConvertor(Lcode);
|
||||
end;
|
||||
@@ -348,14 +363,38 @@ end;
|
||||
|
||||
procedure CurStepChanged(CurStep: TSetupStep);
|
||||
var
|
||||
field: Integer;
|
||||
Index: Integer;
|
||||
ix: Integer;
|
||||
ix2: Integer;
|
||||
Line: String;
|
||||
Voice: String;
|
||||
Voice2: String;
|
||||
separator: String;
|
||||
begin
|
||||
if CurStep = ssPostInstall then
|
||||
begin
|
||||
separator := ' ';
|
||||
Index := 0;
|
||||
for field := 0 to 4 do begin
|
||||
Line := Page.Values[field];
|
||||
ix := 1;
|
||||
ix2 := 1;
|
||||
while ix2 > 0 do begin
|
||||
ix2 := Pos(separator,Copy(Line,ix,999));
|
||||
|
||||
for ix := 0 to 5 do begin
|
||||
if Page.Values[ix] <> '' then
|
||||
SetUpVoice(Page.Values[ix],LanguageFromVoice(Page.Values[ix]),ix);
|
||||
if ix2 = 0 then
|
||||
Voice := Copy(Line,ix,999)
|
||||
else
|
||||
Voice := Copy(Line,ix,ix2-1);
|
||||
|
||||
Voice2 := Trim(Voice);
|
||||
if Voice2 <> '' then begin
|
||||
SetUpVoice(Trim(Voice),Index);
|
||||
Index := Index + 1;
|
||||
end;
|
||||
ix := ix + ix2;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@@ -364,6 +403,7 @@ end;
|
||||
procedure InitializeWizard;
|
||||
var
|
||||
lang: String;
|
||||
voice2: String;
|
||||
begin
|
||||
// Create the language selection page
|
||||
lang := ActiveLanguage;
|
||||
@@ -375,20 +415,55 @@ begin
|
||||
Page.Add('', False);
|
||||
Page.Add('', False);
|
||||
Page.Add('', False);
|
||||
Page.Add('', False);
|
||||
|
||||
UILanguage := GetUILanguage;
|
||||
UIVoice := VoiceFromLanguage(UILanguage);
|
||||
|
||||
// Set initial values (optional)
|
||||
Page.Values[0] := UIVoice;
|
||||
Page.Values[1] := UIVoice+'+f2';
|
||||
if UIVoice = 'en' then
|
||||
Page.Values[2] := 'en-r'
|
||||
voice2 := 'en-us'
|
||||
else
|
||||
Page.values[2] := 'en';
|
||||
voice2 := 'en';
|
||||
Page.Values[0] := Format('%s %s %s',[UIVoice, UIVoice+'+f2', voice2]);
|
||||
|
||||
end;
|
||||
|
||||
procedure ClearRegistry;
|
||||
var
|
||||
Index: Integer;
|
||||
RegVoice2: String;
|
||||
exists: Boolean;
|
||||
begin
|
||||
// remove all espeak voices from the registry
|
||||
exists := True;
|
||||
Index := 0;
|
||||
while exists do begin
|
||||
if Index = 0 then
|
||||
RegVoice2 := RegVoice1
|
||||
else
|
||||
RegVoice2 := RegVoice1 + Format('_%d',[Index]);
|
||||
|
||||
exists := RegKeyExists(HKEY_LOCAL_MACHINE,RegVoice2);
|
||||
RegDeleteKeyIncludingSubkeys(HKEY_LOCAL_MACHINE,RegVoice2);
|
||||
Index := Index + 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
function InitializeSetup: Boolean;
|
||||
begin
|
||||
// remove all espeak voices from the registry
|
||||
ClearRegistry;
|
||||
result := True;
|
||||
end;
|
||||
|
||||
function InitializeUninstall: Boolean;
|
||||
begin
|
||||
// remove all espeak voices from the registry
|
||||
ClearRegistry;
|
||||
result := True;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
[Setup]
|
||||
AppName=eSpeakEdit
|
||||
AppVerName=eSpeakEdit version 1.38
|
||||
AppVerName=eSpeakEdit version 1.40
|
||||
DefaultDirName={pf}\eSpeak
|
||||
DefaultGroupName=eSpeak
|
||||
OutputBaseFilename=setup_espeakedit
|
||||
@@ -32,7 +32,9 @@ Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl"
|
||||
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
|
||||
Name: "hr"; MessagesFile: "compiler:Languages\Croatian.isl"
|
||||
Name: "hu"; MessagesFile: "compiler:Languages\Hungarian.isl"
|
||||
Name: "id"; MessagesFile: "compiler:Languages\Indonesian-5.1.11.isl"
|
||||
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl"
|
||||
Name: "lv"; MessagesFile: "compiler:Languages\Latvian-1-5.1.11.isl"
|
||||
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl"
|
||||
Name: "no"; MessagesFile: "compiler:Languages\Norwegian.isl"
|
||||
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"
|
||||
@@ -40,6 +42,8 @@ Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.isl"
|
||||
Name: "ro"; MessagesFile: "compiler:Languages\Romanian.isl"
|
||||
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
|
||||
Name: "sk"; MessagesFile: "compiler:Languages\Slovak.isl"
|
||||
Name: "sq"; MessagesFile: "compiler:Languages\Albanian-2-5.1.11.isl"
|
||||
Name: "sr"; MessagesFile: "compiler:Languages\Serbian.isl"
|
||||
Name: "tr"; MessagesFile: "compiler:Languages\Turkish.isl"
|
||||
Name: "zh"; MessagesFile: "compiler:Languages\ChineseSimp-12-5.1.11.isl"
|
||||
|
||||
|
||||
@@ -98,6 +98,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
|
||||
@@ -135,10 +139,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
|
||||
@@ -159,6 +159,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
|
||||
@@ -183,10 +187,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
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define PATHSEP '\\'
|
||||
#define USE_PORTAUDIO
|
||||
#define ESPEAK_API
|
||||
#define INCLUDE_KLATT
|
||||
//#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"
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user