mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-05 14:47:26 +00:00
[1.26.10] Lengthen phoneme [n] slightly.
Internationalization of Windows espeak and espeakedit installers. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@54 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -283,6 +283,7 @@ static void init_path(const char *path)
|
||||
HKEY RegKey;
|
||||
unsigned long size;
|
||||
unsigned long var_type;
|
||||
char *env;
|
||||
unsigned char buf[100];
|
||||
|
||||
if(path != NULL)
|
||||
@@ -290,6 +291,14 @@ static void init_path(const char *path)
|
||||
sprintf(path_home,"%s/espeak-data",path);
|
||||
return;
|
||||
}
|
||||
|
||||
if((env = getenv("espeak-path")) != NULL)
|
||||
{
|
||||
sprintf(path_home,"%s/espeak-data",env);
|
||||
if(GetFileLength(path_home) == -2)
|
||||
return; // an espeak-data directory exists
|
||||
}
|
||||
|
||||
buf[0] = 0;
|
||||
RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Speech\\Voices\\Tokens\\eSpeak", 0, KEY_READ, &RegKey);
|
||||
size = sizeof(buf);
|
||||
@@ -299,12 +308,21 @@ static void init_path(const char *path)
|
||||
sprintf(path_home,"%s\\espeak-data",buf);
|
||||
|
||||
#else
|
||||
char *env;
|
||||
|
||||
if(path != NULL)
|
||||
{
|
||||
snprintf(path_home,sizeof(path_home),"%s/espeak-data",path);
|
||||
return;
|
||||
}
|
||||
|
||||
if((env = getenv("ESPEAK-DATA-PATH")) != NULL)
|
||||
{
|
||||
snprintf(path_home,sizeof(path_home),"%s/espeak-data",env);
|
||||
if(GetFileLength(path_home) == -2)
|
||||
return; // an espeak-data directory exists
|
||||
}
|
||||
|
||||
snprintf(path_home,sizeof(path_home),"%s/espeak-data",getenv("HOME"));
|
||||
if(access(path_home,R_OK) != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user