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-fd96e6ae7743master
| @@ -220,8 +220,9 @@ Y | |||
| * ; b d d; dZ; f g | |||
| 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 | |||
| @@ -346,3 +347,13 @@ y | |||
| j k l l^ m n N n^ | |||
| p r R s S t tS ts | |||
| 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 | |||
| @@ -16,7 +16,6 @@ | |||
| // ?6 'one' = [wVn], 'of' = [Vv] | |||
| // ?7 Scottish | |||
| // letter names, as they are spoken as a single character in text | |||
| // precede by _ to distinguish from pronunciation as a language word | |||
| @@ -2691,3 +2690,4 @@ like laIk $strend2 | |||
| // General American | |||
| // ?3 status statVs | |||
| @@ -228,10 +228,10 @@ | |||
| ?1 ढ़ (_ r- // nukta | |||
| .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 त | |||
| त tV | |||
| @@ -255,11 +255,11 @@ | |||
| ?1 ध (_ dh | |||
| .group न | |||
| न n.V | |||
| न (B n. | |||
| ?1 न (_ n. | |||
| ्) न (_ n.V | |||
| र्) न (_ n. // r +virama | |||
| न nV | |||
| न (B n | |||
| ?1 न (_ n | |||
| ्) न (_ nV | |||
| र्) न (_ n // r +virama | |||
| .group ऩ | |||
| @@ -12,20 +12,22 @@ | |||
| // Numbers | |||
| _0 n'ol | |||
| _1 Od;'in | |||
| _0 n'ojl^ | |||
| _1 ojd;'in | |||
| _1f odn'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; | |||
| _6 S'Es;t; | |||
| _7 s;'em | |||
| _7 s;'ejm | |||
| _8 v'os;E2m | |||
| _9 d;'ev;It; | |||
| _9 d;'evI3t; | |||
| _10 d;'es;It; | |||
| _11 Od;'innVttsVt; | |||
| _12 dv;In'AttsVt; | |||
| _13 tr;In'AttsVt; | |||
| _13 tR;In'AttsVt; | |||
| _14 ts;It'y@-*nVttsVt; | |||
| _15 p;Itn'AttsVt; | |||
| _16 SE#stn'AttsVt; | |||
| @@ -35,10 +37,10 @@ _19 d;E2v;Itn'AttsVt; | |||
| _2X dv'AttsVt; | |||
| _3X tr;'ittsVt; | |||
| _4X s'o@-*Ok | |||
| _5X p;Id;d;Is;'jat | |||
| _5X p;Vd;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 | |||
| _0C st'o | |||
| _2C dv;'es;t;I | |||
| @@ -48,11 +50,16 @@ _5C p;,It;s'ot | |||
| _6C S,E#s;t;s'ot | |||
| _7C s;,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 | |||
| _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 | |||
| _dpt2 _d;Is;'atYx // end of decimal fraction | |||
| @@ -623,10 +623,10 @@ | |||
| .group я | |||
| _) я (_ 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 | |||
| ъ) я jV | |||
| @@ -36,7 +36,7 @@ | |||
| no 28 122 | |||
| is 32 121 | |||
| vi 41 133 | |||
| zh_yue 32 124 | |||
| zhy 32 124 | |||
| sw 14 105 | |||
| 3 b/b base hi ro | |||
| @@ -66,10 +66,10 @@ | |||
| 2 dzh/dz_pzd_ base hi | |||
| 5 dzh/xdzh base hi ru | |||
| 2 dzh/xdz_pzd base hi | |||
| 4 envelope/p_fall vi zh_yue | |||
| 4 envelope/p_fall vi zhy | |||
| 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_5amp vi | |||
| 1 envelope/vi_6 vi | |||
| @@ -157,14 +157,14 @@ | |||
| 1 n/ni base | |||
| 1 nn/inn base | |||
| 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#_ is | |||
| 1 nn/nna base | |||
| 1 nn/nne base | |||
| 1 nn/nni base | |||
| 2 nn/nnj base zh_yue | |||
| 2 nn/nnj base zhy | |||
| 1 nn/nno base | |||
| 1 nn/nnu base | |||
| 1 n^/n^o base | |||
| @@ -260,9 +260,9 @@ | |||
| 2 ustop/t_hi hi | |||
| 4 ustop/t_pzd pl 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 | |||
| 8 ustop/ts_pzd base hi ru | |||
| 2 ustop/ts_pzd_ hi hu | |||
| @@ -278,7 +278,7 @@ | |||
| 1 vdiph2/ii@ en | |||
| 1 vdiph2/ii@_2 en_wm | |||
| 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_3 af | |||
| 2 vdiph2/iu_4 cy | |||
| @@ -294,11 +294,11 @@ | |||
| 1 vdiph2/yu nl | |||
| 1 vdiph2/y-y# fi | |||
| 1 vdiph/8u en_us | |||
| 1 vdiph/aai zh_yue | |||
| 1 vdiph/aai zhy | |||
| 2 vdiph/aai_2 af cy | |||
| 1 vdiph/aai_3 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_4 vi | |||
| 1 vdiph/ae fr_ca | |||
| @@ -313,7 +313,7 @@ | |||
| 1 vdiph/ai_en en | |||
| 3 vdiph/au en af vi | |||
| 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 | |||
| 6 vdiph/au_4 base2 cy eo sk it is | |||
| 1 vdiph/ee-e hi | |||
| @@ -321,34 +321,34 @@ | |||
| 2 vdiph/eei_2 eo fi | |||
| 3 vdiph/eei_3 en_us en_rp sk | |||
| 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_3 en_n en_wm | |||
| 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 | |||
| 1 vdiph/eu_2 fi | |||
| 2 vdiph/&i fi hi | |||
| 3 vdiph/@i_2 af cy | |||
| 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_4 vi | |||
| 1 vdiph/ii ro | |||
| 1 vdiph/i#i ro | |||
| 6 vdiph/oi base2 en_wm de it la vi | |||
| 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_3 en_wm | |||
| 2 vdiph/ou fi zh_yue | |||
| 2 vdiph/ou fi zhy | |||
| 2 vdiph/ou_2 sk ro | |||
| 2 vdiph/ou_3 is | |||
| 1 vdiph/@u en_wm | |||
| 1 vdiph/@u_2 en_rp | |||
| 1 vdiph/@u_3 ro | |||
| 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/ui_2 af | |||
| 2 vdiph/ui_3 cy | |||
| @@ -362,7 +362,7 @@ | |||
| 1 vdiph/y#i_2 is | |||
| 1 vdiph/yi_fr fr | |||
| 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 vnasal/aa_n en | |||
| 2 vnasal/aa_n3 af fr | |||
| @@ -418,16 +418,16 @@ | |||
| 3 vowel/3_en en en_wm af | |||
| 1 vowel/@_4 nl | |||
| 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 | |||
| 4 vowel/a# base2 en_sc pt | |||
| 7 vowel/a_2 base2 eo la pt pt_pt ro vi | |||
| 4 vowel/a#_2 hr sv is sw | |||
| 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 | |||
| 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 | |||
| 3 vowel/aa_2 en cy | |||
| 1 vowel/aa_3 af | |||
| @@ -444,7 +444,7 @@ | |||
| 1 vowel/e_5 en_sc | |||
| 3 vowel/ee fr pl sv | |||
| 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 | |||
| 1 vowel/ee#_2 sv | |||
| 4 vowel/ee_3 af pt vi | |||
| @@ -463,7 +463,7 @@ | |||
| 1 vowel/i_6 hr | |||
| 3 vowel/i_en en en_us vi | |||
| 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 | |||
| 1 vowel/ii_2 la | |||
| 7 vowel/ii_3 en_rp fi hi sk hr sv no | |||
| @@ -482,7 +482,7 @@ | |||
| 1 vowel/oe_2 no | |||
| 1 vowel/oe_4 sv | |||
| 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 | |||
| 3 vowel/oo_2 en_sc cy cs | |||
| 1 vowel/oo_3 af | |||
| @@ -511,13 +511,13 @@ | |||
| 3 vowel/uu_2 base2 de la | |||
| 1 vowel/uu_3 af | |||
| 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 | |||
| 3 vowel/V_2 af ru | |||
| 3 vowel/V_3 en_rp hi vi | |||
| 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 | |||
| 2 vowel/y_2 fr | |||
| 2 vowel/y#_2 hu sv | |||
| @@ -595,8 +595,8 @@ | |||
| 1 vwl_ru/u# ru | |||
| 1 vwl_ru/u#u ru | |||
| 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 | |||
| 1 w/w_ base | |||
| @@ -604,7 +604,7 @@ | |||
| 8 w/w2 base2 pl sk pt_pt | |||
| 1 w/wa 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 | |||
| 1 w/wo base | |||
| 1 w/wu base | |||
| @@ -62,13 +62,13 @@ endphoneme | |||
| phoneme a: | |||
| vowel starttype (a) endtype (a) | |||
| length 240 | |||
| length 260 | |||
| formants vowel/a | |||
| endphoneme | |||
| phoneme o: | |||
| vowel starttype (o) endtype (o) | |||
| length 240 | |||
| length 260 | |||
| formants vowel/o_2 | |||
| endphoneme | |||
| @@ -86,7 +86,7 @@ endphoneme | |||
| phoneme Y: | |||
| vowel starttype (@) endtype (@) | |||
| length 240 | |||
| length 260 | |||
| formants vowel/y# | |||
| endphoneme | |||
| @@ -1229,7 +1229,7 @@ include ph_icelandic | |||
| phonemetable vi base | |||
| include ph_vi | |||
| phonemetable zh_yue base | |||
| phonemetable zhy base | |||
| include ph_zh_yue | |||
| phonemetable sw base | |||
| @@ -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) | |||
| @@ -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) | |||
| @@ -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; | |||
| @@ -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); | |||