Browse Source

[1.42.02]


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@231 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 15 years ago
parent
commit
e404310b8f
83 changed files with 3299 additions and 1637 deletions
  1. 7
    2
      dictsource/da_list
  2. 46
    12
      dictsource/da_rules
  3. 80
    65
      dictsource/de_list
  4. 74
    30
      dictsource/de_rules
  5. 24
    22
      dictsource/dict_phonemes
  6. 33
    16
      dictsource/en_list
  7. 88
    70
      dictsource/en_rules
  8. 3
    3
      dictsource/fr_rules
  9. 1
    1
      dictsource/hi_rules
  10. 290
    43
      dictsource/hu_list
  11. 523
    154
      dictsource/hu_rules
  12. 52
    5
      dictsource/no_list
  13. 1
    11
      dictsource/no_rules
  14. 121
    0
      dictsource/pap_list
  15. 139
    0
      dictsource/pap_rules
  16. 96
    70
      dictsource/pt_list
  17. 757
    717
      dictsource/pt_rules
  18. 15
    9
      dictsource/ta_list
  19. 215
    76
      dictsource/ta_rules
  20. 15
    8
      docs/commands.html
  21. 13
    6
      docs/dictionary.html
  22. 27
    19
      docs/index.html
  23. 20
    19
      phsource/compile_report
  24. BIN
      phsource/d/tap2
  25. BIN
      phsource/n/nr@
  26. BIN
      phsource/n/nra
  27. BIN
      phsource/n/nre
  28. BIN
      phsource/n/nri
  29. BIN
      phsource/n/nro
  30. BIN
      phsource/n/nru
  31. 1
    19
      phsource/ph_danish
  32. 12
    2
      phsource/ph_english
  33. 0
    9
      phsource/ph_english_us
  34. 1
    1
      phsource/ph_german
  35. 7
    0
      phsource/ph_hungarian
  36. 24
    5
      phsource/ph_pt_brazil
  37. BIN
      phsource/vnasal/a#_n
  38. BIN
      phsource/vowel/a#_3
  39. BIN
      phsource/vowel/a_5
  40. BIN
      phsource/vowel/e_8
  41. BIN
      phsource/vowel/e_9
  42. BIN
      phsource/vowel/ii_2
  43. BIN
      phsource/vowel/o_8
  44. BIN
      phsource/vowel/vowelchart.png
  45. BIN
      phsource/vwl_fr/_r
  46. BIN
      phsource/vwl_fr/r
  47. BIN
      phsource/vwl_fr/r_
  48. BIN
      phsource/vwl_fr/r_@
  49. BIN
      phsource/vwl_fr/r_a
  50. BIN
      phsource/vwl_fr/r_i
  51. BIN
      phsource/vwl_fr/r_o
  52. BIN
      phsource/vwl_fr/r_u
  53. BIN
      phsource/vwl_fr/r_y
  54. BIN
      phsource/vwl_fr/ra
  55. BIN
      phsource/vwl_fr/re
  56. BIN
      phsource/vwl_fr/ri
  57. BIN
      phsource/vwl_fr/ro
  58. BIN
      phsource/vwl_fr/ru
  59. BIN
      phsource/vwl_fr/ry
  60. BIN
      phsource/vwl_fr/tr
  61. BIN
      phsource/vwl_fr/xr
  62. 20
    8
      platforms/windows/make_espeak.iss
  63. 1
    1
      platforms/windows/make_espeakedit.iss
  64. 22
    23
      platforms/windows/windows_dll/src/speak_lib.h
  65. 1
    0
      platforms/windows/windows_dll/src/speech.h
  66. 5
    5
      platforms/windows/windows_sapi/version.rc2
  67. 38
    6
      src/compiledict.cpp
  68. 72
    59
      src/dictionary.cpp
  69. 2
    1
      src/espeakedit.cpp
  70. 3
    3
      src/intonation.cpp
  71. 1
    1
      src/menus.cpp
  72. 88
    46
      src/numbers.cpp
  73. 1
    0
      src/phoneme.h
  74. 99
    4
      src/readclause.cpp
  75. 2
    2
      src/setlengths.cpp
  76. 39
    1
      src/speak_lib.cpp
  77. 1
    1
      src/speak_lib.h
  78. 14
    2
      src/synthdata.cpp
  79. 51
    12
      src/synthesize.cpp
  80. 28
    13
      src/tr_languages.cpp
  81. 96
    45
      src/translate.cpp
  82. 26
    7
      src/translate.h
  83. 4
    3
      src/voices.cpp

+ 7
- 2
dictsource/da_list View File

@@ -1,4 +1,4 @@

// This file is UTF8 encoded
// Spelling-to-phoneme words for Danish

@@ -73,7 +73,7 @@ __ b'Onsdrai
÷ divid'eReD meD
= l'imeD
# n'OmV
§ paragr'af
§ paragR'af



@@ -240,11 +240,16 @@ eget a:j@D
egne a:in@
enter entV
ide id'e // idea
idé id'e // idea
igen igen
Ny ny // new
også Vs@ // also
havde h'aD@ // had
idet id'e // in so far as
sagde sa@ // said
sig sAi // oneself
//slags sl+ags // sort, type
tre tr'e // the number 3




+ 46
- 12
dictsource/da_rules View File

@@ -28,6 +28,7 @@
au (K au
ch) au (f o
nive) au o
an (cienn aN
aw (K aw
ay (K aj
aa O:
@@ -106,10 +107,12 @@
al) d (er
al) d (et
al) d (o d
al) d (rig d
an) d (re d
An) d (rA d
An) d (re d
be) d (A d
be) d (es D
bu) d (get
bu) d (t
ej) d (e d
@@ -123,6 +126,7 @@
in) d (u d
in) d (uC d
in) d (ue d
la) d (t
le) d (t
li) d (e D
li) d (s D
@@ -148,12 +152,16 @@
or) d (ning d
or) d (re d
or) d (ret
pu) d (s
pæ) d (a d
ro) d (s
ry) d (ni D
re) d (a d
re) d (i d
ri) d (e D
rø) dd (er D
si) d (e D
si) dd (e D
si) d (eA D
si) d (eC D
ti) d (e D
@@ -161,9 +169,11 @@
ud) d d
ur) d (e d
ve) d (h D
ve) d (t D
vi) d (e D
vi) d (er D
yl) d (er
ær) d (es d
æl) d (e
æl) d (i d
æl) d (re d
@@ -173,10 +183,6 @@
kla) dd (e D
kry) dd (er D
dd (et D
pu) d (s
ro) d (s
ry) d (ni D
ær) d (es d
bla) d (r D
dar) d d
gui) de d
@@ -189,6 +195,8 @@
mad) d (A D
plu) d (se
ral) d (e
sag) d (e
sku) d (t
smu) d (s
snu) d (e D
Aor) d (ret d
@@ -215,6 +223,8 @@
ver) d (en d
sli) d (so D
sli) d (s
skræ) dd (e D
kandi) d (at 'd
tilfre) d (s


@@ -229,14 +239,16 @@ tilfre) d (s
g) e (C e
g) e (js aj
em) e (nt a
plem) e (nter e
cem) e (nt e
elem) e (nt e
plem) e (nter e
em) e (ntal e
glem) e (nt a
glem) e (ntal e
ni) e
ni) e (n e
niv) e (au
bur) eau 'o
niv) eau 'o
ani) e (l e
lini) e e
r) e (_ V%
@@ -265,6 +277,8 @@ tilfre) d (s
en (gage aN
en (tre aN
c) en (t en
c) en (tA en
c) en (tC en
p) en (sion aN
r) en (ce aN
r) eg (n A:j
@@ -298,7 +312,7 @@ tilfre) d (s
ika) e (l
ir) e (n 'e
yr) e (n 'e
ompet) en (ce aN


.group f
@@ -352,6 +366,7 @@ tilfre) d (s
i) g (t_
i) g
i) g (A
i) g (a g
i) g (en g
i) g (ere g
i) g (i g
@@ -376,12 +391,18 @@ tilfre) d (s
ø) g (e
ø) g (n
æ) g (e j
g (iv+ g // avoid letter "g" pronounced with phoneme S
Ca) g (en j
ha) g (l u
in) ge (niør Se
ki) gg (e g
la) g (C u
la) g (t g
la) gde e
li) g (ere
ra) g (_ w
ra) g (e w
sa) g (n u
ør) g (s
ur) g (A g
l) g (_ j
@@ -390,6 +411,8 @@ tilfre) d (s
li) g (g g
mA) g (a g
nA) g (a g
ta) g (A u
ta) g (C u
&e) g j
an) g (å g
ba) g (e
@@ -412,10 +435,13 @@ tilfre) d (s
sa) g (a =g
sa) g (s '
si) g (t g
va) g (n u
pli) g (t g
&ti) g
bor) g u
bud) g (et S
gti) g
hol) g (er g
jer) g (A w
jer) g (C w
rea) g (er g
@@ -502,6 +528,7 @@ foreta) g (e
t) i (on // i ommitted because of sj
t) i (øs
s) i (on j
des) ign ain
ingen) i (ør


@@ -571,6 +598,7 @@ foreta) g (e
i) nd (eks nd
i) nd (ing n
u) nd ( n
bå) nd (A n
pu) n (kt
ru) n (ke
sa) n (kt
@@ -667,9 +695,8 @@ foreta) g (e

.group r
r r
b) r r
r (A R
ø) r V:
A) r r
Ae) r V
&) rd (e_ r
&) rd (eKK r
@@ -711,11 +738,13 @@ kompromi) s

&) tt t
&) th d
simpel) th (en th
t (ie t
t (ion+ sj'
t (iøs+ sj'
lek) t (i S
emen) t
cemen) t t
elemen) t t
emen) t (al t
glemen) t
@@ -733,21 +762,24 @@ glemen) t (al t
u (mK O
a) u (g u
b) u (dget y
b) u (reau y
g) ui (de ai
g) u (st O
l) u (k O?
l) u (kas u
m) u (k O?
r) u u
r) u (m O
r) u (nd O?
r) u (s u
s) u (cc y
comp) u (ter ju
fris) u (r y
frit) u (r y
men) u y
proced) u (re y
proven) u y
resso) u (rs 'u
g) u (st O
r) u (s u
s) u (cc y


.group v
@@ -859,3 +891,5 @@ glemen) t (al t






+ 80
- 65
dictsource/de_list View File

@@ -23,9 +23,9 @@ _. pUnkt
€ OY*o:
£ paUnd
& Unt
@ kl'ame:*,af@
@ kl'am3_,af@
~ tIld@
\ bEkslES
\ bakslaS
° g@-*A:t

_, kOma
@@ -34,45 +34,46 @@ _: d'Op@lp,UNkt
_; St@-*'ICpUNkt
__ ,Unt3St@-*'IC
_- b'IndEst@-*,IC
_! 'aUs_|@-*,u:fe:ts,aIC@n
_? f@-*'Age:ts,aIC@n
_' 'apOst@-*,Of
_! 'aUs_|@-*,u:f@ts,aIC@n
_? f@-*'Ag@ts,aIC@n
_' ,apo:st@-*'Of
_" tsi:t'A:t
_/ S@-*'Egst@-*IC
_/ S@-*'e:gSt@-*IC
_( kl'am3||_|'aUf
_) kl'am3||ts'u:
_{ g@Sv'aIft@kl'am3||_|'aUf
_} g@Sv'aIft@kl'am3||ts'u:
_[ 'EkIg@kl'am3||_|'aUf
_] 'ECIg@kl'am3||ts'u:
_] 'EkIg@kl'am3||ts'u:
_< klaIn3
_> g@-*Ws3
_> g@-*Y:s3
_` g@-*A:v
_^ sI*kUmflEks
_— g@d'ank@nSt@-*,IC
_^ tsI*kUmflEks
_— g@d'aNk@nSt@-*,IC

_#9 t,abu:l'Ato:*

_#9 t,abu:l'A:to:3
_#32 l'e:*ts'aIC@n
_?? zymb'o:l
_?A b'UxstA:b@
_?A b'u:xstA:b@
_cap g@-*'o:s


// accent names
_lig l'i:gat,u:*
_lig l'i:gat,u:3
_acu ak'u:t
_ac2 d'Op@l,aku:t
_brv b@-*'e:v@
_ced tse:d'Il@
_ac2 d'Op@lak,u:t
_brv b@-*'E:v@
_ced se:d'i:j
_cir ts'I*kUmflEks
_dia 'UmlaUt
_dot p'Unkt
_grv g@-*'AvIs
_hac h'atSe:k
_mcn m'ak@-*o:n
_ogo 'o:go:n,e:k
_rng k@-*'u:Ze:k
_stk S@-*'Egst@-*IC
_grv g@-*'A:vIs
_hac h'atSEk
_mcn m'A:k@-*On
_ogo 'o:gOn,Ek
_rng k@-*'o:wZEk
_stk S@-*'e:gst@-*IC
_tld t'Ild@

æ $accent
@@ -103,19 +104,19 @@ _10 'tse:n
_11 '_Elf
_12 'tsvWlf
_13 'd@-*aItse:n
_14 'fi:*tse:n
_14 'fI*tse:n
_15 'fynftse:n
_16 'zEktse:n
_16 'zECtse:n
_17 'zi:btse:n
_18 '_axttse:n
_18 '_axtse:n
_19 'nOYntse:n
_2X 'tsvantsIC
_3X 'd@-*aIsIC
_4X 'fi:*tsIC
_4X 'fI*tsIC
_5X 'fynftsIC
_6X 'zECtsIC
_7X 'zi:btsIC
_8X '_axttsIC
_8X '_axtsIC
_9X 'nOYntsIC
_0C 'hUnd3t
_0M1 'taUz@nt
@@ -131,7 +132,7 @@ _dpt _kOma
// ordinal numbers
_ord t@ // default ending
_ord20 st@ // 20,30,etc
_1o _'e:*st@
_1o _'e:3st@
_3o dr'It@
_7o z'i:bt@
_8o _'axt@
@@ -139,15 +140,15 @@ _0Co 'hUnd3tst@

// Abbreviations
//==============
a.a.o A:A:o:
allg 'alg@maIn@n
a.a.o A:||A:||_o:
allg 'alg@maIn
abb 'abb,IldUN
anm 'anm,E*kUN
bd band
bde bEnd@
bzw b@tsi:hUNsvaIz@
chr k@-*Istu:s
dm d'OYtSm,A:*k $capital $only $abbrev
bzw b@tsi:UNsvaIz@
chr k@-*IstUs
dm d'OYtS@||m'A:*k $capital $only $abbrev
dr dOkt'o:*
evtl e:vEntu:'El
od o:d3
@@ -155,7 +156,7 @@ fr f@-*aU
frl f@-*OYlaIn
hr hE*
hrsg hE*'aUsge:b3
inkl Inklu:s'i:v@
inkl Inklu:z'i:v@
km ki:lo:me:t3
nr nUm3
st 'Este:
@@ -174,7 +175,7 @@ dem %de:m
des %dEs

derselb $2
desselb dEss'Elb
desselb dEsz'Elb
dieselb $2
dasselb dasz'Elb
demselb $2
@@ -188,13 +189,13 @@ sondern $pause
denn dEn $u+ $pause
weil $pause
als $u+ $pause
bevor be:fo:* $2 $pause
bevor b@fo:* $2 $pause
also $pause
wenn ,vEn $pause $strend
sowie $2 $pause
obgleich $2 $pause
obwohl $2 $pause
deren dE*@n $u+ $brk
deren de:*@n $u+ $brk

// prepositions
ab ap $u+ $brk
@@ -218,7 +219,7 @@ in In $u+ $brk
im Im $u+ $brk
ins Ins $u+ $brk
mit mIt $u+ $pause
nach nax $u+ $brk
nach nA:x $u+ $brk
ob ,Ob $pause $strend $only
pro ,p@-*o: $pause
von fOn $u+ $brk
@@ -232,14 +233,14 @@ zur tsu:* $u+ $pause
unter ,Unt3 $pause $strend
um Um $u+ $brk
//(um die) %Umd%i: $brk
//(um den) %Umd%e:m $brk
//(um den) %Umd%e:n $brk
während $pause

// misc
so zo: $u+
doch dOx $u+
noch $pause
(noch nicht) n'Ox||n,ICt $brk
(noch nicht) n'Ox||n'ICt $brk
(nicht mehr) n'ICt||,me:*
(nicht mehr) n,ICt||m'e:* $atend
(nicht nur) n'ICt||n'u:* $pause
@@ -277,13 +278,13 @@ worin vo:*'In
ich IC $u $only
du du: $u $only
er Er $u $brk $only
es Ez $u $only
es Es $u $only
sie zi: $u $only
wir vi:* $u $only
ihr i:* $u
man man $u $only
sich zIC $u $only
(es ist) %Ez%Ist
(es ist) %Es%Ist


daß das $u+
@@ -343,7 +344,7 @@ sind zInt $u
seit zaIt $u $only

habe %hA:b@ $only
habst %habst $only
habest hA:bEst $only $u
hast %hast $only
hat %hat $only
haben h,A:b@n $only
@@ -362,15 +363,15 @@ waren 'vA:*@n
will %vIl $only
willst %vIlst $only
wollen %vOl@n $only
wolt %vOlt
wollt %vOlt

werden v,E*d@n
werde v,E*d@
werdst v,E*dst
wirst v,I*st
werdet v,E*d@t
wurden vU*d@n
wurde vU*d@
wurdst vU*dst
wurdest v,U*dEst
wurdet vU*d@t

können ,kWn@n $only
@@ -396,6 +397,7 @@ account _^_EN
aid _^_EN // aids
appeal _^_EN
apple _^_EN
association _^_EN
baseball _^_EN
bbc _^_EN
beat _^_EN
@@ -410,9 +412,11 @@ computer _^_EN
cool _^_EN
couch _^_EN
cursor _^_EN
debugger _^_EN
dj _^_EN
email _^_EN
ensemble _^_FR
enterprise _^_EN
event _^_EN
firewall _^_EN
foul _^_EN
@@ -428,6 +432,7 @@ interface _^_EN
jean _^_EN
jet _^_EN
job _^_EN
joint _^_EN
joke _^_EN
joystick _^_EN
junkie _^_EN
@@ -439,6 +444,8 @@ look _^_EN
macho _^_EN
mail _^_EN
message _^_EN
my _^_EN
mysql _^_EN
offline _^_EN
online _^_EN
out _^_EN
@@ -467,6 +474,7 @@ slum _^_EN
small _^_EN
snob _^_EN
song _^_EN
source _^_EN
spam _^_EN
spirit _^_EN
squaw _^_EN
@@ -479,6 +487,7 @@ terminal _^_EN
trip _^_EN
tuner _^_EN
unix _^_EN
venture _^_EN
window _^_EN
word _^_EN

@@ -494,16 +503,17 @@ allein $2
andre and@-*@ // andere
anomalie $2
antik ant'i:k
archaik a*k'A:Ik
archaik a*C'A:Ik
arie $alt
arpeggier a*pEdZ'i:*
arrangier a*aNZ'i:@
arterie $alt
asphalt $2
atommüll $1
ausgeschamt aUsg@SA:mt
außerdem aUs3d'e:m
außerdem 'aUs3d,e:m
aventurin avEntu:*'i:n
ave A:ve:
ave A:vE

balkan $1
balkon $2
@@ -521,6 +531,7 @@ ciao tSaU
coup ku:

dahlie $alt
debatte $2
deshalb $2
dezember $2
diadem di:ad'e:m
@@ -533,13 +544,14 @@ duett du:'Et

ebendaher e:b@ndah'e:r
ebendahin e:b@ndah'In
ebenso $1
einander aIn'and3
einerlei aIn@*laI
einher aInh'e:r
einig aInIC $only
einige aInIg@ $u+
einiges aInIg@s $u+
enagier EngaZ'i:*
engagier aNgaZ'i:*
endivie $alt
endlich EntlIC
episkopal e:pIsko:p'A:l
@@ -548,7 +560,7 @@ erst e:*st
ersten e:*st@n
erstmal e:*stma:l
extravagant $1
extrem Ekstr'e:m
extrem Ekst@-*'e:m

feuerrot $3
friedvoll f@-*'i:tf,Ol
@@ -565,18 +577,17 @@ geranie ge:*'A:nI@
gessen gEs@n
geste ge:st@
gestern gEst3n
gestrig gEst@-*IC
glorie $alt
grazie $alt

handy handI
handy hEndi:
häuschen hOYsC@n
hausier haUz'i:*
heimat haImat
heimat $1
herberg hE*bE*g
historie $alt
hm h@m
horsam ho:zA:m
horsam hO3zA:m
hostie $alt

illegitim Ile:gi:t'i:m
@@ -603,16 +614,14 @@ kanoe kan'u:
kastanie $alt
kid kId
komödie $alt
konkret k%ONk@-*e:t
konservativ $1
konstatier kOnStat'i:*
konsul $1
kurie $alt

lakaienhaft l%akaInhaft
lappalie $alt
lilie $alt
logier lo:Z'i:*
lucent lu:sEnt
luetisch lu:'e:tIS

machen max@n
@@ -621,7 +630,7 @@ materie $alt
menagier me:naZ'i:*
menuette mEnu:'Et
minut $2
mikrofiche maIk@-*o:fIS
mikrofiche mi:k@-*o:fi:S
miteinander $1
modell mo:d'El
monoton $3
@@ -632,9 +641,10 @@ mumie $alt

nebulos $3
negligent ne:gli:dZ'Ent
numero $1

oberen o:b@*@n
oboe o:bo:@
oboe o:b'o:@
orgie $alt
ok o:k'e:

@@ -643,7 +653,7 @@ passage pas'aZ@
perplex $2
petersilie $alt
pinie $alt
planet plan'Et
planet plan'e:t
pochier pOS'i:*
pochs pOxs
präsident $3
@@ -669,7 +679,7 @@ sowohl $2
sparsam SpA:*zA:m
spinozaisch spi:n'o:tsaIS
stalagmit stalagm'It
system z%IstEm
system zIst'e:m

tag tA:g
telegen te:le:g'e:n
@@ -677,7 +687,6 @@ the D@ // English
theater te:'A:t3
train t@-*e:n
turin $2
tuerei tu:*aI

umweg $1
unten Unt@n
@@ -694,13 +703,19 @@ vielleicht $2
vorbei fo:*b'aI
vorher fo:*h'e:*
vorherig fo:*h'e:*IC
vorig fo:*IC
vorig fo:*Ig

//wahrscheinlich $2
warum vA:*'Um

zoom zu:m
zuerst tsu:'E*st
//zuerst tsu:'E*st
zugegen tsu:g'e:g@n
zudem tsu:'de:m
zurück $2
zymbal $1


// Names
Neumexiko $2
Neuseeland $2

+ 74
- 30
dictsource/de_rules View File

@@ -18,6 +18,7 @@
// * <http://www.gnu.org/licenses/>. *
// ***************************************************************************/

.L01 c f h k p q s t // unvoiced, except s+vowel

// This file is UTF-8 encoded

@@ -75,6 +76,7 @@
_) animal ,ani:mA:l
_) anim ,ani:m
_) ani (s %ani:
a (Co_ 'A:
_) anti (@P4 ,antI
_) an (tw an
_) auf (@P3 _!'aUf
@@ -104,6 +106,7 @@
air (_ E:r
akqu %akv
@A) al (_ 'A:l
b) al (_ 'A:l
g) al (_ 'A:l
k) al (_ 'A:l
n) al (_ 'A:l
@@ -129,6 +132,7 @@
@) atisch (_S6 'A:tIS
@) atisieren (_S9 A:tIs'i:*@n
a (tion a
_) ato (m %ato:
_) au (Ceinand aU
_) aufent aUf@nt
austra (l %aUst@-*A
@@ -142,8 +146,8 @@
b b
b) b
b (_N p
b (h p
b (s_ p
b (L01 p
b (sA b
bt (_N pt

_) be (@P2 b@
@@ -212,14 +216,17 @@
_) cey tsaI
chef SEf
_) c (ent ts
_) ch (ic S
_) ch (if S
_) ch (il S
chip (_ _^_EN
chip (_ tSIp // English
_) ch (ol k
_) ch (or k

bre) ch (en x
chro k@-*o:
nä) chs (t Cs
wa) chstu (m kstu:
c (ie s
pla) c (ie ts
coat (_ _^_EN
@@ -227,13 +234,15 @@
_) cow _^_EN
crew _^_EN
cup _^_EN
_) cyber saIb3

.group d
_) d (_ de:
d d
d) d
d (_N t
d (h t
d (L01 t
d (sA d
ds (_ ts
dt t
ddt t
@@ -310,6 +319,7 @@
&) end (_ @nd
ier) end (_NS3 @nt
ier) end (_ @nd
@) enhaft (_ =@nhaft
@) ent (_ 'Ent
@) entlich @ntl%IC
@m) ent (_ 'Ent
@@ -331,7 +341,8 @@
w) er (k_ E*
&) er (nd_ @*
&) erin (_ @*In
&) erisch (_ @*IS
&) erisch (_ @*IS
exp) er (t E*
@) es (_S2 @s
&) et (_S2 @t
&) est (_S3 @st
@@ -369,16 +380,19 @@
_) emp (@P3 _|%Emp
_) emph (@ %Emf
_) emp (ir %Emp
br) ems Ems // brems-t, not brem-st
_) ene (rg %e:nE
_) energie e:nE*g'i:
@) en (i e:n
@) e (nsi E
_) ent (@P3 _|%Ent
_) enten Ent@n
_) ent (er Ent
pat) ent 'Ent
t) en (t En
qu) en (tA En
&) en (tum @n
&) e (nz_ 'E
&) e (nzK 'E
_) epi (@ ,e:pi:
_) epi (sk e:pI
_) er (@P2 _|%E*
@@ -387,6 +401,7 @@
&) er (igst @*
_) er (beK E*
_) er (HC E* // lC, mC, nC, rC
er (o_ 'e:*
_) ergeb (nis E*g'e:b
_) er (stC E*
_) er (ste E*
@@ -431,9 +446,9 @@
g g
g (g
g (_N k
g (h k
g (L01 k
g (sA g
gd (_N kt
gt (_N kt
gtet (_ kt@t
gtest kt@st

@@ -459,6 +474,7 @@
_) ge (orP2 g@
ge (rman gE
ge (rät g@
ge (strig gE
@) ght (_ _^_EN
graph g@-*Af
graph (_ g@-*'A:f
@@ -564,6 +580,9 @@
_) illeg ,Ile:g
_) i (llu %I
_) i (mag I
i (Co_ 'i:
ik (o_ i:k
&) im (o_ =i:m
r) i (na_ 'i:
// @) ing (_N _^_EN
_) in (k %In
@@ -603,6 +622,7 @@
bank) ie (r I'e:
barr) ie (r I'e:
financ) ie (r I'e:
arr) ie (r I'e:
hotel) ie (r I'e:
prem) ie (r I'e:
hyg) ie (n I'e:
@@ -679,24 +699,24 @@
_) leit (@P4 l'aIt
_) lern (@@P4 l'E*n
_) lexi (@ lEksi:
@) lich (_S4 lIC
@) liche (_S5 lIC@
@) lichem (_S6 lIC@m
@) lichen (_S6 lIC@n
@) licher (_S6 lIC3
@) liches (_S6 lIC@s
@) lichere (_S7 lIC@*@
@) licherem (_S8 lIC@*@m
@) licheren (_S8 lIC@*@n
@) licherer (_S8 lIC@*@3
@) licheres (_S8 lIC@*@s
@) lichste (_S7 lICst@
@) lichstem (_S8 lICst@m
@) lichsten (_S8 lICst@n
@) lichster (_S8 lICst@r
@) lichstes (_S8 lICst@s
@) lichkeit (_S8 lICk%aIt
@) lichung (_S7 lIC%UN
&) lich (_S4 lIC
&) liche (_S5 lIC@
&) lichem (_S6 lIC@m
&) lichen (_S6 lIC@n
&) licher (_S6 lIC3
&) liches (_S6 lIC@s
&) lichere (_S7 lIC@*@
&) licherem (_S8 lIC@*@m
&) licheren (_S8 lIC@*@n
&) licherer (_S8 lIC@*@3
&) licheres (_S8 lIC@*@s
&) lichste (_S7 lICst@
&) lichstem (_S8 lICst@m
&) lichsten (_S8 lICst@n
&) lichster (_S8 lICst@r
&) lichstes (_S8 lICst@s
&) lichkeit (_S8 lICk%aIt
&) lichung (_S7 lIC%UN
@) lo (gisch l'o:

.group m
@@ -760,6 +780,8 @@
o (sch O
o (x O
&CC) o (_ =o:
o (Co_ 'o:
o (lo_ o:

ob (t_ o:p
og (t_ o:k
@@ -793,6 +815,7 @@
pf pF
ph f

pake (t p%ake:
_) para (@ p,a*a
passagie pasaZ'i:
_) peri p,e:*i:
@@ -859,6 +882,9 @@
_be) sp Sp
_ge) sp Sp
_ver) sp Sp
sp (eich Sp
sp (err Sp
sp (r Sp
&C) st (_S2 st
&C) ste (_S3 st@
&C) stem (_S4 st@m
@@ -870,6 +896,8 @@
_be) st St
_ge) st St
_ver) st St
ste (ll StE
a) ste (ll stE

_) safe _^_EN
&) schaft (_S6 Saft
@@ -892,6 +920,7 @@
schwer Sve:*
_) sechs (P5 z'Eks
_) selbst (@@P6 z'Elpst
service (_S7 z%Ervi:s
shop _^_EN
_) sky _^_EN
soldat z%OldA:t
@@ -899,6 +928,7 @@

sound _^_EN
speed _^_EN
stau) ss s
@) straße (_S6 st*,A:s@
_) street _^_EN
style _^_EN
@@ -940,10 +970,12 @@
ier) tester (_S6 t@st3
ier) testes (_S6 t@st@s

_) talent tal'Ent
tch tS
t (chen_ t
_) teen _^_EN
_) tele (@ t,e:le:
tuerei (_ tu:@*'aI
thrill _^_EN
_pa) th t
the (era te:
@@ -1042,12 +1074,18 @@
_) v (on f

_) vehe ve:he:
_) ver (@P3 f%E*
_) ver (bal v%E*
_) ver (sion vE*
_) ver (tik vE*
_) ver (@P3 f%Er
_) ve (rbal vE
_) ve (rbos v%E
_) ve (rsat vE
_) ve (rsie vE
_) ve (rsif vE
_) ve (rsion vE
_) ve (rteb vE
_) ve (rtik vE
@) versich fE*z,IC
@) vergess fE*g,Es
@) verfahren (_S9 fErf,A:@-*@n
_) viel (@P4 f'i:l
_) vier (g@P4 f'i:*
_) viet vIEt
@@ -1080,6 +1118,8 @@
_) weg (C@P3 v'e:k
_) weit (C@P4 v'aIt
_) weiter (@P6 v'aIt@*
_) weither vaIthe:*
_) wieder (@P6 vi:d3
_) wo (hin v%o:
_) wohl (@P4 v'o:l
work _^_EN
@@ -1119,6 +1159,9 @@
_) zigaretten (@P10 tsi:ga*'Et@n
_) zigeu tsi:g'OY
_) zu (C@P2 ts%u:
_) zu (eP2 ts%u:
_) zu (g@ tsu:
_) zu (gu@P2 ts%u:
_) zu (nC tsU
_) zurück (@P6 tsu:*'yk
_) zyklo (@P5 ,tsy:klo:
@@ -1136,6 +1179,7 @@
äb (t_ E:p
äg (t_ E:k
t) ät (_ 'E:t
ä (um_N 'E:

.group ö
ö Y:

+ 24
- 22
dictsource/dict_phonemes View File

@@ -107,10 +107,10 @@ Dictionary en_dict

0 3 3: @ @- @2 @5 @L
a a2 A: A@ aa aI aI@ aU
aU@ A~ E e@ eI I i I2
i: i@ i@3 IR O O: o: O@
o@ OI oU O~ U u: U@ V
VR
aU@ A~ E e: e@ eI I i
I2 i: i@ i@3 IR O O: o:
O@ o@ OI oU O~ U u: U@
V VR

: ; ? b C d D dZ
f g g- h j k l L
@@ -221,10 +221,10 @@ Dictionary hu_dict
A a: E e: i i: o o:
u u: Y y y: Y:

: b c C d dZ f g
h j J k l l^ m n
N n^ p R R2 s S s2
t tS ts v z Z
- : b c d dZ f g
h j J k l m n n^
p r R R2 s S s2 t
tS ts v z Z


Dictionary hy_dict
@@ -292,9 +292,9 @@ y
: b bh c ch d d. dh
dh. dZ f g gh h j J
Jh k kh l l. m n N
n. n^ p ph R R2 s S
s. S; t t. th th. tS v
w z
n. n^ p ph r R R2 s
S s. S; t t. th th. tS
v w z


Dictionary ku_dict
@@ -445,9 +445,11 @@ tS; v w x z Z Z;

Dictionary prs_dict

@ A i o
@ A E eI i o u

b d h l t X
: b d dZ f g h j
k l m n p r R s
S t tS v w X z Z


Dictionary pt_dict
@@ -471,12 +473,12 @@ ea eI eo eU i i/ I^ iI
iU o O Oa oI oU u uI
y Y yI yU

* *; - b b; c C d
d; dZ f f; g h j k
l l; m m; n N n; p
p; r s S S; t t; tS
ts ts; v v; w w2 x z
Z z; Z;
* *; b b; c C d d;
dZ f f; g h j k l
l; m m; n N n; p p;
r s S S; t t; tS ts
ts; v v; w w2 x z Z
z; Z;


Dictionary ru_dict
@@ -558,9 +560,9 @@ I i: o o: U u u: V

: ; b C d d. dZ f
g h H j k l l. m
n N n. n^ p r R s
S s. t t. th tS v w
z z.
n N n. n^ p Q r R
s S s. t t. th tS v
w z z.


Dictionary tr_dict

+ 33
- 16
dictsource/en_list View File

@@ -98,7 +98,7 @@ _?A l,Et3
_?? sImb@L
_#9 tab
_#32 speIs
… _::d%0td,0t // for elipsis or ... while reading
//… _::d%0td,0t // for elipsis or ... while reading

_  hA@dspeIs // U+00A0 no-break-space
_! Ekskl@m'eIS@n
@@ -181,10 +181,8 @@ _₠ jU@roU
# haS $max3
@ _at_ $u+
& _and $u+
\ bakstroUk $max3
/ stroUk $max3
?3 \ bakslaS $max3
?3 / slaS $max3
\ bakslaS $max3
/ slaS $max3
* ast@rIsk $max3
% p3sEnt $max3
?5 % pVRs'Ent $max3
@@ -346,11 +344,11 @@ ctrl k0ntr'oUl
dept dI2pA@tm@nt
diy $abbrev
edt $abbrev
eg fO@Egz'aamp@L
eg fO@Egz'aamp@L $only
est $abbrev
etc Et'sEtr@
eu $abbrev
eur jU@
eur jU@ $only
hmm h@m
(http ://) eItSti:ti:'pi:_
ibm $abbrev
@@ -362,6 +360,7 @@ lbs paUndz
LBS $abbrev
ltd lImI2tI2d
mc m@k $combine // combine with the following word
mya $abbrev
ny $abbrev
oem $abbrev
ok $abbrev
@@ -506,6 +505,7 @@ albeit O:lb'i:It
alfalfa alf'alf@
alias eIli@s
alibi al@baI
alibis al@baIz
alkali alk@laI
allay a2leI
allegiance a2li:dZ@ns
@@ -598,6 +598,7 @@ archimedes A@kIm'i:di:z
archive A@kaIv
archway $1
arena a2ri:n@
argue A@gju:
arithmetic a2rITm@tIk
arise a2raIz
arisen a2rIz@n
@@ -739,7 +740,6 @@ campus kamp@s // campuses
canal k@nal
canary k@ne@rI
canine keInaIn
cannabis kana2bIs
canoe k@nu:
canoes k@nu:z
canton kant0n
@@ -781,6 +781,7 @@ chemise SEm'i:z
chic Si:k
chimpanzee $3
chisel tSIz@L
chloroplast $1
chocolate tS0kl@t
cholera k0l@r@
cholesterol k@lEst@r0l
@@ -1048,6 +1049,7 @@ eras i@r@z
erase I2reIz // erasing erases
ere e@ $only
eros i@r0s
err 3:
errand Er@nd
escapism Esk'eIpI2z@m
escargot I2sk'A@goU
@@ -1157,6 +1159,7 @@ furthermore f3:D3m'o@ $pause
?5 furthermore fVRD3m'o@ $pause
fuscia fju:S@
fuselage fju:z@lA:Z
futon fu:t0n

gala gA:l@
galaxy gala2ksI
@@ -1210,6 +1213,7 @@ havoc hav@k
hasty heIstI
hatred heItrI2d
hazardous haz3d@s
heh hEh
hehe hi:h'i:
heifer hEf@
heist haIst
@@ -1349,6 +1353,7 @@ july dZu:l'aI
kaput ka2pUt
karate k@rA:tI
kebab k@bab
kefir ki:f3
hiatus haI'eIt@s
kilo ki:loU
kilter kIlt3
@@ -1382,7 +1387,7 @@ leant lEnt
leapt lEpt
lego lEgoU
leisure l'EZ3
lemme lElI // let me
lemme lEmI // let me
lemonade $3
leo li:oU
leopard lEp@d
@@ -1390,6 +1395,7 @@ lesion li:Z@n
lethal li:T@L
liaison li:'eIz0n
libre li:br@
lichen laIk@n
lier laI3 // outlier
ligate li:geIt
lilac laIl@k
@@ -1503,7 +1509,8 @@ mitre maIt3
mixer mIks3
modem moUdEm
moderate m0d@reIt $verb
momentum $2
momentary moUm@nt@rI
momentum $2
monday mVndeI
monotone m0n@toUn
monsieur m@sj3:
@@ -1603,6 +1610,7 @@ orion 0r'aI@n
ordeal O@d'i@l
orphan O@f@n // orphaned
outage $1
outback $1
outcome $1
outer aUt3
outbreak $1
@@ -1612,13 +1620,16 @@ outcrop $1
outcry $1
outed aUtI2d
outfit $1
outhouse $1
outing $1
outlaw $1
outlay $1
outlet $1
outlier 'aUtl,aI3
outline $1
outlive aUtl'Iv
outlook $1
outmost $1
outpost aUtpoUst
output $1
outrage $1
@@ -1786,6 +1797,7 @@ question kwEstS@n
quiche ki:S
quiver kwIv3

rabbis rabaIz
rabid reIbI2d
radar reIdA@
radioactive reIdI2oU'aktIv
@@ -1925,8 +1937,6 @@ saucepan sO:sp@n
saudi saUdI
saute sO:teI
says sEz
schema ski:m@
shallow SaloU
salmon sam@n
scalpel skalp@L
scared ske@d
@@ -1972,10 +1982,12 @@ severe sI2v'i@3 $only
severely sI2v'i@3lI2 $verbf
sex sEks // sexism
several sEvr@L
shallow SaloU
shampoo $2
sheriff S'ErI2f
shew SoU
shia Si:@
shiitake Si:t'A:ke:
shillelagh S,I2l'eIl@
shiver SIv3
shone S0n
@@ -2293,7 +2305,7 @@ yoghurt j0g3t
?3 yoghurt joUg3t
yoyo joUjoU

zulu zu:lu:
zulus zu:lu:z


// place names
@@ -2580,6 +2592,7 @@ Cheri Se@r'i:
Cherie Se@r'i:
Chloe kloUI
Chris krIs
Cleo kli:oU
Connie k0nI
Connor k0n3
Daphne dafnI
@@ -2786,6 +2799,7 @@ of 0v $u $only
(of a) @v@ $nounf
(of an) @v@n $nounf
(of which) 0vwItS $2 $pause
(of the) %0vD@2 $nounf
?6 (of the) %VD@2 $nounf
?6 (of which) VvwItS $2 $pause

@@ -2834,7 +2848,7 @@ from fr0m $u
(from which) %fr0m||w'ItS $pause
up ,Vp $strend2
down ,daUn $only $strend2
by baI $u
by baI $u+
across @kr0s $u2 $strend2
per p3: $u
(per cent) p3||s'Ent
@@ -2866,7 +2880,7 @@ thence DEns

//aux. verbs

be %bi: $pastf $only
be bi: $pastf $only $u+
been ,bi:n $pastf $only
?3 been ,bIn $pastf $only
being ,bi:IN $pastf $only $strend2
@@ -2939,7 +2953,7 @@ might ,maIt $verbf $strend2 $only
(might have) maItha2v $pastf $u1+
(might have to) ,maIth'avt@5 $verbf $atend

have %hav $pastf $only $strend2
have hav $pastf $only $u $strend2
haves havz
(have been) %hav%bIn $pastf
has %ha2z $pastf $only
@@ -2979,6 +2993,9 @@ did dId $verbf
didn't dIdnt $verbf
done dVn

make m,eIk $strend2 $only
made m,eId $strend2 $only

putting pUtI2N
put ,pUt $onlys $strend2


+ 88
- 70
dictsource/en_rules View File

@@ -495,6 +495,7 @@
al (ien eIl
_) al (i al
_) al (ig a2l
X) al (in eIl
_) ali (Be a2laI
&) ali (sC_ @lI
&) al (isCic @l
@@ -628,6 +629,7 @@
amaz (o am@z
ambi (d ambI
ch) am (b eIm
ambiv amb'Iv
fl) ame eIm
As) ame (_ 'A:mE
_) ame (l a2mi:
@@ -733,6 +735,7 @@
ch) ang (e eIndZ
ch) anging eIndZIN
d) ang (er eIndZ
m) angel aNg@L
r) ang (e eIndZ
r) anging eIndZIN
r) anged (S1 d
@@ -782,7 +785,7 @@
app (licab a2p
app (reh ap
apres apreI
_) apprec (i a2pri:S
_) apprec (L02 a2pri:S
_) ap (ri eIp
ap (ro eIp
_) ap (s ap
@@ -1297,7 +1300,6 @@
e) ch (el S
cli) ch S
fi) ch S
li) ch k
ni) ch S
clo) ch S
_o) ch (e S
@@ -1464,6 +1466,7 @@
d (d
_) d' (AP2 d
@@e) d (_S1 d // suffix
db (_ d,i:bi:
ddh d
dj dZ
dg (_ dZ
@@ -1729,7 +1732,7 @@
fr) e (q i:
_s) e (que i:
e (quip %I
e (quiv %I
equiv %IkwIv
e'er e@
h) e (sion 'i:
&f) e's (_S2i s
@@ -2038,6 +2041,7 @@
engin EndZIn
eng (_ 'EN // place names
enging EndZIN
eng (th EN
en (ig En
en (igma_ %En
&) enine @ni:n
@@ -2251,7 +2255,7 @@
z) er (o i@r
_C) er (o_ i@r
er (rA E
err (_ 3:
err (_N e@

.group es
&) es (_S1i z
@@ -2477,7 +2481,7 @@
gue (_ g
_) gue gE
_) guer (n g3:
ar) gue gju:
// _ar) gu gju:

.group h
h h
@@ -2606,6 +2610,7 @@
if (icAnC 'If
r) i (fl aI
st) i (fl aI
i (genous 'I
igeo IdZ@

n) ihi aI|@
@@ -2648,34 +2653,8 @@
sh) i (ma_ 'i:
i (mum I
@) i (ness I
io (_ =I2oU
?7 io (_ =i:oU
b) io aIoU
b) io (logy aI0
v) io aI0
i (o I2
?7 i (o i:
io (li_ I2'oU
&) ion (_ =i@n
?8 &) ion (_ =IVn
n) ion =i@n
v) io (l aI@
g) io (n @
m) io (n I20
sh) io (n @
_) io (n aI0
_l) ion aI@n
z) io (n aI@
r) ior (_ I3
&) ior (+ i@3
&) ior (_ j3
iority I'0rI2t%I
iou (rA j@
iour (K j3
@) ious (_ =I2@s
ioux u:
_r) io (t aI@
io (t_ I|@
ipede Ipi:d
_s) i (ph aI
i (que_ 'i:
@@ -2697,6 +2676,7 @@
iz (er_ aIz
prAm) is Is
@Cs) is (_ =Is
b) is (_ Is
ize (_ aIz
ise (d_ aIz
ize (d_ aIz
@@ -2899,21 +2879,21 @@
?3 s) im (ult aIm

.group in
@) ing (_+S3dve I2N
@) ings (_S4dve I2Nz
@) ingly (_S5dve I2Ng-lI
@) ingment (_S7dve I2Ng-m@nt
logu) ing (_S4v I2N
x) ing (_+S3v I2N
el) ing (_+S3dv I2N
@@om) ing (_S3dv I2N
en) ing (_S3v I2N
en) ings (_S4v I2Nz
en) ingly (_S5vf I2Ng-lI
er) ing (_S3v I2N
er) ings (_S4v I2Nz
er) ingly (_S5vf I2Ng-lI
er) ingment (_S7v I2Ng-m@nt
@) ing (_+S3dve IN
@) ings (_S4dve INz
@) ingly (_S5dve INg-lI
@) ingment (_S7dve INg-m@nt
logu) ing (_S4v IN
x) ing (_+S3v IN
el) ing (_+S3dv IN
@@om) ing (_S3dv IN
en) ing (_S3v IN
en) ings (_S4v INz
en) ingly (_S5vf INg-lI
er) ing (_S3v IN
er) ings (_S4v INz
er) ingly (_S5vf INg-lI
er) ingment (_S7v INg-m@nt
Br) ing (_ IN

?7 &) in (_ @n
@@ -3081,6 +3061,34 @@
_) intra Intr@
_) intra (CC %Intra

.group io
io (_ =I2oU
?7 io (_ =i:oU
b) io aIoU
b) io (logy aI0
v) io aI0
io (li_ I2'oU
&) ion (_ =i@n
?8 &) ion (_ =IVn
n) ion =i@n
v) io (l aI@
g) io (n @
m) io (n I20
sh) io (n @
_) io (n aI0
_l) ion aI@n
z) io (n aI@
r) ior (_ I3
&) ior (+ i@3
&) ior (_ j3
iority I'0rI2t%I
iou (rA j@
iour (K j3
@) ious (_ =I2@s
ioux u:
_r) io (t aI@
io (t_ I|@

.group ir
_) ir (a I2r
ir (a_ 'i@r
@@ -3339,6 +3347,8 @@
@) men (_ mEn
&) ment (_S4 m@nt
&) ments (_S5 m@nt|s
u) ment (_ m@nt
u) ments (_ m@nt|s
?8 &) ment (_S4 mEnt
?8 &) ments (_S5 mEnt|s
mEnt (_ m@nt
@@ -3395,7 +3405,7 @@
n) n
&ia) n (_S1 n
&ia) ns (_S2 nz
@) name (_ neIm
@) name (_S4 neIm
_) nano (P4 n,anoU
nause nO:sI
necessit n@sEsIt
@@ -3566,7 +3576,8 @@
o (ffic 0
o (gan_ oU
&) o (gen_ @
hom) o (gen '0
o (genous '0
o (geny '0
ogeni (c oUdZ'EnI
r) o (ger 0
l) o (gy @
@@ -3574,7 +3585,7 @@
r) ogue oUg
v) ogue oUg
@@) ogue 0g
@) oged 0gd
@l) oge (_ 0g
oh oU
o (hA oU
j) oh (n 0
@@ -3653,11 +3664,6 @@
tr) othe oUD
l) oth (ian oUD
_r) o (ther 0
ph) oto oUtoU
ph) o (ton oU
ph) otocop oUt@k0p
ph) oto (grapher @t0
ph) oto (graphy @t0
pr) oto oUtoU
pr) oto (n oUt0
m) otor oUt@
@@ -3715,7 +3721,7 @@
olo (gic @l'0
v) olt oUlt
w) olv Ulv
_p) oly ,0lI
N_p) oly ,0lI

.group om
&) om (_ @m
@@ -3910,7 +3916,7 @@
_) or (iC 0r
@t) ore (_ 3
st) ore (_ o@
@) orily (_ '0r@l%I
@) orily (_ =@r@l%I
h) ori (z @raI
h) ori (zont 0rI
?!3 _h) or (o 0r
@@ -4206,6 +4212,14 @@
p (haza p
ph (erd p
phila fIla
_) photo (@@P5 f,oUtoU
photo foUtoU
photon foUt0n
photocop foUt@k0p
photo (grapher f@t0
photo (graphy f@t0
photo (met foUt'0
_) phyco f,aIkoU
p (hole p
sym) pa p@
_) paleo (@P5 p,eIli:oU
@@ -4289,7 +4303,7 @@
_) pre (ss prE
_) pre (st prE
_) pre (u pr%i:
_) pre (val prE
_) prev (al prEv
_) pre (vio pri:
_) pre (view pri:
_) pri (o praI
@@ -4445,6 +4459,7 @@
_) re (i@P2 r,i:
_) rei (c raI
_) rei (l raI
rei (s raI
_) rele (g rElI2
rele (nt rI2lE
rele (v rElI
@@ -4497,7 +4512,7 @@
s (s
s (sh s
_) sch S
sch (em sk
sche (m ski:
_) sch (ism sk
_) schiz skIts
sch (o sk
@@ -4750,6 +4765,7 @@
ca) th (eri T
_e) th (er T
th (ern_ D
_) thio T,aIoU
th (ith D
th (ole th
_) th (om@ t
@@ -4767,16 +4783,17 @@

.group u
u V
u (_N u:
u (_ ju:
r) u (_ u:
l) u (_ u:
w) u (_ u:
L01) u (_ u:
h) u (_ =u:
men) u (_ ju:
u (ga_ 'u:
u (ki_ 'u:
u (ma_ 'u:
u (mo_ 'u:
u (CA ju:
u (Cu_ u:
?3 d) u (CA u:
?3 n) u (CA u:
?3 t) u (CA+ u:
@@ -4954,24 +4971,20 @@
_) una (b ,Vna2
t) un (e ju:n
?3 t) un (e u:n
_) un (if ju:n
un (ani %ju:n
_) under (@P5 ,Vnd3 // prefix
_) un (deP2 ,Vn
_) un (dula Vn
_) un (enP2 ,Vn
_) un (exP2 ,Vn
_) un (ic ju:n
_) un (imP2 ,Vn
_) unin ,VnI2n
un (inj %Vn
_) uni ju:nI
_) un (id ,Vn
_) un (inP2 ,Vn
_) un (il ,ju:n
_) un (io ju:n
_) un (iq %ju:n
_) un (is ju:n
_) un (it ju:n
unit (e ju:n'aIt
_) un (iv ju:n
_) un (ix ju:n
un (i ju:n
p) un (ish Vn
@@ -5050,6 +5063,8 @@
.group v
v v
v (v

@) va (len veI
_) vehem vi@m
_) vi (brat v%aI
vivi (@ vIvI
@@ -5076,6 +5091,7 @@
wh (ol h
m) w (ich_
B) wing (_ wIN
B) wing (s_ wIN
@) wise (_S4 waIz
e) with (_ w'ID
with (C w%ID
@@ -5096,7 +5112,7 @@
_) x z
xio (n kS@
xious =kS@s
xu (a kSu:
xu (a =kSu:

.group y
y j
@@ -5146,7 +5162,7 @@
d) ynam aInam
@C) y (mAn_ I
w) y (n I
gl) y (ce I
gl) y (cer I
d) yse (n Is@
f) y (_ aI
ff) y (_ I
@@ -5251,6 +5267,7 @@
Em (_ @m
@) E (mber 'E
Eme (_ i:m
Em (ic_ 'i:m
Ensk (_ 'Ensk
En (_ @n
?8 En (_ En
@@ -5298,6 +5315,7 @@
Esque 'Esk
E (ss E
Ess (_ Es
E (te_ i:
E (tric E
Etta (_ 'Et@
Ette (_ 'Et

+ 3
- 3
dictsource/fr_rules View File

@@ -23,7 +23,7 @@

// 2006-11-18 Gilles Casse <[email protected]>
//
// Updated: 2009-10-15 Michel Such <[email protected]>
// Updated: 2009-11-20 Michel Such <[email protected]>
//

// Letter classes:
@@ -753,6 +753,7 @@ C) i (es_ i
dist) ill il // distiller
_L05) ill il // Lille, mille, ville, william
osc) ill il // osciller
gu) ill ij // guillaume
qu) ill ij // quille
A) ill j // caillou
C) ill ij // famille
@@ -1363,7 +1364,7 @@ VCi) t (_ t2
.group v
v v
vers (_ vErz2
Xri) ver (X vWr
dri) ver (X vWr
_) view (X vju
_) view (A vjuv

@@ -1477,4 +1478,3 @@ _r) w (an u // Rwanda





+ 1
- 1
dictsource/hi_rules View File

@@ -2,7 +2,7 @@
// This file is UTF8 encoded

// letter groups:
// A vowel letters
// A vowel letters and vowel signs
// B vowel signs and virama ्
// C consonants
// Y vowel letters and vowel signs

+ 290
- 43
dictsource/hu_list View File

@@ -25,12 +25,11 @@ _7X hEtvEn
_8X n^oltsvAn
_9X kilEntsvEn
_0C sa:z

_0M1 EzER2
_1M1 EzER2
_2M1 ke:tEzER2
_0M2 millio:
_1M2 millio:
_1M2 EJmillio:
_2M2 ke:tmillio:
_0M3 millia:R2d
_1M3 EJmillia:R2d
@@ -95,7 +94,16 @@ _0-ei Ei $alt2
_0-től e:tY:l $alt2
_0-tól a:to:l $alt2
_0-ig e:ig $alt2 //special date ordinal numbers for example elsejéig, negyedikéig etc.

_0-éről e:R2Y:l $alt2
_0-áról a:R2o:l $alt2
_0-ára a:R2A $alt2
_0-ától a:to:l $alt2
_0-ről e:R2Y:l $alt2
_0-ról a:R2o:l $alt2
_0-ével e:vEl $alt2
_0-ával a:vAl $alt2
_0-éig e:ig $alt2
_0-áig a:ig $alt2
(1-e) elseje $text $alt2
(1-én) elsején $text $alt2
(1-jén) elsején $text $alt2
@@ -105,7 +113,10 @@ _0-ig e:ig $alt2 //special date ordinal numbers for example elsejéig, negyedik
(1-re) elsejére $text $alt2
(1-től) elsejétől $text $alt2
(1-ig) elsejéig $text $alt2

(1-éről) elsejéről $text $alt2
(1-ről) elsejéről $text $alt2
(1-ével) elsejével $text $alt2
(1-éig) elsejéig $text $alt2
(2-i) másodikai $text $alt2
(2-ig) másodikáig $text $alt2
(3-i) hAR2_mAdikAi $alt2
@@ -118,7 +129,6 @@ _0-ig e:ig $alt2 //special date ordinal numbers for example elsejéig, negyedik
(16-ig) tizenhatodikáig $text $alt2
(18-ig) tizennyolcadikáig $text $alt2
(20-i) huszadikai $text $alt2

(20-ig) huszadikáig $text $alt2
(23-ig) huszonharmadikáig $text $alt2
(26-ig) huszonhatodikáig $text $alt2
@@ -128,10 +138,14 @@ _0-ig e:ig $alt2 //special date ordinal numbers for example elsejéig, negyedik




// these exceptions only for 0, not for other numbers ending in '0'
(0-ás) nul:a:S
(0-t) nul:a:t
(0-val) nul:a:vAl
(0-ra) nul:a:R2A
(0-nál) nul:a:na:l
(0-hoz) nul:a:hoz

// entries with a single digit such as (2-i) also apply to 22, 32, etc, unless $only

@@ -159,22 +173,29 @@ _0-ig e:ig $alt2 //special date ordinal numbers for example elsejéig, negyedik
(2-esekkel) kEt:ESEk:El
(2-eseket) kEt:ESEkEt
(2-eseik) kEt:ESEik
(2-esük) kEt:ESyk
(3-as) ha:R2mAS
(3-asának) ha:R2mASa:nAk
(3-ason) ha:R2mASon
(3-assal) ha:R2mAS:Al
(3-asával) ha:R2mASa:vAl
(3-ast) ha:R2mASt
(3-astól) ha:R2mASto:l
(3-ashoz) ha:R2mAShoz
(3-at) ha:R2mAt
(3-al) ha:R2om:Al

(4-el) ne:J:El //4 number suffixes (now contains one suffix)
//4 number suffixes
(4-el) ne:J:El //Nneed J: phoneme, not J phoneme contains one suffix)
(4-gyel) ne:J:El //Need J: phoneme, not J phoneme
(5-tel) Yt:El
(5-el) Yt:El
(5-től) Yt:Y:l
(5-től) YtYdike:tY:l $alt2
(6-al) hAt:Al
(6-tal) hAt:Al

(6-tól) hAt:o:l
(6-tól) h'Atodika:to:l $alt2
(7-es) hEtES
(7-est) hEtESt
(7-esek) hEtESEk
@@ -185,16 +206,23 @@ _0-ig e:ig $alt2 //special date ordinal numbers for example elsejéig, negyedik
(7-esük) hEtESyk
(7-tel) he:t:El
(7-el) he:t:El

(7-től) he:t:Y:l
(7-től) hEtEdike:tY:l $alt2
(7-essel) hEtES:El
(10-es) tizES // use [i] not [i:]
(10-est) tizESt
(10-essel) tizES:El
(10-esével) tizESe:vEl

(10-en) tizEn
(10-et) tizEt
(10-szer) ti:s:ER2
(10-szeres) ti:s:ER2ES
(20-as) husAS // use [u] not [u:]
(20-ast) husASt
(20-assal) husAS:Al
(20-asával) husASa:vAl
(20-at) husAt


//special number exceptions
(10-el) ti:zzEl
@@ -234,7 +262,7 @@ júl $alt
aug $alt
szept $alt
okt $alt
now $alt
nov $alt
dec $alt

//this following 7 lines means the 7 hungarian day name
@@ -268,14 +296,19 @@ _#9 tAb
_#13 vAlAmi
_#32 so:kYz
_cap n'AJ_|
_?? kAR2AktEr||ko:d // unknown characters (change this)


// Abbreviations
ADSL a:de:ESEl $allcaps //Internet connection type, we pronouns this with ádéesel
ÁNTSZ a:Ente:Es $allcaps
ATM a:te:Em $allcaps //The ATM stands. We pronouns this abbreviation with átéem word. Default, Espeak pronouns this abbreviation with atéem word.

km kilo:me:tER2
GYSEV JESEv $allcaps
GYESEV JESEv $allcaps
HÉV he:v $allcaps
City siti $capital
IPTV $abbrev $allcaps
GDP dZi:di:pi: $allcaps
HSDPA $abbrev $allcaps
ORTT $abbrev $allcaps
@@ -283,27 +316,29 @@ ORFK oEREfka: $abbrev $allcaps
MÁV ma:v $allcaps
MTI $abbrev $allcaps
mm milime:tER2

RAM R2Am $allcaps //Espeak normaly spokening this abbreviation with erraem, but this is not good
Psszt ps:t $capital // similar word with quiet word. Espeak default spokening this abbrew quiet word with letter by letter by default.
VDSZSZ ve:de:EsEs $allcaps
a.m An^n^i||m'int $dot
ún u:JnEvEzEt: $dot
ún u:JnEvEzEt: $hasdot
dr doktoR2 $dot
mr mistER2 $dot //in hungarian we not use, but lot of books contains this word.
mrs misis $dot //In hungarian we not use, but lot of book contains this word.
mr mistER2 $hasdot //in hungarian we not use, but lot of books contains this word.
mrs misis $hasdot //In hungarian we not use, but lot of book contains this word.
miss mis: $hasdot
gpu $abbrev
GB gigAba:jt $allcaps
MB mEgAba:jt $allcaps
OK ok $allcaps
mvgyosz Emve:Je:oEs
OTP o:te:pe: $allcaps
id idY:SEb: $dot
ill illEtvE $dot
ifj ifjAb: $dot
id idY:SEb: $hasdot
ill illEtvE $hasdot
ifj ifjAb: $hasdot
mta $abbrev
pl pe:lda:ul $dot
stb SAtYb:i $dot
u.n u:JnEvEzEt: $dot
ú.n u:JnEvEzEt: $dot
pl pe:lda:ul $hasdot
stb SAtYb:i $hasdot
u.n u:JnEvEzEt: $hasdot
ú.n u:JnEvEzEt: $hasdot
vö v'EZd||_'Yss2E


@@ -336,7 +371,7 @@ maguk $unstressend
de $u+ $pause // but
vagy $u+ $pause // or

mert $u $pause // because
mert $u $pause // because
miatt $u // because
bár $u $pause // although
habár $u $pause // although
@@ -348,7 +383,8 @@ noha $u $pause // even thought


// Negative
nem $unstressend $combine $strend
nem $strend2 $combine
?2 nem $strend2
ne $unstressend

e $u // "-e" question
@@ -380,9 +416,9 @@ fölé $unstressend
felett $unstressend // above
fölött $unstressend

//mellől $u // besides
//mellé $u
//mellett $u
mellől $unstressend // besides
mellé $unstressend
mellett $unstressend
lett $unstressend
ott $unstressend
itt $unstressend
@@ -391,9 +427,9 @@ nektek $unstressend
nekik $unstressend
neki $unstressend
nekem $unstressend
//közül $u
//közé $u
//között $u
közül $unstressend
közé $unstressend
között $u
an $u // so many persons
as $u
ba $unstressend // into
@@ -426,6 +462,7 @@ ről $unstressend
szer $u
szor $u // times
szó $unstressend
szót $unstressend
szór $u
ször $u
tól $unstressend // from
@@ -465,8 +502,8 @@ rá $unstressend //onto
ide $unstressend // here
oda $unstressend // there
szét $unstressend //apart
//össze $u //connect with
//vissza $u //back
össze $unstressend //connect with
vissza $unstressend //back
volna $unstressend // would
//részén $u //on ... part of

@@ -488,6 +525,7 @@ jót $unstressend
kér $unstressend
tartják $unstressend
erős $unstressend
lenni $unstressend
lennie $unstressend
közt $u+
levegőjére $unstressend
@@ -505,6 +543,7 @@ lenne $unstressend
őt $unstressend
helyes $u+
fák $unstressend
fát $unstressend
et $unstressend
megvédeni $unstressend
sztrájk $unstressend
@@ -552,6 +591,7 @@ srác $unstressend
rám $unstressend
tűnik $unstressend
nyújt $unstressend
nincs $unstressend
nincsen $unstressend
mégy $unstressend
nő $unstressend
@@ -565,7 +605,8 @@ düh $unstressend
más $unstressend
mást $unstressend
rúd $unstressend
mint $unstressend $brk $combine
mint $unstressend $combine
?2 mint $unstressend
iránt $unstressend
légy $unstressend
tűnt $unstressend
@@ -586,6 +627,7 @@ jött $unstressend
szólsz $unstressend
lőtt $unstressend
sor $unstressend
sort $unstressend
árt $unstressend
fest $unstressend
fújt $unstressend
@@ -622,7 +664,167 @@ napját $unstressend
több $unstressend
tart $unstressend
hág $unstressend

sors $unstressend
küzd $unstressend
vert $unstressend
csaj $unstressend
tárgy $unstressend
lágy $unstressend
pont $unstressend //This is mean pont word, not dot character.
pontok $unstressend
bújt $unstressend
mély $unstressend
úr $unstressend
szép $unstressend
szék $unstressend
nagy $unstressend
kár $unstressend
hó $unstressend
tánc $unstressend
füst $unstressend
két $unstressend
őr $unstressend
őrt $unstressend
nyílt $unstressend
fényt $unstressend
éjt $unstressend
ég $unstressend
lépett $unstressend
perc $unstressend
halk $unstressend
busz $unstressend
gyors $unstressend
vett $unstressend
kést $unstressend
fess $unstressend
szín $unstressend
szög $unstressend
sincs $unstressend
tér $unstressend
sztár $unstressend
vers $unstressend
mondja $unstressend
mondják $unstressend
mondta $unstressend
mondták $unstressend
szert $unstressend
látja $unstressend
szél $unstressend
óra $unstressend
hegy $unstressend
colt $unstressend
róla $unstressend
rólunk $unstressend
rólatok $unstressend
róluk $unstressend
szád $unstressend
nos $u
no $u
na $u
vall $unstressend
magam $unstressend
magad $unstressend
tűz $unstressend
egy $unstressend
lehetett $unstressend
arra $unstressend
erre $unstressend
arról $unstressend
erről $unstressend
ölt $unstressend
rosszak $unstressend
helyt $unstressend
bort $unstressend
látszik $unstressend
látszott $unstressend
látszanak $unstressend
látszotok $unstressend
körül $unstressend
dőlt $unstressend
vér $unstressend
sót $unstressend
múlt $unstressend
ügy $unstressend
cél $unstressend
célt $unstressend
láb $unstressend
bőr $unstressend
víz $unstressend
fagy $unstressend
nyelt $unstressend
sokk $unstressend
hét $unstressend
zajt $unstressend
pest $unstressend
stáb $unstressend
súlyt $unstressend
szólt $unstressend
vidd $unstressend
fönn $unstressend
szűk $unstressend
fordul $unstressend
fordult $unstressend
hús $unstressend
bor $unstressend
húsz $unstressend
tőle $unstressend
tőled $unstressend
tőlük $unstressend
tőletek $unstressend
tőlünk $unstressend
mászni $unstressend
jel $unstressend
szállt $unstressend
száll $unstressend
sínt $unstressend
kút $unstressend
bőrt $unstressend
vért $unstressend
lóg $unstressend
vette $unstressend
lenn $unstressend
indult $unstressend
völgy $unstressend
frászt $unstressend
hang $unstressend
fény $unstressend
kösz $unstressend
gramm $unstressend
húst $unstressend
telt $unstressend
zár $unstressend
rész $unstressend
nyom $unstressend
hiszem $unstressend
hiszed $unstressend
hiszi $unstressend
telik $unstressend
adott $unstressend
gázt $unstressend
csap $unstressend
falán $unstressend
hitte $unstressend
nyár $unstressend
túl $unstressend
fáj $unstressend
tudni $unstressend
hinni $unstressend
hopp $unstressend
vinni $unstressend
hozni $unstressend
hittem $unstressend
hitted $unstressend
hittük $unstressend
hittétek $unstressend
hitték $unstressend
folt $unstressend
írva $unstressend
vele $unstressend
veled $unstressend
velem $unstressend
velünk $unstressend
veletek $unstressend
velük $unstressend

// word pairs

@@ -635,10 +837,10 @@ hág $unstressend

vagyok $u // to be, present
vagy $u
van $u
vagyunk $u
vagytok $u
vannak $u
van $unstressend
vagyunk $unstressend
vagytok $unstressend
vannak $unstressend

voltam $u // to be, past
voltál $u
@@ -666,7 +868,7 @@ fogunk $u+
fogtok $u+
fognak $u+

tud $u+ // can
tud $unstressend // can
tudok $u+
tudsz $u+
tudunk $u+
@@ -751,7 +953,7 @@ _? ke:R2dY:jEl
_- m'inus $max3
__ Ala:hu:za:S $max3
_' ApostR2o:f
_– nAJkYtY:
_– gondolAtjEl
_— kviR2tmi:nus
_" ide:zY:jEl
_( b'Alza:R2o:jEl $max3
@@ -762,17 +964,56 @@ _{ k'EzdY:kAptSoS $max3
_} v'e:gkAptSoS $max3
_… pontpontpont

_• di:spont
_• fElSoR2ola:SjEl
_| fyg:Y:lEgESvonAl
_> nAJob
_< kiSSEb
_¤ pe:nznEmjEl

® bEjEJzEt:
™ ve:djEJ
_` tompA
_  SokYz
_« bElSY:|bAl|ide:zY:jEl
_» bElSY:|jobb|ide:zY:jEl
_­ la:JkYtY:jEl
_² ma:Sodik|hAtva:n^
_³ hArmAdik|hAtva:n^
_· kYze:pSY:pont
_¹ ElsY:hAtva:n^
_º Sorsa:m
_‘ bAloldAli|ide:zY:jEl
_’ job:oldAli|ide:zY:jEl
_‚ ide:zY:jEl
_‛ ide:zY:jEl
_“ ide:zY:jEl
_” ide:zY:jEl
_„ ide:zY:jEl
_‟ ide:zY:jEl
_‣ ha:R2omsYgAlAku:|fElSoR2ola:SjEl
_‰ EzR2Ele:k
_′ ApostR2o:f
_″ duplA|ApostR2o:f
© tsopiR2ight-jEl
° fok
− minus
± plusminus
µ my:
¼ nEJEd
½ fe:l
¾ ha:R2omnEJEd
× tAlpAS
÷ osta:S
¬ logikAinEm
√ JYkjEl
∞ vEgtElEn
≠ nEmEJEnlY:
_ˇ lEfEle:n^i:l

// Main Exceptions List
//=====================

nato na:to:
(end-of line) u:jS,oR2

$textmode
MSZP emeszpé
@@ -792,3 +1033,9 @@ egyezség eggyesség
(db-os) darabos
(db-ot) darabot








+ 523
- 154
dictsource/hu_rules
File diff suppressed because it is too large
View File


+ 52
- 5
dictsource/no_list View File

@@ -72,24 +72,51 @@ _1M2 'e:n||m'Illi:;,u:n
_0and u:g
_dpt kOmmA

// ordinal numbers
_ord @nd@2
_1o f'WRst@2
_2o 'AndR@2
_3o tR'Edj@2
_4o fj'a:R@2
_5o f'Emt@2
_6o S'Et:@2
_8o 'Ot:@nd@2
_11o 'EllEvt@2
_12o t'Olvt@2
_13o tR'Et:@nd@2
_14o fj'URt@md@2
_15o f'Emt@nd@2
_16o s'Ekst@nd@2
_17o s'yt:@nd@2
_18o 'At:@nd@2
_19o n'It:@nd@2
_2Xo s;'u-:@nd@2
_0Co h'u-ndR@d@2
_0M1o t'u-:s@nd@2


// punctuation and symbols
//========================

* ss;aRn@2 $max3
= aRli:k $max3
+ plu-s $max3
% pR'u:s'Ent $max3
& O:g
# nu-mm@RtENn $max3
/ skROstR@k $max3
\ OmvEndt||skROstR@k $max3

_! u-:tRu:pstENn
_" AnfY:RS@l
_# nu-mm@RtENn
_$ dOllA:R
% pR'u:s'Ent
& O:g
_' ApUstR'u:f
_( paRaNt'e:s||b@j'ynn@R
_) paRaNt'e:s||Sl'u-t:
_* ss;aRn@2
+ plu-s
_, kOmmA
_- stRe:k
_. pu-Nktu-:m
/ skROstR@k
_: ku:lOn
_; se:mi:ku:lOn
_< mIndR@2||En
@@ -104,7 +131,18 @@ _] h'YyR@2||h'A:ke:paRaNt'e:s
__ u-ndaRStR@k
_` 'OmvEndt||ApUstR'u:f

_#09 tA:b
_#32 mEllOmRu:m

_acu A:'ku-t:
_ced s'e:dIll@2
_cir s'IRku-mflEks
_dia tR'e:mA
_grv gR'A:vi:s
_tld t'Ild@2

é $accent
ü $accent


// abbreviations
@@ -250,6 +288,15 @@ _i i:
i i: $atend


// English Words
firefox _^_EN
screen _^_EN
reader _^_EN
cancel _^_EN
continue _^_EN
magnifier _^_EN
and @2nd $only


// MAIN WORD DICTIONARY
//*********************

+ 1
- 11
dictsource/no_rules View File

@@ -29,6 +29,7 @@
.group c
c k
cc k:
_) c (e s
c (i s
c (y s
c (ei s
@@ -207,7 +208,6 @@
ü y:

$ dOllA:R
\\ OmvEndt||skROstR@k
! _:'u-:tRu:pstENn_:
!) !

@@ -218,14 +218,4 @@
__) - (_D mi:nu-:s
A_) - (_D _
C_) - (_D _
--) -

* ss;aRn@2
*) * (*
**
**) * (_ _::

= aRli:k
= (==
=) = (=
==) = (_ _::

+ 121
- 0
dictsource/pap_list View File

@@ -0,0 +1,121 @@
// This file is UTF8 encoded
// Spelling to phoneme words and exceptions for Papiamento

//http://papiamentu.pbworks.com/Pronouns
//http://www.papiamentu.com/vocab.html



// characters
b be
c se
d de
f Ef
g ge
h ha
j je
k ka
l El
m Em
n En
p pe
q ky
r ER
s Es
t te
v ve
w we
x Eks
z zEt
ñ en^e

_a a
_e e
_i i
_o o
_y igR'Ek $atend

// these letters are in pap_rules, but the letter names include the accent name
á $accent
é $accent
í $accent
ó $accent
ú $accent
// è $accent
// ò $accent
// ù $accrnt

// accent names
_acu skERpi
_grv gRave


// numbers
_0 z'eRo
_1 'unu
_2 d'os
_3 tR'es
_4 kwat'eR
_5 s'inku
_6 s'Ejs
_7 S'ete
_8 'otSo
_9 nw'ebe
_1X dj'es
_11 djes'un
_2X b'inti
_3X tR'inta
_4X kwaR'enta
_5X sinkw'enta
_6X ses'enta
_7X set'enta
_8X otS'enta
_9X nob'enta
_0C sj'en
_0M1 m'il
_1M1 m'il
_0M2 mi'on
_dpt _kOma/


// common function words

un $u+ // a
algun $u+ // some
to

i $u+ $pause // and
y $u $pause // and ??
y igR'Ek $atend

o $u+ $pause // or
òf $u+ $pause // or
ma $pause // but
ku $u+ $brk // which, that
(ken su) $u $brk


mi $u+ // I,me
bo $u+ // you
e $u+ // the. it, he, she
el $u+ // it, he, she (before 'a')
nos $u+ // we
boso $u+ // you
nan $u+ // they

ami $u+ // I
abo $u+ // you
su $u+ // his, her, its


ta $u+ // to be
tabata $u+ // was
lo $u+ // (future)
a $u+ // (past)
// tin $u+ // have
por $u+ // can

di $u+ // of
den $u+ // in
na $u+ // at


+ 139
- 0
dictsource/pap_rules View File

@@ -0,0 +1,139 @@
// This file is UTF8 encoded
// Spelling-to-phoneme rules for Papiamento (Curacao, Netherlands Antilles)

.group a
a a
aa a:
ai aI

.group b
b b

.group c
c k
c (Y s
ch tS

.group d
d d
dj dZ

.group e
e e
ee e:
ei eI
eu ew

.group è
è 'E

.group f
f f

.group g
g g
g (Y x
gu (Y g

.group h
h h

.group i
i i
i (A j
A) i (K j
ij eI

.group j
j j

.group k
k k

.group l
l l

.group m
m m

.group n
n n
n (_ N
&) nan (_ n%an

.group ñ
ñ n^

.group o
o o
oe u
oo o:
ou ow

.group ò
ò 'O

.group p
p p

.group q
q k
qu (A kw
qui kwi

.group r
r R

.group s
s s
sh S

.group t
t t

.group u
u u
u (A w
ui uj
uu y

.group ù
ù Y
ùi Yj

.group ü
ü y
üi yj

.group v
v v

.group w
w w

.group x
x ks
_) x (A z

.group y
y j
K) y (K i

.group z
z z
zj Z

.group
' ?
á ''a
é ''e
í ''i
ó ''o
ú ''u
ç s

$ dOlO





+ 96
- 70
dictsource/pt_list View File

@@ -7,6 +7,11 @@
// ?3 Epenthetic [I] between consonants
// ?4 Brazil mbrola voice

// $alt change [e] or [o] in the stressed syllable to [E] or [O]
// $alt2 change [E] or [O] in the stressed syllable to [e] or [o]
// Any [E] or [O] phonemes in unstressed words must be listed explicitly


// Note for "pt-pt" [R] is the same sound as [r]
// for "pt" [y] is the same sound as [i]

@@ -44,7 +49,7 @@ _à $accent
_à $accent
_â $accent
_ã $accent
_ç $accent
ç $accent
_é $accent
_ê $accent
_í $accent
@@ -205,42 +210,45 @@ vi vi

// ABBREVIATIONS
//**************
aapp $abbrev
abadv $abbrev
abc $abbrev
a.c 'as'e
adsl $abbrev
ae $abbrev
aids $abbrev
apedv $abbrev
avc $abbrev
bios b'i,OS
d.c d,es'e
cne $abbrev
cpu $abbrev
cpuc $abbrev
dpoc $abbrev
ecg $abbrev
edp $abbrev
aapp $abbrev
abadv $abbrev
abc $abbrev
a.c 'as'e
adsl $abbrev
ae $abbrev
aids $abbrev
apedv $abbrev
avc $abbrev
bios b'i,OS
d.c d,es'e
cne $abbrev
cpu $abbrev
cpuc $abbrev
dpoc $abbrev
ecg $abbrev
edp $abbrev
?1 etc ,ets'Et:*&
?2 etc ,ets'Ete*&
hiv $abbrev
(http ://) ag,atete'pe_
icc $abbrev
ieee $abbrev // Institute of Electrical and Electronics Engineers
iss $abbrev
jpeg Z,Ot&p'Eg
mpeg ,Emp'Eg
nba $abbrev
nvda $abbrev
oms $abbrev
omt $abbrev
osi $abbrev
e.u.a Eua
eua $abbrev
fbi $abbrev
hiv $abbrev
(http ://) ag,atete'pe_
icc $abbrev
ieee $abbrev // Institute of Electrical and Electronics Engineers
iss $abbrev
jpeg Z,Ot&p'Eg
mpeg ,Emp'Eg
nba $abbrev
nvda $abbrev
oms $abbrev
omt $abbrev
osi $abbrev
?1 sa ,Esj'a
?1 sos ,Esj,O'Es
ue $abbrev
unts $abbrev
usb $abbrev
ue $abbrev
unts $abbrev
usb $abbrev


dr $dot
@@ -596,48 +604,65 @@ governo gov'ernU $noun

// MAIN WORD DICTIONARY
//*********************
borboleta b,orbol'et&
catorze k&t'orzy
fosse f'osy
fossem f'oseIN
hoje 'oZi
líderes l'ide*ys
mexa m'eS&
mexi meS'i
mexo m'eSU
?2 mulher mulj'Er
?4 mulher mul^'Er
mui mu~j
muito m'u~jtu // -s is included as a suffix
muita m'u~jt&
praxedes pR&S'EdZys
?2 rede x'edZy
selvagem seUv'aZeIN
teta t'et&

// $alt changes the first [o] phoneme to open [O]
novos $alt
mortos $alt
corpos $alt
modo $alt
modos $alt
fogos $alt
lopes $alt
jogos $alt

// Close [O]
?1 calculadora k,Alkul&d'or&
?1 professora pr,ufys'or&
?1 senhora syn^'or&
?1 sobre s'obry
// $alt changes stressed [e] or [o] phoneme to open [E] or [O]
// $alt2 changes stressed [E] or [O] phoneme to close [e] or [o]
boca $alt2
borboleta $alt2
catorze $alt2
copo $alt
escova $alt2
fosse $alt2
fossem $alt2
hoje $alt2
líderes $alt2
mexa m'eS&
mexi meS'i
mexo m'eSU
?2 mulher mulj'Er
?4 mulher mul^'Er
mui mwi
muito mw'iNtU // -s is included as a suffix
muita mw'iNt&
paexa paeSa
perdem $alt
preto $alt2
onu $1
rede $alt2
rixa xiS&
selvagem seUv'aZeIN
suor swOr
tapete $alt2
teta $alt2

novos $alt
mortos $alt
corpos $alt
modo $alt
modos $alt
fogos $alt
lopes $alt
jogos $alt
doce $alt2
drogas $alt
grosso $alt2
torres $alt2

// Close [o]
?1 calculadora $alt2
?1 professora $alt2
?1 senhora $alt2
?1 sobre $alt2

vanessa $alt2
violeta $alt2


abacaxi abakaSy
axé aSE
elixir eliSir
?1 fixe f'iSy
roxo x'oSU
xiquexique S,ikeS'iky
// foreign words
?1 alt 'alt
?2 agosto &g'ostU
@@ -774,6 +799,7 @@ louis _^_FR
?2 Outlook ,aUtl'uk
?1 paint p'aint
?1 player pl'eI&r-
playstation _^_EN
?1 point p'oint
?1 power p'aU&r-
?1 product p:r'&d&kt
@@ -831,7 +857,7 @@ stephen st'i:v@n
steve st'i:v
turing t'u*iNg
voltaire vOlt'Er
von f'On
von f%On


// foreign common names/surnames

+ 757
- 717
dictsource/pt_rules
File diff suppressed because it is too large
View File


+ 15
- 9
dictsource/ta_list View File

@@ -28,7 +28,7 @@
ஸ் is
ஹ் iC
U+b82 anUsvVRV
ஃ ah
ஃ agH
U+bcd ot.RU

ஏ je:
@@ -165,15 +165,11 @@ _1M3x orUko:d.i
_0M3 ko:d.ie:
_1M3 orUko:d.ie:

_0M4x a:jirVmko:d.i // 10,000,000,000
_1M4x a:jirVmko:d.i
_0M4 a:jirVmko:d.ie:
_1M4 a:jirVmko:d.ie:
_dpt _pul.l.i

_0M5 a:jirVma:jirVmko:d.i // 10,000,000,000,000
_1M5 a:jirVma:jirVmko:d.i

_dpt _pul.l.i
// English words
tamil தமிழ் $text


// exceptions
@@ -204,6 +200,13 @@ _dpt _pul.l.i
பீடி $alt
பீதி $alt
பேகம் $alt
பார்லி $alt
பிக்கினி $alt
பேதம் $alt
போனஸ் $alt
போகி $alt
பாபா ba:ba:
புத்த buddV


// initial த as [d]
@@ -222,6 +225,10 @@ _dpt _pul.l.i
தடியன் $alt
தரிசனம் $alt
தட்சணை $alt
தைவதம் $alt
தாட்சண்யம் $alt
தனம் $alt
திக்கற்ற $alt


கக $alt // initial க as [g]
@@ -242,4 +249,3 @@ _dpt _pul.l.i


பப pVpV
டாக்டர் d.a:ktVr

+ 215
- 76
dictsource/ta_rules View File

@@ -3,6 +3,7 @@
// Spelling to phoneme rules for Tamil

// B means a combining vowel sign, or a virama
// K means a consonant or end-of-word


.replace
@@ -16,56 +17,28 @@
௭ 7
௮ 8
௯ 9

ொ ொ
ோ ோ
ௌ ௌ


.group 0xe0ae // characters which start with UTF-8 bytes: [e0 ae]

ஂ // anusvara

ஃ // visarga

அ a

ஆ a:

இ i

ஈ i:

உ u

ஊ u:

எ e
_) எ ;e // add a short [j] sound at start of word ?

ஏ e:
_) ஏ ;e: // add a short [j] sound at start of word ?

ஐ aI

ஒ o

ஓ o:

ஔ aU

// consonants

.group க
க்ஷ ks.V
க்ஷ (B ks.

க gV // inter-vocalic, unless there is virama before or after
க (B g
க (் g
்) க gV
்) க (B g
_) க kV
_) க (B k
_) க (T gV // if word has $alt attribute in ta_list
_) க (BT g // $alt
க்க kkV
க்க (B kk
ற்) க _kV
ற்) க (B _k

க (ீத g
க (ஜ gV
@@ -92,50 +65,74 @@
_) க (ுண g
_) க (தியில் gV
_) க (டிகார gV
வி) க்ட (ோரியா kt. // victoria
க (ோப g
க (ாரன k
க (ாரர k
_) க (ோபம k
_) கோப (ித்து ko:b
_) க (ோபப் k
_) க (ெட்டி g


.group ங
ங NV
ங (B N


.group ச
ச sV // ?? [z]
ச (B s
_) ச sa
_) ச sV
_) ச (B s
ச்ச tS:V
ச்ச (B tS:
ற்ச tS:
ற்ச (B tS:
ட்) ச tSV
ட்) ச (B tS
ற்) ச tSV
ற்) ச (B tS
ஞ்) ச dZV
ஞ்) ச (B dZ
ச் (_ tS
ச்_) ச tSV // previous word ends in ச்
ச்_) ச (B tS

_) ச (ிட் tS
_) ச (ின் tS

_) ச (ப்பாத்தி tSV


.group ஜ
ஜ dZV
ஜ (B dZ


.group ஞ
ஞ n^V
ஞ (B n^


.group ட
ட d.V
ட (B d.
// _) ட t.V
// _) ட (B t.
_) ட (ீ t.
ட்ட t.t.V
ட்ட (B t.t.
ஷ்) ட t.V
ஷ்) ட (B t.
_) டாக்ட (ர d.a:kt.V
_) ட (ோக்கியோ t.
ிங்) ட (ன் t.V // -ington
_) ட (ாக்க t. // talkies


.group ண
ண n.V
ண (B n.


.group த
த dV
த (B d
_) த tV
@@ -149,27 +146,27 @@
ஸ்) த tV
ஸ்) த (B t



// exceptions, த as [d]
_) த (ன dV
_) த (ர்ம dV
_) த (ுர் d
_) த (ூர d
_) த (ர்ம dV
_) த (ுர் d
_) த (ூர d
_) த (ெய்வ d
_) த (ுஷ் d
_) த (ுஷ் d
_) த (க்ஷிணா dV
_) த (ண்ட dV
_) த (ருமி dV
_) த (ர்பை dV
_) த (ண்ட dV
_) த (ருமி dV
_) த (ர்பை dV
_) த (ாவா d
_) த (ாதா d
_) த (ரித்திரம dV
_) த (ர்பார dV
_) த (ீர்க d
_) த (ர்பார dV
_) த (ீர்க d
_) த (ீரன d
_) த (ீரர் d
_) த (ீரச் d
_) த (ினுச d
_) த (ாராவி d
_) த (ர்க dV
_) த (ர்க dV
_) த (ான d
_) த (ேக d
_) த (ேக்கு t
@@ -177,12 +174,11 @@
_) த (ேக்கடி t
_) த (ிரவிய d
_) த (ூப d
_) த (ீப d
_) த (ீர d
_) த (ீப d
_) த (ைரிய d
_) த (ிட d
_) த (ிட d
_) த (ிரவ d
_) த (ிடீ d
_) த (ிடீ d
_) த (ிவச d
_) த (ியான d
_) த (ானிய d
@@ -190,7 +186,7 @@
_) த (ிகில d
_) த (ூம d
_) த (ாவணி d
_) த (ாம்_தூம d
_) த (ாம்_தூம d
_) த (ாடி d
_) த (ாச d
_) த (சரா dV
@@ -198,17 +194,52 @@
_) த (ரணி dV
_) த (ாரணி d
_) த (ோசை d



_) த (வம dV
_) த (ட்சன dV
_) த (ாட்சாய d
_) த (ாக்கா d
_) த (ில்லி d
_) த (டித்த dV
_) த (டியன dV
_) த (டியர dV
_) த (ிக்கு d
_) த (ிக்கு_வாய t
_) த (ிக்கில d
_) த (னபால dV
_) த (னசேகரன dV
_) த (னலட்சுமி dV
_) த (னகோடி dV
_) த (னன்ஜெயன dV
_) த (ிசை d
_) த (சை dV
_) த (னராஜ dV
_) த (ன்மந்திரி dV
_) த (ினம d
_) த (ினக d
_) த (னலக்ஷ்மி dV
_) த (க்க்ஷிண dV
_) த (ட்சிண dV
_) த (ன்ராஜ dV
_) த (ாராபுர d
_) த (டி_மாட dV

பு) த்த (ி dd
பு) த்த (ியி dd
பு) த்த (ர ddV
பு) த்த (ன ddV


.group ந
ந nV
ந (B n // dental n


.group ன
ன nV
ன (B n // alveolar n


.group ப
ப bV
ப (B b
_) ப pV
@@ -221,20 +252,24 @@
ட்) ப (B p
ற்) ப pV
ற்) ப (B p
று) ப pV
று) ப(B p
று) ப _pV
று) ப(B _p
ன்) ப pV
ன்) ப (B p

ம்) ப p
ம்) ப (ா p
ம்) ப (B b
த்) ப p
த்) ப (ா p
த்) ப (B b
ம) ப pV
ம) ப (ா p
ம) ப (B b
த) ப pV
த) ப (ா p
த) ப (B b

பத (ி pVt
ப (ுர p
ப (ால p
ப (ாள p
ம்) ப (ா b

ஃ) ப fV
ஃ) ப (B f

_) ப (ால b
_) ப (ால் p
@@ -273,59 +308,163 @@
_) ப (லி bV
_) ப (கவான bV
_) ப (ௌதிக b


_) ப (ரோட bV
_) ப (ெர்லிங b
_) ப (ீஜிங b
_) ப (ுவன b
_) ப (ரதநாட்டிய bV
_) ப (ேதலித்த b
_) ப (ோன்ஸ்லே b
_) ப (ௌத்த b
_) ப (கீர bV
_) ப (கிரங்க bV
_) ப (ோபால b
_) ப (ெங்களூர b
_) ப (ூபாள b
_) ப (ுத்த b
_) ப (னியன bV
கோ) ப (ி p


// musical notes
சா) ப (ா p
ரி) ப (K pV
ரீ) ப (K pV
ரி) ப (ா p
ரீ) ப (ா p
ம) ப (K pV
மா) ப (K pV
ம) ப (ா p
மா) ப( ா p
பப (K pVpV
பாப (K pa:pV
பப (ா pVp
பாப (ா pa:p
// த) ப (K pV
தா) ப (K pV
// த) ப (ா p
தா) ப (ா p

னி) ப (K pV
னீ) ப (K pV
னி) ப (ா p
னீ) ப( ா p
க) ப (K pV
க) ப (ா p
கா) ப (K pV
கா) ப (ா p

// (exceptions)
தா) ப (ம் bV
_த) ப (ால b
_க) ப (ால b
_கா) ப (ந்து bV



.group ம
ம mV
ம (B m


.group ய
ய jV
ய (B j


.group ர
ர rV
ர (B r


.group ற
ற RV
ற (B R
ற் (ற t. // RR -> t.R
ற்ச tS:
ற்ச (B tS:


.group ல
ல lV
ல (B l


.group ள
ள l.V
ள (B l.


.group ழ
ழ z.V
ழ (B z.


.group வ
வ vV
வ (B v


.group ஶ
ஶ SV
ஶ (B S


.group ஷ
ஷ s.V
ஷ (B s.


.group ஸ
ஸ sV
ஸ (B s


.group ஹ
ஹ HV
ஹ (B H


க்ஷ ks.V
க்ஷ (B ks.
.group ஃ
ஃ h
ஃப fV
ஃப (B f
ஃத QdV
ஃத (B Qd
ஃக gQV
ஃக (B gQ

// vowel letters

.group 0xe0ae // characters which start with UTF-8 bytes: [e0 ae]

ஂ // anusvara

அ a

ஆ a:

இ i
_) இ (ரா // silent before 'raa'

ஈ i:

உ u

ஊ u:

எ e
_) எ ;e // add a short [j] sound at start of word ?

ஏ e:
_) ஏ ;e: // add a short [j] sound at start of word ?

ஐ aI

ஒ o

ஓ o:

ஔ aU


// combining vowels

+ 15
- 8
docs/commands.html View File

@@ -58,7 +58,9 @@ or<br>
Or just type<br>
&nbsp; <strong>espeak</strong><br>
followed by text on subsequent lines. Each line is spoken when
RETURN is pressed.<br>Use <strong>espeak -x</strong> to see the corresponding phoneme codes.
RETURN is pressed.
<p>
Use <strong>espeak -x</strong> to see the corresponding phoneme codes.
<p>&nbsp;<hr>
<h3>2.2.2 The Command Line Options</h3>
<dl>
@@ -88,11 +90,15 @@ If neither -f nor --stdin is given, then the text input is taken from "text word
<dt>
<strong>-s &lt;integer&gt;</strong><br>
<dd>Sets the speed in words-per-minute (approximate values for the default English voice, others may differ slightly). The default value is 170. I generally use a faster speed
of 190. Range 80 to 390.
of 190. Range 80 to 390. Larger value are rounded down to the maximum.
<p>
<dt>
<strong>-b</strong><br>
<dd>Indicates that the input text is not UTF-8, but the 8-bit character set which corresponds to the language (eg. Latin-2 for Polish). Without this option, eSpeak assumes text is UTF8, but will automatically switch to the 8-bit character set if it finds an illegal UTF8 sequence. That may give wrong results if some 8-bit character sequences look like valid UFT8 multibyte characters.
<strong>-b &lt;integer&gt;</strong><br>
<dd>Input text character format.<p>
1 &nbsp; UTF-8. This is the default.<p>
2 &nbsp; The 8-bit character set which corresponds to the language (eg. Latin-2 for Polish).<p>
4 &nbsp; 16 bit Unicode.<p>
Without this option, eSpeak assumes text is UTF-8, but will automatically switch to the 8-bit character set if it finds an illegal UTF-8 sequence.
<p>
<dt>
<strong>-g &lt;integer&gt;</strong><br>
@@ -130,7 +136,7 @@ Quiet. No sound is generated. This may be useful with the -x option.
<pre> espeak -vaf</pre>
To use the Afrikaans voice. A modifier after the voice name can be used to vary the tone of the voice, eg:
<pre> espeak -vaf+3</pre>
The variants are <code> +m1 +m2 +m3 +m4 +m5 +m6 </code> for male voices and <code> +f1 +f2 +f3 +f4 </code> which simulate female voices by using higher pitches. Other variants are <code>+croak</code> and <code>+whisper</code>.
The variants are <code> +m1 +m2 +m3 +m4 +m5 +m6 +m7</code> for male voices and <code> +f1 +f2 +f3 +f4 </code> which simulate female voices by using higher pitches. Other variants include <code>+croak</code> and <code>+whisper</code>.
<p>
&lt;voice filename&gt; is a file within the <code>espeak-data/voices</code> directory.<br>
&lt;variant&gt; is a file within the <code>espeak-data/voices/!v</code> directory.<p>
@@ -188,7 +194,7 @@ Used with <strong>-w</strong>, it starts a new WAV file every <code>&lt;minutes&
<strong>--voices [=&lt;language code&gt;]</strong><br>
<dd>Lists the available voices.<br>
If =&lt;language code&gt; is present then only those voices which are suitable for that language are listed.<br>
<code>--voices=mbrola</code> lists the voices which use mbrola diphone voices. These are not included in the <code>--voices</code> list<br>
<code>--voices=mbrola</code> lists the voices which use mbrola diphone voices. These are not included in the default <code>--voices</code> list<br>
<code>--voices=variant</code> lists the voice variants (voice modifiers).<br>

</dl>
@@ -205,7 +211,8 @@ As well as plain text, phoneme mnemonics can be used in the text input to <stron
&nbsp; eg: &nbsp; <code> espeak -v en "[[D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt]]" </code><p>
This command will speak: "This is some phonetic text input".
</dl>
</body>
</b>

<hr>
<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=159649&amp;type=2" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a>

</body>

+ 13
- 6
docs/dictionary.html View File

@@ -88,13 +88,13 @@ The rules are organized in groups, each starting with a ".group" line:
A group for each letter or character.
<p>
<dt><strong>.group &lt;2 characters&gt;</strong><br><dd>
Optional groups for some common 2 letter combinations. This is only needed, for efficiency, in cases where there are many rules for a particular letter. They would not be needed for a language which has regular spelling rules.
Optional groups for some common 2 letter combinations. This is only needed, for efficiency, in cases where there are many rules for a particular letter. They would not be needed for a language which has regular spelling rules. The first character can only be an ascii character (less than 0x80).
<p>
<dt><strong>.group</strong><br><dd>
A group for other characters which don't have their own group.
<p>
<dt><strong>.L&lt;nn&gt;</strong><br><dd>
Defines a group of letter sequences, any of which can match with <strong>Lnn</strong> in a <strong>post</strong> rule (see below). <strong>nn</strong> is a 2 digit decimal number in the range 01 to 25. eg:<p>
Defines a group of letter sequences, any of which can match with <strong>Lnn</strong> in a <strong>pre</strong> or <strong>post</strong> rule (see below). <strong>nn</strong> is a 2 digit decimal number in the range 01 to 25. eg:<p>
<code>.L01 b bl br pl pr</code>
<p>
<dt><strong>.replace</strong><br><dd>
@@ -159,7 +159,11 @@ indicates that a word which ends in "th" is translated using the English transla
<td><strong>B&nbsp;H&nbsp;F&nbsp;G&nbsp;Y&nbsp;</strong></td>
<td>These may indicate other sets of characters (defined for a particular language).</td>
</tr>
<tr>
<tr>
<td><strong>L&lt;nn&gt;</strong></td>
<td>Any of the sequence of characters defined as a letter group (see 4.3.1 above).</td>
</tr>
<tr>
<td><strong>D</strong></td>
<td>Any digit.</td>
</tr>
@@ -480,6 +484,10 @@ A word (or group of words) may be given one or more flags, either instead of, or
<td>$dot</td>
<td>Ignore a . after this word even when followed by a capital letter (eg. Mr. Dr. ).</td>
</tr>
<tr>
<td>$hasdot</td>
<td>Use this pronunciation if the word is followed by a dot. (This attribute also implies $dot).</td>
</tr>
<tr>
<td>$abbrev</td>
<td>This has two meanings.<br> 1. If there is no phoneme string: Speak the word as individual letters, even if it contains a vowel (eg. "abc" should be spoken as "a" "b" "c").<br>2. If there is a phoneme string: This word is capitalized because it is an abbreviation and capitalization does indicate emphasis (if the "emphasize all-caps" is on).</td>
@@ -587,13 +595,12 @@ _0 to _9 &nbsp;
<td>The numbers 0 to 9
</tr>
<tr>
<td>_13<td>etc. Any pronunciations which are needed for specific numbers in the range _11 to _99 &nbsp;
<td>_13<td>etc. Any pronunciations which are needed for specific numbers in the range _10 to _99 &nbsp;
</tr>
<tr>
<td>_2X &nbsp;_3X<td>Twenty, thirty, etc., used to make numbers 10 to 99 &nbsp;
</tr>
<tr>
<td>_nn<td>Any two digit numbers with a special pronunciation (eg. _15 "fifteen").
</tr>
<tr><TD>_0C<td>The word for "hundred"</td>
<tr><TD>_1C &nbsp;_2C<td>Special pronunciation for one hundred, two hundred, etc., if needed.</tr>
@@ -601,7 +608,7 @@ _0 to _9 &nbsp;
<tr><TD>_0M1<td>The word for "thousand"</tr>
<tr><TD>_0M2<td>The word for "million"</tr>
<tr><TD>_0M3<td>The word for 1000000000</tr>
<tr><TD>_1M1 &nbsp;_2M1<td>Special pronunciation for one thousand, two thousand, tc, if needed</td>
<tr><TD>_1M1 &nbsp;_2M1<td>Special pronunciation for one thousand, two thousand, etc, if needed</td>
<tr><TD>_0and<td>Word for "and" when speaking numbers (eg. "two hundred and twenty").</tr>
<tr><TD>_dpt<td>Word spoken for the decimnal point/comma</tr>
<tr><TD>_dpt2<td>Word spoken (if any) at the end of all the digits after a decimal point.</tr>

+ 27
- 19
docs/index.html View File

@@ -17,8 +17,12 @@
<div align="center">
(email) &nbsp; jonsd at users dot sourceforge.net<br>
<a href="http://espeak.sf.net/download.html"><strong>Download</strong></a>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://sourceforge.net/forum/?group_id=159649"><strong>Forum</strong></a>
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://sourceforge.net/projects/espeak/"><strong>eSpeak Sourceforge page</a>
&nbsp; &nbsp; &nbsp; &nbsp;
<a href="http://sourceforge.net/projects/espeak/"><strong>eSpeak Sourceforge page</a>
&nbsp; &nbsp; &nbsp; &nbsp;
<a href="http://sourceforge.net/forum/?group_id=159649"><strong>Forum</strong></a>
&nbsp; &nbsp; &nbsp; &nbsp;
<a href="http://sourceforge.net/mail/?group_id=159649"><strong>Mailing list</strong></a>
</div>
</td>
</tr>
@@ -40,32 +44,36 @@
eSpeak is a compact open source software speech synthesizer for English and other languages, for Linux and Windows. &nbsp;
<a href="http://espeak.sourceforge.net/"><strong>http://espeak.sourceforge.net</strong></a>
<p>
eSpeak produces good quality English speech. It uses a different synthesis method from other open source TTS engines, and sounds quite different. It's perhaps not as natural or "smooth", but I find the articulation clearer and easier to listen to for long periods.
eSpeak uses a "formant synthesis" method. This allows many languages to be provided in a small size. The speech is clear, and can be used at high speeds, but is not as natural or smooth as larger synthesizers which are based on human speech recordings.
<p>
It can run as a command line program to speak text from a file or from stdin. A shared library version is also available.

eSpeak is available as:
<ul>
<li>A command line program (Linux and Windows) to speak text from a file or from stdin.
<li>A shared library version for use by other programs. (On Windows this is a DLL).
<li>A SAPI5 version for Windows, so it can be used with screen-readers and other programs that support the Windows SAPI5 interface.
<li>eSpeak has been ported to other platforms, including Solaris and Mac OSX.
</ul>
Features.
<ul>
<li>Includes different Voices, whose characteristics can be altered.
<li>Can produce speech output as a WAV file.
<li>SSML (Speech Synthesis Markup Language) is supported (not complete), and also HTML.
<li>Compact size. The program and its data, including many languages, totals about 1 Mbytes.
<li>Can translate text to phoneme codes, so it could be adapted as a front end for another speech synthesis engine.
<li>Potential for other languages. Several are included in varying stages of progress. Help from native speakers for these or other languages is welcomed.
<li>Development tools available for producing and tuning phoneme data.
<li>Written in C++.
<li>Compact size. The program and its data, including many languages, totals about 1.4 Mbytes.
<li>Can be used as a front-end to MBROLA diphone voices, see <a href="mbrola.html">mbrola.html</a>. eSpeak converts text to phonemes with pitch and length information.
<li>Can translate text into phoneme codes, so it could be adapted as a front end for another speech synthesis engine.
<li>Potential for other languages. Several are included in varying stages of progress. Help from native speakers for these or other languages is welcome.
<li>Development tools are available for producing and tuning phoneme data.
<li>Written in C.
</ul>
<p>
It works well as a "Talker" with the KDE text to speech system (KTTS), as an alternative to Festival for example. As such, it can speak text which has been selected into the clipboard, or directly from the Konqueror browser or the Kate editor. A Gnome Speech driver is now available.
<p>
I regularly use it to listen to blogs and news sites. I prefer the sound through a domestic stereo system rather than my small computer speakers.
<hr>
<strong>Windows Version</strong>. There are Windows SAPI5 and command-line versions of eSpeak. The SAPI5 version can be used with screen readers such as NVDA, JAWS, Supernova, and Window-Eyes.<br>
They are available as a Windows installer package from the <a href="download.html"><strong>eSpeak Download</strong></a> page.<p>
A Windows version of the espeakedit program is also available.
I regularly use eSpeak to listen to blogs and news sites. I prefer the sound through a domestic stereo system rather than small computer speakers, which can sound rather harsh.

<hr>
<strong>Languages</strong>. The eSpeak speech synthesizer supports several languages, however in most cases these are initial drafts and need more work to improve them. Assistance from native speakers is welcome for these, or other new languages. Please contact me if you want to help.<p>
eSpeak does text to speech synthesis for the following languages, some better than others. Afrikaans, Albanian, Armenian, Cantonese, Catalan, Croatian, Czech, Dutch, English, Esperanto, Finnish, French, German, Greek, Hindi, Hungarian, Icelandic, Indonesian, Italian, Kurdish, Latvian, Lojban, Macedonian, Mandarin, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Spanish, Swahili, Swedish, Tamil, Vietnamese, Welsh. See <a href="languages.html">Languages</a>.
<strong>Languages</strong>. The eSpeak speech synthesizer supports several languages, however in many cases these are initial drafts and need more work to improve them. Assistance from native speakers is welcome for these, or other new languages. Please contact me if you want to help.<p>
eSpeak does text to speech synthesis for the following languages, some better than others. Afrikaans, Albanian, Armenian, Cantonese, Catalan, Croatian, Czech, Danish, Dutch, English, Esperanto, Finnish, French, German, Greek, Hindi, Hungarian, Icelandic, Indonesian, Italian, Kurdish, Latvian, Lojban, Macedonian, Mandarin, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Spanish, Swahili, Swedish, Tamil, Turkish, Vietnamese, Welsh.
<hr>
The latest <strong>development version</strong> is at:
<a href="http://espeak.sf.net/test/latest.html">espeak.sf.net/test/latest.html</a>.
<hr>
<strong>espeakedit</strong> is a GUI program used to prepare and compile phoneme data. It is now available for download. Documentation is currently sparse, but if you want to use it to add or improve language support, let me know.
<hr>

+ 20
- 19
phsource/compile_report View File

@@ -2,9 +2,9 @@
new total
base 104 104
base2 26 125
en 50 150
en 51 150
en_n 32 150
en_us 37 151
en_us 36 151
en_sc 39 152
en_rp 34 150
en_wm 31 150
@@ -34,8 +34,8 @@
es 9 125
es_la 1 125
ca 11 127
pt 28 141
pt_pt 20 141
pt 30 142
pt_pt 20 142
ro 36 147
el 8 125
grc 12 129
@@ -51,7 +51,7 @@
id 15 127
sq 35 128
hy 24 120
da 22 122
da 20 119
rw 15 132
ml 13 154
kn 15 154
@@ -164,7 +164,8 @@ d/dr [*] base
[d.] bn
d/tap [*;] ro
d/tap1 [*] base
d/tap2 [t#] en_us
d/tap2 [t#] en
[*] pt
d/tap3 [*] base
d/tap4 [r] es
d/tap_i [*;] ro
@@ -197,7 +198,8 @@ d/xd_pzd [d;] pl
d/xdz [dz] pl
[dz] sq
[dz] hy
d/x_tap [t#] en_us
d/x_tap [t#] en
[*] pt
dzh/dzh [dZ] base
[dZ;] base
[dz;] base
@@ -624,12 +626,10 @@ r3/r_trill.wav [R2] base
[x] pt
r3/r_u [(u)] base
r3/r_uvl [r"] base
[R4] da
r3/r_uvl.wav [r"] base
[R] fr
[r] fr
[r/2] fr
[R4] da
r3/rx [*] base
[r/] base
[r/] af
@@ -645,12 +645,11 @@ r3/@tap [**] base
r3/@tap2 [**] base
r3/@tap_rfx [r.] base
r/a_ [r] da
r/aa [R6] da
r/aa [R] da
r/r [r] base
[r-] base
[r] en_sc
[r] de
[R5] da
r/_r [r] base
[r] en_sc
[r.] bn
@@ -1563,8 +1562,6 @@ vowel/a# [a/] base2
[a2] en_sc
[a2] en_wi
[&] sr
[&] pt
[&/] pt
[a#] rw
[a/] rw
vowel/a_2 [a] base2
@@ -1605,6 +1602,8 @@ vowel/a#_3 [a2] en
[a] hi
[a#] ru
[a#] ca
[&] pt
[&/] pt
[&] pt_pt
[&/] pt_pt
[a] zhy
@@ -1725,8 +1724,7 @@ vowel/ee_1 [E] base2
[E:] sv
[E:] no
[e] zhy
vowel/ee_2 [E] en
[E] cy
vowel/ee_2 [E] cy
[E2] nl
[E] zh
[E#] ku
@@ -1739,6 +1737,7 @@ vowel/ee_3 [&] af
[E] pt
[E] vi
vowel/ee_4 [E] sq
vowel/ee_5 [E] en
vowel/ee_6 [&] sk
[E3] sv
[E] ku
@@ -1881,7 +1880,8 @@ vowel/ii# [Y] cy
[i] sq
[y] ml
[y] kn
vowel/ii_2 [i] zh
vowel/ii_2 [I] en
[i] zh
vowel/ii#_2 [y] pl
vowel/ii_3 [I] cy
[I] fi
@@ -1894,8 +1894,7 @@ vowel/ii_3 [I] cy
[I] bn
[I] pa
vowel/ii#_3 [I2] en_us
vowel/ii_4 [I] en
[I2] en
vowel/ii_4 [I2] en
[I] en_us
vowel/ii_5 [I] la
[i] zh
@@ -2073,6 +2072,7 @@ vowel/u [u:] en_wi
[u:] lv
[u:] cs
[U] la
[u2] pt
[u] id
[u] ml
[u:] ml
@@ -2448,11 +2448,12 @@ x/b [b] base
x/b_ [b] base
[b] fr
x/d [d] base
[t#] en_us
[t#] en
[d] fr
[d.] hi
[dh.] hi
[d] hr
[*] pt
[d] el
[d] is
[d] id

BIN
phsource/d/tap2 View File


BIN
phsource/n/nr@ View File


BIN
phsource/n/nra View File


BIN
phsource/n/nre View File


BIN
phsource/n/nri View File


BIN
phsource/n/nro View File


BIN
phsource/n/nru View File


+ 1
- 19
phsource/ph_danish View File

@@ -134,27 +134,9 @@ phoneme r // used for 'r' after a vowel (to create a diphthong)
lengthmod 7
endphoneme

phoneme R6 //
phoneme R //
liquid
formants r/aa
lengthmod 7
endphoneme

phoneme R4 // uvular trill [r"] without WAV
vcd uvl frc
formants r3/r_uvl+r3/r_uvl.wav%1
before _ r3/r_uvl+r3/r_uvl.wav%1
lengthmod 6
endphoneme


phoneme R5 // English r
liquid starttype #r endtype #r
rhotic
length 100
lengthmod 7
beforenotvowel r/
formants r/r
endphoneme



+ 12
- 2
phsource/ph_english View File

@@ -27,6 +27,16 @@ phoneme t2 // [t] which doesn't reduce
endphoneme


phoneme t# // reduced [t] as in "city"
vcd alv stop
vowelin f1=1 f2=1700 -300 300 f3=-100 80
vowelout f1=2 f2=1700 -300 300 f3=-100 80
formants d/tap2+x/d%70
after @ d/x_tap
lengthmod 5
endphoneme


phoneme l
liquid
length 100
@@ -118,7 +128,7 @@ endphoneme
phoneme E
vowel starttype (e) endtype (e)
length 140
formants vowel/ee_2
formants vowel/ee_5
reduceto I 0
endphoneme

@@ -126,7 +136,7 @@ endphoneme
phoneme I
vowel starttype (i) endtype (i)
length 130
formants vowel/ii_4
formants vowel/ii_2
linkout ;
endphoneme


+ 0
- 9
phsource/ph_english_us View File

@@ -293,12 +293,3 @@ phoneme r/ // used for [r] when not preceding a vowel
endphoneme


phoneme t# // reduced [t] as in "city"
vcd alv stop
vowelin f1=1 f2=1700 -300 300 f3=-100 80
vowelout f1=2 f2=1700 -300 300 f3=-100 80
formants d/tap2+x/d%70
after @ d/x_tap
lengthmod 5
endphoneme


+ 1
- 1
phsource/ph_german View File

@@ -186,7 +186,7 @@ endphoneme

phoneme y
vowel starttype (u) endtype (u)
length 150
length 130
formants vowel/yy_4
before * DFT+40
endphoneme

+ 7
- 0
phsource/ph_hungarian View File

@@ -49,6 +49,7 @@ endphoneme

phoneme i:
vowel starttype (i) endtype (i)
long
length 220
formants vowel/i
// linkout ;
@@ -56,36 +57,42 @@ endphoneme

phoneme e:
vowel starttype (e) endtype (e)
long
length 240
formants vowel/e_3
endphoneme

phoneme a:
vowel starttype (a) endtype (a)
long
length 270
formants vowel/a
endphoneme

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

phoneme u:
vowel starttype (u) endtype (u)
long
length 240
formants vowel/u_bck
endphoneme

phoneme y:
vowel starttype (u) endtype (u)
long
length 240
formants vowel/y
endphoneme

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

+ 24
- 5
phsource/ph_pt_brazil View File

@@ -37,7 +37,7 @@ endphoneme

phoneme &~
vowel starttype (@) endtype (@)
length 200
length 180
formants vnasal/a#_n
// reduceto & 4
endphoneme
@@ -60,14 +60,14 @@ endphoneme
phoneme &
vowel starttype (@) endtype (@)
length 180
formants vowel/a#
formants vowel/a#_3
endphoneme

phoneme &/ // Used for final "a" when next word starts with "a"
vowel starttype (@) endtype (@)
beforevowel NULL
length 180
formants vowel/a#
formants vowel/a#_3
endphoneme


@@ -94,7 +94,7 @@ endphoneme

phoneme y // this is the same as [i] for Brazil
vowel starttype (i) endtype (i)
length 150
length 110
formants vowel/ii_6
linkout ;
endphoneme
@@ -122,9 +122,15 @@ phoneme u
formants vowel/u_bck
endphoneme

phoneme U
phoneme u2 // TEST
vowel starttype (u) endtype (u)
length 160
formants vowel/u
endphoneme

phoneme U
vowel starttype (u) endtype (u)
length 140
formants vowel/uu_bck
endphoneme

@@ -135,6 +141,7 @@ phoneme aI
vowel starttype (a) endtype (i)
length 230
formants vdiph/ai
linkout ;
endphoneme


@@ -142,6 +149,7 @@ phoneme eI
vowel starttype (e) endtype (i)
length 210
formants vdiph/ei
linkout ;
endphoneme


@@ -149,6 +157,7 @@ phoneme OI
vowel starttype (o) endtype (i)
length 230
formants vdiph/0i
linkout ;
endphoneme


@@ -213,3 +222,13 @@ phoneme s# // This is [s] for Brazi;, [S] for Portugal
switchvoicing z
endphoneme


phoneme *
vcd alv stop
vowelin f1=1 f2=1700 -300 300 f3=0 80
vowelout f1=2 f2=1700 -300 300 f3=0 80
formants d/tap2+x/d%40
after @ d/x_tap
lengthmod 6
endphoneme


BIN
phsource/vnasal/a#_n View File


BIN
phsource/vowel/a#_3 View File


BIN
phsource/vowel/a_5 View File


BIN
phsource/vowel/e_8 View File


BIN
phsource/vowel/e_9 View File


BIN
phsource/vowel/ii_2 View File


BIN
phsource/vowel/o_8 View File


BIN
phsource/vowel/vowelchart.png View File


BIN
phsource/vwl_fr/_r View File


BIN
phsource/vwl_fr/r View File


BIN
phsource/vwl_fr/r_ View File


BIN
phsource/vwl_fr/r_@ View File


BIN
phsource/vwl_fr/r_a View File


BIN
phsource/vwl_fr/r_i View File


BIN
phsource/vwl_fr/r_o View File


BIN
phsource/vwl_fr/r_u View File


BIN
phsource/vwl_fr/r_y View File


BIN
phsource/vwl_fr/ra View File


BIN
phsource/vwl_fr/re View File


BIN
phsource/vwl_fr/ri View File


BIN
phsource/vwl_fr/ro View File


BIN
phsource/vwl_fr/ru View File


BIN
phsource/vwl_fr/ry View File


BIN
phsource/vwl_fr/tr View File


BIN
phsource/vwl_fr/xr View File


+ 20
- 8
platforms/windows/make_espeak.iss View File

@@ -2,7 +2,7 @@
[Setup]
AppName=eSpeak
AppVerName=eSpeak version 1.41.01
AppVerName=eSpeak version 1.42
AppCopyright=Licensed under GNU General Public License version 3. (See file License.txt for details).
WindowVisible=yes
@@ -118,7 +118,7 @@ begin
$07: Result := 'de';
$08: Result := 'el';
$09: Result := 'en';
$0a: Result := 'es-la';
$0a: Result := 'es-la es-la+m3 es-la+f3';
$0b: Result := 'fi';
$0c: Result := 'fr';
$0e: Result := 'hu';
@@ -147,6 +147,7 @@ begin
$41: Result := 'sw';
$49: Result := 'ta';
$4b: Result := 'kn';
$50: Result := 'mn';
$52: Result := 'cy';
$61: Result := 'ne';
$87: Result := 'rw';
@@ -154,9 +155,9 @@ begin
// is there a match on the full language code?
case language of
$40a: Result := 'es';
$80a: Result := 'es-la es-la+f3 es-la+m3';
$c0a: Result := 'es';
$816: Result := 'pt-pt';
$816: Result := 'pt-pt es-la';
$41a: Result := 'hr';
$81a: Result := 'sr';
$c1a: Result := 'sr';
@@ -207,6 +208,7 @@ begin
'ko': value := $412;
'lv': value := $426;
'mk': value := $42f;
'mn': value := $450;
'ne': value := $461;
'nl': value := $413;
'no': value := $414;
@@ -406,10 +408,16 @@ procedure InitializeWizard;
var
lang: String;
voice2: String;
uilang: String;
begin
// Create the language selection page
UILanguage := GetUILanguage;
UIVoice := VoiceFromLanguage(UILanguage);
uilang := Format(' (Language code %x)',[UILanguage]);
lang := ActiveLanguage;
Page := CreateInputQueryPage(wpSelectDir,CustomMessage('v1'),CustomMessage('v2'),CustomMessage('v3'));
Page := CreateInputQueryPage(wpSelectDir,CustomMessage('v1'),CustomMessage('v2')+uilang,CustomMessage('v3'));
// Add items (False means it's not a password edit)
Page.Add('', False);
@@ -418,15 +426,19 @@ begin
Page.Add('', False);
Page.Add('', False);
UILanguage := GetUILanguage;
UIVoice := VoiceFromLanguage(UILanguage);
// Set initial values (optional)
if UIVoice = 'en' then
voice2 := 'en-us'
else
voice2 := 'en';
Page.Values[0] := Format('%s %s %s',[UIVoice, UIVoice+'+f2', voice2]);
if Pos('+',UIVoice) = 0 then
Page.Values[0] := Format('%s %s',[UIVoice, UIVoice+'+f2'])
else
Page.Values[0] := Format('%s',[UIVoice]);
Page.Values[1] := Format('%s',[voice2]);
end;

+ 1
- 1
platforms/windows/make_espeakedit.iss View File

@@ -1,7 +1,7 @@
[Setup]
AppName=eSpeakEdit
AppVerName=eSpeakEdit version 1.41.02
AppVerName=eSpeakEdit version 1.42
DefaultDirName={pf}\eSpeak
DefaultGroupName=eSpeak
OutputBaseFilename=setup_espeakedit

+ 22
- 23
platforms/windows/windows_dll/src/speak_lib.h View File

@@ -24,7 +24,6 @@
/* This is the header file for the library version of espeak */
/* */
/*************************************************************/
#define ESPEAK_API __declspec(dllexport)

#include <stdio.h>

@@ -152,7 +151,7 @@ typedef enum {
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API int espeak_Initialize(espeak_AUDIO_OUTPUT output, int buflength, const char *path, int options);
int espeak_Initialize(espeak_AUDIO_OUTPUT output, int buflength, const char *path, int options);
/* Must be called before any synthesis functions are called.
output: the audio data can either be played by eSpeak or passed back by the SynthCallback function.

@@ -171,7 +170,7 @@ typedef int (t_espeak_callback)(short*, int, espeak_EVENT*);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API void espeak_SetSynthCallback(t_espeak_callback* SynthCallback);
void espeak_SetSynthCallback(t_espeak_callback* SynthCallback);
/* Must be called before any synthesis functions are called.
This specifies a function in the calling program which is called when a buffer of
speech sound data has been produced.
@@ -199,7 +198,7 @@ int SynthCallback(short *wav, int numsamples, espeak_EVENT *events);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API void espeak_SetUriCallback(int (*UriCallback)(int, const char*, const char*));
void espeak_SetUriCallback(int (*UriCallback)(int, const char*, const char*));
/* This function may be called before synthesis functions are used, in order to deal with
<audio> tags. It specifies a callback function which is called when an <audio> element is
encountered and allows the calling program to indicate whether the sound file which
@@ -240,7 +239,7 @@ int UriCallback(int type, const char *uri, const char *base);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API espeak_ERROR espeak_Synth(const void *text,
espeak_ERROR espeak_Synth(const void *text,
size_t size,
unsigned int position,
espeak_POSITION_TYPE position_type,
@@ -296,7 +295,7 @@ ESPEAK_API espeak_ERROR espeak_Synth(const void *text,
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API espeak_ERROR espeak_Synth_Mark(const void *text,
espeak_ERROR espeak_Synth_Mark(const void *text,
size_t size,
const char *index_mark,
unsigned int end_position,
@@ -320,7 +319,7 @@ ESPEAK_API espeak_ERROR espeak_Synth_Mark(const void *text,
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API espeak_ERROR espeak_Key(const char *key_name);
espeak_ERROR espeak_Key(const char *key_name);
/* Speak the name of a keyboard key.
If key_name is a single character, it speaks the name of the character.
Otherwise, it speaks key_name as a text string.
@@ -334,7 +333,7 @@ ESPEAK_API espeak_ERROR espeak_Key(const char *key_name);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API espeak_ERROR espeak_Char(wchar_t character);
espeak_ERROR espeak_Char(wchar_t character);
/* Speak the name of the given character

Return: EE_OK: operation achieved
@@ -379,7 +378,7 @@ typedef enum {
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int value, int relative);
espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int value, int relative);
/* Sets the value of the specified parameter.
relative=0 Sets the absolute value of the parameter.
relative=1 Sets a relative value of the parameter.
@@ -415,7 +414,7 @@ ESPEAK_API espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int valu
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API int espeak_GetParameter(espeak_PARAMETER parameter, int current);
int espeak_GetParameter(espeak_PARAMETER parameter, int current);
/* current=0 Returns the default value of the specified parameter.
current=1 Returns the current value of the specified parameter, as set by SetParameter()
*/
@@ -423,7 +422,7 @@ ESPEAK_API int espeak_GetParameter(espeak_PARAMETER parameter, int current);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API espeak_ERROR espeak_SetPunctuationList(const wchar_t *punctlist);
espeak_ERROR espeak_SetPunctuationList(const wchar_t *punctlist);
/* Specified a list of punctuation characters whose names are to be spoken when the
value of the Punctuation parameter is set to "some".

@@ -438,7 +437,7 @@ ESPEAK_API espeak_ERROR espeak_SetPunctuationList(const wchar_t *punctlist);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API void espeak_SetPhonemeTrace(int value, FILE *stream);
void espeak_SetPhonemeTrace(int value, FILE *stream);
/* Controls the output of phoneme symbols for the text
value=0 No phoneme output (default)
value=1 Output the translated phoneme symbols for the text
@@ -450,7 +449,7 @@ ESPEAK_API void espeak_SetPhonemeTrace(int value, FILE *stream);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API void espeak_CompileDictionary(const char *path, FILE *log, int flags);
void espeak_CompileDictionary(const char *path, FILE *log, int flags);
/* Compile pronunciation dictionary for a language which corresponds to the currently
selected voice. The required voice should be selected before calling this function.

@@ -503,19 +502,19 @@ typedef struct {
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API const espeak_VOICE **espeak_ListVoices(espeak_VOICE *voice_spec);
const espeak_VOICE **espeak_ListVoices(espeak_VOICE *voice_spec);
/* Reads the voice files from espeak-data/voices and creates an array of espeak_VOICE pointers.
The list is terminated by a NULL pointer

If voice_spec is NULL then all voices are listed.
If voice spec is give, then only the voices which are compatible with the voice_spec
If voice spec is given, then only the voices which are compatible with the voice_spec
are listed, and they are listed in preference order.
*/

#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API espeak_ERROR espeak_SetVoiceByName(const char *name);
espeak_ERROR espeak_SetVoiceByName(const char *name);
/* Searches for a voice with a matching "name" field. Language is not considered.
"name" is a UTF8 string.

@@ -528,7 +527,7 @@ ESPEAK_API espeak_ERROR espeak_SetVoiceByName(const char *name);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API espeak_ERROR espeak_SetVoiceByProperties(espeak_VOICE *voice_spec);
espeak_ERROR espeak_SetVoiceByProperties(espeak_VOICE *voice_spec);
/* An espeak_VOICE structure is used to pass criteria to select a voice. Any of the following
fields may be set:

@@ -548,7 +547,7 @@ ESPEAK_API espeak_ERROR espeak_SetVoiceByProperties(espeak_VOICE *voice_spec);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API espeak_VOICE *espeak_GetCurrentVoice(void);
espeak_VOICE *espeak_GetCurrentVoice(void);
/* Returns the espeak_VOICE data for the currently selected voice.
This is not affected by temporary voice changes caused by SSML elements such as <voice> and <s>
*/
@@ -556,7 +555,7 @@ ESPEAK_API espeak_VOICE *espeak_GetCurrentVoice(void);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API espeak_ERROR espeak_Cancel(void);
espeak_ERROR espeak_Cancel(void);
/* Stop immediately synthesis and audio output of the current text. When this
function returns, the audio output is fully stopped and the synthesizer is ready to
synthesize a new message.
@@ -569,14 +568,14 @@ ESPEAK_API espeak_ERROR espeak_Cancel(void);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API int espeak_IsPlaying(void);
int espeak_IsPlaying(void);
/* Returns 1 if audio is played, 0 otherwise.
*/

#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API espeak_ERROR espeak_Synchronize(void);
espeak_ERROR espeak_Synchronize(void);
/* This function returns when all data have been spoken.
Return: EE_OK: operation achieved
EE_INTERNAL_ERROR.
@@ -585,7 +584,7 @@ ESPEAK_API espeak_ERROR espeak_Synchronize(void);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API espeak_ERROR espeak_Terminate(void);
espeak_ERROR espeak_Terminate(void);
/* last function to be called.
Return: EE_OK: operation achieved
EE_INTERNAL_ERROR.
@@ -595,7 +594,7 @@ ESPEAK_API espeak_ERROR espeak_Terminate(void);
#ifdef __cplusplus
extern "C"
#endif
ESPEAK_API const char *espeak_Info(void* ptr);
const char *espeak_Info(void* ptr);
/* Returns the version number string.
The parameter is for future use, and should be set to NULL
*/

+ 1
- 0
platforms/windows/windows_dll/src/speech.h View File

@@ -30,6 +30,7 @@

#define PATHSEP '\\'
// #define USE_PORTAUDIO
#define NO_VARIADIC_MACROS
#define ESPEAK_API __declspec(dllexport)
#define LIBRARY


+ 5
- 5
platforms/windows/windows_sapi/version.rc2 View File

@@ -5,8 +5,8 @@
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,40,00
PRODUCTVERSION 1,0,40,00
FILEVERSION 1,0,42,00
PRODUCTVERSION 1,0,42,00
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -24,14 +24,14 @@ BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "Jonathan Duddington\0"
VALUE "FileDescription", "Text to Speech\0"
VALUE "FileVersion", "1, 0,40,00\0"
VALUE "InternalName", "espeak1.40\0"
VALUE "FileVersion", "1, 0,42,00\0"
VALUE "InternalName", "espeak1.42\0"
VALUE "LegalCopyright", "Copyright (c) Jonathan Duddington\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "espeak_sapi.dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "espeak TTS\0"
VALUE "ProductVersion", "1, 0, 40, 00\0"
VALUE "ProductVersion", "1, 0, 42, 00\0"
VALUE "SpecialBuild", "\0"
END
END

+ 38
- 6
src/compiledict.cpp View File

@@ -83,7 +83,6 @@ MNEM_TAB mnem_flags[] = {
{"$unstressend",13}, /* reduce stress at end of clause */
{"$atend", 14}, /* use this pronunciation if at end of clause */

{"$dot", 16}, /* ignore '.' after this word (abbreviation) */
{"$abbrev", 17}, /* use this pronuciation rather than split into letters */
{"$stem", 18}, // must have a suffix

@@ -93,6 +92,9 @@ MNEM_TAB mnem_flags[] = {
{"$alt2", 21},
{"$combine", 22}, // Combine with the next word

{"$dot", 24}, // ignore '.' after this word (abbreviation)
{"$hasdot", 25}, // use this pronunciation if there is a dot after the word

{"$max3", 27}, // limit to 3 repetitions
{"$brk", 28}, // a shorter $pause
{"$text", 29}, // word translates to replcement text, not phonemes
@@ -125,6 +127,7 @@ typedef struct {
char name[LEN_GROUP_NAME+1];
unsigned int start;
unsigned int length;
int group3_ix;
} RGROUP;


@@ -345,7 +348,7 @@ step=1; // TEST
break;
case 1:
if((c == '-') && (word[0] != '_'))
if((c == '-') && multiple_words)
{
if(isdigit(word[0]))
{
@@ -734,6 +737,7 @@ static char rule_post[80];
static char rule_match[80];
static char rule_phonemes[80];
static char group_name[LEN_GROUP_NAME+1];
static int group3_ix;

#define N_RULES 2000 // max rules for each group

@@ -1129,7 +1133,10 @@ static int __cdecl string_sorter(char **a, char **b)

static int __cdecl rgroup_sorter(RGROUP *a, RGROUP *b)
{//===================================================
// Sort long names before short names
int ix;
ix = strlen(b->name) - strlen(a->name);
if(ix != 0) return(ix);
ix = strcmp(a->name,b->name);
if(ix != 0) return(ix);
return(a->start-b->start);
@@ -1401,6 +1408,7 @@ static int compile_dictrules(FILE *f_in, FILE *f_out, char *fname_temp)
int n_rules=0;
int count=0;
int different;
int wc;
const char *prev_rgroup_name;
unsigned int char_code;
int compile_mode=0;
@@ -1409,6 +1417,7 @@ static int compile_dictrules(FILE *f_in, FILE *f_out, char *fname_temp)
char *rules[N_RULES];

int n_rgroups = 0;
int n_groups3 = 0;
RGROUP rgroup[N_RULE_GROUP2];
linenum = 0;
@@ -1436,6 +1445,7 @@ static int compile_dictrules(FILE *f_in, FILE *f_out, char *fname_temp)
if(n_rules > 0)
{
strcpy(rgroup[n_rgroups].name,group_name);
rgroup[n_rgroups].group3_ix = group3_ix;
rgroup[n_rgroups].start = ftell(f_temp);
output_rule_group(f_temp,n_rules,rules,group_name);
rgroup[n_rgroups].length = ftell(f_temp) - rgroup[n_rgroups].start;
@@ -1481,7 +1491,8 @@ static int compile_dictrules(FILE *f_in, FILE *f_out, char *fname_temp)
while((*p > ' ') && (ix < LEN_GROUP_NAME))
group_name[ix++] = *p++;
group_name[ix]=0;
group3_ix = 0;

if(sscanf(group_name,"0x%x",&char_code)==1)
{
// group character is given as a character code (max 16 bits)
@@ -1494,8 +1505,19 @@ static int compile_dictrules(FILE *f_in, FILE *f_out, char *fname_temp)
*p++ = char_code;
*p = 0;
}
else
{
if(translator->letter_bits_offset > 0)
{
utf8_in(&wc, group_name);
if(((ix = (wc - translator->letter_bits_offset)) >= 0) && (ix < 128))
{
group3_ix = ix+1; // not zero
}
}
}
if(strlen(group_name) > 2)
if((group3_ix == 0) && (strlen(group_name) > 2))
{
if(utf8_in(&c,group_name) < 2)
{
@@ -1573,7 +1595,17 @@ static int compile_dictrules(FILE *f_in, FILE *f_out, char *fname_temp)
if(gp > 0)
fputc(RULE_GROUP_END,f_out);
fputc(RULE_GROUP_START,f_out);
fprintf(f_out, prev_rgroup_name = rgroup[gp].name);

if(rgroup[gp].group3_ix != 0)
{
n_groups3++;
fputc(1,f_out);
fputc(rgroup[gp].group3_ix, f_out);
}
else
{
fprintf(f_out, "%s", prev_rgroup_name = rgroup[gp].name);
}
fputc(0,f_out);
}

@@ -1593,7 +1625,7 @@ static int compile_dictrules(FILE *f_in, FILE *f_out, char *fname_temp)
fclose(f_temp);
remove(fname_temp);

fprintf(f_log,"\t%d rules, %d groups\n\n",count,n_rgroups);
fprintf(f_log,"\t%d rules, %d groups (%d)\n\n",count,n_rgroups,n_groups3);
return(0);
} // end of compile_dictrules


+ 72
- 59
src/dictionary.cpp View File

@@ -36,6 +36,7 @@
#include "translate.h"



int dictionary_skipwords;
char dictionary_name[40];

@@ -146,6 +147,7 @@ static void InitGroups(Translator *tr)
tr->groups2_start[ix]=255; // indicates "not set"
}
memset(tr->letterGroups,0,sizeof(tr->letterGroups));
memset(tr->groups3,0,sizeof(tr->groups3));

p = tr->data_dictrules;
while(*p != 0)
@@ -194,7 +196,8 @@ static void InitGroups(Translator *tr)
len = strlen(p);
p_name = p;
c = p_name[0];
c2 = p_name[1];

p += (len+1);
if(len == 1)
{
@@ -206,13 +209,18 @@ static void InitGroups(Translator *tr)
tr->groups1[0] = p;
}
else
if(c == 1)
{
// index by offset from letter base
tr->groups3[c2 - 1] = p;
}
else
{
if(tr->groups2_start[c] == 255)
tr->groups2_start[c] = tr->n_groups2;
tr->groups2_count[c]++;
tr->groups2[tr->n_groups2] = p;
c2 = p_name[1];
tr->groups2_name[tr->n_groups2++] = (c + (c2 << 8));
}
}
@@ -1255,18 +1263,17 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,
{
/* no explicit stress - stress the final vowel */
stressed_syllable = vowel_count - 1;
if(max_stress == 0)

while(stressed_syllable > 0)
{
while(stressed_syllable > 0)
// find the last vowel which is not unstressed
if(vowel_stress[stressed_syllable] == 0)
{
if(vowel_stress[stressed_syllable] == 0)
{
vowel_stress[stressed_syllable] = 4;
break;
}
else
stressed_syllable--;
vowel_stress[stressed_syllable] = 4;
break;
}
else
stressed_syllable--;
}
max_stress = 4;
}
@@ -1391,7 +1398,7 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,
if(vowel_stress[2] == 4)
vowel_stress[1] = 3;
}
#if deleted
if((stressflags & 0x2000) && (vowel_stress[1] == 0))
{
// If there is only one syllable before the primary stress, give it a secondary stress
@@ -1400,7 +1407,6 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,
vowel_stress[1] = 3;
}
}
#endif

done = 0;
for(v=1; v<vowel_count; v++)
@@ -1621,8 +1627,8 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,


#ifdef LOG_TRANSLATE
static char *DecodeRule(const char *group, char *rule)
{//==================================================
static char *DecodeRule(const char *group_chars, int group_length, char *rule)
{//===========================================================================
/* Convert compiled match template to ascii */

unsigned char rb;
@@ -1648,7 +1654,13 @@ static char *DecodeRule(const char *group, char *rule)

match_type = 0;
buf_pre[0] = 0;
strcpy(buf,group);

for(ix=0; ix<group_length; ix++)
{
buf[ix] = group_chars[ix];
}
buf[ix] = 0;

p = &buf[strlen(buf)];
while(!finished)
{
@@ -1819,8 +1831,8 @@ void AppendPhonemes(Translator *tr, char *string, int size, const char *ph)



static void MatchRule(Translator *tr, char *word[], const char *group, char *rule, MatchRecord *match_out, int word_flags, int dict_flags)
{//=======================================================================================================================================
static void MatchRule(Translator *tr, char *word[], int group_length, char *rule, MatchRecord *match_out, int word_flags, int dict_flags)
{//======================================================================================================================================
/* Checks a specified word against dictionary rules.
Returns with phoneme code string, or NULL if no match found.

@@ -1865,12 +1877,12 @@ static void MatchRule(Translator *tr, char *word[], const char *group, char *rul
static MatchRecord best;

int total_consumed; /* letters consumed for best match */
int group_length;

unsigned char condition_num;
char *common_phonemes; /* common to a group of entries */
char *group_chars;

group_chars = *word;

if(rule == NULL)
{
@@ -1890,8 +1902,6 @@ static void MatchRule(Translator *tr, char *word[], const char *group, char *rul
best.end_type = 0;
best.del_fwd = NULL;

group_length = strlen(group);
/* search through dictionary rules */
while(rule[0] != RULE_GROUP_END)
{
@@ -2372,7 +2382,7 @@ static void MatchRule(Translator *tr, char *word[], const char *group, char *rul
if(group_length > 1)
pts += 35; // to account for an extra letter matching
DecodePhonemes(match.phonemes,decoded_phonemes);
fprintf(f_trans,"%3d\t%s [%s]\n",pts,DecodeRule(group,rule_start),decoded_phonemes);
fprintf(f_trans,"%3d\t%s [%s]\n",pts,DecodeRule(group_chars, group_length, rule_start),decoded_phonemes);
}
#endif

@@ -2411,7 +2421,7 @@ int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, c
Append the result to 'phonemes' and any standard prefix/suffix in 'end_phonemes' */

unsigned char c, c2;
unsigned int c12;
unsigned int c12, c123;
int wc=0;
int wc_prev;
int wc_bytes;
@@ -2432,8 +2442,6 @@ int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, c
char word_copy[N_WORD_BYTES];
static const char str_pause[2] = {phonPAUSE_NOLINK,0};

char group_name[4];

if(tr->data_dictrules == NULL)
return(0);

@@ -2502,12 +2510,22 @@ int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, c
{
digit_count = 0;
found = 0;
if(n > 0)

if(((ix = wc - tr->letter_bits_offset) >= 0) && (ix < 128))
{
if(tr->groups3[ix] != NULL)
{
MatchRule(tr, &p, wc_bytes, tr->groups3[ix], &match1, word_flags, dict_flags0);
found = 1;
}
}

if(!found && (n > 0))
{
/* there are some 2 byte chains for this initial letter */
c2 = p[1];
c12 = c + (c2 << 8); /* 2 characters */
c123 = c12 + (p[2] << 16);
g1 = tr->groups2_start[c];
for(g=g1; g < (g1+n); g++)
@@ -2516,17 +2534,13 @@ int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, c
{
found = 1;

group_name[0] = c;
group_name[1] = c2;
group_name[2] = 0;
p2 = p;
MatchRule(tr, &p2, group_name, tr->groups2[g], &match2, word_flags, dict_flags0);
MatchRule(tr, &p2, 2, tr->groups2[g], &match2, word_flags, dict_flags0);
if(match2.points > 0)
match2.points += 35; /* to acount for 2 letters matching */

/* now see whether single letter chain gives a better match ? */
group_name[1] = 0;
MatchRule(tr, &p, group_name, tr->groups1[c], &match1, word_flags, dict_flags0);
MatchRule(tr, &p, 1, tr->groups1[c], &match1, word_flags, dict_flags0);

if(match2.points >= match1.points)
{
@@ -2541,15 +2555,12 @@ int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, c
if(!found)
{
/* alphabetic, single letter chain */
group_name[0] = c;
group_name[1] = 0;
if(tr->groups1[c] != NULL)
MatchRule(tr, &p, group_name, tr->groups1[c], &match1, word_flags, dict_flags0);
MatchRule(tr, &p, 1, tr->groups1[c], &match1, word_flags, dict_flags0);
else
{
// no group for this letter, use default group
MatchRule(tr, &p, "", tr->groups1[0], &match1, word_flags, dict_flags0);
MatchRule(tr, &p, 0, tr->groups1[0], &match1, word_flags, dict_flags0);

if((match1.points == 0) && ((option_sayas & 0x10) == 0))
{
@@ -2715,9 +2726,8 @@ void ApplySpecialAttribute2(Translator *tr, char *phonemes, int dict_flags)

len = strlen(phonemes);

switch(tr->translator_name)
if(tr->langopts.param[LOPT_ALT] & 2)
{
case L('i','t'):
for(ix=0; ix<(len-1); ix++)
{
if(phonemes[ix] == phonSTRESS_P)
@@ -2740,7 +2750,6 @@ void ApplySpecialAttribute2(Translator *tr, char *phonemes, int dict_flags)
break;
}
}
break;
}
} // end of ApplySpecialAttribute2

@@ -2749,9 +2758,7 @@ void ApplySpecialAttribute(Translator *tr, char *phonemes, int dict_flags)
{//=======================================================================
// Amend the translated phonemes according to an attribute which is specific for the language.
int len;
int ix;
char *p_end;
int phoneme_1;

if((dict_flags & (FLAG_ALT_TRANS | FLAG_ALT2_TRANS)) == 0)
return;
@@ -2772,18 +2779,6 @@ void ApplySpecialAttribute(Translator *tr, char *phonemes, int dict_flags)
}
break;

case L('p','t'):
phoneme_1 = PhonemeCode('o');
for(ix=0; ix<(len-1); ix++)
{
if(phonemes[ix] == phoneme_1)
{
phonemes[ix] = PhonemeCode('O');
break;
}
}
break;

case L('r','o'):
if(p_end[0] == PhonemeCode('j'))
{
@@ -2961,6 +2956,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
wlen = strlen(word);
}


hash = HashDictionary(word);
p = tr->dict_hashtab[hash];

@@ -3127,6 +3123,11 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
continue;
}
}
if(dictionary_flags & FLAG_NEEDS_DOT)
{
if(!(wflags & FLAG_HAS_DOT))
continue;
}

if((dictionary_flags & FLAG_ATEND) && (word_end < tr->clause_end))
{
@@ -3267,7 +3268,7 @@ int LookupDictList(Translator *tr, char **wordptr, char *ph_out, unsigned int *f
// set the skip words flag
flags[0] |= FLAG_SKIPWORDS;
dictionary_skipwords = length;
return(flags[0]);
return(1);
}
}

@@ -3367,7 +3368,7 @@ int LookupDictList(Translator *tr, char **wordptr, char *ph_out, unsigned int *f
return(0);
}

return(flags[0]);
return(1);
}

ph_out[0] = 0;
@@ -3384,6 +3385,17 @@ int Lookup(Translator *tr, const char *word, char *ph_out)
return(LookupDictList(tr, &word1, ph_out, flags, 0, NULL));
}

int LookupFlags(Translator *tr, const char *word)
{//==============================================
char buf[100];
static unsigned int flags[2];

flags[0] = flags[1] = 0;
char *word1 = (char *)word;
LookupDictList(tr, &word1, buf, flags, 0, NULL);
return(flags[0]);
}



int RemoveEnding(Translator *tr, char *word, int end_type, char *word_copy)
@@ -3410,7 +3422,8 @@ int RemoveEnding(Translator *tr, char *word, int end_type, char *word_copy)
"ion", NULL };

static const char *add_e_additions[] = {
"c", "rs", "ir", "ur", "ath", "ns", "lu", NULL };
// "c", "rs", "ir", "ur", "ath", "ns", "lu", NULL };
"c", "rs", "ir", "ur", "ath", "ns", "u", NULL };

for(word_end = word; *word_end != ' '; word_end++)
{

+ 2
- 1
src/espeakedit.cpp View File

@@ -266,6 +266,7 @@ wxSashLayoutWindow *win;


ConfigInit();
LoadConfig();
WavegenInitSound();

if((result = LoadPhData()) != 1)
@@ -320,7 +321,7 @@ void MyFrame::SetVoiceTitle(char *voice_name)
{
sprintf(buf,"Compile &dictionary '%s'",dictionary_name);
data_menu->SetLabel(MENU_COMPILE_DICT, wxString(buf,wxConvLocal));
sprintf(buf,"&Format '%s_rules' file",dictionary_name);
sprintf(buf,"&Layout '%s_rules' file",dictionary_name);
data_menu->SetLabel(MENU_FORMAT_DICTIONARY, wxString(buf,wxConvLocal));
}
}

+ 3
- 3
src/intonation.cpp View File

@@ -214,7 +214,7 @@ static int drops_0[8] = {0x400,0x400,0x700,0x700,0x700,0xa00,0x1800,0x0e00};
//static int drops_2[8] = {0x400,0x400,0x600,0x600,-0x800,0xc00,0x0e00,0x0e00};

static short oflow[] = {0, 20, 12, 4, 0};
static short oflow_emf[] = {5, 24, 15, 10, 5};
static short oflow_emf[] = {5, 26, 16, 10, 5};
static short oflow_less[] = {3, 19, 12, 7, 2};
// static short oflow_test2[] = {20, 0, 20, 0, 20};
// static short back_emf[] = {35, 32, 0};
@@ -262,7 +262,7 @@ static TONE_HEAD tone_head_table[N_TONE_HEAD_TABLE] = {
{20, 25, 34, 22, drops_0, 3, 3, 5, oflow}, // 0 statement
{20, 25, 34, 20, drops_0, 3, 3, 5, oflow}, // 1 comma
{20, 25, 34, 20, drops_0, 3, 3, 5, oflow}, // 2 question
{20, 25, 36, 22, drops_0, 3, 4, 5, oflow_emf}, // 3 exclamation
{20, 25, 39, 22, drops_0, 3, 4, 5, oflow_emf}, // 3 exclamation
{20, 25, 34, 22, drops_0, 3, 3, 5, oflow}, // 4 statement, emphatic
{20, 25, 32, 24, drops_0, 4, 3, 5, oflow_less}, // 5 statement, less intonation
{20, 25, 32, 24, drops_0, 4, 3, 5, oflow_less}, // 6 comma, less intonation
@@ -275,7 +275,7 @@ static TONE_HEAD tone_head_table[N_TONE_HEAD_TABLE] = {
};

static TONE_NUCLEUS tone_nucleus_table[N_TONE_NUCLEUS_TABLE] = {
{PITCHfall, 29, 4, PITCHfall, 32, 9, NULL, 12, 6, 0}, // 0 statement
{PITCHfall, 29, 4, PITCHfall, 31, 8, NULL, 11, 6, 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

+ 1
- 1
src/menus.cpp View File

@@ -89,7 +89,7 @@ wxMenuBar *MakeMenu(int type)
data_menu->Append(MENU_COMPILE_DICT_DEBUG, _("Compile dictionary (debu&g)"));
data_menu->Append(MENU_COMPILE_MBROLA, _("Compile &mbrola phonemes list..."));
data_menu->AppendSeparator();
data_menu->Append(MENU_FORMAT_DICTIONARY, _("&Format *_rules file"));
data_menu->Append(MENU_FORMAT_DICTIONARY, _("&Layout *_rules file"));
// OPTIONS MENU
paths_menu = new wxMenu;

+ 88
- 46
src/numbers.cpp View File

@@ -67,6 +67,8 @@

static int n_digit_lookup;
static char *digit_lookup;
static int speak_missing_thousands;


typedef struct {
const char *name;
@@ -589,8 +591,8 @@ void LookupLetter(Translator *tr, unsigned int letter, int next_byte, char *ph_b



int TranslateLetter(Translator *tr, char *word, char *phonemes, int control, int word_length)
{//======================================================================================
int TranslateLetter(Translator *tr, char *word, char *phonemes, int control)
{//=========================================================================
// get pronunciation for an isolated letter
// return number of bytes used by the letter
// control 2=say-as glyphs, 3-say-as chars
@@ -755,27 +757,28 @@ void SetSpellingStress(Translator *tr, char *phonemes, int control, int n_chars)
static char ph_ordinal2[12];


static int CheckDotOrdinal(Translator *tr, char *word, WORD_TAB *wtab, int lowercase)
{//==================================================================================
// nextupper: Next word must start with lower-case
static int CheckDotOrdinal(Translator *tr, char *word, WORD_TAB *wtab, int roman)
{//==============================================================================

int ordinal = 0;
int c2;

if((tr->langopts.numbers & NUM_ORDINAL_DOT) && (word[0] == '.'))
if((tr->langopts.numbers & NUM_ORDINAL_DOT) && ((word[0] == '.') || (wtab[0].flags & FLAG_HAS_DOT)) && !(wtab[1].flags & FLAG_NOSPACE))
{
if((lowercase==0) || !(wtab[1].flags & FLAG_FIRST_UPPER))
if(roman || !(wtab[1].flags & FLAG_FIRST_UPPER))
{
utf8_in(&c2, &word[2]);
if(IsAlpha(c2))
if((word[1] != 0) && IsAlpha(c2))
{
// ordinal number is indicated by dot after the number
// but not if the next word starts with an upper-case letter
ordinal = 2;
word[0] = ' ';
if(tr->translator_name == L('h','u'))
if(word[0] == '.')
word[0] = ' ';

if((roman==0) && (tr->translator_name == L('h','u')))
{
// lang=hu don't treat dot as ordinal indicator if the next word is a month name ($alt)
// lang=hu don't treat dot as ordinal indicator if the next word is a month name ($alt). It may have a suffix.
if(TranslateWord(tr, &word[2], 0, NULL) & FLAG_ALT_TRANS)
ordinal = 0;
}
@@ -799,7 +802,7 @@ int TranslateRoman(Translator *tr, char *word, char *ph_out, WORD_TAB *wtab)
int subtract;
int repeat = 0;
int n_digits = 0;
unsigned int flags;
unsigned int flags[2];
char ph_roman[30];
char number_chars[N_WORD_BYTES];

@@ -809,6 +812,7 @@ int TranslateRoman(Translator *tr, char *word, char *ph_out, WORD_TAB *wtab)
acc = 0;
prev = 0;
subtract = 0x7fff;
ph_out[0] = 0;

if((tr->langopts.numbers & NUM_ROMAN_CAPITALS) && !(wtab[0].flags & FLAG_ALL_UPPER))
return(0);
@@ -861,12 +865,12 @@ int TranslateRoman(Translator *tr, char *word, char *ph_out, WORD_TAB *wtab)
if((tr->langopts.numbers & NUM_ROMAN_AFTER) == 0)
{
strcpy(ph_out,ph_roman);
p = &ph_out[strlen(ph_out)];
p = &ph_out[strlen(ph_roman)];
}

sprintf(number_chars," %d ",acc);
sprintf(number_chars," %d ",acc);

if(CheckDotOrdinal(tr, word, wtab, 0))
if(CheckDotOrdinal(tr, word, wtab, 1))
wtab[0].flags |= FLAG_ORDINAL;

if(tr->langopts.numbers & NUM_ROMAN_ORDINAL)
@@ -876,8 +880,8 @@ int TranslateRoman(Translator *tr, char *word, char *ph_out, WORD_TAB *wtab)
wtab[0].flags |= FLAG_ORDINAL;
}

TranslateNumber(tr, &number_chars[1], p, &flags, wtab);
tr->prev_dict_flags = 0;
TranslateNumber(tr, &number_chars[2], p, flags, wtab);

if(tr->langopts.numbers & NUM_ROMAN_AFTER)
strcat(ph_out,ph_roman);
@@ -922,6 +926,7 @@ static int LookupThousands(Translator *tr, int value, int thousandplex, int thou
char string[12];
char ph_of[12];
char ph_thousands[40];
char ph_buf[40];

ph_of[0] = 0;

@@ -976,10 +981,24 @@ static int LookupThousands(Translator *tr, int value, int thousandplex, int thou

if(Lookup(tr, string, ph_thousands) == 0)
{
// repeat "thousand" if higher order names are not available
sprintf(string,"_%dM1",value);
if((found_value = Lookup(tr, string, ph_thousands)) == 0)
Lookup(tr, "_0M1", ph_thousands);
if(thousandplex > 3)
{
sprintf(string,"_0M%d", thousandplex-1);
if(Lookup(tr, string, ph_buf) == 0)
{
// say "millions" if this name is not available and neither is the next lower
Lookup(tr, "_0M2", ph_thousands);
speak_missing_thousands = 3;
}
}
if(ph_thousands[0] == 0)
{
// repeat "thousand" if higher order names are not available
sprintf(string,"_%dM1",value);
if((found_value = Lookup(tr, string, ph_thousands)) == 0)
Lookup(tr, "_0M1", ph_thousands);
speak_missing_thousands = 2;
}
}
}
}
@@ -1015,6 +1034,9 @@ static int LookupNum2(Translator *tr, int value, int control, char *ph_out)

found = 0;
ph_ordinal[0] = 0;
ph_tens[0] = 0;
ph_digits[0] = 0;
ph_and[0] = 0;

if((control & 2) && (n_digit_lookup == 2))
{
@@ -1366,7 +1388,7 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned

int n_digits;
int value;
unsigned int ix;
int ix;
unsigned char c;
int suppress_null = 0;
int decimal_point = 0;
@@ -1376,7 +1398,6 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
int prev_thousands = 0;
int ordinal = 0;
int this_value;
static int prev_value;
int decimal_count;
int max_decimal_count;
int decimal_mode;
@@ -1394,16 +1415,48 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
static const char str_pause[2] = {phonPAUSE_NOLINK,0};

*flags = 0;
n_digit_lookup = 0;
buf_digit_lookup[0] = 0;
digit_lookup = buf_digit_lookup;

for(ix=0; isdigit(word[ix]); ix++) ;
n_digits = ix;
value = this_value = atoi(word);

// is there a previous thousands part (as a previous "word") ?
if((n_digits == 3) && (word[-2] == tr->langopts.thousands_sep) && isdigit(word[-3]))
{
prev_thousands = 1;
}
else
if((tr->langopts.thousands_sep == ' ') || (tr->langopts.numbers & NUM_ALLOW_SPACE))
{
// thousands groups can be separated by spaces
if((n_digits == 3) && isdigit(word[-2]))
{
prev_thousands = 1;
}
}
if(prev_thousands == 0)
{
speak_missing_thousands = 0;
}


ph_ordinal2[0] = 0;
ph_zeros[0] = 0;

ordinal = CheckDotOrdinal(tr, &word[ix], wtab, 1);
if(prev_thousands || (word[0] != '0'))
{
// don't check for ordinal if the number has a leading zero
ordinal = CheckDotOrdinal(tr, &word[ix], wtab, 0);
}

if((word[ix] == '.') && !isdigit(word[ix+1]) && !isdigit(word[ix+2]) && !(wtab[1].flags & FLAG_NOSPACE))
{
// remove dot unless followed by another number
word[ix] = 0;
}

if(ordinal == 0)
{
@@ -1417,7 +1470,7 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
hyphen = 1;
ix++;
}
while((word[ix] != 0) && (word[ix] != ' ') && (ix < (sizeof(suffix)-1)))
while((word[ix] != 0) && (word[ix] != ' ') && (ix < int(sizeof(suffix)-1)))
{
*p++ = word[ix++];
}
@@ -1442,20 +1495,6 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
ph_append[0] = 0;
ph_buf2[0] = 0;

// is there a previous thousands part (as a previous "word") ?
if((n_digits == 3) && (word[-2] == tr->langopts.thousands_sep) && isdigit(word[-3]))
{
prev_thousands = 1;
}
else
if((tr->langopts.thousands_sep == ' ') || (tr->langopts.numbers & NUM_ALLOW_SPACE))
{
// thousands groups can be separated by spaces
if((n_digits == 3) && isdigit(word[-2]))
{
prev_thousands = 1;
}
}

if((word[0] == '0') && (prev_thousands == 0) && (word[1] != ' ') && (word[1] != tr->langopts.decimal_sep))
{
@@ -1532,12 +1571,13 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
}
}
else
if((thousandplex > 1) && prev_thousands && (prev_value > 0))

if(speak_missing_thousands == 1)
{
sprintf(string,"_%s%d",M_Variant(value),thousandplex+1);
// speak this thousandplex if there was no word for the previous thousandplex
sprintf(string,"_0M%d",thousandplex+1);
if(Lookup(tr, string, buf1)==0)
{
// speak this thousandplex if there was no word for the previous thousandplex
sprintf(string,"_0M%d",thousandplex);
Lookup(tr, string, ph_append);
}
@@ -1548,8 +1588,6 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
Lookup(tr, "_.", ph_append);
}

n_digit_lookup = 0;
buf_digit_lookup[0] = 0;
if(thousandplex == 0)
{
char *p2;
@@ -1560,13 +1598,17 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
{
p2 = p - 1;
if(LookupDictList(tr, &p2, buf_digit_lookup, flags, FLAG_SUFX, wtab)) // lookup 2 digits
{
n_digit_lookup = 2;
}
}
if((buf_digit_lookup[0] == 0) && (*p != '0'))
{
// not found, lookup only the last digit
if(LookupDictList(tr, &p, buf_digit_lookup, flags, FLAG_SUFX, wtab)) // don't match '0', or entries with $only
n_digit_lookup = 1;
{
n_digit_lookup = 1;
}
}
}

@@ -1674,7 +1716,7 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
}

*flags |= FLAG_FOUND;
prev_value = this_value;
speak_missing_thousands--;
return(1);
} // end of TranslateNumber_1


+ 1
- 0
src/phoneme.h View File

@@ -95,6 +95,7 @@ extern const unsigned char pause_phonemes[8]; // 0, vshort, short, pause, long,

// place of articulation
#define phPLACE 0xf0000
#define phPLACE_blb 0x10000
#define phPLACE_pla 0x60000

#define N_PHONEME_TABS 100 // number of phoneme tables

+ 99
- 4
src/readclause.cpp View File

@@ -61,6 +61,7 @@ static int ignore_text=0; // set during <sub> ... </sub> to ignore text which
static int clear_skipping_text = 0; // next clause should clear the skipping_text flag
int count_characters = 0;
static int sayas_mode;
static int sayas_start;
static int ssml_ignore_l_angle = 0;

// alter tone for announce punctuation or capitals
@@ -1521,6 +1522,31 @@ static void SetProsodyParameter(int param_type, wchar_t *attr1, PARAM_STACK *sp)
} // end of SetProsodyParemeter


static int ReplaceKeyName(char *outbuf, int index, int &outix)
{//===========================================================
// Replace some key-names by single characters, so they can be pronounced in different languages
MNEM_TAB keynames[] = {
{"space ",0xe020},
{"tab ", 0xe009},
{"underscore ", 0xe05f},
{"double-quote ", '"'},
{NULL, 0}};
int ix;
int letter;
char *p;

p = &outbuf[index+1];

if((letter = LookupMnem(keynames, p)) != 0)
{
ix = utf8_out(letter, p);
outix = index + ix + 1;
return(letter);
}
return(0);
}


static int ProcessSsmlTag(wchar_t *xml_buf, char *outbuf, int &outix, int n_outbuf, int self_closing)
{//==================================================================================================
@@ -1706,10 +1732,17 @@ static int ProcessSsmlTag(wchar_t *xml_buf, char *outbuf, int &outix, int n_outb
strcpy(&outbuf[outix],buf);
outix += strlen(buf);

sayas_start = outix;
sayas_mode = value; // punctuation doesn't end clause during SAY-AS
break;

case SSML_SAYAS + SSML_CLOSE:
if(sayas_mode == SAYAS_KEY)
{
outbuf[outix] = 0;
ReplaceKeyName(outbuf, sayas_start, outix);
}

outbuf[outix++] = CTRL_EMBEDDED;
outbuf[outix++] = 'Y';
sayas_mode = 0;
@@ -1971,6 +2004,8 @@ int ReadClause(Translator *tr, FILE *f_in, char *buf, short *charix, int *charix
int is_end_clause;
int announced_punctuation;
int stressed_word = 0;
int end_clause_after_tag = 0;
int end_clause_index = 0;
const char *p;
wchar_t xml_buf[N_XML_BUF+1];

@@ -1985,6 +2020,7 @@ int ReadClause(Translator *tr, FILE *f_in, char *buf, short *charix, int *charix
clear_skipping_text = 0;
}

tr->phonemes_repeat_count = 0;
tr->clause_upper_count = 0;
tr->clause_lower_count = 0;
end_of_input = 0;
@@ -2150,6 +2186,9 @@ f_input = f_in; // for GetC etc
if(terminator != 0)
{
if(end_clause_after_tag)
ix = end_clause_index;

buf[ix] = ' ';
buf[ix++] = 0;
@@ -2333,6 +2372,9 @@ f_input = f_in; // for GetC etc
// 2nd newline, assume paragraph
UngetC(c2);

if(end_clause_after_tag)
ix = end_clause_index; // delete clause-end punctiation

buf[ix] = ' ';
buf[ix+1] = 0;
if(parag > 3)
@@ -2359,6 +2401,30 @@ if(option_ssml) parag=1;
{
is_end_clause = 0;

if(end_clause_after_tag)
{
// Because of an xml tag, we are waiting for the
// next non-blank character to decide whether to end the clause
// i.e. is dot followed by an upper-case letter?
if(c1 == '\n')
{
// end_clause_after_tag &= ~CLAUSE_DOT;
}
if(!iswspace(c1))
{
if(iswdigit(c1) || (IsAlpha(c1) && !iswlower(c1)))
{
UngetC(c2);
ungot_char2 = c1;
buf[end_clause_index] = ' '; // delete the end-clause punctuation
buf[end_clause_index+1] = 0;
return(end_clause_after_tag);
}
end_clause_after_tag = 0;
}
}

if((c1 == '.') && (c2 == '.'))
{
while((c_next = GetC()) == '.')
@@ -2396,6 +2462,7 @@ if(option_ssml) parag=1;
// if a list of allowed punctuation has been set up, check whether the character is in it
if((option_punctuation == 1) || (wcschr(option_punctlist,c1) != NULL))
{
tr->phonemes_repeat_count = 0;
if((terminator = AnnouncePunctuation(tr, c1, &c2, buf, &ix, is_end_clause)) >= 0)
return(terminator);
announced_punctuation = c1;
@@ -2432,6 +2499,11 @@ if(option_ssml) parag=1;
}
}

if((c1 == '.') && (nl_count < 2))
{
punct_data |= CLAUSE_DOT;
}

if(nl_count==0)
{
if(c1 == '.')
@@ -2440,14 +2512,21 @@ if(option_ssml) parag=1;
(iswdigit(cprev) || (IsRomanU(cprev) && (IsRomanU(cprev2) || iswspace(cprev2))))) // lang=hu
{
// dot after a number indicates an ordinal number
if(!iswdigit(cprev) || iswlower(c_next) || (c_next == '<'))
is_end_clause = 0; // only if followed by lower-case, (or if there is a XML tag)
if(!iswdigit(cprev))
{
is_end_clause = 0; // Roman number followed by dot
}
else
{
if (iswlower(c_next))
is_end_clause = 0; // only if followed by lower-case, (or if there is a XML tag)
}
}
else
if(iswlower(c_next))
{
// next word has no capital letter, this dot is probably from an abbreviation
c1 = ' ';
// c1 = ' ';
is_end_clause = 0;
}
if(any_alnum==0)
@@ -2466,6 +2545,14 @@ if(option_ssml) parag=1;
is_end_clause = 0;
}
}

if(is_end_clause && (c1 == '.') && (c_next == '<') && option_ssml)
{
// wait until after the end of the xml tag, then look for upper-case letter
is_end_clause = 0;
end_clause_index = ix;
end_clause_after_tag = punct_data;
}
}

if(is_end_clause)
@@ -2473,7 +2560,11 @@ if(option_ssml) parag=1;
UngetC(c_next);
buf[ix] = ' ';
buf[ix+1] = 0;

if(!IsAlpha(c_next))
{
punct_data &= ~CLAUSE_DOT;
}
if(nl_count > 1)
{
if((punct_data == CLAUSE_QUESTION) || (punct_data == CLAUSE_EXCLAMATION))
@@ -2536,6 +2627,10 @@ if(option_ssml) parag=1;
{
ix += utf8_out(CHAR_EMPHASIS, &buf[ix]);
}
if(end_clause_after_tag)
{
ix = end_clause_index; // delete clause-end punctuation
}
buf[ix] = ' ';
buf[ix+1] = 0;
return(CLAUSE_EOF); // end of file

+ 2
- 2
src/setlengths.cpp View File

@@ -326,10 +326,10 @@ void CalcLengths(Translator *tr)
case phSTOP:
last_pitch = 0;
if(prev->type == phFRICATIVE)
p->prepause = 20;
p->prepause = 25;
else
if((more_syllables > 0) || (stress < 4))
p->prepause = 40;
p->prepause = 48;
else
p->prepause = 60;


+ 39
- 1
src/speak_lib.cpp View File

@@ -47,6 +47,7 @@
#include "wave.h"

unsigned char *outbuf=NULL;
extern FILE *f_logespeak;
extern espeak_VOICE voice_selected;

espeak_EVENT *event_list=NULL;
@@ -713,7 +714,12 @@ ENTER("espeak_Initialize");
init_path(path);
initialise();
select_output(output_type);

if(f_logespeak)
{
fprintf(f_logespeak,"INIT mode %d options 0x%x\n",output_type,options);
}

// buflength is in mS, allocate 2 bytes per sample
if(buf_length == 0)
buf_length = 200;
@@ -763,6 +769,12 @@ ESPEAK_API espeak_ERROR espeak_Synth(const void *text, size_t size,
SHOW("espeak_Synth > position=%d, position_type=%d, end_position=%d, flags=%d, user_data=0x%x, text=%s\n", position, position_type, end_position, flags, user_data, text);
#endif

if(f_logespeak)
{
fprintf(f_logespeak,"\nSYNTH posn %d %d %d flags 0x%x\n%s\n",position,end_position,position_type,flags, (const char *)text);
fflush(f_logespeak);
}

espeak_ERROR a_error=EE_INTERNAL_ERROR;
static unsigned int temp_identifier;

@@ -825,6 +837,12 @@ ESPEAK_API espeak_ERROR espeak_Synth_Mark(const void *text, size_t size,
espeak_ERROR a_error=EE_OK;
static unsigned int temp_identifier;

if(f_logespeak)
{
fprintf(f_logespeak,"\nSYNTH MARK %s posn %d flags 0x%x\n%s\n",index_mark,end_position,flags, (const char *)text);
}


if (unique_identifier == NULL)
{
unique_identifier = &temp_identifier;
@@ -875,6 +893,11 @@ ESPEAK_API espeak_ERROR espeak_Key(const char *key)
ENTER("espeak_Key");
// symbolic name, symbolicname_character - is there a system resource of symbolicnames per language

if(f_logespeak)
{
fprintf(f_logespeak,"\nKEY %s\n",key);
}

espeak_ERROR a_error = EE_OK;

if(synchronous_mode)
@@ -901,6 +924,11 @@ ESPEAK_API espeak_ERROR espeak_Char(wchar_t character)
ENTER("espeak_Char");
// is there a system resource of character names per language?

if(f_logespeak)
{
fprintf(f_logespeak,"\nCHAR U+%x\n",character);
}

#ifdef USE_ASYNC
espeak_ERROR a_error;

@@ -997,6 +1025,10 @@ ESPEAK_API espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int valu
{//=============================================================================================
ENTER("espeak_SetParameter");

if(f_logespeak)
{
fprintf(f_logespeak,"SETPARAM %d %d %d\n",parameter,value,relative);
}
#ifdef USE_ASYNC
espeak_ERROR a_error;

@@ -1141,6 +1173,12 @@ ESPEAK_API espeak_ERROR espeak_Terminate(void)
outbuf = NULL;
FreePhData();

if(f_logespeak)
{
fclose(f_logespeak);
f_logespeak = NULL;
}

return EE_OK;
} // end of espeak_Terminate


+ 1
- 1
src/speak_lib.h View File

@@ -507,7 +507,7 @@ const espeak_VOICE **espeak_ListVoices(espeak_VOICE *voice_spec);
The list is terminated by a NULL pointer

If voice_spec is NULL then all voices are listed.
If voice spec is give, then only the voices which are compatible with the voice_spec
If voice spec is given, then only the voices which are compatible with the voice_spec
are listed, and they are listed in preference order.
*/


+ 14
- 2
src/synthdata.cpp View File

@@ -35,10 +35,12 @@
#include "translate.h"
#include "wave.h"

const char *version_string = "1.41.32 09.Nov.09";
const int version_phdata = 0x014118;
const char *version_string = "1.42.02 30.Nov.09";
const int version_phdata = 0x014200;

int option_device_number = -1;
FILE *f_logespeak = NULL;
int logging_type;

// copy the current phoneme table into here
int n_phoneme_tab;
@@ -640,6 +642,8 @@ void LoadConfig(void)
char *p;
char string[200];

logging_type = 0;

for(ix=0; ix<N_SOUNDICON_SLOTS; ix++)
{
soundicon_tab[ix].filename = NULL;
@@ -654,6 +658,14 @@ void LoadConfig(void)

while(fgets(buf,sizeof(buf),f)!=NULL)
{
if(buf[0] == '/') continue;

if(memcmp(buf,"log",3)==0)
{
if(sscanf(&buf[4],"%d %s",&logging_type,string)==2)
f_logespeak = fopen(string,"w");
}
else
if(memcmp(buf,"tone",4)==0)
{
ReadTonePoints(&buf[5],tone_points);

+ 51
- 12
src/synthesize.cpp View File

@@ -876,36 +876,65 @@ int DoSpect(PHONEME_TAB *this_ph, PHONEME_TAB *prev_ph, PHONEME_TAB *next_ph,
int ix;
long *q;
int len;
int min;
int match_level;
int frame_length;
int frame1_length;
int frame2_length;
int length_factor;
int length_mod;
int length_mod2; // reduced effect length_mod
int total_len = 0;
int len_adjust_factor = 256;
static int wave_flag = 0;
int wcmd_spect = WCMD_SPECT;

length_mod = plist->length;
if(length_mod==0) length_mod=256;

if(which==1)
{
// limit the shortening of sonorants before shortened (eg. unstressed vowels)
if((this_ph->type==phLIQUID) || (prev_ph->type==phLIQUID) || (prev_ph->type==phNASAL))
length_mod2 = (length_mod*(256-speed.speed_factor3) + 256*speed.speed_factor3)/256;

if(which==1)
{
if(length_mod < (len = translator->langopts.param[LOPT_SONORANT_MIN]))
// limit the shortening of sonorants before shortened (eg. unstressed vowels)
if((this_ph->type==phLIQUID) || (prev_ph->type==phLIQUID) || (prev_ph->type==phNASAL))
{
length_mod = len;
if(length_mod < (len = translator->langopts.param[LOPT_SONORANT_MIN]))
{
length_mod = len;
}
}
}
}

modn_flags = 0;
frames = LookupSpect(this_ph,prev_ph,next_ph,which,&match_level,&n_frames, plist);
if(frames == NULL)
return(0); // not found

// if((which==2) && (this_ph->phflags & phLONG))
if((which==2) && (this_ph->std_length >= 200))
{
// apply a minimum length for long vowels at fast speeds, to keep the distinction with short vowels
total_len = 0;
for(frameix=0; frameix<(n_frames-1); frameix++)
{
length_factor = length_mod;
if(frames[frameix].frflags & FRFLAG_LEN_MOD) // reduce effect of length mod
{
length_factor = length_mod2;
}
len = (frames[frameix].length * samplerate)/1000;
len = (len * length_factor)/256;
total_len += len;
}

min = translator->langopts.param[LOPT_MIN_LONG_VOWEL] * (samplerate)/1000;
min = (min * length_mod2)/256;
if(total_len < min)
{
len_adjust_factor = (min*256)/total_len;
}
}

frame1 = frames[0].frame;
frame1_length = frames[0].length;
if(voice->klattv[0])
@@ -960,6 +989,7 @@ if(which==1)
syllable_centre = wcmdq_tail;
}

total_len = 0;
frame_length = frame1_length;
for(frameix=1; frameix<n_frames; frameix++)
{
@@ -978,10 +1008,11 @@ if(which==1)
length_factor = length_mod;
if(frame1->frflags & FRFLAG_LEN_MOD) // reduce effect of length mod
{
length_factor = (length_mod*(256-speed.speed_factor3) + 256*speed.speed_factor3)/256;
length_factor = length_mod2;
}
len = (frame_length * samplerate)/1000;
len = (len * length_factor)/256;
len = (len * len_adjust_factor)/256;

if(modulation >= 0)
{
@@ -1210,8 +1241,16 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)

case phSTOP:
released = 0;
if(next->type==phVOWEL) released = 1;
if(next->type==phLIQUID && !next->newword) released = 1;
if(next->type==phVOWEL)
{
released = 1;
}
else
if(!next->newword)
{
if(next->type==phLIQUID) released = 1;
// if(((p->ph->phflags & phPLACE) == phPLACE_blb) && (next->ph->phflags & phSIBILANT)) released = 1;
}

if(released)
DoSample(p->ph,next->ph,2,0,0);
@@ -1307,7 +1346,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
}
}

if((next->type==phVOWEL) || ((next->type==phLIQUID)) && (next->newword==0)) // ?? test 14.Aug.2007
if((next->type==phVOWEL) || ((next->type==phLIQUID) && (next->newword==0))) // ?? test 14.Aug.2007
{
StartSyllable();
if(p->synthflags & SFLAG_LENGTHEN)

+ 28
- 13
src/tr_languages.cpp View File

@@ -46,6 +46,7 @@
#define OFFSET_GREEK 0x380
#define OFFSET_CYRILLIC 0x420
#define OFFSET_ARMENIAN 0x530
#define OFFSET_ARABIC 0x600
#define OFFSET_DEVANAGARI 0x900
#define OFFSET_BENGALI 0x980
#define OFFSET_GURMUKHI 0xa00
@@ -156,6 +157,7 @@ static Translator* NewTranslator(void)
tr->langopts.param[LOPT_UNPRONOUNCABLE] = 's'; // don't count this character at start of word
tr->langopts.param[LOPT_BRACKET_PAUSE] = 4; // pause at bracket
tr->langopts.param2[LOPT_BRACKET_PAUSE] = 2; // pauses when announcing bracket names
tr->langopts.param[LOPT_MIN_LONG_VOWEL] = 40;
tr->langopts.max_initial_consonants = 3;
tr->langopts.replace_chars = NULL;
tr->langopts.ascii_language = ""; // Non-Latin alphabet languages, use this language to speak Latin words, default is English
@@ -221,7 +223,9 @@ void SetIndicLetters(Translator *tr)
static const char dev_consonants2[] = {0x02,0x03,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f};

memset(tr->letter_bits,0,sizeof(tr->letter_bits));
SetLetterBitsRange(tr,LETTERGP_A,0x04,0x14); // vowel letters only
SetLetterBitsRange(tr,LETTERGP_A,0x04,0x14); // vowel letters
SetLetterBitsRange(tr,LETTERGP_A,0x3e,0x4d); // + vowel signs, and virama

SetLetterBitsRange(tr,LETTERGP_B,0x3e,0x4d); // vowel signs, and virama

SetLetterBitsRange(tr,LETTERGP_C,0x15,0x39); // the main consonant range
@@ -274,6 +278,12 @@ Translator *SelectTranslator(const char *name)
}
break;

case L('a','r'): // Arabic
case L('u','r'): // Urdu
tr->letter_bits_offset = OFFSET_ARABIC;
tr->langopts.param[LOPT_UNPRONOUNCABLE] = 1; // disable check for unpronouncable words
break;

case L('b','n'): // Bengali
{
static const short stress_lengths_bn[8] = {180, 180, 210, 210, 0, 0, 230, 240};
@@ -463,13 +473,15 @@ Translator *SelectTranslator(const char *name)
static const unsigned char stress_amps_eu[8] = {16,16, 18,18, 18,18, 18,18 };
SetupTranslator(tr,stress_lengths_eu,stress_amps_eu);
tr->langopts.stress_rule = STRESSPOSN_2L; // ?? second syllable ??
tr->langopts.numbers = NUM_SINGLE_STRESS + NUM_DECIMAL_COMMA | NUM_AND_UNITS | NUM_HUNDRED_AND | NUM_OMIT_1_HUNDRED | NUM_VIGESIMAL;
tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_AND_UNITS | NUM_HUNDRED_AND | NUM_OMIT_1_HUNDRED | NUM_VIGESIMAL;
}
break;


case L('f','a'): // Farsi
{
tr->letter_bits_offset = OFFSET_ARABIC;
tr->langopts.numbers = NUM_AND_UNITS | NUM_HUNDRED_AND;
tr->langopts.param[LOPT_UNPRONOUNCABLE] = 1; // disable check for unpronouncable words
}
break;
@@ -486,6 +498,7 @@ Translator *SelectTranslator(const char *name)
tr->langopts.stress_flags = 0x56; // move secondary stress from light to a following heavy syllable
tr->langopts.param[LOPT_IT_DOUBLING] = 1;
tr->langopts.long_stop = 130;
tr->langopts.param[LOPT_MIN_LONG_VOWEL] = 65;

tr->langopts.numbers = NUM_DECIMAL_COMMA + NUM_ALLOW_SPACE;
SetLetterVowel(tr,'y');
@@ -506,7 +519,7 @@ Translator *SelectTranslator(const char *name)
tr->langopts.stress_flags = 0x0024; // don't use secondary stress
tr->langopts.param[LOPT_IT_LENGTHEN] = 1; // remove lengthen indicator from unstressed syllables

tr->langopts.numbers = NUM_SINGLE_STRESS + NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_OMIT_1_HUNDRED | NUM_NOPAUSE | NUM_ROMAN | NUM_VIGESIMAL | NUM_DFRACTION_4;
tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_OMIT_1_HUNDRED | NUM_NOPAUSE | NUM_ROMAN | NUM_VIGESIMAL | NUM_DFRACTION_4;
SetLetterVowel(tr,'y');
}
break;
@@ -558,7 +571,7 @@ Translator *SelectTranslator(const char *name)
tr->langopts.spelling_stress = 1;
tr->langopts.accents = 1;

tr->langopts.numbers = NUM_SINGLE_STRESS + NUM_HUNDRED_AND | NUM_DECIMAL_COMMA | NUM_THOUS_SPACE | NUM_DFRACTION_2 | NUM_ROMAN_UC;
tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_HUNDRED_AND | NUM_OMIT_1_HUNDRED | NUM_DECIMAL_COMMA | NUM_THOUS_SPACE | NUM_DFRACTION_2 | NUM_ROMAN_UC;
tr->langopts.numbers2 = 0x4a; // variant numbers before thousands,milliards
tr->langopts.replace_chars = replace_cyrillic_latin;

@@ -578,11 +591,11 @@ Translator *SelectTranslator(const char *name)

tr->langopts.vowel_pause = 0x20;
tr->langopts.stress_rule = STRESSPOSN_1L;
tr->langopts.stress_flags = 0x8036 | STRS_HYPEN_UNSTRESS;
tr->langopts.stress_flags = 0x8036 | S_HYPEN_UNSTRESS;
tr->langopts.unstressed_wd1 = 2;
tr->langopts.param[LOPT_IT_DOUBLING] = 1;
tr->langopts.param[LOPT_ANNOUNCE_PUNCT] = 2; // don't break clause before announcing . ? !
// tr->langopts.param[LOPT_COMBINE_WORDS] = 9; // combine some prepositions with the following word
tr->langopts.param[LOPT_MIN_LONG_VOWEL] = 65;

tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_DFRACTION_5 | NUM_ROMAN | NUM_ROMAN_ORDINAL | NUM_ROMAN_CAPITALS | NUM_ORDINAL_DOT | NUM_OMIT_1_HUNDRED;
tr->langopts.min_roman = 1;
@@ -786,7 +799,7 @@ SetLengthMods(tr,3); // all equal
SetupTranslator(tr,stress_lengths_no,NULL);
tr->langopts.stress_rule = STRESSPOSN_1L;
SetLetterVowel(tr,'y');
tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_HUNDRED_AND | NUM_ALLOW_SPACE | NUM_1900 + NUM_ORDINAL_DOT;
tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_HUNDRED_AND | NUM_ALLOW_SPACE | NUM_1900 | NUM_ORDINAL_DOT;
}
break;

@@ -822,18 +835,19 @@ SetLengthMods(tr,3); // all equal

case L('p','t'): // Portuguese
{
static const short stress_lengths_pt[8] = {180, 125, 210, 210, 0, 0, 270, 295};
static const unsigned char stress_amps_pt[8] = {16,13, 19,19, 20,22, 22,21 }; // 'diminished' is used to mark a quieter, final unstressed syllable
static const short stress_lengths_pt[8] = {170, 115, 210, 240, 0, 0, 260, 280};
static const unsigned char stress_amps_pt[8] = {16,11, 19,21, 20,22, 22,21 }; // 'diminished' is used to mark a quieter, final unstressed syllable

SetupTranslator(tr,stress_lengths_pt,stress_amps_pt);
tr->langopts.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable

tr->langopts.stress_rule = STRESSPOSN_1R; // stress on final syllable
tr->langopts.stress_flags = 0x6 | 0x10 | 0x20000;
tr->langopts.stress_flags = 0x6 | 0x10 | 0x2000 | 0x20000;
tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_DFRACTION_2 | NUM_HUNDRED_AND | NUM_AND_UNITS | NUM_ROMAN;
SetLetterVowel(tr,'y');
ResetLetterBits(tr,0x2);
SetLetterBits(tr,1,"bcdfgjkmnpqstvxz"); // B hard consonants, excluding h,l,r,w,y
tr->langopts.param[LOPT_ALT] = 2; // call ApplySpecialAttributes2() if a word has $alt or $alt2
}
break;

@@ -924,7 +938,7 @@ SetLengthMods(tr,3); // all equal

tr->langopts.stress_rule = STRESSPOSN_1L;
SetLetterVowel(tr,'y');
tr->langopts.numbers = NUM_SINGLE_STRESS + NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_1900;
tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_1900;
tr->langopts.accents = 1;
}
break;
@@ -959,7 +973,7 @@ SetLengthMods(tr,3); // all equal

tr->langopts.stress_rule = STRESSPOSN_1L;
tr->langopts.stress_flags = 0x10004; // use 'diminished' for unstressed final syllable
tr->langopts.break_numbers = 0x24a8; // 1000, 100,000 10,000,000
tr->langopts.break_numbers = 0x14a8; // 1000, 100,000 10,000,000

if(name2 == L('t','a'))
{
@@ -1015,7 +1029,7 @@ SetLengthMods(tr,3); // all equal
tr->langopts.stress_rule = 7; // stress on the last syllable, before any explicitly unstressed syllable
tr->langopts.stress_flags = 0x20; //no automatic secondary stress

tr->langopts.numbers = NUM_SINGLE_STRESS + NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_OMIT_1_HUNDRED | NUM_DFRACTION_2;
tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_OMIT_1_HUNDRED | NUM_DFRACTION_2;
tr->langopts.max_initial_consonants = 2;
}
break;
@@ -1093,6 +1107,7 @@ SetLengthMods(tr,3); // all equal
{
tr->langopts.thousands_sep = 0; // don't allow thousands separator, except space
}

return(tr);
} // end of SelectTranslator


+ 96
- 45
src/translate.cpp View File

@@ -80,7 +80,11 @@ int pre_pause;


// these were previously in translator class
#ifdef PLATFORM_WINDOWS
char word_phonemes[N_WORD_PHONEMES*2]; // longer, because snprint() is not available
#else
char word_phonemes[N_WORD_PHONEMES]; // a word translated into phoneme codes
#endif
int n_ph_list2;
PHONEME_LIST2 ph_list2[N_PHONEME_LIST]; // first stage of text->phonemes

@@ -384,6 +388,9 @@ int IsAlpha(unsigned int c)
return(0);
}

if((c >= 0x64b) && (c <= 0x65e))
return(1); // arabic vowel marks

if((c >= 0x300) && (c <= 0x36f))
return(1); // combining accents

@@ -567,7 +574,6 @@ char *strchr_w(const char *s, int c)




int TranslateWord(Translator *tr, char *word1, int next_pause, WORD_TAB *wtab)
{//===========================================================================
// word1 is terminated by space (0x20) character
@@ -585,17 +591,16 @@ int TranslateWord(Translator *tr, char *word1, int next_pause, WORD_TAB *wtab)
char *wordx;
char phonemes[N_WORD_PHONEMES];
char *ph_limit;
char *phonemes_ptr;
char prefix_phonemes[N_WORD_PHONEMES];
char unpron_phonemes[N_WORD_PHONEMES];
char end_phonemes[N_WORD_PHONEMES];
char word_copy[N_WORD_BYTES];
char prefix_chars[N_WORD_BYTES];
char prefix_chars[41];
int found=0;
int end_flags;
char c_temp; // save a character byte while we temporarily replace it with space
int first_char;
int last_char = 0;
int unpron_length;
int add_plural_suffix = 0;
int prefix_flags = 0;
int confirm_prefix;
@@ -626,6 +631,8 @@ int TranslateWord(Translator *tr, char *word1, int next_pause, WORD_TAB *wtab)
dictionary_flags2[1] = 0;
dictionary_skipwords = 0;

phonemes[0] = 0;
unpron_phonemes[0] = 0;
prefix_phonemes[0] = 0;
end_phonemes[0] = 0;
ph_limit = &phonemes[N_WORD_PHONEMES];
@@ -649,15 +656,22 @@ int TranslateWord(Translator *tr, char *word1, int next_pause, WORD_TAB *wtab)
word_length++;
}

// try an initial lookup in the dictionary list, we may find a pronunciation specified, or
// we may just find some flags
spell_word = 0;
if(option_sayas == SAYAS_KEY)
{
if(word_length == 1)
spell_word = 4;
else
{
// is there a translation for this keyname ?
word1--;
*word1 = '_'; // prefix keyname with '_'
found = LookupDictList(tr, &word1, phonemes, dictionary_flags, 0, wtab);
}
}

// try an initial lookup in the dictionary list, we may find a pronunciation specified, or
// we may just find some flags
if(option_sayas & 0x10)
{
// SAYAS_CHAR, SAYAS_GYLPH, or SAYAS_SINGLE_CHAR
@@ -665,9 +679,10 @@ int TranslateWord(Translator *tr, char *word1, int next_pause, WORD_TAB *wtab)
}
else
{
found = LookupDictList(tr, &word1, phonemes, dictionary_flags, FLAG_ALLOW_TEXTMODE, wtab); // the original word
if(!found)
found = LookupDictList(tr, &word1, phonemes, dictionary_flags, FLAG_ALLOW_TEXTMODE, wtab); // the original word

if((dictionary_flags[0] & FLAG_DOT) && (wordx[1] == '.'))
if((dictionary_flags[0] & (FLAG_ALLOW_DOT || FLAG_NEEDS_DOT)) && (wordx[1] == '.'))
{
wordx[1] = ' '; // remove a Dot after this word
}
@@ -773,7 +788,7 @@ if((wmark > 0) && (wmark < 8))

while(*wordx != ' ')
{
wordx += TranslateLetter(tr,wordx, phonemes,spell_word, word_length);
wordx += TranslateLetter(tr,wordx, phonemes, spell_word);
posn++;
if(phonemes[0] == phonSWITCH)
{
@@ -802,13 +817,13 @@ if((wmark > 0) && (wmark < 8))
// This word looks "unpronouncable", so speak letters individually until we
// find a remainder that we can pronounce.
emphasize_allcaps = 0;
wordx += TranslateLetter(tr,wordx,phonemes,0, word_length);
wordx += TranslateLetter(tr, wordx, unpron_phonemes, 0);
posn++;
if(phonemes[0] == phonSWITCH)
{
// change to another language in order to translate this word
strcpy(word_phonemes,phonemes);
if(strcmp(&phonemes[1],"en")==0)
strcpy(word_phonemes,unpron_phonemes);
if(strcmp(&unpron_phonemes[1],"en")==0)
return(FLAG_SPELLWORD); // _^_en must have been set in TranslateLetter(), not *_rules
return(0);
}
@@ -828,13 +843,12 @@ if((wmark > 0) && (wmark < 8))
if(length > 0)
wordx[-1] = ' '; // prevent this affecting the pronunciation of the pronuncable part
}
SetSpellingStress(tr,phonemes,0,posn);
SetSpellingStress(tr,unpron_phonemes,0,posn);

// anything left ?
if(*wordx != ' ')
{
// Translate the stem
unpron_length = strlen(phonemes);
end_type = TranslateRules(tr, wordx, phonemes, N_WORD_PHONEMES, end_phonemes, wflags, dictionary_flags);

if(phonemes[0] == phonSWITCH)
@@ -855,7 +869,7 @@ if((wmark > 0) && (wmark < 8))
posn = 0;
while((*wordx != ' ') && (*wordx != 0))
{
wordx += TranslateLetter(tr,wordx, phonemes, 4, word_length);
wordx += TranslateLetter(tr,wordx, phonemes, 4);
posn++;
if(phonemes[0] == phonSWITCH)
{
@@ -1000,14 +1014,13 @@ strcpy(phonemes2,phonemes);
// The word has a standard ending, re-translate without this ending
end_flags = RemoveEnding(tr, wordx, end_type, word_copy);

phonemes_ptr = &phonemes[unpron_length];
phonemes_ptr[0] = 0;
phonemes[0] = 0;

if(prefix_phonemes[0] != 0)
{
// lookup the stem without the prefix removed
wordx[-1] = c_temp;
found = LookupDictList(tr, &word1, phonemes_ptr, dictionary_flags2, end_flags, wtab); // include prefix, but not suffix
found = LookupDictList(tr, &word1, phonemes, dictionary_flags2, end_flags, wtab); // include prefix, but not suffix
wordx[-1] = ' ';
if(dictionary_flags[0]==0)
{
@@ -1022,12 +1035,12 @@ strcpy(phonemes2,phonemes);
}
if(found == 0)
{
found = LookupDictList(tr, &wordx, phonemes_ptr, dictionary_flags2, end_flags, wtab); // without prefix and suffix
if(phonemes_ptr[0] == phonSWITCH)
found = LookupDictList(tr, &wordx, phonemes, dictionary_flags2, end_flags, wtab); // without prefix and suffix
if(phonemes[0] == phonSWITCH)
{
// change to another language in order to translate this word
memcpy(wordx,word_copy,strlen(word_copy));
strcpy(word_phonemes,phonemes_ptr);
strcpy(word_phonemes,phonemes);
return(0);
}
if(dictionary_flags[0]==0)
@@ -1115,15 +1128,23 @@ strcpy(phonemes2,phonemes);
*p = phonSTRESS_3;
}
}
strcpy(word_phonemes,prefix_phonemes);
strcat(word_phonemes,phonemes);
#ifdef PLATFORM_WINDOWS
sprintf(word_phonemes, "%s%s%s", unpron_phonemes, prefix_phonemes, phonemes);
#else
snprintf(word_phonemes, sizeof(word_phonemes), "%s%s%s", unpron_phonemes, prefix_phonemes, phonemes);
#endif
word_phonemes[N_WORD_PHONEMES-1] = 0;
SetWordStress(tr, word_phonemes, dictionary_flags, -1, 0);
}
else
{
// stress position affects the whole word, including prefix
strcpy(word_phonemes,prefix_phonemes);
strcat(word_phonemes,phonemes);
#ifdef PLATFORM_WINDOWS
sprintf(word_phonemes, "%s%s%s", unpron_phonemes, prefix_phonemes, phonemes);
#else
snprintf(word_phonemes, sizeof(word_phonemes), "%s%s%s", unpron_phonemes, prefix_phonemes, phonemes);
#endif
word_phonemes[N_WORD_PHONEMES-1] = 0;
SetWordStress(tr, word_phonemes, dictionary_flags, -1, tr->prev_last_stress);
}
}
@@ -1133,14 +1154,20 @@ strcpy(phonemes2,phonemes);
SetWordStress(tr, phonemes, dictionary_flags, -1, tr->prev_last_stress);
else
SetWordStress(tr, phonemes, dictionary_flags, -1, 0);
strcpy(word_phonemes,prefix_phonemes);
strcat(word_phonemes,phonemes);
#ifdef PLATFORM_WINDOWS
sprintf(word_phonemes, "%s%s%s", unpron_phonemes, prefix_phonemes, phonemes);
#else
snprintf(word_phonemes, sizeof(word_phonemes), "%s%s%s", unpron_phonemes, prefix_phonemes, phonemes);
#endif
word_phonemes[N_WORD_PHONEMES-1] = 0;
}

if(end_phonemes[0] != 0)
{
// a suffix had the SUFX_T option set, add the suffix after the stress pattern has been determined
strcat(word_phonemes,end_phonemes);
ix = strlen(word_phonemes);
end_phonemes[N_WORD_PHONEMES-1-ix] = 0; // ensure no buffer overflow
strcpy(&word_phonemes[ix], end_phonemes);
}

if(wflags & FLAG_LAST_WORD)
@@ -1150,7 +1177,7 @@ strcpy(phonemes2,phonemes);
dictionary_flags[0] &= ~FLAG_PAUSE1;
}

if((wflags & FLAG_HYPHEN) && (tr->langopts.stress_flags & STRS_HYPEN_UNSTRESS))
if((wflags & FLAG_HYPHEN) && (tr->langopts.stress_flags & S_HYPEN_UNSTRESS))
{
ChangeWordStress(tr,word_phonemes,3);
}
@@ -1237,7 +1264,7 @@ strcpy(phonemes2,phonemes);
{
// English Specific !!!!
// any single letter before a dot is an abbreviation, except 'I'
dictionary_flags[0] |= FLAG_DOT;
dictionary_flags[0] |= FLAG_ALLOW_DOT;
}

if((tr->langopts.param[LOPT_ALT] & 2) && ((dictionary_flags[0] & (FLAG_ALT_TRANS | FLAG_ALT2_TRANS)) != 0))
@@ -2186,12 +2213,10 @@ void *TranslateClause(Translator *tr, FILE *f_text, const void *vp_input, int *t
}
}

if(option_sayas2 == SAYAS_KEY)
if((option_sayas2 == SAYAS_KEY) && (c != ' '))
{
if(((c == '_') || (c == '-')) && IsAlpha(prev_in))
{
c = ' ';
}
if((prev_in == ' ') && (next_in == ' '))
option_sayas2 = SAYAS_SINGLE_CHARS; // single character, speak its name
c = towlower2(c);
}

@@ -2231,7 +2256,7 @@ void *TranslateClause(Translator *tr, FILE *f_text, const void *vp_input, int *t
}
}
else
if((option_sayas2 & 0x30) == 0)
if((option_sayas2 & 0x10) == 0)
{
// speak as words

@@ -2325,6 +2350,7 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
// start of word, insert space if not one there already
c = ' ';
space_inserted = 1;
next_word_flags |= FLAG_NOSPACE;
}
else
{
@@ -2402,12 +2428,21 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
else
if(c=='-')
{
if((IsAlpha(prev_in) || iswdigit(prev_in)) && IsAlpha(next_in))
if(!IsSpace(prev_in) && IsAlpha(next_in))
{
// '-' between two letters is a hyphen, treat as a space
word_flags |= FLAG_HYPHEN;
words[word_count-1].flags |= FLAG_HYPHEN_AFTER;
c = ' ';
if(prev_out != ' ')
{
// previous 'word' not yet ended (not alpha or numeric), start new word now.
c = ' ';
space_inserted = 1;
}
else
{
// '-' between two letters is a hyphen, treat as a space
word_flags |= FLAG_HYPHEN;
words[word_count-1].flags |= FLAG_HYPHEN_AFTER;
c = ' ';
}
}
else
if((prev_in==' ') && (next_in==' '))
@@ -2433,6 +2468,18 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
}
}
else
if(c == '.')
{
if(!(words[word_count-1].flags & FLAG_NOSPACE) && IsAlpha(prev_in))
{
// dot after a word, with space following, probably an abbreviation
words[word_count-1].flags |= FLAG_HAS_DOT;

if(IsSpace(next_in))
c = ' '; // remove the dot if it's followed by a space, so that it's not pronounced
}
}
else
if(c == '\'')
{
if(iswalnum(prev_in) && IsAlpha(next_in))
@@ -2604,9 +2651,14 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
words[0].pre_pause = 0; // don't add extra pause at beginning of clause
words[word_count].pre_pause = 8;
if(word_count > 0)
{
words[word_count-1].flags |= FLAG_LAST_WORD;
if((terminator & CLAUSE_DOT) && !(words[word_count-1].flags & FLAG_NOSPACE))
words[word_count-1].flags |= FLAG_HAS_DOT;
}
words[0].flags |= FLAG_FIRST_WORD;


for(ix=0; ix<word_count; ix++)
{
int nx;
@@ -2693,11 +2745,10 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
}
}
}
word = pw;
pw--;

// include the next few characters, in case there are an ordinal indicator or other suffix
pn[0] = ' ';
memcpy(pn+1, pw, 16);
memcpy(pn, pw, 16);
pn[16] = 0;

for(pw = &number_buf[1]; pw < pn;)
@@ -2732,7 +2783,7 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
}
}

if((dict_flags & FLAG_DOT) && (ix == word_count-1) && (terminator == CLAUSE_PERIOD))
if((dict_flags & (FLAG_ALLOW_DOT | FLAG_NEEDS_DOT)) && (ix == word_count-1) && (terminator & CLAUSE_DOT))
{
// probably an abbreviation such as Mr. or B. rather than end of sentence
clause_pause = 10;

+ 26
- 7
src/translate.h View File

@@ -48,7 +48,6 @@
#define FLAG_ATEND 0x4000 /* use this pronunciation if at end of clause */
#define FLAG_SPELLWORD 0x8000 // re-translate the word as individual letters, separated by spaces

#define FLAG_DOT 0x10000 /* ignore '.' after word (abbreviation) */
#define FLAG_ABBREV 0x20000 // spell as letters, even with a vowel, OR use specified pronunciation rather than split into letters
#define FLAG_STEM 0x40000 // must have a suffix

@@ -57,6 +56,9 @@
#define FLAG_ALT2_TRANS 0x200000 // language specific
#define FLAG_COMBINE 0x400000 // combine with the next word

#define FLAG_ALLOW_DOT 0x01000000 // ignore '.' after word (abbreviation)
#define FLAG_NEEDS_DOT 0x02000000 // only if the word is followed by a dot

#define FLAG_MAX3 0x08000000 // limit to 3 repeats
#define FLAG_PAUSE1 0x10000000 // shorter prepause
#define FLAG_TEXTMODE 0x20000000 // word translates to replacement text, not phonemes
@@ -100,9 +102,10 @@
#define FLAG_SUFFIX_REMOVED 0x2000
#define FLAG_HYPHEN_AFTER 0x4000
#define FLAG_ORDINAL 0x8000 // passed to TranslateNumber() to indicate an ordinal number
#define FLAG_HAS_DOT 0x10000 // dot after this word

#define FLAG_NO_TRACE 0x10000 // passed to TranslateRules() to suppress dictionary lookup printout
#define FLAG_NO_PREFIX 0x20000
#define FLAG_NO_TRACE 0x10000000 // passed to TranslateRules() to suppress dictionary lookup printout
#define FLAG_NO_PREFIX 0x20000000

// prefix/suffix flags (bits 8 to 14, bits 16 to 22) don't use 0x8000, 0x800000
#define SUFX_E 0x0100 // e may have been added
@@ -169,12 +172,14 @@
// bit 16 used to distinguish otherwise identical types
// bit 20= punctuation character can be inside a word (Armenian)
// bit 21= speak the name of the punctuation character
// bit 22= dot after the last word
#define CLAUSE_BIT_SENTENCE 0x80000
#define CLAUSE_BIT_CLAUSE 0x40000
#define CLAUSE_BIT_VOICE 0x20000
#define CLAUSE_BITS_INTONATION 0x7000
#define PUNCT_IN_WORD 0x100000
#define PUNCT_SAY_NAME 0x200000
#define CLAUSE_DOT 0x400000

#define CLAUSE_NONE 0 + 0x04000
#define CLAUSE_PARAGRAPH 70 + 0x80000
@@ -215,9 +220,9 @@ typedef struct {

// used to mark words with the source[] buffer
typedef struct{
unsigned int flags;
unsigned short start;
unsigned short sourceix;
unsigned short flags;
unsigned char pre_pause;
unsigned char wmark;
unsigned char length;
@@ -243,7 +248,7 @@ extern const int param_defaults[N_SPEECH_PARAM];



#define N_LOPTS 18
#define N_LOPTS 19
#define LOPT_DIERESES 1
// 1=remove [:] from unstressed syllables, 2= remove from unstressed or non-penultimate syllables
// bit 4=0, if stress < 4, bit 4=1, if not the highest stress in the word
@@ -295,6 +300,7 @@ extern const int param_defaults[N_SPEECH_PARAM];
#define LOPT_IT_DOUBLING 14

// Call ApplySpecialAttributes() if $alt or $alt2 is set for a word
// bit 1: stressed syllable: $alt change [e],[o] to [E],[O], $alt2 change [E],[O] to [e],[o]
#define LOPT_ALT 15

// pause for bracket (default=4), pause when annoucing bracket names (default=2)
@@ -303,6 +309,9 @@ extern const int param_defaults[N_SPEECH_PARAM];
// bit 1, don't break clause before annoucning . ? !
#define LOPT_ANNOUNCE_PUNCT 17

// set minimum length for long vowels at fast speeds, to keep a distinction with short vowels
#define LOPT_MIN_LONG_VOWEL 18


// stress_rule
#define STRESSPOSN_1L 0 // 1st syllable
@@ -321,7 +330,15 @@ typedef struct {
int vowel_pause;
int stress_rule; // 1=first syllable, 2=penultimate, 3=last

#define STRS_HYPEN_UNSTRESS 0x100000
#define S_NO_DIM 0x02
#define S_FINAL_DIM 0x04
#define S_FINAL_NO_2 0x10
#define S_NO_AUTO_2 0x20
#define S_2_TO_HEAVY 0x40
#define S_2_SYL_2 0x1000
#define S_INITIAL_2 0x2000
#define S_NO_AUTO_DIM 0x10000
#define S_HYPEN_UNSTRESS 0x100000
// bit0=don't stress monosyllables, except at end of clause
// bit1=don't set diminished stress,
// bit2=mark unstressed final syllables as diminished
@@ -487,6 +504,7 @@ struct Translator
// the two-letter rules for each letter must be consecutive in the language_rules source
char *groups1[256]; // translation rule lists, index by single letter
char *groups3[128]; // index by offset letter
char *groups2[N_RULE_GROUP2]; // translation rule lists, indexed by two-letter pairs
unsigned int groups2_name[N_RULE_GROUP2]; // the two letter pairs for groups2[]
int n_groups2; // number of groups2[] entries used
@@ -591,13 +609,14 @@ Translator *SelectTranslator(const char *name);
int SetTranslator2(const char *name);
void DeleteTranslator(Translator *tr);
int Lookup(Translator *tr, const char *word, char *ph_out);
int LookupFlags(Translator *tr, const char *word);

int TranslateNumber(Translator *tr, char *word1, char *ph_out, unsigned int *flags, WORD_TAB *wtab);
int TranslateRoman(Translator *tr, char *word, char *ph_out, WORD_TAB *wtab);

void ChangeWordStress(Translator *tr, char *word, int new_stress);
void SetSpellingStress(Translator *tr, char *phonemes, int control, int n_chars);
int TranslateLetter(Translator *tr, char *letter, char *phonemes, int control, int word_length);
int TranslateLetter(Translator *tr, char *letter, char *phonemes, int control);
void LookupLetter(Translator *tr, unsigned int letter, int next_byte, char *ph_buf);
void LookupAccentedLetter(Translator *tr, unsigned int letter, char *ph_buf);


+ 4
- 3
src/voices.cpp View File

@@ -116,6 +116,7 @@ enum {
static MNEM_TAB options_tab[] = {
{"reduce_t", LOPT_REDUCE_T},
{"bracket", LOPT_BRACKET_PAUSE},
{"fastLongVowel", LOPT_MIN_LONG_VOWEL},
{NULL, -1} };

static MNEM_TAB keyword_tab[] = {
@@ -373,9 +374,9 @@ void VoiceReset(int tone_only)

static int breath_widths[N_PEAKS] = {0,200,200,400,400,400,600,600,600};

// default is: pitch 78,120
voice->pitch_base = 0x45000;
voice->pitch_range = 4536;
// default is: pitch 80,118
voice->pitch_base = 0x47000;
voice->pitch_range = 4104;
// default is: pitch 80,117
// voice->pitch_base = 0x47000;
// voice->pitch_range = 3996;

Loading…
Cancel
Save