Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

ESpeakEngine - Objective-C speech synthesizer

, 23 Jan 2012
ESpeakEngine - Objective-C speech synthesizer
ESpeakTest.zip
ESpeakTest
.DS_Store
__MACOSX
ESpeakTest
._.DS_Store
.git
branches
COMMIT_EDITMSG
config
description
HEAD
hooks
applypatch-msg.sample
commit-msg.sample
post-commit.sample
post-receive.sample
post-update.sample
pre-applypatch.sample
pre-commit.sample
pre-rebase.sample
prepare-commit-msg.sample
update.sample
index
info
exclude
.git
info
._exclude
logs
HEAD
refs
heads
master
objects
00
e88867c94b8f6728422a4ad099a53a9f392cb7
01
477be5465c04d4cfd46ab95003f17445731d74
02
37597b848a1890bb30ba0ff4102f8107cafdcb
6363f6a3bb9fe78b03b09f4d0fdce472b95e20
69a98a29eb1baf79dd1f6f2bbc9370b9c4c9cb
78ea2136d97866104e3789d7950d39632b5046
03
7b0f820ace631b85715dfb13cc21fe26daa44d
dac4f6baff6f5a2b06f5a68b6daa265c16e0a2
edde41daf54530ac1fe426e9349a5544b48ccc
05
b2d0d21b687b4190600f6ea0206972c960dd1c
06
23379b22e1417ed806ff4c48337afbe9457cdf
0c
2d13a65548266d9c8a6758599c9a86faf53b28
0d
51695daffab058d065e942018f5c56067942fe
6fa2a91273ee3271fb1d3202d7f6ad86379ef7
10
e91b22ea1e6c67962cd858e8d03de74e7abf6f
11
8095eb5859b9c2ee14be00adeb87ee66eaec94
12
83826f9250bed7326aed2542a0e3c5b47edbec
ce1096a4ef6c4538a43ebd951dcaf2b624b717
13
664a34fe6a3b585603e00df15b17bcef3591e0
93b3551c88468dccede7550726aae27a931555
14
1160885f6955ee4855933ce984bc117649d220
417c1fdfdb3af16ef717d90a078f5c9b8468c3
15
96e3c77205e1688ad5968359106b5ea92d322a
17
004519410f433308228397abc30d2b69e55b26
19
3700525eaa0aa02256a4211c820007bb005995
da34a5b9b6e585ece12d4a6ec24341fa98f50c
fd69d3bec6857b0d4b29f4f26c03ac0dc727e3
1a
61238c5c772724cb12490eb555630bcc0e7870
9e53b6e584bd1e8245f3fc69751211b7d4e86a
1c
2992dd5455746aef85905cc0293031e3e9ceaa
a6f6abadb2e86be2baf2f823a27d16c43d2528
1e
9a757f891fd7ece2ff350dc9225837cb7e70f7
1f
2eb929019174a9b4c2654c1398ed26aca50e2c
20
5e59c21f973ea13de6deab139efee2f171027a
21
4d6f9d708a7691c1abf13b0801ee9a54a44ae6
22
a3b80f6954fd663b59f66210e7b658c5db3a3f
a95d18a3ead5d0274abab7986121dccafc1842
23
8c69126e18387f9c2b3d059db6d7df1cd91a6f
25
55d5d8bec5ee0524034d96ea5aa95eeb1a90dd
5fe35ca3bf7c8743abf0f95518aae822aac4f0
bfdbf47ea384bd8118ed197a8842cb2104eb2a
d78c05ca841d2019f204184927282dc69ebd61
28
59e093f75f1f88ca412e0bde9345afc01f15ac
29
91e99d136fe8e13f7c0c99eaa27c8ca397186d
2a
736d4d3f3c3ffe36bea620d6c28b672efc5867
fb1adc71b7f4e90bd02355dd8cdb75e8d23870
2e
1534872410e5819a69396cdbb57225baa3a888
9dd1f58881b69e931f3b5a73fef461eb9b838b
30
441d7e239ccd9169d15b04efc59be7a158a4a5
dea89200864b8e84dc0fec67850491d460a78d
31
02c9a1a9a5db99cadf90502de610f69c994913
bd479a3d5873c8a970de821a84d2addc864839
32
49dd4f8012e94af03784f043478ebab38fd0b7
33
00c360065de4a18e093dd02df3f6419b656f74
430a22c186f11e5cf838e81dacb386a7e4c8d0
8b8c450f3027ea5d3751fc1e0b4bf969cc1afc
35
a4a3fc517a71ec8bad8f9d0c71bd9da960c494
36
665314753a98e11162485805608fe1aca7bc1e
669d3f0592eaeb8465b81341b486a4c9c1eb11
a4bff6503dfb82fcdc7a160cc36f4cdd9e333d
3a
f2aa1af75587b7a29685fa2dbbebbd2b3592c2
3b
105a7fb0f9b3bb28a87a7212dfcef08daf53c0
3d
d75260a68d0fb7b88fe70d0e3e73c916b963e5
3e
520ec5c8b88db8f95f6a230273278fd39bfbd6
41
22d96b39bf2bc1025a1c57ef01b8b03936773d
42
dbdc5586bc89d681d23851f4a5aafd79b414cb
de58882d0c80e94597b575893afc8e99bd431e
46
07dd079dd2748f8e9cde034268e6cd68278644
317618d912082d6070e4e3972809824bd35395
47
7b28ff8f86a3158a71c4934fbd3a2456717d7a
4b
6a9ae550599ea85d77fea7c0f71b4d5aaf1ba8
4c
6239268d21312d311a504ad0d8aeb0e4f1030b
4d
ec15997c4e00c7a764156687431ac8c47676a5
4e
2b9d23e84059b93883e1a0c0f7a859a23b087e
4f
1904e5164410f93689beb55d46901b214271fe
8f5e88f436d478b126c5c4eccf3568e398c26f
e4188e53b10cc21b50c3bf47e9ef3b2fc4c641
50
1b5a4a8620d5bd9a545c8941cdcbd565fca1c6
52
1be164ce6c87e1d6df58fd82ab160c8f6255db
692c38546eb82aee2a7550c93798f70f02dc9a
c5ac93561331143a9caea14d6c0f008216b4e9
53
6957cb8fe03bde580784e6f97537ec3444e9c3
7beb3ba82da8af147f028685e61fc839cad713
c2a70482993f53d6df321687b5cc4d9e95abc1
cb31446e077a5f159c831e126a0e3f9a2d0ed2
56
9f9d05432267a13b75ca2562beb85e1e1c17db
58
1cd883fed6aa3b84b580a543b6ec8998f4d327
5a
24e11ad4dc2842c79033ad323f02e2e6c2f566
85640ee385afef9b9dc9b7d2889d47b81aa1bd
5c
3583da4700ab6982766d187d1195b37f9a3fb5
5e
bb6a35716f489f249db8bb0e9df7dde150eba4
5f
3297d3a2009a6051a8ebc606bc674056ea03fc
61
124ff298a7d392b816cb1a71095ed1ec8ffe6b
65
3c3f5c4a2d2e44b8a188b88b64278085ebde27
68
1cad9627cb3af687a30507f05114c89ef9340f
69
cceefb779a5236074db6871d7523d92f8a709f
6a
8d5efd87553a3f0e977636c6b819cddf3a99e7
cadba6aea97cd920745428a1c4ccd998581cc7
6c
65e3c6851f204d9c4cd9b616b46a9ff425b3c2
6d
826477b6ee1ecb3e502ffe3c26387d1bce3961
6e
11c93121ab5d535e4f2d50253ee4a527694a9f
71
99341c34f93f5fa5219ff479e82edaee5d7936
ecab7197ec9646efdae05bb02b465f5b5e361a
73
ac62a4ab12374bbf6f72539b2e104d10d7d394
74
00c07a5c17fbbead0d252a22f1fcdb6e5f15c4
0601d129aa08fd59be839301c923b684361dbe
79
2d8a9f9ef248c4358c36000722ba0c53a76497
7c
bdab338114c51e83e0b54c67280b91872211d5
7d
276eb2b779d73c46d8ed97e4be287bec96c828
7e
6c16a2c28e97392d20d4f4c243ecd6f6f40a91
f93a5edd61fddc97d982242d7654e5ab07a09e
7f
4631899e208f50b855ad579b726eadea70f67d
fccbe6dd68c968e78da5b6265a13c62c1fc639
82
2c9a312addee71797811c17690f2be8746bea4
98f98722e5f5f405e9631eb4a5064d87114424
83
71a46410d32c3f000db4c7b11254f48a3d6055
84
79e658ebe74cdd0b9525a41dededf8b9839858
ccc3a6d4681e19dbe6b982ddcee2e760944d55
85
ebb03e3089c5055e4f76d272866738a90a7842
88
1634035cad7fbc213a9def0b5e5ef7f15dffa2
48d6820e826b907349234a642535725247f837
89
28f0ff69aa677f7c5f96053ca70589552e17b0
e6c82914aa9457a644d5a498fa643f98b9ade3
8f
c65d4bab0f132f34e70868a961188deabc55dc
d4a63a1a24c8b25eab5ed28c135457a8332e6b
92
3d517415d489cc9b3f91638c14264dd0df55a3
a1582817dc2f8256db5a02bed320a05f6e5e43
95
8799c61770d05ba341183cd2d6a107a1ec093c
96
35ac150af1804b398d67cf4703d718a16806a7
97
8ec49ed00c46862d89580efe68f7efd98c93c3
a337d34bb9ab89812b5e79c3bc2bb784d48953
98
9f9eab7b5ee98f4b6acf35fe8b4ef86db3a62e
9b
06e0bd24aa4658ed8009be3e2fe7e32ccee54e
280bf8bc106ca904c9b33a90d0822c4c9b03fd
2d891f12030afadc1e737914a1759ab59ef01f
a872a49ab896e3d7c6203bedfd2502d8cb6521
c60c7cbd38db3307551ae17ef2a8a5d623b3a0
9d
e1630d90e22bf6df53a0093c212e9e1d7da9b6
eba8432350a07d0ab15189bb124d48b836fb62
9e
9c4e7476f3dce3b6808b0c8ea917a4d8503d7f
a3
72fb170d6218ccc7298335f1ea55ff674fb3cc
a5
4cb02cd26c7ecc2bd08debb1cfe85c3546c039
504505ef08ce6040091e48eb5c1653a34574b0
a6
56d2c7f2e9509fef687b3174282f6ec9b61498
e0f46bb57f876255cdb5767729aefccbe3a33e
a7
a8223dbda4d4cd47ae8796ad2be9bc70e46754
a9
09e1af21f9dc9dccf095d02920266ea11fe7f5
0c7b72565da6e015014e343f10ae50197587c9
aa
80edaad05f0f16c6195e72a0130d803b58bcbc
ae
76a4c4deb77d53e7ee512c3e85f45ba802dd08
9247d41055f6721d3500645539ee00ae29d7e4
a3d895c09d5eae5411aec5fb5ecbe82451bd50
b0
d4979c857d151ef5cd27248926fb112c0c3cee
b1
a874be65ad7df189c933f4c576475f29d15f67
b2
7a8114a03ed27348a40f37428107e02f67acc8
fd9d084c6df70da314916ee674421872f9ef50
b3
2b6a6660b12a14fc5e8749eff9ba696b7f6061
b4
8b1788b979853cdd57bb6cec6b9cc4dd7925bc
b7
39a86e488eeec6f5693b7ee2590f84d6c95191
b8
519559d3db834193518d4f4c4fed777734c8ee
6f59306a576f4548ff3bd62e344570cc538932
f782946f4728a629eda8038e82dd165dadee1d
ba
7c42cc48ae095ccfffeb03cf36d519d7cbe5a3
bc
bb2a0058b7866064b779ae246244c5342a0ccb
bd
336a9884877889e2f85ee1849f8a068d2c6279
be
1b6246a01d3d9c01dac0f888454369e0b32892
c0
a5475ece89c3274e62f9132560ec8afdd569d4
c2
34f46877a761d5c98fda2cbbeb172dc2efc81a
76bec0dd56b68a8e0ed0062b38dd149422b45d
c3
2db3968df0779b3c3a47899085625a7b86339b
c6
32e263c2a639311be4ca1512aadee97a91bc9a
cb
c4fb3a5d3dcc07f26b5ca02eb53a52b897aa80
cd
02abedb89d8975a792d73de536d2ce82260553
ce
800f70be34d9fba11f7d09b0c329b3f259507b
cf
584b7dd3f005be3cffb47d27f1bfe980a6e53b
f13bac9dd46f2c2a2fb66db64ce78caffd5b5a
d0
2b035cae9b12c66a5e0d5ae9cf57433041ed40
864f3d6209ad6f3e8ab51dc880836e67c96fc5
b729579de2537a63cebdb809e8bdfb5a897a33
d2
5865608d7d973e77c77d13bbdbe3ae454d864d
d3
d7720074a2fc7e3bfbc18cc1bacad0f9ea61d2
d5
06e7f9f85667d054794f808f9098b2a1625372
9fe79529970f627e83857f9bd516f5474bf685
d6
737d787752a799349095b49cf81024dfd00fb6
811d3ae4f710d3eb8a16c690cd42bebc4faf4e
d7
59cfdf018f8814d995588d176dadde0820b5ca
d8
ecd252c04bc00a6dcc6d0b84d64285726b65d4
f35efaa2dc2293277365d811c9b6222cfe59b8
da
c1e4d0643b01e99052f575b5f6add2e10a2143
ef5160c9c1500d3a9f6b0eadf434ef702a009f
db
63d6ca3d87629e693327a2ba4a719e79847b6c
de212341a0b131224b3e123f91d154348070ba
dc
51396ce24aad46d1c761e2c96f8aee68d4b622
de
4786c94cfa90c84982ca06a2a9623035993dfc
df
70f4387ca97d30c66d7dc87d5abca9b0ffa820
7fa77bc23477530674f05f4f619803983d5eb0
e0
783ec3b1e38ce0f77b5b018d9b8641a7b924c3
ea6d6394ab8409463adfeb753f1632ef09a47f
e4
16c6dc5e784243ad8d33000139178fa178de87
1d3105c048e789fe605c780efe2881df833ea8
e7
178e4d5666a3b75aa48de33b966f0590665a8e
e8
5978c76abd7430436356cd2a126018642d6a2d
ea
dd707322e08d90e3a2208aef9060706c340799
eb
d92ffb3ec9499292d1faa7ca60adcc5edac74f
ed
05f4240da98a569e3c9f9a5b9e2301d7caa79e
ee
3bd233e2bc458aab63eb36f613f853f72e6bf7
f2
033dc11fee0a1db4a2cae358c1a808149a5aa2
130ba4f980783f8605eb50387ffc2e54f66b3c
f3
10f868efea6408fc49fd4e6d6c293db2098114
e97b52355ea6f5384790bb3cda677222be900c
f4
3ef84fa6caf08bc6e9e442e15d71eaa8c6962a
ede3296c4fb294a58715e61ecef26f74ed898a
f5
0e89c905a3e8dd519f415585283757fc85d2d6
f9
624b31623b500b57b74e9765ac7a2d9f039c65
fa
4eece0b1cc7dababed3d09d560f38e00ea8755
fc
377156b487a559efb384ec2b6e551d6c2085c6
60f41672c8fb6fc69c1548552988f046a2aa14
fe
7c4d8d002499fbaff530adfaa0543d626536dd
ff
a94206372e46914dcadeb10c212a9674daf62e
info
pack
refs
heads
master
tags
ESpeakTest
ESpeakTest
AppDelegate.m
._AppDelegate.m
en.lproj
InfoPlist.strings
en.lproj
._InfoPlist.strings
ViewController_iPad.xib
._ViewController_iPad.xib
ViewController_iPhone.xib
ESpeakTest-Info.plist
ESpeakTest-Prefix.pch
._ESpeakTest-Prefix.pch
main.m
._main.m
ViewController.m
._ViewController.m
ESpeakTest.xcodeproj
project.pbxproj
project.xcworkspace
contents.xcworkspacedata
xcuserdata
jozefbozek.xcuserdatad
UserInterfaceState.xcuserstate
xcuserdata
jozefbozek.xcuserdatad
xcdebugger
Breakpoints.xcbkptlist
xcschemes
ESpeakTest.xcscheme
xcschememanagement.plist
ESpeakTestTests
en.lproj
InfoPlist.strings
ESpeakTestTests
en.lproj
._InfoPlist.strings
ESpeakTestTests-Info.plist
ESpeakTestTests.m
._ESpeakTestTests.m
eSpeak_1.0.zip
eSpeak_1.0
Classes
eSpeak_1.0
Classes
ESpeakEngine.m
._ESpeakEngine.m
eSpeak.xcodeproj
jBozEk.mode1v3
jBozEk.pbxuser
project.pbxproj
project.xcworkspace
contents.xcworkspacedata
xcuserdata
jBozEk.xcuserdatad
UserInterfaceState.xcuserstate
jozefbozek.xcuserdatad
UserInterfaceState.xcuserstate
WorkspaceSettings.xcsettings
xcuserdata
jBozEk.xcuserdatad
xcschemes
xcschememanagement.plist
jozefbozek.xcuserdatad
xcdebugger
Breakpoints.xcbkptlist
xcschemes
eSpeak.xcscheme
TestApp.xcscheme
xcschememanagement.plist
eSpeak_Prefix.pch
._eSpeak_Prefix.pch
Libraries
Libraries
espeak-data
af_dict
espeak-data
._af_dict
ca_dict
._ca_dict
config
._config
cs_dict
._cs_dict
cy_dict
._cy_dict
da_dict
._da_dict
de_dict
._de_dict
el_dict
._el_dict
en_dict
._en_dict
eo_dict
._eo_dict
es_dict
._es_dict
fi_dict
._fi_dict
fr_dict
._fr_dict
grc_dict
._grc_dict
hbs_dict
._hbs_dict
hi_dict
._hi_dict
hu_dict
._hu_dict
hy_dict
._hy_dict
id_dict
._id_dict
intonations
._intonations
is_dict
._is_dict
it_dict
._it_dict
jbo_dict
._jbo_dict
ku_dict
._ku_dict
la_dict
._la_dict
lv_dict
._lv_dict
mbrola
._mbrola
mbrola_ph
af1_phtrans
mbrola_ph
._af1_phtrans
ca1_phtrans
._ca1_phtrans
cr1_phtrans
._cr1_phtrans
cs_phtrans
._cs_phtrans
de2_phtrans
._de2_phtrans
de4_phtrans
._de4_phtrans
de6_phtrans
._de6_phtrans
en1_phtrans
._en1_phtrans
es_phtrans
._es_phtrans
fr1_phtrans
._fr1_phtrans
gr2_phtrans
._gr2_phtrans
grc-de6_phtrans
._grc-de6_phtrans
hu1_phtrans
._hu1_phtrans
ic1_phtrans
._ic1_phtrans
id1_phtrans
._id1_phtrans
in1_phtrans
._in1_phtrans
it3_phtrans
._it3_phtrans
la1_phtrans
._la1_phtrans
nl_phtrans
._nl_phtrans
pl1_phtrans
._pl1_phtrans
pt1_phtrans
._pt1_phtrans
pt_phtrans
._pt_phtrans
ptbr4_phtrans
._ptbr4_phtrans
ptbr_phtrans
._ptbr_phtrans
ro1_phtrans
._ro1_phtrans
sv2_phtrans
._sv2_phtrans
sv_phtrans
._sv_phtrans
tr1_phtrans
._tr1_phtrans
us3_phtrans
._us3_phtrans
us_phtrans
._us_phtrans
._mbrola_ph
mk_dict
._mk_dict
nci_dict
._nci_dict
nl_dict
._nl_dict
no_dict
._no_dict
pap_dict
._pap_dict
phondata
._phondata
phonindex
._phonindex
phontab
._phontab
pl_dict
._pl_dict
pt_dict
._pt_dict
ro_dict
._ro_dict
ru_dict
._ru_dict
sk_dict
._sk_dict
soundicons
._soundicons
sq_dict
._sq_dict
sv_dict
._sv_dict
sw_dict
._sw_dict
ta_dict
._ta_dict
tr_dict
._tr_dict
vi_dict
._vi_dict
voices
!v
croak
voices
!v
._croak
f1
._f1
f2
._f2
f3
._f3
f4
._f4
f5
._f5
fast
._fast
klatt
._klatt
klatt2
._klatt2
klatt3
._klatt3
m1
._m1
m2
._m2
m3
._m3
m4
._m4
m5
._m5
m6
._m6
m7
._m7
whisper
._whisper
whisperf
._whisperf
._!v
af
._af
bs
._bs
ca
._ca
cs
._cs
cy
._cy
da
._da
de
._de
default
._default
el
._el
en
en
en
._en
en-n
._en-n
en-rp
._en-rp
en-sc
._en-sc
en-us
._en-us
en-wi
._en-wi
en-wm
._en-wm
._en
eo
._eo
es
._es
es-la
._es-la
fi
._fi
fr
._fr
fr-be
._fr-be
hi
._hi
hr
._hr
hu
._hu
hy
._hy
hy-west
._hy-west
id
._id
is
._is
it
._it
ku
._ku
la
._la
lv
._lv
mb
mb-af1
mb
._mb-af1
mb-af1-en
._mb-af1-en
mb-br1
._mb-br1
mb-br3
._mb-br3
mb-br4
._mb-br4
mb-cr1
._mb-cr1
mb-cz2
._mb-cz2
mb-de2
._mb-de2
mb-de4
._mb-de4
mb-de4-en
._mb-de4-en
mb-de5
._mb-de5
mb-de5-en
._mb-de5-en
mb-de6
._mb-de6
mb-de6-grc
._mb-de6-grc
mb-de7
._mb-de7
mb-en1
._mb-en1
mb-es1
._mb-es1
mb-es2
._mb-es2
mb-fr1
._mb-fr1
mb-fr1-en
._mb-fr1-en
mb-fr4
._mb-fr4
mb-fr4-en
._mb-fr4-en
mb-gr2
._mb-gr2
mb-gr2-en
._mb-gr2-en
mb-hu1
._mb-hu1
mb-hu1-en
._mb-hu1-en
mb-ic1
._mb-ic1
mb-id1
._mb-id1
mb-it3
._mb-it3
mb-it4
._mb-it4
mb-la1
._mb-la1
mb-nl2
._mb-nl2
mb-nl2-en
._mb-nl2-en
mb-pl1
._mb-pl1
mb-pl1-en
._mb-pl1-en
mb-pt1
._mb-pt1
mb-ro1
._mb-ro1
mb-ro1-en
._mb-ro1-en
mb-sw1
._mb-sw1
mb-sw1-en
._mb-sw1-en
mb-sw2
._mb-sw2
mb-sw2-en
._mb-sw2-en
mb-tr1
._mb-tr1
mb-tr2
._mb-tr2
mb-us1
._mb-us1
mb-us2
._mb-us2
mb-us3
._mb-us3
._mb
mk
._mk
nl
._nl
no
._no
pl
._pl
pt
._pt
pt-pt
._pt-pt
ro
._ro
ru
._ru
sk
._sk
sq
._sq
sr
._sr
sv
._sv
sw
._sw
ta
._ta
test
grc
test
._grc
jbo
._jbo
nci
._nci
pap
._pap
._test
tr
._tr
vi
._vi
zh
._zh
zh-yue
._zh-yue
._voices
zh_dict
._zh_dict
zhy_dict
._zhy_dict
._espeak-data
TestApp-Info.plist
._TestApp-Info.plist
Tests
FliteEngineTest-Info.plist
Tests
FliteEngineTestAppDelegate.m
._FliteEngineTestAppDelegate.m
FliteEngineTestViewController.m
._FliteEngineTestViewController.m
FliteEngineTestViewController.xib
main.m
._main.m
MainWindow.xib
/***************************************************************************
 *   Copyright (C) 2005 to 2010 by Jonathan Duddington                     *
 *   email: jonsd@users.sourceforge.net                                    *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, see:                                 *
 *               <http://www.gnu.org/licenses/>.                           *
 ***************************************************************************/


#define L(c1,c2)  (c1<<8)+c2          // combine two characters into an integer for translator name 

#define CTRL_EMBEDDED    0x01         // control character at the start of an embedded command
#define REPLACED_E       'E'          // 'e' replaced by silent e

#define N_WORD_PHONEMES  160          // max phonemes in a word
#define N_WORD_BYTES     160          // max bytes for the UTF8 characters in a word
#define N_CLAUSE_WORDS   300          // max words in a clause
#define N_RULE_GROUP2    120          // max num of two-letter rule chains
#define N_HASH_DICT     1024
#define N_CHARSETS        20
#define N_LETTER_GROUPS   26


/* dictionary flags, word 1 */
// bits 0-3  stressed syllable,  bit 6=unstressed
#define FLAG_SKIPWORDS        0x80
#define FLAG_PREPAUSE        0x100

#define FLAG_ONLY            0x200
#define FLAG_ONLY_S          0x400
#define BITNUM_FLAG_ONLY         9  // bit 9 is set
#define BITNUM_FLAG_ONLY_S      10  // bit 10 is set

#define FLAG_STRESS_END      0x800  /* full stress if at end of clause */
#define FLAG_STRESS_END2    0x1000  /* full stress if at end of clause, or only followed by unstressed */
#define FLAG_UNSTRESS_END   0x2000  /* reduce stress at end of clause */
#define FLAG_ATEND          0x4000  /* use this pronunciation if at end of clause */
#define FLAG_ATSTART        0x8000  // use this pronunciation if at start of clause
#define FLAG_SPELLWORD     0x10000  // re-translate the word as individual letters, separated by spaces
#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

#define FLAG_DOUBLING      0x80000  // doubles the following consonant
#define BITNUM_FLAG_ALT         19  // bit number of FLAG_ALT_TRANS - 1 
#define FLAG_ALT_TRANS    0x100000  // language specific
#define FLAG_ALT2_TRANS   0x200000  // language specific
#define FLAG_ALT3_TRANS   0x400000  // language specific
#define FLAG_COMBINE      0x800000  // 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
#define BITNUM_FLAG_TEXTMODE    29

#define FLAG_FOUND_ATTRIBUTES     0x40000000  // word was found in the dictionary list (has attributes)
#define FLAG_FOUND      0x80000000  // pronunciation was found in the dictionary list

// dictionary flags, word 2
#define FLAG_VERBF             0x1  /* verb follows */
#define FLAG_VERBSF            0x2  /* verb follows, may have -s suffix */
#define FLAG_NOUNF             0x4  /* noun follows */
#define FLAG_PASTF             0x8  /* past tense follows */
#define FLAG_VERB             0x10  /* pronunciation for verb */
#define FLAG_NOUN             0x20  /* pronunciation for noun */
#define FLAG_PAST             0x40  /* pronunciation for past tense */
#define FLAG_VERB_EXT        0x100  /* extend the 'verb follows' */
#define FLAG_CAPITAL         0x200  /* pronunciation if initial letter is upper case */
#define FLAG_ALLCAPS         0x400  // only if the word is all capitals
#define FLAG_ACCENT          0x800  // character name is base-character name + accent name
#define FLAG_HYPHENATED     0x1000  // multiple-words, but needs hyphen between parts 1 and 2
#define FLAG_SENTENCE       0x2000  // only if the clause is a sentence
#define BITNUM_FLAG_ALLCAPS   0x2a
#define BITNUM_FLAG_HYPHENATED  0x2c


// wordflags, flags in source word
#define FLAG_ALL_UPPER     0x1    /* no lower case letters in the word */
#define FLAG_FIRST_UPPER   0x2    /* first letter is upper case */
#define FLAG_UPPERS        0x3    // FLAG_ALL_UPPER | FLAG_FIRST_UPPER
#define FLAG_HAS_PLURAL    0x4    /* upper-case word with s or 's lower-case ending */
#define FLAG_PHONEMES      0x8    /* word is phonemes */
#define FLAG_LAST_WORD     0x10   /* last word in clause */
#define FLAG_EMBEDDED      0x40   /* word is preceded by embedded commands */
#define FLAG_HYPHEN        0x80
#define FLAG_NOSPACE       0x100  // word is not seperated from previous word by a space
#define FLAG_FIRST_WORD    0x200  // first word in clause
#define FLAG_FOCUS         0x400   // the focus word of a clause
#define FLAG_EMPHASIZED    0x800
#define FLAG_EMPHASIZED2   0xc00  // FLAG_FOCUS | FLAG_EMPHASIZED
#define FLAG_DONT_SWITCH_TRANSLATOR  0x1000
#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_COMMA_AFTER   0x20000  // comma after this word
#define FLAG_MULTIPLE_SPACES 0x40000  // word is preceded by multiple spaces, newline, or tab
#define FLAG_INDIVIDUAL_DIGITS 0x80000  // speak number as individual digits

#define FLAG_SUFFIX_VOWEL  0x08000000   // remember an initial vowel from the suffix
#define FLAG_NO_TRACE      0x10000000   // passed to TranslateRules() to suppress dictionary lookup printout
#define FLAG_NO_PREFIX     0x20000000
#define FLAG_UNPRON_TEST   0x80000000   // do unpronounability test on the beginning of the word


// 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
#define SUFX_I        0x0200   // y may have been changed to i
#define SUFX_P        0x0400   // prefix
#define SUFX_V        0x0800   // suffix means use the verb form pronunciation
#define SUFX_D        0x1000   // previous letter may have been doubles
#define SUFX_F        0x2000   // verb follows
#define SUFX_Q        0x4000   // don't retranslate
#define SUFX_T        0x10000   // don't affect the stress position in the stem
#define SUFX_B        0x20000  // break, this character breaks the word into stem and suffix (used with SUFX_P)
#define SUFX_A        0x40000  // remember that the suffix starts with a vowel

#define SUFX_UNPRON     0x8000   // used to return $unpron flag from *_rules


#define FLAG_ALLOW_TEXTMODE  0x02  // allow dictionary to translate to text rather than phonemes
#define FLAG_SUFX       0x04
#define FLAG_SUFX_S     0x08
#define FLAG_SUFX_E_ADDED 0x10


// codes in dictionary rules
#define RULE_PRE			1
#define RULE_POST			2
#define RULE_PHONEMES	3
#define RULE_PH_COMMON	4	// At start of rule. Its phoneme string is used by subsequent rules
#define RULE_CONDITION	5	// followed by condition number (byte)
#define RULE_GROUP_START 6
#define RULE_GROUP_END	7
#define RULE_LINENUM		8  // next 2 bytes give a line number, for debugging purposes

#define RULE_SPACE		32   // ascii space
#define RULE_SYLLABLE	9    // @
#define RULE_STRESSED	10   // &
#define RULE_DOUBLE		11   // %
#define RULE_INC_SCORE	12   // +
#define RULE_DEL_FWD		13   // #
#define RULE_ENDING		14   // S
#define RULE_DIGIT		15   // D digit
#define RULE_NONALPHA	16   // Z non-alpha
#define RULE_LETTERGP   17   // A B C H F G Y   letter group number
#define RULE_LETTERGP2  18   // L + letter group number
#define RULE_CAPITAL    19   // !   word starts with a capital letter
#define RULE_REPLACEMENTS 20  // section for character replacements
#define RULE_SKIPCHARS  23   // J
#define RULE_NO_SUFFIX  24   // N
#define RULE_NOTVOWEL   25   // K
#define RULE_IFVERB     26   // V
#define RULE_DOLLAR     28   // $ commands
#define RULE_NOVOWELS   29   // X no vowels up to word boundary
#define RULE_SPELLING   31   // W while spelling letter-by-letter
#define RULE_LAST_RULE   31

#define LETTERGP_A	0
#define LETTERGP_B	1
#define LETTERGP_C	2
#define LETTERGP_H	3
#define LETTERGP_F	4
#define LETTERGP_G	5
#define LETTERGP_Y	6
#define LETTERGP_VOWEL2   7


// Punctuation types  returned by ReadClause()
// bits 0-7 pause x 10mS, bits 12-14 intonation type,
// bit 15- don't need space after the punctuation
// bit 19=sentence, bit 18=clause,  bits 17=voice change
// 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)
#define CLAUSE_EOF         (40 + 0x90000)
#define CLAUSE_VOICE       ( 0 + 0x24000)
#define CLAUSE_PERIOD      (40 + 0x80000)
#define CLAUSE_COMMA       (20 + 0x41000)
#define CLAUSE_SHORTCOMMA  ( 4 + 0x41000)
#define CLAUSE_SHORTFALL   ( 4 + 0x40000)
#define CLAUSE_QUESTION    (40 + 0x82000)
#define CLAUSE_EXCLAMATION (45 + 0x83000)
#define CLAUSE_COLON       (30 + 0x40000)
#define CLAUSE_SEMICOLON   (30 + 0x41000)

#define SAYAS_CHARS     0x12
#define SAYAS_GLYPHS    0x13
#define SAYAS_SINGLE_CHARS 0x14
#define SAYAS_KEY       0x24
#define SAYAS_DIGITS    0x40  // + number of digits
#define SAYAS_DIGITS1   0xc1

#define CHAR_EMPHASIS   0x0530  // this is an unused character code
#define CHAR_COMMA_BREAK  0x0557  // unused character code

// Rule:
// [4] [match] [1 pre] [2 post] [3 phonemes] 0
//     match 1 pre 2 post 0     - use common phoneme string
//     match 1 pre 2 post 3 0   - empty phoneme string

typedef const char *  constcharptr;

typedef struct {
	int  points;
	const char *phonemes;
	int  end_type;
	char *del_fwd;
} MatchRecord;
	

// used to mark words with the source[] buffer
typedef struct{
	unsigned int flags;
	unsigned short start;
	unsigned short sourceix;
	unsigned char pre_pause;
	unsigned char wmark;
	unsigned char length;
} WORD_TAB;


typedef struct {
	int type;
	int parameter[N_SPEECH_PARAM];
} PARAM_STACK;

extern PARAM_STACK param_stack[];
extern const int param_defaults[N_SPEECH_PARAM];



#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
#define LOPT_IT_LENGTHEN        2

 // 1=german
#define LOPT_PREFIXES        3

 // non-zero, change voiced/unoiced to match last consonant in a cluster
 // bit 1=LANG=ru,  don't propagate over [v]
 // bit 2=don't propagate acress word boundaries
 // bit 3=LANG=pl,  propagate over liquids and nasals
 // bit 4=devoice word-final consonants
#define LOPT_REGRESSIVE_VOICING  4

 // 0=default, 1=no check, other allow this character as an extra initial letter (default is 's')
#define LOPT_UNPRONOUNCABLE  5

 // select length_mods tables,  (length_mod_tab) + (length_mod_tab0 * 100)
#define LOPT_LENGTH_MODS    6

 // increase this to prevent sonorants being shortened before shortened (eg. unstressed) vowels
#define LOPT_SONORANT_MIN    7

 // bit 0: don't break vowels at word boundary
#define LOPT_WORD_MERGE      8

 // max. amplitude for vowel at the end of a clause
#define LOPT_MAXAMP_EOC      9

 // bit 0=reduce even if phonemes are specified in the **_list file
 // bit 1=don't reduce the strongest vowel in a word which is marked 'unstressed'
#define LOPT_REDUCE  10

 // LANG=cs,sk  combine some prepositions with the following word, if the combination has N or fewer syllables
 // bits 0-3  N syllables
 // bit 4=only if the second word has $alt attribute
 // bit 5=not if the second word is end-of-sentence
#define LOPT_COMBINE_WORDS 11

 // change [t] when followed by unstressed vowel
#define LOPT_REDUCE_T 12

 // 1 = allow capitals inside a word
 // 2 = stressed syllable is indicated by capitals
#define LOPT_CAPS_IN_WORD  13

 // bit 0=Italian "syntactic doubling" of consoants in the word after a word marked with $double attribute
 // bit 1=also after a word which ends with a stressed vowel
#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)
#define LOPT_BRACKET_PAUSE 16

	// bit 1, don't break clause before annoucning . ? !
#define LOPT_ANNOUNCE_PUNCT 17

	// recognize long vowels (0 = don't recognize)
#define LOPT_LONG_VOWEL_THRESHOLD 18


// stress_rule
#define STRESSPOSN_1L	0	// 1st syllable
#define STRESSPOSN_2L	1	// 2nd syllable
#define STRESSPOSN_2R	2	// penultimate
#define STRESSPOSN_1R	3	// final syllable
#define STRESSPOSN_3R	4	// antipenultimate


typedef struct {
// bits0-2  separate words with (1=pause_vshort, 2=pause_short, 3=pause, 4=pause_long 5=[?] phonemme)
// bit 3=don't use linking phoneme
// bit4=longer pause before STOP, VSTOP,FRIC
// bit5=length of a final vowel doesn't depend on the next phoneme
	int word_gap;
	int vowel_pause;
	int stress_rule; // 1=first syllable, 2=penultimate,  3=last

#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
// bit3=set consecutive unstressed syllables in unstressed words to diminished, but not in stressed words
// bit4=don't allow secondary stress on last syllable
// bit5-don't use automatic secondary stress
// bit6=light syllable followed by heavy, move secondary stress to the heavy syllable. LANG=Finnish
// bit8=stress last syllable if it doesn't end in a vowel
// bit9=stress last syllable if it doesn't end in vowel or "s" or "n"  LANG=Spanish
// bit12= In a 2-syllable word, if one has primary stress then give the other secondary stress
// bit13= If there is only one syllable before the primary stress, give it a secondary stress
// bit15= Give stress to the first unstressed syllable
// bit16= Don't diminish consecutive syllables within a word.
// bit17= "priority" stress reduces other primary stress to "unstressed" not "secondary"
// bit18= don't lengthen short vowels more than long vowels at end-of-clause
// bit19=stress on final syllable if it has a long vowel, but previous syllable has a short vowel
// bit20= hyphenated words, 2nd part is unstressed

	int stress_flags; 
	int unstressed_wd1; // stress for $u word of 1 syllable
	int unstressed_wd2; // stress for $u word of >1 syllable
	int param[N_LOPTS];
	int param2[N_LOPTS];
	unsigned char *length_mods;
	unsigned char *length_mods0;

#define NUM_THOUS_SPACE  0x4
#define NUM_DECIMAL_COMMA 0x8
#define NUM_SWAP_TENS    0x10
#define NUM_AND_UNITS    0x20
#define NUM_HUNDRED_AND  0x40
#define NUM_SINGLE_AND   0x80
#define NUM_SINGLE_STRESS 0x100
#define NUM_SINGLE_VOWEL 0x200
#define NUM_OMIT_1_HUNDRED 0x400
#define NUM_1900         0x800
#define NUM_ALLOW_SPACE  0x1000
#define NUM_DFRACTION_1  0x2000
#define NUM_DFRACTION_2  0x4000
#define NUM_DFRACTION_3  0x6000
#define NUM_DFRACTION_4  0x8000
#define NUM_DFRACTION_5  0xa000
#define NUM_ORDINAL_DOT   0x10000
#define NUM_NOPAUSE       0x20000
#define NUM_AND_HUNDRED   0x40000
#define NUM_THOUSAND_AND  0x80000
#define NUM_VIGESIMAL     0x100000
#define NUM_OMIT_1_THOUSAND 0x200000

#define NUM_ROMAN         0x1000000
#define NUM_ROMAN_CAPITALS 0x2000000
#define NUM_ROMAN_AFTER   0x4000000
#define NUM_ROMAN_ORDINAL 0x8000000

	// bits0-1=which numbers routine to use.
	// bit2=  thousands separator must be space
	// bit3=  , decimal separator, not .
	// bit4=use three-and-twenty rather than twenty-three
	// bit5='and' between tens and units
	// bit6=add "and" after hundred or thousand
	// bit7=don't have "and" both after hundreds and also between tens and units
   // bit8=only one primary stress in tens+units
	// bit9=only one vowel betwen tens and units
	// bit10=omit "one" before "hundred"
	// bit11=say 19** as nineteen hundred
	// bit12=allow space as thousands separator (in addition to langopts.thousands_sep)
	// bits13-15  post-decimal-digits 0=single digits, 1=(LANG=it) 2=(LANG=pl) 3=(LANG=ro)

	// bit16= dot after number indicates ordinal
	// bit17= don't add pause after a number
	// bit18= 'and' before hundreds
	// bit19= 'and' after thousands if there are no hundreds
	// bit20= vigesimal number, if tens are not found
	// bit21= omit "one" before "thousand"

	// bit24= recognize roman numbers
	// bit25= Roman numbers only if upper case
	// bit26= say "roman" after the number, not before
	// bit27= Roman numbers are ordinal numbers
	int numbers;

	// bits 1-4  use variant form of numbers before thousands,millions,etc.
	// bit6=(LANG=pl) two forms of plural, M or MA
	// bit7=(LANG-ru) use MB for 1 thousand, million, etc
	// bit8=(LANG=cs,sk) two forms of plural, M or MA
	// bit9=(LANG=rw) say "thousand" and "million" before its number, not after
	int numbers2;

#define BREAK_THOUSANDS   0x49249248
	int break_numbers;  // which digits to break the number into thousands, millions, etc (Hindi has 100,000 not 1,000,000)
	int max_roman;
	int min_roman;
	int thousands_sep;
	int decimal_sep;
	int max_digits;    // max number of digits which can be spoken as an integer number (rather than individual digits)
	const char *ordinal_indicator;   // UTF-8 string

	// bit 0, accent name before the letter name, bit 1 "capital" after letter name
	int accents;

	int tone_language;          // 1=tone language
	int intonation_group;
	unsigned char tunes[6];
	int long_stop;          // extra mS pause for a lengthened stop
	int phoneme_change;     // TEST, change phonemes, after translation
	char max_initial_consonants;
	char spelling_stress;   // 0=default, 1=stress first letter
	char tone_numbers;
	char ideographs;      // treat as separate words
	char textmode;          // the meaning of FLAG_TEXTMODE is reversed (to save data when *_list file is compiled)
	int testing;            // testing options: bit 1= specify stressed syllable in the form:  "outdoor/2"
	int listx;    // compile *_listx after *list
	const unsigned int *replace_chars;      // characters to be substitutes
	const char *ascii_language;  // switch to this language for Latin characters
	int max_lengthmod;
	int suffix_add_e;     // replace a suffix (which has the SUFX_E flag) with this character
} LANGUAGE_OPTIONS;


// a parameter of ChangePhonemes()
typedef struct {
	int flags;
	unsigned char stress;          // stress level of this vowel
	unsigned char stress_highest;  // the highest stress level of a vowel in this word
	unsigned char n_vowels;        // number of vowels in the word
	unsigned char vowel_this;      // syllable number of this vowel (counting from 1)
	unsigned char vowel_stressed;  // syllable number of the highest stressed vowel
} CHANGEPH;



#define NUM_SEP_DOT    0x0008    // . , for thousands and decimal separator
#define NUM_SEP_SPACE  0x1000    // allow space as thousands separator (in addition to langopts.thousands_sep)
#define NUM_DEC_IT     0x2000    // (LANG=it) speak post-decimal-point digits as a combined number not as single digits

typedef struct
{//===========

	LANGUAGE_OPTIONS langopts;
	int translator_name;
	int transpose_max;
	int transpose_min;
	char dictionary_name[40];

	char phon_out[300];
	char phonemes_repeat[20];
	int  phonemes_repeat_count;
	int  phoneme_tab_ix;

	unsigned char stress_amps[8];
	unsigned char stress_amps_r[8];
	short stress_lengths[8];
	int dict_condition;    // conditional apply some pronunciation rules and dict.lookups
	const unsigned short *charset_a0;   // unicodes for characters 0xa0 to oxff
	const wchar_t *char_plus_apostrophe;  // single chars + apostrophe treated as words
	const wchar_t *punct_within_word;   // allow these punctuation characters within words

// holds properties of characters: vowel, consonant, etc for pronunciation rules
	unsigned char letter_bits[256];
	int letter_bits_offset;
	const wchar_t *letter_groups[8];

	/* index1=option, index2 by 0=. 1=, 2=?, 3=! 4=none */
#define INTONATION_TYPES 8
#define PUNCT_INTONATIONS 6
	unsigned char punct_to_tone[INTONATION_TYPES][PUNCT_INTONATIONS];

	char *data_dictrules;     // language_1   translation rules file
	char *data_dictlist;      // language_2   dictionary lookup file
	char *dict_hashtab[N_HASH_DICT];   // hash table to index dictionary lookup file
	char *letterGroups[N_LETTER_GROUPS];

	// groups1 and groups2 are indexes into data_dictrules, set up by InitGroups()
	// 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
	
	unsigned char groups2_count[256];    // number of 2 letter groups for this initial letter
	unsigned char groups2_start[256];    // index into groups2
	const short *frequent_pairs;   // list of frequent pairs of letters, for use in compressed *_list
	
	
	int expect_verb;
	int expect_past;    // expect past tense
	int expect_verb_s;
	int expect_noun;
	int prev_last_stress;
	char *clause_end;

	int word_vowel_count;     // number of vowels so far
	int word_stressed_count;  // number of vowels so far which could be stressed
	
	int clause_upper_count;   // number of upper case letters in the clause
	int clause_lower_count;   // number of lower case letters in the clause

	int prepause_timeout;
	int end_stressed_vowel;  // word ends with stressed vowel
	int prev_dict_flags;     // dictionary flags from previous word
	int clause_terminator;
} Translator;


extern int option_tone2;
#define OPTION_EMPHASIZE_ALLCAPS  0x100
#define OPTION_EMPHASIZE_PENULTIMATE 0x200
extern int option_tone_flags;
extern int option_waveout;
extern int option_quiet;
extern int option_phonemes;
extern int option_mbrola_phonemes;
extern int option_phoneme_events;
extern int option_linelength;     // treat lines shorter than this as end-of-clause
extern int option_multibyte;
extern int option_capitals;
extern int option_punctuation;
extern int option_endpause;
extern int option_ssml;
extern int option_phoneme_input;   // allow [[phonemes]] in input text
extern int option_phoneme_variants;
extern int option_sayas;
extern int option_wordgap;

extern int count_characters;
extern int count_words;
extern int count_sentences;
extern int skip_characters;
extern int skip_words;
extern int skip_sentences;
extern int skipping_text;
extern int end_character_position;
extern int clause_start_char;
extern int clause_start_word;
extern char *namedata;
extern int pre_pause;



#define N_MARKER_LENGTH 50   // max.length of a mark name
extern char skip_marker[N_MARKER_LENGTH];

#define N_PUNCTLIST  60
extern wchar_t option_punctlist[N_PUNCTLIST];  // which punctuation characters to announce
extern unsigned char punctuation_to_tone[INTONATION_TYPES][PUNCT_INTONATIONS];

extern Translator *translator;
extern Translator *translator2;
extern const unsigned short *charsets[N_CHARSETS];
extern char dictionary_name[40];
extern char ctrl_embedded;    // to allow an alternative CTRL for embedded commands
extern unsigned char *p_textinput;
extern wchar_t *p_wchar_input;
extern int dictionary_skipwords;

extern int (* uri_callback)(int, const char *, const char *);
extern int (* phoneme_callback)(const char *);
extern void SetLengthMods(Translator *tr, int value);

void LoadConfig(void);
int TransposeAlphabet(Translator *tr, char *text);
int utf8_in(int *c, const char *buf);
int utf8_in2(int *c, const char *buf, int backwards);
int utf8_out(unsigned int c, char *buf);
int utf8_nbytes(const char *buf);
int lookupwchar(const unsigned short *list,int c);
int Eof(void);
char *strchr_w(const char *s, int c);
int IsBracket(int c);
void InitNamedata(void);
void InitText(int flags);
void InitText2(void);
int IsDigit(unsigned int c);
int IsAlpha(unsigned int c);
int isspace2(unsigned int c);
int towlower2(unsigned int c);
void GetTranslatedPhonemeString(char *phon_out, int n_phon_out);

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 control);
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);
void LookupLetter(Translator *tr, unsigned int letter, int next_byte, char *ph_buf, int control);
void LookupAccentedLetter(Translator *tr, unsigned int letter, char *ph_buf);

int LoadDictionary(Translator *tr, const char *name, int no_error);
int LookupDictList(Translator *tr, char **wordptr, char *ph_out, unsigned int *flags, int end_flags, WORD_TAB *wtab);

void MakePhonemeList(Translator *tr, int post_pause, int new_sentence);
int ChangePhonemes_ru(Translator *tr, PHONEME_LIST2 *phlist, int n_ph, int index, PHONEME_TAB *ph, CHANGEPH *ch);
void ApplySpecialAttribute(Translator *tr, char *phonemes, int dict_flags);
void ApplySpecialAttribute2(Translator *tr, char *phonemes, int dict_flags);
void AppendPhonemes(Translator *tr, char *string, int size, const char *ph);

void CalcLengths(Translator *tr);
void CalcPitches(Translator *tr, int clause_tone);

int RemoveEnding(Translator *tr, char *word, int end_type, char *word_copy);
int Unpronouncable(Translator *tr, char *word);
void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, int tonic, int prev_stress);
int TranslateRules(Translator *tr, char *p, char *phonemes, int size, char *end_phonemes, int end_flags, unsigned int *dict_flags);
int TranslateWord(Translator *tr, char *word1, int next_pause, WORD_TAB *wtab);
void *TranslateClause(Translator *tr, FILE *f_text, const void *vp_input, int *tone, char **voice_change);
int ReadClause(Translator *tr, FILE *f_in, char *buf, short *charix, int *charix_top, int n_buf, int *tone_type, char *voice_change);

void SetVoiceStack(espeak_VOICE *v);
void InterpretPhoneme(Translator *tr, int control, PHONEME_LIST *plist, PHONEME_DATA *phdata);
void InterpretPhoneme2(int phcode, PHONEME_DATA *phdata);

extern FILE *f_trans;		// for logging
extern FILE *f_logespeak;
extern int logging_type;  // from config file

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The BSD License

Share

About the Author

Jozef Bozek
CEO bring-it-together s.r.o.
Slovakia Slovakia
Jozef Božek is currently a software engineer at bring-it-together s.r.o. in area of large scale infomation systems and mobile applications development.
He has been developing in C++ nearly full time since 2000, in Java since 2004 and in Objective-C since 2009. He is programming using Java EE SDK, iOS SDK, COM/DCOM, MFC, ATL, STL and so on Smile | :)
Follow on   Twitter   Google+

| Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 24 Jan 2012
Article Copyright 2012 by Jozef Bozek
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid