diff --git a/dictsource/dict_phonemes b/dictsource/dict_phonemes index 6b7e79cb..ab20dae4 100644 --- a/dictsource/dict_phonemes +++ b/dictsource/dict_phonemes @@ -89,12 +89,12 @@ r R s t ts v z Z Dictionary es_dict @- a aI e E eI eU i -o oI u +o O oI u -* ** b B d D f g -j J J^ k l l^ m n -n^ p Q r R s t T -tS v w x +* ** : b B d D f +g j J J^ k l l^ m +n n^ p Q r R s t +T tS v w x Dictionary fi_dict @@ -341,9 +341,9 @@ i i. i[ iou o o- ou u uai y (u) : f h j k kh l -m n N p ph r s S# -s. S; t th ts ts. ts. tS; -tS; tsh v w x z z. +m n N p ph r s s. +S; t th ts ts. ts. tS; tS; +tsh v w x z z. Dictionary jbo_dict diff --git a/dictsource/es_list b/dictsource/es_list index 80b5f600..eb8086d4 100644 --- a/dictsource/es_list +++ b/dictsource/es_list @@ -4,70 +4,70 @@ // letters _cap m'aJ^us -_?? s'imbolo +_?? s'imbOlo _#32 Esp'aTjo // names of symbols _. punto -_, koma -_; p,untoik'oma -_: d,osp'untos -_! TE*R'aRaDmi**aTj'on -_? TE*R'aRintE*R,oQaTj'on -_¡ aB@-*'iRaDmi**aTj'on -_¿ aB@-*'iRintE*R,oQaTj'on +_, kOma +_; p,untOik'Oma +_: d,Osp'untOs +_! TE*R'aRaDmi**aTj'On +_? TE*R'aRintE*R,OQaTj'On +_¡ aB@-*'iRaDmi**aTj'On +_¿ aB@-*'iRintE*R,OQaTj'On _= iQw'al -_< mEn'oRke -_> maJ^'oRke -_' apost@-*'ofo -_" kom'iJ^as -_+ s'iQnodesum'aR -_$ dolar -_# almoaD'il^a +_< mEn'ORke +_> maJ^'ORke +_' apOst@-*'Ofo +_" kOm'iJ^as +_+ s'iQnOdesum'aR +_$ dOlar +_# almOaD'il^a _* astE*'isko -_- gJ^on +_- gJ^On __ suB@-*aJ^'aDo _/ ba*Ra _\ b'a*RaimbERt'iDa -_` aT'Entog@-*'aBe +_` aT'EntOg@-*'aBe _( ,aB@-*epa**'EntEsis _) Tj,E*Rapa**'EntEsis -_[ ,aB@-*ekoRtS'Ete -_] Tj,E*RakoRtS'Ete +_[ ,aB@-*ekORtS'Ete +_] Tj,E*RakORtS'Ete _{ ,aB@-*eJ^'aBe _} Tj,E*RaJ^'aBe -_« kom'iJ^as||iTkJ^'ERDas -_» kom'iJ^as||dE**'EtSas +_« kOm'iJ^as||iTkJ^'ERDas +_» kOm'iJ^as||dE**'EtSas ^ TiRkumfl'Exo € eU*o -% porTj'Ento +% pOrTj'Ento & ampERs'ant -@ a*R'oBa +@ a*R'OBa / ba*Ra -© kopi*R'aIt +© kOpi*R'aIt £ liB@-*as ¶ p'a*Rafo -§ sEkTj'on +§ sEkTj'On // numbers _0 TE*o _1 'uno -_2 d'os +_2 d'Os _3 t@-*'es _4 kw'at@-*o _5 T'inko _6 s'eIs _7 sj'Ete -_8 'otSo +_8 'OtSo _9 nw'Eve _1X dj'ET -_11 'onTe -_12 d'oTe +_11 'OnTe +_12 d'OTe _13 t@-*'ETe -_14 kat'oRTe +_14 kat'ORTe _15 k'inTe _20 v'eInte _2X v'eInt @@ -76,23 +76,23 @@ _4X kwa*'Enta _5X Tinkw'Enta _6X sEs'Enta _7X sEt'Enta -_8X otS'Enta -_9X nov'Enta -_0C T'ientos +_8X OtS'Enta +_9X nOv'Enta +_0C T'ientOs _1C0 T'ien // exactly one hundred _1C T'iento -_5C kinj'Entos -_7C s,EtETj'Entos -_9C n,ovETj'Entos +_5C kinj'EntOs +_7C s,EtETj'EntOs +_9C n,OvETj'EntOs _0M1 m'il _1M1 m'il // no '1' before thousand -_0M2 mil^'ones -_1M2 'unmil^'on -_0M4 _bil^'ones -_1M4 'unbil^'on +_0M2 mil^'Ones +_1M2 'unmil^'On +_0M4 _bil^'Ones +_1M4 'unbil^'On _0and i -_dpt koma -//_roman Rom'ano +_dpt kOma +//_roman ROm'ano vi vi // not a Roman number diff --git a/dictsource/es_rules b/dictsource/es_rules index eb982ded..dca313bf 100644 --- a/dictsource/es_rules +++ b/dictsource/es_rules @@ -76,7 +76,7 @@ .group j - _) j (_ x'ota + _) j (_ x'Ota j x @@ -109,7 +109,8 @@ .group o _) o (_ o - o o + o O + o (_ o oy (K oI oy (_ 'oI @@ -117,6 +118,7 @@ .group p _) p (_ pe p p + p (t p: .group q @@ -164,14 +166,14 @@ .group w - _) w (_ ,uBe||d'oBle + _) w (_ ,uBe||d'OBle w w .group x _) x (_ Ekis x ks - A) x (A Qs +// A) x (A Qs // ?? x (_ =Qs @@ -194,22 +196,22 @@ á ''a é ''E í ''i - ó ''o + ó ''O ú ''u ü u ñ n^ _)ñ (_ En^e - $ d'olar + $ d'Olar + m'as _) ++ (_ masm'as \+\+\+) + // ignore + after the first 3 - # almoaD'il^a + # almOaD'il^a \#) # - __) - (_D m'Enos + __) - (_D m'EnOs A_) - (_D _ C_) - (_D _ --) - @@ -223,4 +225,4 @@ . (. _: \.) . - , (D koma + , (D kOma diff --git a/dictsource/fr_list b/dictsource/fr_list index 15caafe5..ea3aa859 100755 --- a/dictsource/fr_list +++ b/dictsource/fr_list @@ -5,7 +5,7 @@ // 2006-11-18 Gilles Casse // -// Updated 2008-02-08 Michel Such +// Updated 2008-02-10 Michel Such // // * Numbers, a few abbreviations and exceptions. // @@ -178,6 +178,7 @@ ac $abbrev adsl $abbrev alt $pause amd $abbrev +anpe $abbrev api $abbrev avh $abbrev cci $abbrev @@ -198,6 +199,7 @@ mme madam mr m@sjY nti $abbrev nvda $abbrev +ong $abbrev pci $abbrev pda $abbrev p.s postskRiptOm @@ -417,21 +419,39 @@ absent absA~ accident aksidA~ adéquat adekuat2 adéquate adekuat +airbus Erbys +anus anys +any Eni ardent aRdA~ +bissus bisys +bonus bonys bus bys +bus by $verb +campus kA~pys +casus kazys choeur k@r +cocus coky discident disidA~ +eye aj +eyes ajz fils fis imprudent E~pRydA~ juin ZyE~ +malus malys +many mEni mars maRs +minus minys occident OksidA~ orient ORjA~ pays pEi +phallus falys prudent pRydA~ secret sYkRE souris suri - +sus sys +sus sy $verb +to tu +vénus venys mens mA~z2 @@ -518,6 +538,7 @@ flirt fl@Rt // words from other languages about @bawt +acer asEr amazon amaz'On (audible manager) od'ibl||manadZ'@r be bi @@ -554,7 +575,6 @@ its its klaxon klaksOn leader li:d@R let lEt -link link liszt list lite lajt (mac os x) makoEsiks @@ -577,7 +597,6 @@ release rili:z schubert SubER screamer skri:m@r (search & destroy) s@:rS_||end_||dEsstrOj -shrink Sr'ink skype sk'ajp@- spybot spajbOt sun s@n diff --git a/dictsource/fr_rules b/dictsource/fr_rules index 64c168bc..e1f5a942 100755 --- a/dictsource/fr_rules +++ b/dictsource/fr_rules @@ -3,7 +3,7 @@ // 2006-11-18 Gilles Casse // -// Updated: 2008-02-08 Michel Such +// Updated: 2008-02-10 Michel Such // // * The rules are based on Cicero TTS. // @@ -151,6 +151,7 @@ em (me a // femme patiemment em (b A~ // décembre em (m A~ // emmancher + em (manu e // emmanuel em (p A~ en (_ A~n2 // en en (hA A~n // enharmonique @@ -425,12 +426,14 @@ _) h (are _! // hareng, haret _) h (arf _! // harfang _) h (argn _! // hargne _) h (ari _! // haricot haridelle +_) h (ark _! // harka _) h (arn _! // harnais _) h (arp _! // harpe _) h (as _! // hasard, hase _) h (âs _! // hâte _) h (au _! // haut _) h (av _! // havre + _) h (eau _! // heaume _) h (él _! // hélas, héler _) h (èl _! // hèlement @@ -445,6 +448,7 @@ _) h (ertz _! // hertz _) h (êtr _! // hêtre, hêtraie _) h (eula _! // heulandite _) h (eurt _! // heurter + _) h (iat _! // hiatal, hiatus _) h (ibo _! // hibou _) h (ic _! // hic @@ -455,6 +459,7 @@ _) h (igh _! // highlandais _) h (i-han _! // hi-han _) h (iss _! // hisser _) h (it _! // hit, hit-parad + _) h (ob _! // hobby, hobereau _) h (och _! // hocher _) h (ock _! // hockey @@ -476,6 +481,7 @@ _) h (ot _! // hot-dog, hotte _) h (ou _! // houle, housse _) h (u _! +_) h (uil // huile _) h (uiss // huissier _) h (uî // huître _) h (umain // humain @@ -511,6 +517,7 @@ _) h (umo // humour ing (_ iN // parking in (h in // inhumain inct (_ E~ // distinct + ink (_ ink // link, pink in (n i // innombrable in (C E~ // vingt // in (_ E~ // vin @@ -574,6 +581,7 @@ _) h (umo // humour o (che_ O // poche, cloche oe (ll wa // moelleux _) oe (C Y // oesophage + _ph) oe (t Y // phoetus oeu @ // soeur coeur oeufs @ // oeufs boeufs o (eC o // coefficient @@ -727,21 +735,35 @@ e) s (_h z2 xpan) s (A s // expansion - ibu) s (_ s + _u) s (_ s + Cu) s (_ + Abu) s (_ s + _Abu) s (_ mbu) s (_ s - - cu) s (_ s // focus phallus cumulus minus - iu) s (_ s + Acu) s (_ s + écu) s (_ + odu) s (_ s + gu) s (_ s + igu) s (_ // aigus + iu) s (_ s // radius + ïu) s (_ s // laïus + Culu) s (_ s // cumulus + plu) s (_ z2 // plus, surplus mu) s (_ s - nu) s (_ s - pu) s (_ s - llu) s (_ s - ulu) s (_ s + _mu) s (_ + ému) s (_ + opu) s (_ s // opus, octopus + Aru) s (_ s // virus + aru) s (_ // disparus + psu) s (_ s // lapsus atu) s (_ s // stratus cactus motus - ctu) s (_ s + ctu) s (_ s // cactus + etu) s (_ s + aitu) s (_ itu) s (_ s - otu) s (_ s + ltu) s (_ s // altus + otu) s (_ s // motus _tou) s (_C _tou) s (_ s @@ -817,8 +839,10 @@ C) te (_ t@- // patte u y // cruel nuage brut ui w^i + _b) usi iz // business, businessman c) ueill Wj // cueillir c) ueil (_ Wj // recueil + _c) ul (_ y g) ueill Wj // orgueilleux g) ueil (_ Wj // orgueil @@ -883,6 +907,7 @@ C) te (_ t@- // patte ym (p E~ // tympan y (nn i y (nA i + ys (_ is yx (_ iks yn E~ // laryngite diff --git a/dictsource/zh_rules b/dictsource/zh_rules index 41aecfa4..9a05e9ac 100644 --- a/dictsource/zh_rules +++ b/dictsource/zh_rules @@ -234,6 +234,7 @@ language). .group y y j //before a o e i y (u //NULL before u + y (uDn j yo (DngK yu y (K i // foreign words diff --git a/phsource/compile_report b/phsource/compile_report index a23564cf..6bc8bad6 100644 --- a/phsource/compile_report +++ b/phsource/compile_report @@ -41,7 +41,7 @@ is 32 124 vi 42 137 zhy 40 132 - zh 64 148 + zh 63 147 sw 14 108 th 50 142 id 14 120 @@ -597,15 +597,14 @@ ufric/sh_ [S] base [s#] pt_pt ufric/sh_pzd [S;] base [S;] ro - [S;] zh ufric/sh_pzd_ [S;] base [Z;] base -ufric/sh_rfx [s.] base - [s.] zh -ufric/sh_sr [S#] zh -ufric/sh_sr.wav [S] sr +ufric/sh_pzd2 [S] sr [Z] sr [dZ] sr + [S;] zh +ufric/sh_rfx [s.] base + [s.] zh ufric/s_pzd [s;] base [z;] base [s;] ro @@ -802,7 +801,7 @@ ustop/tsh_pzd [tS;] zh [ch] th ustop/tsh_pzd_unasp [tS;] zh [c] th -ustop/tsh_sr.wav [tS] sr +ustop/tsh_sr [tS] sr ustop/ts_pzd [tS;] base [ts;] base [ch] hi @@ -816,7 +815,7 @@ ustop/t_sr [d] sr [t] zh ustop/ts_rfx [ts.] zh ustop/ts_rfx_unasp [ts.] zh -ustop/ts_sr.wav [tS;] sr +ustop/ts_sr [tS;] sr [dZ;] sr ustop/ts_unasp [ts] zh ustop/t_unasp [t] th @@ -872,8 +871,8 @@ vdiph2/uu@ [U@] en [u@] vi [ua] th [u:a] th +vdiph2/y@ [y@] zh vdiph2/y#@ [Y@] af - [y@] zh vdiph2/yu [yU] nl [yu] zh vdiph2/y-y# [yY] fi @@ -1541,7 +1540,7 @@ vowel/oo [O:] en_sc [O@] en_wi [O] de [o] eo - [o] es + [O] es [o] el [O] sv [O] no diff --git a/phsource/ph_serbian b/phsource/ph_serbian index 424c664a..f4eed0fa 100644 --- a/phsource/ph_serbian +++ b/phsource/ph_serbian @@ -1,13 +1,3 @@ -// ufric/x_sr -// ufric/ch_sr -// ufric/sh_sr -// ustop/t_sr -// ustop/ts_sr -// ustop/tsh_sr -// r3/r_sr -// m/m_sr -// n/n_sr -// n^/nj_sr // This file inherits phonemes from ph_croatian // Only phonemes which differ from the inherited phonemes need @@ -97,10 +87,10 @@ phoneme dZ vcd pla afr sibilant vowelin f1=2 f2=2300 200 400 f3=100 80 vowelout f1=2 f2=2300 250 300 f3=100 80 brk - formants dzh/dzh+ufric/sh_sr.wav - before _ dzh/dzh+ufric/sh_sr.wav + formants dzh/dzh+ufric/sh_pzd2 + before _ dzh/dzh+ufric/sh_pzd2 after _ NULL - after @ dzh/dzh+ufric/sh_sr.wav + after @ dzh/dzh+ufric/sh_pzd2 lengthmod 5 switchvoicing tS endphoneme @@ -109,10 +99,10 @@ endphoneme phoneme dZ; vcd pla afr sibilant palatal vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 - formants dzh/dzh+ustop/ts_sr.wav - before _ dzh/dzh+ustop/ts_sr.wav + formants dzh/dzh+ustop/ts_sr + before _ dzh/dzh+ustop/ts_sr after _ NULL - after @ dzh/dzh+ustop/ts_sr.wav + after @ dzh/dzh+ustop/ts_sr lengthmod 5 switchvoicing tS; endphoneme @@ -122,8 +112,8 @@ phoneme tS vls pla afr sibilant vowelin f1=0 f2=2300 200 400 f3=-100 80 lengthmod 2 - wave ustop/tsh_sr.wav%50 - before _ ustop/tsh_sr.wav%50 + wave ustop/tsh_sr%50 + before _ ustop/tsh_sr%50 switchvoicing dZ endphoneme @@ -132,8 +122,8 @@ phoneme tS; vls pal afr sibilant palatal vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 lengthmod 2 - wave ustop/ts_sr.wav - before _ ustop/ts_sr.wav + wave ustop/ts_sr + before _ ustop/ts_sr switchvoicing dZ; endphoneme @@ -144,8 +134,8 @@ phoneme Z vcd pla frc sibilant vowelin f1=0 f2=2000 0 300 f3=-200 80 vowelout f1=2 f2=2000 0 300 f3=-200 80 brk - formants voc/zh+ufric/sh_sr.wav%60 - before _ voc/zh+ufric/sh_sr.wav%50 + formants voc/zh+ufric/sh_pzd2%60 + before _ voc/zh+ufric/sh_pzd2%50 lengthmod 6 switchvoicing S endphoneme @@ -157,8 +147,8 @@ phoneme S vowelout f1=0 f2=2100 100 300 f3=-100 80 length 100 lengthmod 3 - wave ufric/sh_sr.wav%70 - before _ ufric/sh_sr.wav%60 + wave ufric/sh_pzd2%70 + before _ ufric/sh_pzd2%60 switchvoicing Z endphoneme diff --git a/phsource/ph_spanish b/phsource/ph_spanish index 0cdd313c..ad97b82d 100644 --- a/phsource/ph_spanish +++ b/phsource/ph_spanish @@ -9,7 +9,7 @@ phoneme E formants vowel/e_mid endphoneme -phoneme o +phoneme O vowel starttype (o) endtype (o) length 170 formants vowel/oo diff --git a/phsource/ph_zh b/phsource/ph_zh index 87f11fba..9edba062 100644 --- a/phsource/ph_zh +++ b/phsource/ph_zh @@ -147,21 +147,14 @@ phoneme tS;h vls pal afr sibilant palatal vowelin f1=0 f2=2700 400 600 f3=300 80 lengthmod 2 - wave ustop/tsh_pzd + wave ustop/tsh_pzd%80 endphoneme phoneme S; vls pla frc sibilant vowelin f1=0 f2=2700 400 600 f3=300 80 lengthmod 2 - wave ufric/sh_pzd -endphoneme - -phoneme S# - vls pla frc sibilant - vowelin f1=0 f2=2700 400 600 f3=300 80 - lengthmod 2 - wave ufric/sh_sr%20 + wave ufric/sh_pzd2%20 endphoneme phoneme s. @@ -170,7 +163,7 @@ phoneme s. vowelout f1=0 f2=1800 -100 300 f3=-300 80 length 100 lengthmod 3 - wave ufric/sh_rfx%60 // quieter + wave ufric/sh_rfx%50 // quieter before _ ufric/sh_rfx%50 endphoneme @@ -429,5 +422,5 @@ endphoneme phoneme y@ vowel starttype (i) endtype (@) length 250 - formants vdiph2/y#@ + formants vdiph2/y@ endphoneme \ No newline at end of file diff --git a/phsource/phonemes b/phsource/phonemes index 957f42bd..0555f27b 100644 --- a/phsource/phonemes +++ b/phsource/phonemes @@ -603,8 +603,8 @@ endphoneme phoneme ** // TEST flap liquid alv vowelout f1=3 f2=1600 -300 300 f3=-300 80 rms=35 len=15 - vowelin f1=2 f2=1600 -300 300 f3=-300 80 - formants r3/@tap+r3/rx%50 + vowelin f1=2 f2=1600 -300 300 f3=-100 80 len=20 + formants r3/@tap vowelin f1=3 f2=1600 -300 300 f3=-300 80 before (i) r3/@tap_i+r3/rx before (e) r3/@tap_i+r3/rx diff --git a/phsource/r3/@tap b/phsource/r3/@tap index 24ad2967..8c844f59 100644 Binary files a/phsource/r3/@tap and b/phsource/r3/@tap differ diff --git a/phsource/ufric/sh_sr.wav b/phsource/ufric/sh_pzd2.wav similarity index 100% rename from phsource/ufric/sh_sr.wav rename to phsource/ufric/sh_pzd2.wav diff --git a/phsource/ustop/tsh_pzd.wav b/phsource/ustop/tsh_pzd.wav index c7390a2b..a51264f3 100644 Binary files a/phsource/ustop/tsh_pzd.wav and b/phsource/ustop/tsh_pzd.wav differ diff --git a/phsource/vdiph2/vowelchart.png b/phsource/vdiph2/vowelchart.png index 3bdf2945..7d407b12 100644 Binary files a/phsource/vdiph2/vowelchart.png and b/phsource/vdiph2/vowelchart.png differ diff --git a/phsource/vdiph2/y@ b/phsource/vdiph2/y@ new file mode 100644 index 00000000..aaa24210 Binary files /dev/null and b/phsource/vdiph2/y@ differ diff --git a/phsource/vowel/o b/phsource/vowel/o index 5bfed0a2..8e185225 100644 Binary files a/phsource/vowel/o and b/phsource/vowel/o differ diff --git a/phsource/vwl_zh/a_n b/phsource/vwl_zh/a_n index a7fff123..f052f66c 100644 Binary files a/phsource/vwl_zh/a_n and b/phsource/vwl_zh/a_n differ diff --git a/src/intonation.cpp b/src/intonation.cpp index 9a5dd5f0..c8525b9b 100755 --- a/src/intonation.cpp +++ b/src/intonation.cpp @@ -275,12 +275,11 @@ static TONE_HEAD tone_head_table[N_TONE_HEAD_TABLE] = { }; static TONE_NUCLEUS tone_nucleus_table[N_TONE_NUCLEUS_TABLE] = { - {PITCHfall, 30, 5, PITCHfall, 30, 8, NULL, 12, 7, 0}, // 0 statement + {PITCHfall, 30, 5, PITCHfall, 32, 9, NULL, 12, 7, 0}, // 0 statement {PITCHfrise, 35, 8, PITCHfrise2, 35,10, NULL, 15, 23, 0}, // 1 comma {PITCHfrise, 39,10, PITCHfrise2, 36,10, NULL, 15, 28, 0}, // 2 question // {PITCHfall, 41, 4, PITCHfall, 41,27, NULL, 16, 4, T_EMPH}, // 3 exclamation - {PITCHfall, 43, 3, PITCHfall, 43,35, NULL, 35, 4, T_EMPH}, // 3 exclamation -// {PITCHrisefall,47, 8, PITCHrise, 48,30, NULL, 48, 5, T_EMPH}, // 3 exclamation + {PITCHfall, 41, 4, PITCHfall, 41,35, NULL, 35, 4, T_EMPH}, // 3 exclamation {PITCHfall, 38, 2, PITCHfall, 42,30, NULL, 15, 5, 0}, // 4 statement, emphatic {PITCHfall, 28, 5, PITCHfall, 28, 9, NULL, 12, 7, 0}, // 5 statement, less intonation {PITCHfrise, 30, 8, PITCHfrise2, 30,10, NULL, 13, 20, 0}, // 6 comma, less intonation @@ -772,6 +771,7 @@ void Translator::CalcPitches_Tone(int clause_tone) if((p->type == phPAUSE) && (p->ph->std_length > 50)) { pause = 1; // there is a pause since the previous vowel + prevw_tph = phoneme_tab[phonPAUSE]; // forget previous tone } if(p->newword) @@ -817,7 +817,7 @@ void Translator::CalcPitches_Tone(int clause_tone) } } - if(prev_tph->mnemonic == 0x343132) // [214] + if(prevw_tph->mnemonic == 0x343132) // [214] { if(tph->mnemonic == 0x343132) // [214] prev_p->tone_ph = LookupPh("35"); diff --git a/src/readclause.cpp b/src/readclause.cpp index 2ccde071..cdf20ab5 100644 --- a/src/readclause.cpp +++ b/src/readclause.cpp @@ -1695,6 +1695,7 @@ MNEM_TAB xml_char_mnemonics[] = { {"amp", '&'}, {"quot", '"'}, {"nbsp", ' '}, + {"apos", '\''}, {NULL,-1}}; @@ -1723,13 +1724,18 @@ int Translator::ReadClause(FILE *f_in, char *buf, unsigned short *charix, int n_ int n_xml_buf; int terminator; int punct; + int found; int any_alnum = 0; int self_closing; int punct_data; const char *p; - char buf2[40]; wchar_t xml_buf[N_XML_BUF+1]; +#define N_XML_BUF2 12 + char buf2[N_XML_BUF2+2]; + static char ungot_string[N_XML_BUF2+4]; + static int ungot_string_ix = -1; + if(clear_skipping_text) { skipping_text = 0; @@ -1752,14 +1758,13 @@ f_input = f_in; // for GetC etc if(ungot_char2 != 0) { c2 = ungot_char2; - ungot_char2 = 0; } else { c2 = GetC(); } - while(!Eof() || (ungot_char != 0)) + while(!Eof() || (ungot_char != 0) || (ungot_char2 != 0) || (ungot_string_ix >= 0)) { if(!iswalnum(c1)) { @@ -1782,47 +1787,79 @@ f_input = f_in; // for GetC etc cprev = c1; c1 = c2; - c2 = GetC(); - if(Eof()) + if(ungot_string_ix >= 0) { - c2 = ' '; + if(ungot_string[ungot_string_ix] == 0) + ungot_string_ix = -1; } + if((ungot_string_ix == 0) && (ungot_char2 == 0)) + { + c1 = ungot_string[ungot_string_ix++]; + } + if(ungot_string_ix >= 0) + { + c2 = ungot_string[ungot_string_ix++]; + } + else + { + c2 = GetC(); + + if(Eof()) + { + c2 = ' '; + } + } + ungot_char2 = 0; + if((option_ssml) && (phoneme_mode==0)) { if((ssml_ignore_l_angle != '&') && (c1 == '&') && ((c2=='#') || ((c2 >= 'a') && (c2 <= 'z')))) { n_xml_buf = 0; c1 = c2; - while(!Eof() && (iswalnum(c1) || (c1=='#')) && (n_xml_buf < 12)) + while(!Eof() && (iswalnum(c1) || (c1=='#')) && (n_xml_buf < N_XML_BUF2)) { buf2[n_xml_buf++] = c1; c1 = GetC(); } buf2[n_xml_buf] = 0; c2 = GetC(); + sprintf(ungot_string,"%s%c%c",&buf2[0],c1,c2); - if(buf2[0] == '#') + if(c1 == ';') { - // character code number - c1 = '#'; // in case there isn't a number - if(buf2[1] == 'x') - sscanf(&buf2[2],"%x",(unsigned int *)(&c1)); + if(buf2[0] == '#') + { + // character code number + if(buf2[1] == 'x') + found = sscanf(&buf2[2],"%x",(unsigned int *)(&c1)); + else + found = sscanf(&buf2[1],"%d",&c1); + } else - sscanf(&buf2[1],"%d",&c1); + { + if((found = LookupMnem(xml_char_mnemonics,buf2)) != -1) + { + c1 = found; + if(c2 == 0) + c2 = ' '; + } + } } else { - if((j = LookupMnem(xml_char_mnemonics,buf2)) != -1) - { - c1 = j; - } - else - { - c1 = '&'; - } + found = -1; } + + if(found <= 0) + { + ungot_string_ix = 0; + c1 = '&'; + c2 = ' '; + } + if((sayas_mode == 0x14) && (c1 <= 0x20)) { c1 += 0xe000; // move into unicode private usage area diff --git a/src/setlengths.cpp b/src/setlengths.cpp index a8e2ee41..2064f444 100755 --- a/src/setlengths.cpp +++ b/src/setlengths.cpp @@ -310,6 +310,9 @@ void Translator::CalcLengths() else p->prepause = 60; + if(prev->type == phSTOP) + p->prepause = 60; + if((langopts.word_gap & 0x10) && (p->newword)) p->prepause = 60; diff --git a/src/synthdata.cpp b/src/synthdata.cpp index 0af44ed6..183ef505 100755 --- a/src/synthdata.cpp +++ b/src/synthdata.cpp @@ -35,7 +35,7 @@ #include "translate.h" #include "wave.h" -const char *version_string = "1.31.08 08.Feb.08"; +const char *version_string = "1.31.09 11.Feb.08"; const int version_phdata = 0x013105; int option_device_number = -1;