mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-07 15:24:02 +00:00
[1.25.04] Windows, look in Registry to find location of dictsource.
Add lang=is Icelandic. Adopt Phoneme [R] from experimental Croatian [R2]. lang=hu, add vowel_pause. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@20 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+3
-3
@@ -51,7 +51,7 @@ wxString path_dictsource;
|
||||
wxString path_speaktext;
|
||||
int option_speed=160;
|
||||
|
||||
char path_dsource[80];
|
||||
char path_dsource[120];
|
||||
|
||||
BEGIN_EVENT_TABLE(Options, wxDialog)
|
||||
EVT_BUTTON(wxID_SAVE,Options::OnCommand)
|
||||
@@ -175,9 +175,9 @@ void ConfigInit()
|
||||
void ConfigSave(int exit)
|
||||
{//======================
|
||||
wxFileConfig *pConfig = (wxFileConfig *)(wxConfigBase::Get());
|
||||
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
pConfig->Write(_T("/samplerate"),samplerate);
|
||||
pConfig->Write(_T("/samplerate"),samplerate);
|
||||
#endif
|
||||
pConfig->Write(_T("/basedir"),basedir);
|
||||
pConfig->Write(_T("/spectload"),path_spectload);
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ extern wxString path_phsource;
|
||||
extern wxString path_dictsource;
|
||||
|
||||
extern char path_source[80];
|
||||
extern char path_dsource[80];
|
||||
extern char path_dsource[120];
|
||||
|
||||
extern int option_speed;
|
||||
|
||||
|
||||
+5
-1
@@ -538,7 +538,11 @@ int main (int argc, char **argv)
|
||||
if(flag_compile)
|
||||
{
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
CompileDictionary("C:\\Program Files\\eSpeak\\dictsource\\",dictionary_name,NULL,NULL);
|
||||
char path_dsource[120];
|
||||
strcpy(path_dsource,path_home);
|
||||
path_dsource[strlen(path_home)-11] = 0; // renove "espeak-data" from the end
|
||||
strcat(path_dsource,"dictsource\\");
|
||||
CompileDictionary(path_dsource,dictionary_name,NULL,NULL);
|
||||
#else
|
||||
CompileDictionary(NULL,dictionary_name,NULL,NULL);
|
||||
#endif
|
||||
|
||||
+11
-1
@@ -280,13 +280,23 @@ void Free(void *ptr)
|
||||
static void init_path(const char *path)
|
||||
{//====================================
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
HKEY RegKey;
|
||||
unsigned long size;
|
||||
unsigned long var_type;
|
||||
unsigned char buf[100];
|
||||
|
||||
if(path != NULL)
|
||||
{
|
||||
sprintf(path_home,"%s/espeak-data",path);
|
||||
return;
|
||||
}
|
||||
buf[0] = 0;
|
||||
RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Speech\\Voices\\Tokens\\eSpeak", 0, KEY_READ, &RegKey);
|
||||
size = sizeof(buf);
|
||||
var_type = REG_SZ;
|
||||
RegQueryValueEx(RegKey, "path", 0, &var_type, buf, &size);
|
||||
|
||||
strcpy(path_home,"c:\\Program Files\\espeak\\espeak-data");
|
||||
sprintf(path_home,"%s\\espeak-data",buf);
|
||||
|
||||
#else
|
||||
if(path != NULL)
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.25.03 22.May.07";
|
||||
const char *version_string = "1.25.04 23.May.07";
|
||||
const int version_phdata = 0x012501;
|
||||
|
||||
int option_device_number = -1;
|
||||
|
||||
@@ -312,8 +312,8 @@ Translator *SelectTranslator(const char *name)
|
||||
|
||||
case L('h','u'): // Hungarian
|
||||
{
|
||||
static int stress_amps_hu[8] = {16,16, 20,20, 20,24, 24,22 };
|
||||
static int stress_lengths_hu[8] = {180,160, 200,180, 0,0, 230,270};
|
||||
static int stress_amps_hu[8] = {17,16, 20,19, 20,24, 24,22 };
|
||||
static int stress_lengths_hu[8] = {180,160, 200,190, 0,0, 220,240};
|
||||
static const wchar_t replace_chars_hu[] = {0xd4,0xf4,0xdb,0xfb,0};
|
||||
static const unsigned int replacement_chars_hu[] = {0x150,0x151,0x170,0x171,0}; // allow o,u-circumflex for o,u-double-acute
|
||||
|
||||
@@ -323,9 +323,10 @@ Translator *SelectTranslator(const char *name)
|
||||
tr->langopts.replace_chars = replace_chars_hu;
|
||||
tr->langopts.replacement_chars = replacement_chars_hu;
|
||||
|
||||
tr->langopts.vowel_pause = 0x10;
|
||||
tr->langopts.stress_rule = 0;
|
||||
tr->langopts.stress_flags = 0x16; // move secondary stress from light to a following heavy syllable
|
||||
tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x1;
|
||||
tr->langopts.stress_flags = 0x16;
|
||||
tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x4; // don't propagate over word boundaries
|
||||
tr->langopts.param[LOPT_IT_DOUBLING] = 1;
|
||||
tr->langopts.long_stop = 130;
|
||||
|
||||
@@ -338,13 +339,15 @@ Translator *SelectTranslator(const char *name)
|
||||
case L('i','s'): // Icelandic
|
||||
{
|
||||
static int stress_amps_is[] = {16,16, 20,20, 20,24, 24,22 };
|
||||
static int stress_lengths_is[8] = {180,160, 200,200, 0,0, 240,260};
|
||||
static int stress_lengths_is[8] = {180,155, 200,200, 0,0, 240,250};
|
||||
static const wchar_t is_L08[] = {'c','f','h','k','p','t','x',0xfe,0}; // voiceless conants, including 'þ' ?? 's'
|
||||
|
||||
tr = new Translator();
|
||||
SetupTranslator(tr,stress_lengths_is,stress_amps_is);
|
||||
tr->langopts.stress_rule = 1;
|
||||
tr->langopts.stress_flags = 0x10;
|
||||
tr->langopts.param[LOPT_IT_LENGTHEN] = 0x11; // remove lengthen indicator from unstressed vowels
|
||||
tr->langopts.param[LOPT_KEEP_UNSTR_VOWEL] = 1;
|
||||
|
||||
ResetLetterBits(tr,0x18);
|
||||
SetLetterBits(tr,4,"kpst"); // Letter group F
|
||||
|
||||
Reference in New Issue
Block a user