mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-18 18:50:25 +00:00
[1.27.03] Windows, look for env variable ESPEAK_DATA_PATH.
espeakedit, fix crash in Compile_phoneme_data when there is no voices directory. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@58 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+2
-2
@@ -226,7 +226,7 @@ static void init_path(void)
|
||||
char *env;
|
||||
unsigned char buf[100];
|
||||
|
||||
if((env = getenv("espeak-path")) != NULL)
|
||||
if((env = getenv("ESPEAK_DATA_PATH")) != NULL)
|
||||
{
|
||||
sprintf(path_home,"%s/espeak-data",env);
|
||||
if(GetFileLength(path_home) == -2)
|
||||
@@ -242,7 +242,7 @@ static void init_path(void)
|
||||
sprintf(path_home,"%s\\espeak-data",buf);
|
||||
#else
|
||||
// char *env;
|
||||
// if((env = getenv("ESPEAK-DATA-PATH")) != NULL)
|
||||
// if((env = getenv("ESPEAK_DATA_PATH")) != NULL)
|
||||
// {
|
||||
// snprintf(path_home,sizeof(path_home),"%s/espeak-data",env);
|
||||
// if(GetFileLength(path_home) == -2)
|
||||
|
||||
+2
-2
@@ -292,7 +292,7 @@ static void init_path(const char *path)
|
||||
return;
|
||||
}
|
||||
|
||||
if((env = getenv("ESPEAK-DATA-PATH")) != NULL)
|
||||
if((env = getenv("ESPEAK_DATA_PATH")) != NULL)
|
||||
{
|
||||
sprintf(path_home,"%s/espeak-data",env);
|
||||
if(GetFileLength(path_home) == -2)
|
||||
@@ -316,7 +316,7 @@ static void init_path(const char *path)
|
||||
return;
|
||||
}
|
||||
|
||||
// if((env = getenv("ESPEAK-DATA-PATH")) != NULL)
|
||||
// if((env = getenv("ESPEAK_DATA_PATH")) != NULL)
|
||||
// {
|
||||
// snprintf(path_home,sizeof(path_home),"%s/espeak-data",env);
|
||||
// if(GetFileLength(path_home) == -2)
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.27 30.Jun.07";
|
||||
const char *version_string = "1.27.03 03.Jul.07";
|
||||
const int version_phdata = 0x012701;
|
||||
|
||||
int option_device_number = -1;
|
||||
|
||||
@@ -400,13 +400,14 @@ Translator *SelectTranslator(const char *name)
|
||||
|
||||
case L('m','k'): // Macedonian
|
||||
{
|
||||
static wchar_t vowels_cyrillic[] = {0x430,0x435,0x438,0x439,0x43e,0x443,0x44b,0x44d,0x44e,0x44f,0x450,0x451,0x456,0x457,0x45d,0x45e,0};
|
||||
static wchar_t vowels_cyrillic[] = {0x440, // also include 'р' [R]
|
||||
0x430,0x435,0x438,0x439,0x43e,0x443,0x44b,0x44d,0x44e,0x44f,0x450,0x451,0x456,0x457,0x45d,0x45e,0};
|
||||
static int stress_amps_mk[8] = {16,16, 20,20, 20,24, 24,22 };
|
||||
static int stress_lengths_mk[8] = {180,160, 200,200, 0,0, 220,230};
|
||||
|
||||
tr = new Translator();
|
||||
SetupTranslator(tr,stress_lengths_mk,stress_amps_mk);
|
||||
tr->charset_a0 = charsets[2]; // ISO-8859-2
|
||||
tr->charset_a0 = charsets[5]; // ISO-8859-5
|
||||
tr->letter_groups[0] = vowels_cyrillic;
|
||||
|
||||
tr->langopts.stress_rule = 4; // antipenultimate
|
||||
@@ -705,7 +706,8 @@ Translator_Russian::Translator_Russian() : Translator()
|
||||
langopts.stress_rule = 5;
|
||||
langopts.stress_flags = 0x0020; // waas 0x1010
|
||||
|
||||
langopts.numbers = 0x409;
|
||||
langopts.numbers = 0x80409;
|
||||
langopts.numbers2 = 0x2; // variant numbers before thousands
|
||||
langopts.phoneme_change = 1;
|
||||
langopts.testing = 2;
|
||||
|
||||
|
||||
+1
-1
@@ -581,7 +581,7 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
language_type = voicename;
|
||||
}
|
||||
|
||||
if(first_voice == NULL)
|
||||
if((first_voice == NULL) && (f_voice != NULL))
|
||||
{
|
||||
first_voice = ReadVoiceFile(f_voice,buf+strlen(path_voices),voicename);
|
||||
rewind(f_voice);
|
||||
|
||||
Reference in New Issue
Block a user