Browse Source

[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
master
jonsd 18 years ago
parent
commit
3303246b80

+ 13
- 2
dictsource/dict_phonemes View File



* ; b d d; dZ; f g * ; b d d; dZ; f g
j k l l^ m n n^ p j k l l^ m n n^ p
r s S s; S; t t; ts
ts; tS; v x z Z z; Z;
r R s S s; S; t t;
ts ts; tS; v x z Z z;
Z;




Dictionary sk_dict Dictionary sk_dict
j k l l^ m n N n^ j k l l^ m n N n^
p r R s S t tS ts p r R s S t tS ts
tS; v x z Z tS; v x z Z


Dictionary mk_dict

@- a E i l- O r- u

* b c d dZ f g h
j J k l l^ m n n^
p R s S t tS ts v
z Z

+ 1
- 1
dictsource/en_list View File

// ?6 'one' = [wVn], 'of' = [Vv] // ?6 'one' = [wVn], 'of' = [Vv]
// ?7 Scottish // ?7 Scottish



// letter names, as they are spoken as a single character in text // letter names, as they are spoken as a single character in text
// precede by _ to distinguish from pronunciation as a language word // precede by _ to distinguish from pronunciation as a language word


// General American // General American
// ?3 status statVs // ?3 status statVs




+ 9
- 9
dictsource/hi_rules View File

?1 ढ़ (_ r- // nukta ?1 ढ़ (_ r- // nukta


.group ण .group ण
ण nV // (temporary) same as dental [n]
ण (B n
?1 ण (_ n
्) ण (_ nV
ण n.V // (temporary) same as dental [n]
ण (B n.
?1 ण (_ n.
्) ण (_ n.V


.group त .group त
त tV त tV
?1 ध (_ dh ?1 ध (_ dh


.group न .group न
न n.V
न (B n.
?1 न (_ n.
्) न (_ n.V
र्) न (_ n. // r +virama
न nV
न (B n
?1 न (_ n
्) न (_ nV
र्) न (_ n // r +virama




.group ऩ .group ऩ

+ 21
- 14
dictsource/ru_list View File





// Numbers // Numbers
_0 n'ol
_1 Od;'in
_0 n'ojl^
_1 ojd;'in
_1f odn'a
_2 dv'A _2 dv'A
_3 t;r'i
_4 ts;It'yr;I
_2f dv;'e
_3 tR;'i
_4 tS;It'yR;I
_5 p;'jat; _5 p;'jat;
_6 S'Es;t; _6 S'Es;t;
_7 s;'em
_7 s;'ejm
_8 v'os;E2m _8 v'os;E2m
_9 d;'ev;It;
_9 d;'evI3t;
_10 d;'es;It; _10 d;'es;It;
_11 Od;'innVttsVt; _11 Od;'innVttsVt;
_12 dv;In'AttsVt; _12 dv;In'AttsVt;
_13 tr;In'AttsVt;
_13 tR;In'AttsVt;
_14 ts;It'y@-*nVttsVt; _14 ts;It'y@-*nVttsVt;
_15 p;Itn'AttsVt; _15 p;Itn'AttsVt;
_16 SE#stn'AttsVt; _16 SE#stn'AttsVt;
_2X dv'AttsVt; _2X dv'AttsVt;
_3X tr;'ittsVt; _3X tr;'ittsVt;
_4X s'o@-*Ok _4X s'o@-*Ok
_5X p;Id;d;Is;'jat
_5X p;Vd;d;Is;'jat
_6X SE2z;d;d;Is;'jat _6X SE2z;d;d;Is;'jat
_7X s;'emd;E2s;It
_8X v'os;E2md;E2s;It
_7X s;'emd;E2s;Vt
_8X v'os;E2md;E2s;Vt
_9X d;E2v;In'ostO _9X d;E2v;In'ostO
_0C st'o _0C st'o
_2C dv;'es;t;I _2C dv;'es;t;I
_6C S,E#s;t;s'ot _6C S,E#s;t;s'ot
_7C s;,Ims'ot _7C s;,Ims'ot
_8C vOs;Ims'ot _8C vOs;Ims'ot
_9C d;E2v;It;s'ot
_0M1 t'ys;Its;V
_9C dev;Vn'ostO
_1M1 t'ys;Its;V // no '1' before thousand _1M1 t'ys;Its;V // no '1' before thousand
_0M2 m;,IlI;'on
_0M3 m;,IlI;'art
_0MA1 t'ys;Its;i
_0M1 t'ys;Vts;
_1M2 m;,IlI;'on
_0MA2 m;,IlI;'ona
_0M2 m;,IlI;'onof
_1M3 m;,IlI;'art
_0MA3 m;,IlI;'arda
_0M3 m;,IlI;'artof
_dpt _:'i_: // start of decimal fraction _dpt _:'i_: // start of decimal fraction
_dpt2 _d;Is;'atYx // end of decimal fraction _dpt2 _d;Is;'atYx // end of decimal fraction



+ 4
- 4
dictsource/ru_rules View File



.group я .group я
_) я (_ ja _) я (_ ja
_) я jI //second position
A) я (_ jI //second position
ъ) я (_ jI //second position
ь) я (_ jI //second position
_) я jV //second position
A) я (_ jV //second position
ъ) я (_ jV //second position
ь) я (_ jV //second position


A) я jV A) я jV
ъ) я jV ъ) я jV

+ 33
- 33
phsource/compile_report View File

no 28 122 no 28 122
is 32 121 is 32 121
vi 41 133 vi 41 133
zh_yue 32 124
zhy 32 124
sw 14 105 sw 14 105


3 b/b base hi ro 3 b/b base hi ro
2 dzh/dz_pzd_ base hi 2 dzh/dz_pzd_ base hi
5 dzh/xdzh base hi ru 5 dzh/xdzh base hi ru
2 dzh/xdz_pzd base hi 2 dzh/xdz_pzd base hi
4 envelope/p_fall vi zh_yue
4 envelope/p_fall vi zhy
1 envelope/p_fallrise vi 1 envelope/p_fallrise vi
3 envelope/p_level vi zh_yue
3 envelope/p_rise vi zh_yue
3 envelope/p_level vi zhy
3 envelope/p_rise vi zhy
1 envelope/vi_5 vi 1 envelope/vi_5 vi
1 envelope/vi_5amp vi 1 envelope/vi_5amp vi
1 envelope/vi_6 vi 1 envelope/vi_6 vi
1 n/ni base 1 n/ni base
1 nn/inn base 1 nn/inn base
4 n/nj base ro 4 n/nj base ro
3 nn/_nn base en zh_yue
3 nn/nn_ base en zh_yue
3 nn/_nn base en zhy
3 nn/nn_ base en zhy
1 nn/nn@ base 1 nn/nn@ base
1 nn/nn#_ is 1 nn/nn#_ is
1 nn/nna base 1 nn/nna base
1 nn/nne base 1 nn/nne base
1 nn/nni base 1 nn/nni base
2 nn/nnj base zh_yue
2 nn/nnj base zhy
1 nn/nno base 1 nn/nno base
1 nn/nnu base 1 nn/nnu base
1 n^/n^o base 1 n^/n^o base
2 ustop/t_hi hi 2 ustop/t_hi hi
4 ustop/t_pzd pl ru 4 ustop/t_pzd pl ru
7 ustop/tr base en hi ru 7 ustop/tr base en hi ru
8 ustop/ts base2 de eo hu pl ru ro zh_yue
2 ustop/tsh base zh_yue
2 ustop/tsh_ base zh_yue
8 ustop/ts base2 de eo hu pl ru ro zhy
2 ustop/tsh base zhy
2 ustop/tsh_ base zhy
3 ustop/t_short hi sk el 3 ustop/t_short hi sk el
8 ustop/ts_pzd base hi ru 8 ustop/ts_pzd base hi ru
2 ustop/ts_pzd_ hi hu 2 ustop/ts_pzd_ hi hu
1 vdiph2/ii@ en 1 vdiph2/ii@ en
1 vdiph2/ii@_2 en_wm 1 vdiph2/ii@_2 en_wm
1 vdiph2/ii@_3 vi 1 vdiph2/ii@_3 vi
3 vdiph2/iu base2 vi zh_yue
3 vdiph2/iu base2 vi zhy
1 vdiph2/iu_2 fi 1 vdiph2/iu_2 fi
1 vdiph2/iu_3 af 1 vdiph2/iu_3 af
2 vdiph2/iu_4 cy 2 vdiph2/iu_4 cy
1 vdiph2/yu nl 1 vdiph2/yu nl
1 vdiph2/y-y# fi 1 vdiph2/y-y# fi
1 vdiph/8u en_us 1 vdiph/8u en_us
1 vdiph/aai zh_yue
1 vdiph/aai zhy
2 vdiph/aai_2 af cy 2 vdiph/aai_2 af cy
1 vdiph/aai_3 fi 1 vdiph/aai_3 fi
1 vdiph/aau fi 1 vdiph/aau fi
4 vdiph/aau_2 de nl la zh_yue
4 vdiph/aau_2 de nl la zhy
1 vdiph/aau_3 hi 1 vdiph/aau_3 hi
1 vdiph/aau_4 vi 1 vdiph/aau_4 vi
1 vdiph/ae fr_ca 1 vdiph/ae fr_ca
1 vdiph/ai_en en 1 vdiph/ai_en en
3 vdiph/au en af vi 3 vdiph/au en af vi
1 vdiph/au# en_sc 1 vdiph/au# en_sc
2 vdiph/au_2 en_us zh_yue
2 vdiph/au_2 en_us zhy
1 vdiph/au_3 en_rp 1 vdiph/au_3 en_rp
6 vdiph/au_4 base2 cy eo sk it is 6 vdiph/au_4 base2 cy eo sk it is
1 vdiph/ee-e hi 1 vdiph/ee-e hi
2 vdiph/eei_2 eo fi 2 vdiph/eei_2 eo fi
3 vdiph/eei_3 en_us en_rp sk 3 vdiph/eei_3 en_us en_rp sk
1 vdiph/eei_4 nl 1 vdiph/eei_4 nl
3 vdiph/eeu pt vi zh_yue
3 vdiph/eeu pt vi zhy
2 vdiph/eeu_2 la pt_pt 2 vdiph/eeu_2 la pt_pt
2 vdiph/eeu_3 en_n en_wm 2 vdiph/eeu_3 en_n en_wm
1 vdiph/eey fi 1 vdiph/eey fi
7 vdiph/ei base2 nl la pt is vi zh_yue
7 vdiph/ei base2 nl la pt is vi zhy
8 vdiph/eu base2 en cy eo nl sk pt vi 8 vdiph/eu base2 en cy eo nl sk pt vi
1 vdiph/eu_2 fi 1 vdiph/eu_2 fi
2 vdiph/&i fi hi 2 vdiph/&i fi hi
3 vdiph/@i_2 af cy 3 vdiph/@i_2 af cy
1 vdiph/i@_2 af 1 vdiph/i@_2 af
3 vdiph/@i_3 en_wm ro zh_yue
3 vdiph/@i_3 en_wm ro zhy
1 vdiph/&i_3 vi 1 vdiph/&i_3 vi
1 vdiph/@i_4 vi 1 vdiph/@i_4 vi
1 vdiph/ii ro 1 vdiph/ii ro
1 vdiph/i#i ro 1 vdiph/i#i ro
6 vdiph/oi base2 en_wm de it la vi 6 vdiph/oi base2 en_wm de it la vi
1 vdiph/oi_2 af 1 vdiph/oi_2 af
10 vdiph/ooi en en_n en_us en_rp cy eo fi no zh_yue
10 vdiph/ooi en en_n en_us en_rp cy eo fi no zhy
1 vdiph/ooi_2 af 1 vdiph/ooi_2 af
1 vdiph/ooi_3 en_wm 1 vdiph/ooi_3 en_wm
2 vdiph/ou fi zh_yue
2 vdiph/ou fi zhy
2 vdiph/ou_2 sk ro 2 vdiph/ou_2 sk ro
2 vdiph/ou_3 is 2 vdiph/ou_3 is
1 vdiph/@u en_wm 1 vdiph/@u en_wm
1 vdiph/@u_2 en_rp 1 vdiph/@u_2 en_rp
1 vdiph/@u_3 ro 1 vdiph/@u_3 ro
3 vdiph/@u_en en vi 3 vdiph/@u_en en vi
6 vdiph/ui base2 en eo fi vi zh_yue
6 vdiph/ui base2 en eo fi vi zhy
1 vdiph/u-i vi 1 vdiph/u-i vi
1 vdiph/ui_2 af 1 vdiph/ui_2 af
2 vdiph/ui_3 cy 2 vdiph/ui_3 cy
1 vdiph/y#i_2 is 1 vdiph/y#i_2 is
1 vdiph/yi_fr fr 1 vdiph/yi_fr fr
1 vdiph/y#y fi 1 vdiph/y#y fi
2 vdiph/y#y_2 af zh_yue
2 vdiph/y#y_2 af zhy
1 vdiph/y#y_3 nl 1 vdiph/y#y_3 nl
1 vnasal/aa_n en 1 vnasal/aa_n en
2 vnasal/aa_n3 af fr 2 vnasal/aa_n3 af fr
3 vowel/3_en en en_wm af 3 vowel/3_en en en_wm af
1 vowel/@_4 nl 1 vowel/@_4 nl
2 vowel/8_2 en_us sv 2 vowel/8_2 en_us sv
1 vowel/8_3 zh_yue
1 vowel/8_3 zhy
14 vowel/a en_n cy de hu nl pl sk hr sr it la 14 vowel/a en_n cy de hu nl pl sk hr sr it la
4 vowel/a# base2 en_sc pt 4 vowel/a# base2 en_sc pt
7 vowel/a_2 base2 eo la pt pt_pt ro vi 7 vowel/a_2 base2 eo la pt pt_pt ro vi
4 vowel/a#_2 hr sv is sw 4 vowel/a#_2 hr sv is sw
7 vowel/a_3 en_sc fr cs is 7 vowel/a_3 en_sc fr cs is
12 vowel/a#_3 en en_n en_us en_wm de hi ru pt_pt vi zh_yue
12 vowel/a#_3 en en_n en_us en_wm de hi ru pt_pt vi zhy
4 vowel/a_4 en_wm el vi 4 vowel/a_4 en_wm el vi
3 vowel/a_5 it sv sw 3 vowel/a_5 it sv sw
7 vowel/aa en_us fi fr_ca no zh_yue
7 vowel/aa en_us fi fr_ca no zhy
1 vowel/aa# fi 1 vowel/aa# fi
3 vowel/aa_2 en cy 3 vowel/aa_2 en cy
1 vowel/aa_3 af 1 vowel/aa_3 af
1 vowel/e_5 en_sc 1 vowel/e_5 en_sc
3 vowel/ee fr pl sv 3 vowel/ee fr pl sv
2 vowel/e_e en_sc is 2 vowel/e_e en_sc is
8 vowel/ee_1 base2 en en_n pl la sv no zh_yue
8 vowel/ee_1 base2 en en_n pl la sv no zhy
3 vowel/ee_2 en cy nl 3 vowel/ee_2 en cy nl
1 vowel/ee#_2 sv 1 vowel/ee#_2 sv
4 vowel/ee_3 af pt vi 4 vowel/ee_3 af pt vi
1 vowel/i_6 hr 1 vowel/i_6 hr
3 vowel/i_en en en_us vi 3 vowel/i_en en en_us vi
2 vowel/i_fnt hi 2 vowel/i_fnt hi
10 vowel/ii en_wm cy de fr_ca nl is zh_yue
10 vowel/ii en_wm cy de fr_ca nl is zhy
3 vowel/ii# cy pl ru 3 vowel/ii# cy pl ru
1 vowel/ii_2 la 1 vowel/ii_2 la
7 vowel/ii_3 en_rp fi hi sk hr sv no 7 vowel/ii_3 en_rp fi hi sk hr sv no
1 vowel/oe_2 no 1 vowel/oe_2 no
1 vowel/oe_4 sv 1 vowel/oe_4 sv
2 vowel/o_mid fr hu 2 vowel/o_mid fr hu
9 vowel/oo en_sc de eo la es el sv no zh_yue
9 vowel/oo en_sc de eo la es el sv no zhy
11 vowel/oo_1 en_n en_rp en_wm af fi sk hr vi 11 vowel/oo_1 en_n en_rp en_wm af fi sk hr vi
3 vowel/oo_2 en_sc cy cs 3 vowel/oo_2 en_sc cy cs
1 vowel/oo_3 af 1 vowel/oo_3 af
3 vowel/uu_2 base2 de la 3 vowel/uu_2 base2 de la
1 vowel/uu_3 af 1 vowel/uu_3 af
2 vowel/uu_4 fi sv 2 vowel/uu_4 fi sv
7 vowel/uu_bck fr_ca hi hu pt no zh_yue
7 vowel/uu_bck fr_ca hi hu pt no zhy
2 vowel/V en en_sc 2 vowel/V en en_sc
3 vowel/V_2 af ru 3 vowel/V_2 af ru
3 vowel/V_3 en_rp hi vi 3 vowel/V_3 en_rp hi vi
1 vowel/V_4 en_sc 1 vowel/V_4 en_sc
6 vowel/y en de fi hu nl zh_yue
10 vowel/y# en en_wm de fi fr hu nl ro vi zh_yue
6 vowel/y en de fi hu nl zhy
10 vowel/y# en en_wm de fi fr hu nl ro vi zhy
1 vowel/y## is 1 vowel/y## is
2 vowel/y_2 fr 2 vowel/y_2 fr
2 vowel/y#_2 hu sv 2 vowel/y#_2 hu sv
1 vwl_ru/u# ru 1 vwl_ru/u# ru
1 vwl_ru/u#u ru 1 vwl_ru/u#u ru
1 vwl_sv/r_sv3 sv 1 vwl_sv/r_sv3 sv
1 vwl_zh/aang zh_yue
1 vwl_zh/ong zh_yue
1 vwl_zh/aang zhy
1 vwl_zh/ong zhy
2 w/w base fr 2 w/w base fr
2 w/_w base fr 2 w/_w base fr
1 w/w_ base 1 w/w_ base
8 w/w2 base2 pl sk pt_pt 8 w/w2 base2 pl sk pt_pt
1 w/wa base 1 w/wa base
1 w/we base 1 w/we base
3 w/wi base vi zh_yue
3 w/wi base vi zhy
12 w/wi2 en en_n en_us en_sc en_rp en_wm de nl la sv no 12 w/wi2 en en_n en_us en_sc en_rp en_wm de nl la sv no
1 w/wo base 1 w/wo base
1 w/wu base 1 w/wu base

+ 3
- 3
phsource/ph_hungarian View File



phoneme a: phoneme a:
vowel starttype (a) endtype (a) vowel starttype (a) endtype (a)
length 240
length 260
formants vowel/a formants vowel/a
endphoneme endphoneme


phoneme o: phoneme o:
vowel starttype (o) endtype (o) vowel starttype (o) endtype (o)
length 240
length 260
formants vowel/o_2 formants vowel/o_2
endphoneme endphoneme




phoneme Y: phoneme Y:
vowel starttype (@) endtype (@) vowel starttype (@) endtype (@)
length 240
length 260
formants vowel/y# formants vowel/y#
endphoneme endphoneme



+ 1
- 1
phsource/phonemes View File

phonemetable vi base phonemetable vi base
include ph_vi include ph_vi


phonemetable zh_yue base
phonemetable zhy base
include ph_zh_yue include ph_zh_yue


phonemetable sw base phonemetable sw base

+ 2
- 2
src/speak.cpp View File

char *env; char *env;
unsigned char buf[100]; unsigned char buf[100];


if((env = getenv("espeak-path")) != NULL)
if((env = getenv("ESPEAK_DATA_PATH")) != NULL)
{ {
sprintf(path_home,"%s/espeak-data",env); sprintf(path_home,"%s/espeak-data",env);
if(GetFileLength(path_home) == -2) if(GetFileLength(path_home) == -2)
sprintf(path_home,"%s\\espeak-data",buf); sprintf(path_home,"%s\\espeak-data",buf);
#else #else
// char *env; // 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); // snprintf(path_home,sizeof(path_home),"%s/espeak-data",env);
// if(GetFileLength(path_home) == -2) // if(GetFileLength(path_home) == -2)

+ 2
- 2
src/speak_lib.cpp View File

return; return;
} }


if((env = getenv("ESPEAK-DATA-PATH")) != NULL)
if((env = getenv("ESPEAK_DATA_PATH")) != NULL)
{ {
sprintf(path_home,"%s/espeak-data",env); sprintf(path_home,"%s/espeak-data",env);
if(GetFileLength(path_home) == -2) if(GetFileLength(path_home) == -2)
return; 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); // snprintf(path_home,sizeof(path_home),"%s/espeak-data",env);
// if(GetFileLength(path_home) == -2) // if(GetFileLength(path_home) == -2)

+ 1
- 1
src/synthdata.cpp View File

#include "translate.h" #include "translate.h"
#include "wave.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; const int version_phdata = 0x012701;


int option_device_number = -1; int option_device_number = -1;

+ 5
- 3
src/tr_languages.cpp View File



case L('m','k'): // Macedonian 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_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}; static int stress_lengths_mk[8] = {180,160, 200,200, 0,0, 220,230};


tr = new Translator(); tr = new Translator();
SetupTranslator(tr,stress_lengths_mk,stress_amps_mk); 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->letter_groups[0] = vowels_cyrillic;


tr->langopts.stress_rule = 4; // antipenultimate tr->langopts.stress_rule = 4; // antipenultimate
langopts.stress_rule = 5; langopts.stress_rule = 5;
langopts.stress_flags = 0x0020; // waas 0x1010 langopts.stress_flags = 0x0020; // waas 0x1010


langopts.numbers = 0x409;
langopts.numbers = 0x80409;
langopts.numbers2 = 0x2; // variant numbers before thousands
langopts.phoneme_change = 1; langopts.phoneme_change = 1;
langopts.testing = 2; langopts.testing = 2;



+ 1
- 1
src/voices.cpp View File

language_type = voicename; language_type = voicename;
} }


if(first_voice == NULL)
if((first_voice == NULL) && (f_voice != NULL))
{ {
first_voice = ReadVoiceFile(f_voice,buf+strlen(path_voices),voicename); first_voice = ReadVoiceFile(f_voice,buf+strlen(path_voices),voicename);
rewind(f_voice); rewind(f_voice);

Loading…
Cancel
Save