diff --git a/dictsource/an_list b/dictsource/an_list index 3151fcc2..43df719e 100755 --- a/dictsource/an_list +++ b/dictsource/an_list @@ -83,8 +83,8 @@ _12 d'oTe _13 tr'eTe _14 kat'orTe _15 k'inTe -_20 B'inte -_2X B,int +_20 b'inte +_2X b,int _3X tr'enta _4X kwar'anta _5X Tinkw'anta @@ -112,40 +112,40 @@ _dpt kon // ordinal numbers -_#º o -_#ª a +_#º %'eno +_#ª %'ena +_x#º %o // for 1º 2º 3º +_x#ª %a +º orDin'al||maskul'in +ª orDin'al||femen'in _1ox prim'Er _2ox seQ'und _3ox tErT'Er -_1o un'en -_2o dos'en -_3o tres'en -_4o kwatr'en -_5o Tink'en -_6o seIs'en -_7o sEt'en -_8o gwit'en -_9o nU'en -_11o onT'en -_12o DoT'en -_13o tReT'en -_14o katorT'en -_15o kinT'en -_16o sET'en -_10o DET'en -_20o Bint'en -_30o trent'en -_40o kwarant'en -_50o Tinkwant'en -_60o siSant'en -_70o sEtant'en -_80o gwitant'en -_90o noBant'en +_4o kwatr +_5o Tink +_7o sEt +_8o gwit +_9o nU +_11o onT +_12o doT +_13o tReT +_14o katorT +_15o kinT +_16o sET +_10o dET +_20o bint +_30o trent +_40o kwarant +_50o Tinkwant +_60o siSant +_70o sEtant +_80o gwitant +_90o noBant -_1Xo DeTi -_2Xo Binti +_1Xo deTi +_2Xo binti _3Xo trentaI _4Xo kwarantaI _5Xo TinkwantaI @@ -153,21 +153,16 @@ _6Xo siSantaI _7Xo sEtantaI _8Xo gwitantaI _9Xo noBantaI -_1Co TEnt'en -_2Co dosTEnt'en -_3Co tresTEnt'en -_4Co kw,atroTEnt'en -_5Co T,inkoTEnt'en -_6Co seIsTEnt'en -_7Co sjEtTEnt'en -_8Co gw,eItoTEnt'en -_9Co nweUTEnt'en +_0Co Tent +_1Co TEnt +_2Co dosTEnt +_3Co tresTEnt +_6Co seIsTEnt +_7Co sjEtTEnt +_8Co gw,eItoTEnt +_9Co nweUTEnt -_0M1o mil'en -_0M2o mil^on'en -_1M2o mil^on'en -_0M4o bil^on'en -_1M4o bil^on'en +_0M1o mil // characters @@ -208,8 +203,13 @@ lo $u la $u los $u las $u +ro $u +ra $u +ros $u +ras $u ne $u nes $u + me $u te $u se $u @@ -236,13 +236,10 @@ tu $u sin $u su $u ye $u -ro $u -ra $u -ros $u -ras $u el $u es $u els $u +ers $u mis $u tus $u sus $u @@ -250,6 +247,7 @@ bell $u bel $u bella $u bells $u +bels $u bellas $u bellos $u que $u @@ -261,25 +259,15 @@ quando $u on $u aon $u porque $u -dende $u -entre $u -contra $u -enta $u -sinde $u per $u pus $u -dica $u -sino $u ni $u -pero $u +ibi $u bi $u i $u+ ie $u hu $u sant $u -donya $u -don $u -se'n sen $u //abbreviations diff --git a/dictsource/bn_list b/dictsource/bn_list new file mode 100755 index 00000000..25132df2 --- /dev/null +++ b/dictsource/bn_list @@ -0,0 +1,263 @@ +// Translation rules for Bengali +// This file is UTF8 encoded + +// Numbers + devanagari numbers are changed to latin characters before translation +_0 S'unjO +_1 '&k +_2 duj +_3 t'in +_4 tS'ar +_5 p'a~tS +_6 tS#'Oj +_7 S'at +_8 'at.# +_9 n'Oj + +_10 d'OS +_11 '&garo +_12 b'aro +_13 t'ero +_14 tS'owddo +_15 p'Onero +_16 S'olo +_17 S'Otero +_18 'at.#aro +_19 'uniS + +_20 b'iS // ?? +_21 'ekuS +_22 b'ajS +_23 t'ejS +_24 tS'ObbiS +_25 p'O~tSiS +_26 tS#'ObbiS +_27 S'ataS +_28 'at.#aS +_29 'untriS + +_30 t'iriS +_31 'ektriS +_32 b'OtriS +_33 t'etriS +_34 tSowtriS +_35 pO~jtriS +_36 tS#'OtriS +_37 S'a~itriS +_38 'at.riS +_39 'unOtSOlliS + +_40 tS'OlliS +_41 'ektSOlliS +_42 b'ialliS +_43 t'etalliS +_44 tS'oalliS +_45 p'O~jtalliS +_46 tS'etSOlliS +_47 S'atSOllis +_48 'atSOlliS +_49 'unOpO~tSaS + +// numbers above 50 need to be corrected +_50 p'O~tSaS +_5X p'O~tSaS +_59 'unOsat. + +_60 s'at. +_6X s'at. +_69 'unOS'OttOr + +_70 S'OttOr +_7X S'OttOr +_79 'unOaSi + +_80 'aSi +_8X 'aSi +_89 'unOnObbOj + +_90 n'ObbOj +_9X n'ObbOj + +_0C S'o +_0M1 h'ajar +_0M2 l'ak# +_0M3 k'ot.i +_0M4 'Orbud +_dpt dOsomik + + +// Single consonants +ক kO +খ k#O +গ gO +ঘ g#O +ঙ 'uNO +চ tSO +ছ tShO // [h] to distinguish from [tS] +জ JO +ঝ J#O +ঞ 'iNO +ট t.O +ঠ t.#O +ড d.O +ঢ d.#O +ণ m'odd#ennO +ত tO +থ t#O +দ dO +ধ d#O +ন d'ontennO +প pO +ফ p#O +ব bO +ভ b#O +ম mO +য় Oj +য ontostedZ'O +র rO +ঢ় hrO +ল lO +শ taleboS:O +ষ mud#en:oS:O +স d'onteS:O +হ hO +ৎ kh'Ond.otO + +// full vowels +অ SOro'O +আ SOro'a +ই hrOS:o'i +ঈ dirg#o'i +উ hrOS:o'u +ঊ dirg#o'u +ঋ ri +এ e +ঐ oj +ও o +ঔ ow + +// combining vowel signs +া 'akar +ি r'oS:ikar +ী d'irg#ikar +ূ r'oS:ukar +ু d'irg#ukar +ৃ r'ikar +ে 'ekar +ৈ 'ojkar +ো 'okar +ৌ 'owkar + +// signs +্ h'OSonto +ং 'OnuSSOr +ঃ b'iSOrgo +ঁ tS'Ondrobindu +় b'indu + + +// Punctuation +। dVn.d.V + + +// Pronouns +আমি $u // main: I +আমায় $u +আমার $u + +আমরা $u // we +আমাদের $u + +আপনি $u // you(formal) +আপনাকে $u +আপনার $u + +তুমি $u // you (informal) +তোমায় $u +তোমার $u +তোমাদের $u + +তুই $u // you (informal) +তোকে $u +তোর $u + +এ $u // he/she/it +আপনি $u +এটার $u +এর $u + +ইনি $u // they +এনাকে $u +এনার $u + +ও $u // he/she/it +সে $u +ওর $u +তার $u + +ওরা $u // they +তারা $u +ওদের $u // unheṃ: them +তাদের $u + +এই $u // e:I this/it +এটা $u // e:ta: this/it +এটার $u // e:ta:'r this/it +এর $u // e:r this/it + +ওটা $u // o:ta: that +ওটাকে $u // o:ta:ke: to that +ওটার $u // o:ta:'r of that + +ওগুলো $u // o:gu:lo: those +ওগুলোকে $u // o:gu:lo:ke: to those +ওগুলোর $u // o:gu:lo:'r of those + + + +// Prepositions/Postpositions +মধ্যে $u // moddhe in +উপর $u // upor on, above +নীচে $u // niche below + +পূর্ব্বে $u // purbe before, prior +পর্য্যন্ত $u // parjonto till +অব্দি $u // abdi till +বিনা $u // bina without + + + +// Questions +কেন $u $pause // kano why interrogative particle +কি $u $pause // ki what +কোথায় $u $pause // kothaay where +কখন $u $pause // kakhon when +কে $u $pause // ke who + +// Conjunctions + +এবং $u $pause // ebong: and +আর $u $pause // aar: and +অথবা $u $pause // athoba: or +কিন্তু $u $pause // kintu: but +যদি $pause // jodi: if +তবু $pause // tobu: still, yet +তবে $pause // tabe: if...then +অথচ $u // athacho: yet + + +// Verbs + +হয় $u + + +ছিল $u // chilo: past aux +ছিলেন $u // chilen + + +করছি $u // korchi: continuous +করছিলাম $u // korchilam: past indefinite +করেছি $u // korechi: past + + +// Exceptions diff --git a/dictsource/bn_rules b/dictsource/bn_rules new file mode 100755 index 00000000..bd8dd554 --- /dev/null +++ b/dictsource/bn_rules @@ -0,0 +1,402 @@ + +// This file is UTF8 encoded + +// letter groups: +// A vowel letters and vowel signs +// B vowel signs and virama ् +// C consonants +// Y vowel letters and vowel signs + + + +.replace + ০ 0 + ১ 1 + ২ 2 + ৩ 3 + ৪ 4 + ৫ 5 + ৬ 6 + ৭ 7 + ৮ 8 + ৯ 9 + + +// Vowels + + +.group অ + অ V + অঁ O~ + + +.group আ + আ a + আঁ a~ + +.group ই + ই i + ইঁ i~ + + +.group ঈ + ঈ i + ঈঁ i~ + + +.group উ + উ u + উঁ u~ + + +.group ঊ + ঊ u + ঊঁ u~ + +.group ঋ + ঋ ri + ঋঁ ri~ + +.group ঌ + ঌ l- + + +.group এ + এ & + এঁ &~ + + +.group ঐ + ঐ oj + ঐঁ o~j + + +.group এ + এ e + এঁ e~ + + +.group ও + ও o + ওঁ o~ + + +.group ঔ + ঔ ow + ঔঁ o~w + +.group ও //?? + ও o: + + + + +// Vowel Signs + +.group া + া a + াঁ a~ + +.group ি + ি i + িঁ i~ + +.group ী + ী i + ীঁ i~ + +.group ূ + ূ u + ূঁ u~ + +.group ু + ু u + ুঁ u~ + +.group ৃ + ৃ ri + ৃঁ ri~ + + +.group ে + ে e + েঁ e~ + েউ ew + + +.group ৈ + ৈ oj + ৈঁ o~j + +.group ো + ো o + োঁ o~ + +.group ৌ + ৌ ow + ৌঁ o~w + + + + +// Consonants + +.group ক + ক kV + ক (B k + ক (_ k + + +.group খ + খ k#V + খ (B k# + খ (_ k# + + +.group গ + গ gV + গ (B g + গ (_ g + + +.group ঘ + ঘ g#V + ঘ (B g# + ঘ (_ g# + + +.group ঙ + ঙ NV + ঙ্ (B N + ঙ্ (_ N + + +.group চ + চ tSV + চ (B tS + চ (_ tS + + +.group ছ + ছ tS#V + ছ (B tS# + ছ (_ tS# + + +.group জ + জ JV + জ (B J + জ (_ J + + জ্ব JV + জ্ব (B J + জ্ঞ ggo~ + জ্ঞ (B gg + + +.group ঝ + ঝ J#V + ঝ (B J# + ঝ (_ J# + + +.group ঞ + ঞ nV + ঞ্ (B n + ঞ্ (_ n + + +.group ট + ট t.V + ট (B t. + ট (_ t. + + +.group ঠ + ঠ t.#V + ঠ (B t.# + ঠ (_ t.# + + +.group ড + ড d.V + ড (B d. + ড (_ d. + + ড় r.V // nukta + ড় (B r. + +.group ঢ + ঢ d.#V + ঢ (B d.# + ঢ (_ d.# + + +.group ণ + ণ nV // should be [n.] if adjacent to t. or d. ? + ণ (B n + ণ (_ n + + + +.group ত + ত tV + ত (B t + ত (_ t + + +.group থ + থ t#V + থ (B t# + থ (_ t# + + +.group দ + দ dV + দ (B d + দ (_ d + + +.group ধ + ধ d#V + ধ (B d# + ধ (_ d# + + +.group ন + ন nV + ন (B n + ন (_ n + + +.group প + প pV + প (B p + প (_ p + + +.group ফ + ফ fV // or [p#] ? + ফ (B f + ফ (_ f + + +.group ব + ব bV + ব (B b + ব (_ b + + +.group ভ + ভ b#V + ভ (B b# + ভ (_ b# + + +.group ম + ম mV + ম (B m + ম (_ m + + +.group য় + য় jV + য় (B j + য় (_ j + + +.group য + য dZV + য (B dZ + য (_ dZ + + য় jV // nukta + য় (B j + @) য় (_ j + + +.group র + র rV + র (B r + র (_ r + ্) র (_ rV + + +.group ল + ল lV + ল (B l + ল (_ l + + + +.group শ + শ SV // or [s] ? + শ (B S + শ (_ S + + + শ (্ল s + + +.group ষ + ষ SV + ষ (B S + ষ (_ S + + +.group স + স SV // or [s] ?? + স (B S + + স (্থ s + স (্ত s + + _) স্ব SV // shb + _) স্ব (B S + + +.group হ + হ hV + হ (B h + হ (_ h + + +.group হ্ব + হ্ব vV + হ্ব (B v + হ্ব (_ v + + +.group ৎ + ৎ t + + +.group ড় + ড় r.V + ড় (B r. + +.group ঢ় + ঢ় r.V + ঢ় (B r. + + + +.group ঁ + ঁ O~ // candrabindu, nasalize the previous vowel + +.group ং + ং N // anusvara/onushshor + +.group ঃ // visarga/bishorgo + ঃ // doubles the following consonant + ঃ (_ H + +.group ্ // virama/hoshonto + ্ + +.group ় + ় // nukta, modifies a consonant + + + + diff --git a/dictsource/dict_phonemes b/dictsource/dict_phonemes index aa23f7d3..a8676a90 100644 --- a/dictsource/dict_phonemes +++ b/dictsource/dict_phonemes @@ -68,18 +68,16 @@ s; t t; tS ts v x z Z z; -Dictionary bn_dict 2013-03-09 +Dictionary bn_dict 2013-03-22 -@ a a: aI a~ e E e: -E: E~ i I i: i~ o O -o: O: O~ o~ r- u U u: -u~ V +& a a~ e e~ i i~ l- +o O o: O~ o~ u u~ V -#X1 #X2 : b b# c c# d -d# d. d.# g g# h H j -J J# k k# l m n N -n. n^ p p# r r. s S -s. t t# t. t.# v w z +: b b# d d# d. d.# dZ +f g g# h H j J J# +k k# l m n N n. p +p# r r. s S t t# t. +t.# tS tS# v w ~ Dictionary bo_dict 2013-03-09 @@ -185,7 +183,7 @@ p Q r R s s; t T ts v x z -Dictionary en_dict 2013-03-20 +Dictionary en_dict 2013-03-22 0 0# 3 3: @ @- @2 @5 @L a a# A: A@ aa aI aI3 @@ -333,7 +331,7 @@ m n N p r s S t tS v z Z -Dictionary hu_dict 2013-03-21 +Dictionary hu_dict 2013-03-22 a A a: e E e: i i: o o: u u: Y y y: Y: diff --git a/dictsource/en_list b/dictsource/en_list index c3f21695..b6927dbc 100644 --- a/dictsource/en_list +++ b/dictsource/en_list @@ -3032,6 +3032,7 @@ Altrincham O:ltrIN@m Anglesey aNg@Lsi Argyle A@g'aIl Argyll A@g;aIl +Armagh A@m'A: Bacup beIk@p Berwick bErIk Betws bEtUs diff --git a/dictsource/en_rules b/dictsource/en_rules index ae1aae23..ec9a1374 100644 --- a/dictsource/en_rules +++ b/dictsource/en_rules @@ -5252,7 +5252,7 @@ te (rrest t2@ r) tga (g gI @) t (ia S - s) t (l ? + s) t (l to (morr t@ _) to (nn tV t (ooth t2 diff --git a/dictsource/hu_rules b/dictsource/hu_rules index 299801b1..86932af1 100644 --- a/dictsource/hu_rules +++ b/dictsource/hu_rules @@ -955,7 +955,6 @@ bagate) ll (iz l szí) n (ját n szí) n (józan n nyj n^n^ - _) nem (- nEm // has $combine attribute in hu_list, combine with the next word me) nny (ország n^ pihe) nj (_S2 n^ @@ -1038,6 +1037,9 @@ boszorká) ny (jelet n^ legé) ny (jár n^ szé) n (jelek n teljesítmé) ny (j n^ + nem-lts n'Em||_!'Ellt,e:,ES //without this rule Espeak spokening the nem LTS text with one word, because general in hu_list have a $combine attribute the nem word. + + n'Em _!'Ellt,e:,ES .group o o o @@ -1928,6 +1930,7 @@ szögle) t (szob t _robo) t (szoftve t diva) t (cirk t álla) t (cirk t + szen) t (szob t .group tj C) tj c @@ -2515,3 +2518,4 @@ csatlako) z (tok s ç tS ñ n^ ø Y + diff --git a/espeak-data/voices/asia/pa b/espeak-data/voices/asia/pa index 2ce846b7..4cd585d1 100755 --- a/espeak-data/voices/asia/pa +++ b/espeak-data/voices/asia/pa @@ -1,2 +1,2 @@ -name punjabi-test +name punjabi language pa diff --git a/espeak-data/voices/europe/fr-be b/espeak-data/voices/europe/fr-be index c2bb5357..4a741820 100755 --- a/espeak-data/voices/europe/fr-be +++ b/espeak-data/voices/europe/fr-be @@ -1,4 +1,4 @@ -name french (Belgium) +name french-Belgium language fr-be language fr 8 gender male diff --git a/espeak-data/voices/europe/nl b/espeak-data/voices/europe/nl index 6a8d5efd..beef33fa 100755 --- a/espeak-data/voices/europe/nl +++ b/espeak-data/voices/europe/nl @@ -1,3 +1,3 @@ language nl -name dutch-test +name dutch gender male diff --git a/phsource/compile_report b/phsource/compile_report index a2e4e298..9c2abf10 100644 --- a/phsource/compile_report +++ b/phsource/compile_report @@ -24,7 +24,7 @@ consonants 11 119 fr-ca 11 146 nl 35 130 hi 57 149 - bn 5 149 + bn 12 152 ne 18 157 ur 6 149 pa 15 151 @@ -1554,6 +1554,7 @@ vowel/@_2 [@:] vi [V] sq [@/] sq [V] tt +vowel/&_2 [&] bn vowel/@_3 [@#] en [@] en-sc [I] en-sc @@ -1748,14 +1749,13 @@ vowel/aa_8 [0] en-us vowel/aa_9 [a] fi [a] et [a:] hi - [a:] bn + [a] bn [a] ne [a] pa [a] ak [a] mt [A] kk vowel/@_bck [@] hi - [@] bn [V] ne [@/] ne [@] ur @@ -1772,6 +1772,7 @@ vowel/e [e] base [e:] af [e:] cy [e:] ga + [e] bn [e] ne [e] ta [e:] ta @@ -1998,6 +1999,7 @@ vowel/i#_5 [y] pt-pt [i/] pt-pt [y] ro vowel/i_6 [i] hi + [i] bn [i] ta [i] kn [i] ml @@ -2102,7 +2104,6 @@ vowel/@_low [@] en-rp [@] hi [V] hi [@2] hi - [@] bn [V] ne [@/] ne [@] ur @@ -2125,6 +2126,7 @@ vowel/o [o] base2 [o:] et [o] fr [o] hi + [o] bn [o:] pa [o] ta [o:] ta @@ -2152,7 +2154,6 @@ vowel/o [o] base2 [o] kl vowel/o_2 [o:] cy [o:] hi - [o:] bn [o:] hu [o:] la [o:] no @@ -2257,7 +2258,8 @@ vowel/oo_4 [O] base2 [O] pa [O] it [O] an -vowel/oo_5 [O] pl +vowel/oo_5 [O] bn + [O] pl [O] is [O] sq vowel/oo_en [O] en @@ -2286,6 +2288,7 @@ vowel/u [u] base [u1] ga [u:] de [u] eo + [u] bn [u] ml [u:] ml [U] lt diff --git a/phsource/ph_bengali b/phsource/ph_bengali new file mode 100755 index 00000000..efb46a97 --- /dev/null +++ b/phsource/ph_bengali @@ -0,0 +1,90 @@ + +//==================================================== +// Bengali, inherits from Hindi +//==================================================== + + +phoneme V // inherent vowel, can be [O] or [o] + vowel flag1 starttype #o endtype #o + length 200 + + IF thisPh(isFirstVowel) THEN + IF nextVowel(i) OR nextVowel(u) THEN + ChangePhoneme(o) + ENDIF + + IF prevPhW(r) THEN + ChangePhoneme(o) + ENDIF + ENDIF + + ChangePhoneme(O) +endphoneme + + +phoneme a + vowel starttype #a endtype #a + length 225 + FMT(vowel/aa_9) +endphoneme + + +phoneme i + vowel starttype #i endtype #i + length 200 + FMT(vowel/i_6) +endphoneme + + +phoneme u + vowel starttype #u endtype #u + length 200 + FMT(vowel/u) +endphoneme + + +phoneme e + vowel starttype #e endtype #e + length 200 + FMT(vowel/e) +endphoneme + + +phoneme & + vowel starttype #a endtype #a + length 200 + FMT(vowel/&_2) +endphoneme + + +phoneme o + vowel starttype #o endtype #o + length 200 + IF nextPhW(w) THEN + length 160 + ENDIF + FMT(vowel/o) +endphoneme + + +phoneme O + vowel starttype #o endtype #o + length 200 + FMT(vowel/oo_5) +endphoneme + + +phoneme tS + import_phoneme base/tS +endphoneme + + +phoneme tS# + import_phoneme base/tS +endphoneme + + +phoneme ~ + virtual +endphoneme + diff --git a/phsource/ph_punjabi b/phsource/ph_punjabi new file mode 100644 index 00000000..26ceaf84 --- /dev/null +++ b/phsource/ph_punjabi @@ -0,0 +1,96 @@ + +phoneme + // high tone, use after a vowel + stress + Tone (5, 30, envelope/p_512, NULL) +endphoneme + +phoneme @ + vowel starttype #@ endtype #@ + length 130 + IF nextPh(H) THEN + FMT(vowel/@_low) + ENDIF + FMT(vowel/@_bck) +endphoneme + +phoneme V + vowel starttype #@ endtype #@ + length 130 + ChangeIfNotStressed(@) + IF nextPh(H) THEN + FMT(vowel/@_low) + ENDIF + FMT(vowel/V_3) +endphoneme + + +phoneme i + vowel long starttype #i endtype #i + length 220 + IfNextVowelAppend(;) + FMT(vowel/i_fnt) +endphoneme + +phoneme I + vowel starttype #i endtype #i + length 150 + IfNextVowelAppend(;) + FMT(vowel/ii_3) +endphoneme + +phoneme e + vowel long starttype #e endtype #e + length 220 + FMT(vowel/e_2) +endphoneme + +phoneme E + vowel long starttype #e endtype #e + length 200 + FMT(vowel/ee_2) +endphoneme + +phoneme a + vowel long starttype #a endtype #a + length 220 + FMT(vowel/aa_9) +endphoneme + +phoneme O + vowel long starttype #o endtype #o + length 200 + FMT(vowel/oo_4) +endphoneme + +phoneme o: + vowel long starttype #o endtype #o + length 220 + FMT(vowel/o) +endphoneme + + +phoneme U + vowel starttype #u endtype #u + length 150 + FMT(vowel/uu_bck) +endphoneme + + +phoneme u + vowel long starttype #u endtype #u + length 220 + FMT(vowel/u_bck) +endphoneme + + +phoneme eI // for English words + import_phoneme en/eI +endphoneme + + +// Consonants + +phoneme v // Try English [v] + import_phoneme base/v +endphoneme + diff --git a/phsource/vowel/oo_5 b/phsource/vowel/oo_5 index ad18bde5..98b4651a 100644 Binary files a/phsource/vowel/oo_5 and b/phsource/vowel/oo_5 differ diff --git a/src/espeak.cpp b/src/espeak.cpp index f9669a9e..5fd81d45 100644 --- a/src/espeak.cpp +++ b/src/espeak.cpp @@ -128,13 +128,16 @@ void DisplayVoices(FILE *f_out, char *language) const char *p; int len; int count; + int c; + int j; const espeak_VOICE *v; const char *lang_name; char age_buf[12]; + char buf[80]; const espeak_VOICE **voices; espeak_VOICE voice_select; - static char genders[4] = {' ','M','F',' '}; + static char genders[4] = {'-','M','F','-'}; if((language != NULL) && (language[0] != 0)) { @@ -150,7 +153,7 @@ void DisplayVoices(FILE *f_out, char *language) voices = espeak_ListVoices(NULL); } - fprintf(f_out,"Pty Language Age/Gender VoiceName File Other Langs\n"); + fprintf(f_out,"Pty Language Age/Gender VoiceName File Other Languages\n"); for(ix=0; (v = voices[ix]) != NULL; ix++) { @@ -168,8 +171,16 @@ void DisplayVoices(FILE *f_out, char *language) if(count==0) { - fprintf(f_out,"%2d %-12s%s%c %-17s %-11s ", - p[0],lang_name,age_buf,genders[v->gender],v->name,v->identifier); + for(j=0; j < sizeof(buf); j++) + { + // replace spaces in the name + if((c = v->name[j]) == ' ') + c = '_'; + if((buf[j] = c) == 0) + break; + } + fprintf(f_out,"%2d %-12s%s%c %-20s %-13s ", + p[0],lang_name,age_buf,genders[v->gender],buf,v->identifier); } else { diff --git a/src/speak.cpp b/src/speak.cpp index 559d7d18..e1fa4b55 100644 --- a/src/speak.cpp +++ b/src/speak.cpp @@ -160,13 +160,16 @@ void DisplayVoices(FILE *f_out, char *language) const char *p; int len; int count; + int c; + int j; const espeak_VOICE *v; const char *lang_name; char age_buf[12]; + char buf[80]; const espeak_VOICE **voices; espeak_VOICE voice_select; - static char genders[4] = {' ','M','F',' '}; + static char genders[4] = {'-','M','F','-'}; if((language != NULL) && (language[0] != 0)) { @@ -182,7 +185,7 @@ void DisplayVoices(FILE *f_out, char *language) voices = espeak_ListVoices(NULL); } - fprintf(f_out,"Pty Language Age/Gender VoiceName File Other Langs\n"); + fprintf(f_out,"Pty Language Age/Gender VoiceName File Other Languages\n"); for(ix=0; (v = voices[ix]) != NULL; ix++) { @@ -200,8 +203,16 @@ void DisplayVoices(FILE *f_out, char *language) if(count==0) { - fprintf(f_out,"%2d %-12s%s%c %-17s %-11s ", - p[0],lang_name,age_buf,genders[v->gender],v->name,v->identifier); + for(j=0; j < sizeof(buf); j++) + { + // replace spaces in the name + if((c = v->name[j]) == ' ') + c = '_'; + if((buf[j] = c) == 0) + break; + } + fprintf(f_out,"%2d %-12s%s%c %-20s %-13s ", + p[0],lang_name,age_buf,genders[v->gender],buf,v->identifier); } else { diff --git a/src/synthdata.cpp b/src/synthdata.cpp index 7eda9693..f9c2c8f7 100644 --- a/src/synthdata.cpp +++ b/src/synthdata.cpp @@ -35,7 +35,7 @@ #include "translate.h" #include "wave.h" -const char *version_string = "1.47.03a 21.Mar.13"; +const char *version_string = "1.47.03b 22.Mar.13"; const int version_phdata = 0x014701; int option_device_number = -1; diff --git a/src/tr_languages.cpp b/src/tr_languages.cpp index aeea1a93..fe5b5867 100644 --- a/src/tr_languages.cpp +++ b/src/tr_languages.cpp @@ -539,9 +539,10 @@ Translator *SelectTranslator(const char *name) tr->langopts.stress_flags = S_MID_DIM | S_FINAL_DIM; // use 'diminished' for unstressed final syllable tr->letter_bits_offset = OFFSET_BENGALI; SetIndicLetters(tr); // call this after setting OFFSET_BENGALI + SetLetterBitsRange(tr,LETTERGP_B,0x01,0x01); // candranindu SetLetterBitsRange(tr,LETTERGP_F,0x3e,0x4c); // vowel signs, but not virama - tr->langopts.numbers = 0x1; + tr->langopts.numbers = NUM_SWAP_TENS; tr->langopts.break_numbers = 0x24924aa8; // for languages which have numbers for 100,000 and 100,00,000, eg Hindi } break; diff --git a/src/voices.cpp b/src/voices.cpp index 8fa66944..be7da4f4 100644 --- a/src/voices.cpp +++ b/src/voices.cpp @@ -603,7 +603,7 @@ voice_t *LoadVoice(const char *vname, int control) static const char *voices_asia = "fa fa-pin hi hy hy-west id ka kn ku ml ne pa ta tr vi vi-hue zh zh-yue "; static const char *voices_europe = - "an bg bs ca cs cy da el es et fi fr-be ga hr hu is it lt lv mk nl no pl pt-pt ro ru sk sq sr sv "; + "an bg bs ca cs cy da de el en en-us es et fi fr fr-be ga hr hu is it lt lv mk nl no pl pt-pt ro ru sk sq sr sv "; strncpy0(voicename, vname, sizeof(voicename)); @@ -1227,10 +1227,10 @@ static int ScoreVoice(espeak_VOICE *voice_spec, const char *spec_language, int s p = voice->languages; // list of languages+dialects for which this voice is suitable - if(strcmp(spec_language,"mbrola")==0) + if(spec_n_parts < 0) { - // only list mbrola voices - if(memcmp(voice->identifier,"mb/",3) == 0) + // match on the subdirectory + if(memcmp(voice->identifier, spec_language, spec_lang_len) == 0) return(100); return(0); } @@ -1363,6 +1363,7 @@ static int SetVoiceScores(espeak_VOICE *voice_select, espeak_VOICE **voices, int int lang_len=0; espeak_VOICE *vp; char language[80]; + char buf[sizeof(path_home)+80]; // count number of parts in the specified language if((voice_select->languages != NULL) && (voice_select->languages[0] != 0)) @@ -1375,6 +1376,26 @@ static int SetVoiceScores(espeak_VOICE *voice_select, espeak_VOICE **voices, int n_parts++; } } + + if((n_parts == 1) && (control & 1)) + { + if(strcmp(language, "mbrola") == 0) + { + language[2] = 0; // truncate to "mb" + lang_len = 2; + } + + sprintf(buf, "%s/voices/%s", path_home, language); + if(GetFileLength(buf) == -2) + { + // A subdirectory name has been specified. List all the voices in that subdirectory + language[lang_len++] = PATHSEP; + language[lang_len] = 0; + n_parts = -1; + } + + } + // select those voices which match the specified language nv = 0; for(ix=0; ixlanguages[0] != 0) && (strcmp(&v->languages[1],"variant") != 0) && (memcmp(v->identifier,"mb/",3) != 0)) + if((v->languages[0] != 0) && (strcmp(&v->languages[1],"variant") != 0) + && (memcmp(v->identifier,"mb/",3) != 0) && (memcmp(v->identifier,"test/",5) != 0)) { voices[j++] = v; }