Browse Source

[1.46.38]

Speak names of characters in non-native alphabets (eg. non-Latin).
Language changes: en, nl, pt.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@304 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 12 years ago
parent
commit
6ee501b5bb

+ 6
- 0
dictsource/de_list View File

v faU v faU
x Iks x Iks


// Alphabets
_ar aR'AbIS
_cyr ky:R'IlIS
_he hEbr'E:IS


// Numbers // Numbers
//======== //========
_0 'nUl _0 'nUl

+ 15
- 14
dictsource/dict_phonemes View File

x z Z x z Z




Dictionary hu_dict 2012-07-25
Dictionary hu_dict 2013-02-25


a A a: e E e: i i: a A a: e E e: i i:
o o: u u: Y y y: Y: o o: u u: Y y y: Y:
z Z z Z




Dictionary de_dict 2012-11-26
Dictionary de_dict 2013-02-25


3 @ @- a A A: aI aU 3 @ @- a A A: aI aU
A~ E E2 E: e: EI i I A~ E E2 E: e: EI i I
ts v x z ts v x z




Dictionary en_dict 2013-02-20
Dictionary en_dict 2013-02-27


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


: ; ? b C d D d#
dZ f g h j k l l#
m n N n^ p Q r r-
s S t T t2 tS v w
x z Z z#
* : ; ? b C d D
d# dZ f g h j k l
l# l/ m n N n^ p Q
q Q" r R r- R2 s S
t T t2 tS v w x z
Z z#




Dictionary eo_dict 2013-01-24 Dictionary eo_dict 2013-01-24
t tS v w x t tS v w x




Dictionary nl_dict 2011-11-22
Dictionary nl_dict 2013-02-26


8 @ @- a A a: A~ e 8 @ @- a A a: A~ e
E e# E2 e: EI eU i I E e# E2 e: EI eU i I
ts; v w x z Z Z; ts; v w x z Z Z;




Dictionary pt_dict 2013-02-20
Dictionary pt_dict 2013-02-25


& &/ &U~ &~ @ @- a A & &/ &U~ &~ @ @- a A
aI aU e E eI EI eU EU aI aU e E eI EI eU EU

+ 161
- 10
dictsource/en_list View File

♭ flat ♭ flat
¬ n0t_|saIn ¬ n0t_|saIn
√ skw,e@r'u:t √ skw,e@r'u:t
∞ Inf'InI2tI2
∞ Inf'InI2ti
≠ n0t'i:kw@LtU ≠ n0t'i:kw@LtU
∫ IntIgr@L
№ nju:m@roU № nju:m@roU
। dVnda# । dVnda#
● bl,aks'3:k@L ● bl,aks'3:k@L
ʧ tSES ʧ tSES
ʤ dZEZ ʤ dZEZ


// Language names
_el gr'i:k
_cyr sI2r'IlIk
_hy A@m'i:ni@n
_he h'i:bru:
_ar 'ar@bIk
_dv t'A:na#
_hi h'Indi
_bn bEng'A:li
_gur g'U@mUki
_gu gu:dZ3r'A:ti
_or 0r'i@
_ta t'amI2l
_kn k'A:na#d@
_ml maleI'A:l@m
_si sI2nh'A:l@
_th t'aI
_lo l'aU
_ti tI2b'Et@n
_my mj'A:nmA@
_ka dZ'O@dZ@n
_ko k3r'i@n
_eth i:TI'0pIk


// Cyrillic letters
а a
б bE
в vE
г gE
д dE
е jE
ё jo
ж ZE
з zE
и I
й ,Ik@-*'atkOji
к ka
л El/1
м Em
н En
о o
п pE
р Er
с Es
т tE
у u
ф Ef
х xa
ц tsE
ч tSE
ш Sa
щ StSa
ъ jEr
ы _^_RU
ь jer
э E
ю ju
я ja

// Arabic letters

ء h'amza
آ 'Elifm,adda#
أ 'Elifh,amza
ا 'Elif
ب bE?
ة t'E?maR2b'uta#
ت tE?
ث TE?
ج ZIm
ح hE?
خ xE?
د dEl/1
ذ DEl/1
ر R2A:?
ز zEjn
س si:n
ش Si:n
ص sO:d@-
ض dO:d@-
ط thA:?
ظ DA:?
ع ?ajn
غ Q"ajn
ف fE?
ق qO:f
ك kEf
ل lEm
م mi:m
ن nu|:n
ه hE?
و wO:w
ي jE?

َ a
ِ i
ُ u
ّ S'ada#
ْ suk'un



// Hebrew letters
א 'alef_
ב bet_
ג 'gimel_
ד 'dalet_
ה he_
ו vav_
ז z'ajin_
ח xet_
ט tet_
י jod_
ך kaf_
כ kaf_
ל l'amed_
ם mem_
מ mem_
ן nun_
נ nun_
ס s'amex_
ע ?'ajin_
ף pe_
פ pe_
ץ ts'adi_
צ ts'adi_
ק kuf_
ר ReS_
ש Sin_
ת tav_


// phonetic modifiers // phonetic modifiers
ː lENT@nd_ ː lENT@nd_
U+2b0 aspI2reItI2d_ // supr-h U+2b0 aspI2reItI2d_ // supr-h
ie aIi:_! $pause $only ie aIi:_! $pause $only
i.e aIi:_! $pause i.e aIi:_! $pause
imo $abbrev imo $abbrev
inlb $abbrev
irc $abbrev irc $abbrev
irs $abbrev irs $abbrev
itx $abbrev itx $abbrev
uv $abbrev uv $abbrev
VI $abbrev VI $abbrev
wwii dVb@Lju:dVb@Lju:t'u: wwii dVb@Lju:dVb@Lju:t'u:
xl $abbrev // not roman 40
xxx $abbrev // not roman 30 xxx $abbrev // not roman 30
xy $abbrev xy $abbrev
yd $abbrev yd $abbrev
bridal braId@L bridal braId@L
brigade $2 brigade $2
brigadier brIga#d'i@3 brigadier brIga#d'i@3
brioche bri:'oUS
broccoli br0k@li broccoli br0k@li
brochure broUS3 brochure broUS3
?3 brochure broU'SU@r ?3 brochure broU'SU@r
brooch broUtS brooch broUtS
budgerigar bVdZ@rIgA@ budgerigar bVdZ@rIgA@
buffet bVfeI buffet bVfeI
?3 bulimia bUl'Imi@
bunion bVnI2@n bunion bVnI2@n
bureaucracy bjU@'0kr@si bureaucracy bjU@'0kr@si
bursar b3:s3 bursar b3:s3
?3 carburetor kA@b@reIt3 ?3 carburetor kA@b@reIt3
career k@r'i@3 career k@r'i@3
caress k@rEs caress k@rEs
carousel kar@s'El
carpel kA@p@l carpel kA@p@l
cascade $alt3 cascade $alt3
cashier kaS'i@3 cashier kaS'i@3
converse $1 $only converse $1 $only
converse $verb converse $verb
convert $1 $noun convert $1 $noun
convict $1 $onlys
convict $verb
convict $2 $verb
convolute k0nv@l'u:t convolute k0nv@l'u:t
coop ku:p coop ku:p
cooper ku:p3 cooper ku:p3
halleluiah halI2'lu:j@ halleluiah halI2'lu:j@
hallelujah halI2'lu:j@ hallelujah halI2'lu:j@
halloween $3 halloween $3
hallucinate $alt3
halogen hal@dZ@n halogen hal@dZ@n
hanged haNd hanged haNd
harem hA:r'i:m harem hA:r'i:m
ja jA: ja jA:
jagged dZagI#d jagged dZagI#d
jaguar dZagwA@ jaguar dZagwA@
jalapeno hA:l@p'eIn;oU
japan dZ@pan japan dZ@pan
jasmine dZazmIn jasmine dZazmIn
jedi dZEdaI jedi dZEdaI
july dZu:l'aI july dZu:l'aI


kaput $alt3 kaput $alt3
karaoke karI'oUki
karate k@rA:ti karate k@rA:ti
kebab k@bab kebab k@bab
?3 kebab k@bA:b ?3 kebab k@bA:b
nosir noUs3: nosir noUs3:
not noUt // for noted, notable, etc not noUt // for noted, notable, etc
nots n0ts nots n0ts
(nôtre dame) noUtr@'dA:m
nott n0t nott n0t
nothing nVTIN nothing nVTIN
notwithstanding $3 notwithstanding $3
padre pA:dreI padre pA:dreI
paella paI'El@ paella paI'El@
palling palIN palling palIN
palsy pO:lzi
papa pa#p'A: papa pa#p'A:
?3 papa pA:p@ ?3 papa pA:p@
papal peIp@L papal peIp@L
plaguing pleIgIN plaguing pleIgIN
playtest pleItEst playtest pleItEst
plaza plA:z@ plaza plA:z@
plebeian pl@b'i@n
plebeian pl@b'i:@n
plethora plET3r@ plethora plET3r@
plicate $2 plicate $2
plumber plVm3 plumber plVm3
polyamide p0lI'eImaId polyamide p0lI'eImaId
polythene $1 polythene $1
portend po@t'End portend po@t'End
?!3 portrait po@treIt
poseidon p@saId@n poseidon p@saId@n
posse p0si posse p0si
postage poUstI2dZ postage poUstI2dZ
salami $alt3 salami $alt3
saline seIlaIn saline seIlaIn
?3 saline seIli:n ?3 saline seIli:n
salmon sam@n
?3 salon $alt3 ?3 salon $alt3
saloon $alt3 saloon $alt3
san ,san $only san ,san $only
sardine $2 sardine $2
satan seIt@n
satanist seIt@nIst
satanic $alt3
saucepan sO:sp@n saucepan sO:sp@n
saudi saUdi saudi saUdi
saute sO:teI saute sO:teI
?3 savant sa#vA:nt ?3 savant sa#vA:nt
says sEz says sEz
scaly skeIlI scaly skeIlI
salmon sam@n
scalpel skalp@L scalpel skalp@L
scared ske@d scared ske@d
scaring ske@rIN scaring ske@rIN
signage saInI2dZ signage saInI2dZ
signal sIgn@l // signaled signal sIgn@l // signaled
signer saIn3 signer saIn3
signoff s,aIn'0f
signon s,aIn'0n
signup saInVp signup saInVp
sikh si:k sikh si:k
silo saIloU silo saIloU
Belize bEl'i:z Belize bEl'i:z
Bengal b,Eng'O:l Bengal b,Eng'O:l
Benin bEnIn Benin bEnIn
Berlin b3:l'In
Bhutan bu:t'an Bhutan bu:t'an
Bideford bIdIf@d Bideford bIdIf@d
Bogota b0g@t'A: Bogota b0g@t'A:
Gdansk g@-dansk Gdansk g@-dansk
Gibraltar $2 Gibraltar $2
Gomera goUm'e@r@ Gomera goUm'e@r@
Gurmukhi gU@mUki
Harare ha#rA:ri Harare ha#rA:ri
Hanoi han'OI Hanoi han'OI
Havana ha#van@ Havana ha#van@
Montana m0nt'an@ Montana m0nt'an@
Monte m0nt2i Monte m0nt2i
Munich mju:nIk Munich mju:nIk
Myanmar mjA:nmA@
Nairobi naIr'oUbi Nairobi naIr'oUbi
Naples neIp@Lz Naples neIp@Lz
Nauru naUru: Nauru naUru:
Suriname sU@rIn'am Suriname sU@rIn'am
Taipei t,aIp'eI Taipei t,aIp'eI
Taiwan taI'wA:n Taiwan taI'wA:n
Taiwanese taIw@n'i:z
Tawakoni ta#wA:k@ni Tawakoni ta#wA:k@ni
Tblisi t@-bli:si Tblisi t@-bli:si
Tehran te@r'A:n Tehran te@r'A:n
Jacques Zak Jacques Zak
Jamie dZeImi Jamie dZeImi
Jared dZar@d Jared dZar@d
Jarred dZar@d
Jarrad dZar@d
Jesus dZi:z@s Jesus dZi:z@s
Jonah dZoUn@ Jonah dZoUn@
José hoUs'eI José hoUs'eI
Vanessa $alt3 Vanessa $alt3
Wallace w0lI#s Wallace w0lI#s
Wally w0li Wally w0li
?3 William wIlj@m
Yves i:v Yves i:v
Yvonne $2 Yvonne $2
Zoe zoUi Zoe zoUi
Buchanan bju:k'an@n Buchanan bju:k'an@n
Cabrillo ka#bri:oU Cabrillo ka#bri:oU
Campbell kamb@l Campbell kamb@l
Capone ka#poUn
Carnegie kA@n@gi Carnegie kA@n@gi
Cohen koU@n Cohen koU@n
Cthulhu k@-Tu:l#u: Cthulhu k@-Tu:l#u:
Guinness gInIs Guinness gInIs
Hades heIdi:z Hades heIdi:z
Hamilton ham@Lt@n Hamilton ham@Lt@n
Hoosier hu:Z3
Jacobi dZa#koUbi Jacobi dZa#koUbi
Kendell kEnd@L Kendell kEnd@L
Kyocera kaI|@s'i@r@ Kyocera kaI|@s'i@r@
Rizzoli rI2zoUli Rizzoli rI2zoUli
Rodrigues r0dr'i:gEz Rodrigues r0dr'i:gEz
Sanchez santSEz Sanchez santSEz
Shakur Sa#kU@
Tzu tsu: Tzu tsu:
Versace v3sA:tSi
Wii wi:: Wii wi::
Yaesu jeIsu: Yaesu jeIsu:
Yamaha jam@hA: Yamaha jam@hA:

+ 23
- 10
dictsource/en_rules View File

-) a (- a# -) a (- a#
_) a (- 'eI _) a (- 'eI
_) a (-half a# _) a (-half a#
X) a ($w_alt3+++ a#
X) a ($w_alt3++++ a#
sw) a (B 0 sw) a (B 0
a (Be# eI a (Be# eI
w) a (Be# eI w) a (Be# eI
@) a (tious 'eI @) a (tious 'eI
n) a (tur eI n) a (tur eI
n) a (tura a n) a (tura a
&) a (ture_ @
sign) a (ture I sign) a (ture I
_) a (ve a _) a (ve a
_) a (viat eI _) a (viat eI
aise (_ 'eIz aise (_ 'eIz
_c) ais (l aS // 'caislin' _c) ais (l aS // 'caislin'
@l) ais (_ eI @l) ais (_ eI
portr) ai (t I#


.group al .group al
_) al (@ a#l _) al (@ a#l
_) al (i al _) al (i al
_) al (ig a#l _) al (ig a#l
X) al (in eIl X) al (in eIl
st) al (in A:l
_) ali (Be a#laI _) ali (Be a#laI
&) ali (sC_ @lI &) ali (sC_ @lI
&) al (isCic @l &) al (isCic @l
f) all (ib al f) all (ib al
_C) all (ow al _C) all (ow al
h) all (C O:l h) all (C O:l
h) all (uc a#l
sm) all O:l sm) all O:l
st) all O:l st) all O:l
t) all O:l t) all O:l
und) am (en @m und) am (en @m
_) am (en a#m _) am (en a#m
ame (nab a#mi: ame (nab a#mi:
_l) ame (nt %amE
_l) am (ent a#m
amm (end a#m amm (end a#m
amoeb a#mi:b amoeb a#mi:b
f) amil amIl f) amil amIl
&) an (ty_ @n &) an (ty_ @n
&) an (t_ @n &) an (t_ @n
&) an (t_$w_alt an &) an (t_$w_alt an
?3 &) an (t_$w_alt A:n
?8 &) an (t_ a#n ?8 &) an (t_ a#n
_f) an (at a#n _f) an (at a#n
pl) an (t_ an pl) an (t_ an
_p) ara (de @reI _p) ara (de @reI
&t) ar (_ 3 &t) ar (_ 3
st) ar (_ A@ st) ar (_ A@
guit) ar (_ A@
guit) ar 'A@
_t) ar (_ A@ _t) ar (_ A@
&) ar (dis 3 &) ar (dis 3
&) ar (diz 3 &) ar (diz 3
w) ast (e# eIst w) ast (e# eIst


.group at .group at
_s) ata (n eIt@
_g) ator eIt3 _g) ator eIt3
&) ate (_$w_alt2 @t &) ate (_$w_alt2 @t
pal) ate (_ @t pal) ate (_ @t
par) ates (_ eIt|s par) ates (_ eIt|s
@) ated (++_ eItId @) ated (++_ eItId
_s) ate (ll at@ _s) ate (ll at@
@) ati (_ 'A:tI
@) ati (_ 'A:ti
at (im_ 'eIt at (im_ 'eIt
@) ating (++_ eItIN @) ating (++_ eItIN
&) at (ive @t &) at (ive @t
@) ath (An_ @T @) ath (An_ @T
athed (_ eIDd athed (_ eIDd
athei eITI2I athei eITI2I
&) athy =@TI2
&) athy (_ =@TI2
@) ath (is =@T @) ath (is =@T
_) at (lan a#t _) at (lan a#t
at (omi a#t at (omi a#t


.group b .group b
b b b b
_) bh b
_) bh (@ b
_) b (L01Y b // allow _bl _br _) b (L01Y b // allow _bl _br
_) bj (A bj _) bj (A bj
_) brz (e brz _) brz (e brz
benevo b@nEv@ benevo b@nEv@
_) be (o beI _) be (o beI
be (qu bI2 be (qu bI2
_) berlin %b3:lIn
_) ber (s b3 _) ber (s b3
be (see bI2 be (see bI2
be (sie bI2 be (sie bI2
co (ntrol+ k@ co (ntrol+ k@
conva (l k0nv@ conva (l k0nv@
_) co (nvenA k@ _) co (nvenA k@
_) co (nvi k@
_) co (nvi k0#
_) co (nvoy k0 _) co (nvoy k0
_) co (nw k0 _) co (nw k0
_) copy k0pI _) copy k0pI
h) emorrh Em@r h) emorrh Em@r
sph) em @m sph) em @m
sph) em (e 'i:m sph) em (e 'i:m
_s) ema (nti @ma
&) em (y_ @m &) em (y_ @m
yst) em @m yst) em @m
yst) em (i Em yst) em (i Em
erred (_ '3:d erred (_ '3:d
er (_ 3: er (_ 3:
er (B_ 3: er (B_ 3:
_c) ere (br 3ri:
&) ere (_ 3 &) ere (_ 3
ere (_ 3: ere (_ 3:
&) er (s_ 3 &) er (s_ 3
&) ia (n i@ &) ia (n i@
@) ia (nic I'a @) ia (nic I'a
@) ia (nit I'a @) ia (nit I'a
@) ia (na i:'a
@) ia (na_ i:'a
ia (ng_ ja ia (ng_ ja
_f) ia (nc I'0 _f) ia (nc I'0
_f) iance I'0nseI _f) iance I'0nseI
an) ism (_S3d Iz@m an) ism (_S3d Iz@m
@iB) ism (_S3d Iz@m @iB) ism (_S3d Iz@m
@) ism (_S3de Iz@m @) ism (_S3de Iz@m
et) ism (_S3 Iz@m
is (o_ aIz is (o_ aIz
is (or_ aIz is (or_ aIz
iss (a_ 'Is iss (a_ 'Is
_) ja (mai dZa# _) ja (mai dZa#
_) jere (C dZEr@ _) jere (C dZEr@
_) jes (ui dZEz _) jes (ui dZEz
_) jiha (d dZI2hA:
_) joa (n@ dZoU'a _) joa (n@ dZoU'a
n) j (a_ j n) j (a_ j
j (ü j j (ü j
per (fec p3 per (fec p3
_) per (iC@@ p,Er _) per (iC@@ p,Er
_) perini pErIn'i: _) perini pErIn'i:
per (iph p3r
_) per (iph p3r
_) per (isc pEr _) per (isc pEr
_) per (ish pEr _) per (ish pEr
perme (a p3:mI perme (a p3:mI
_) re (i@P2 r,i: _) re (i@P2 r,i:
_) rei (c raI _) rei (c raI
_) rei (l raI _) rei (l raI
_) rei (s raI
_) reis raIz
_) re (iss r%i: _) re (iss r%i:
_) rele (g rElI2 _) rele (g rElI2
rele (nt rI2lE rele (nt rI2lE
_) zs (Y z _) zs (Y z
_) z (wY z _) z (wY z


n) z (_ ts
@) zales (_ z'A:l@s @) zales (_ z'A:l@s
zei zaI zei zaI
zes (_ zI2z zes (_ zI2z
// ñ nj // ñ nj
ñ _^_ES ñ _^_ES


_) ʻ (A ? // arabic


' '
! _:Ekskl@meIS@n_: ! _:Ekskl@meIS@n_:

+ 6
- 0
dictsource/hu_list View File

_¡ AlSo:indEks _¡ AlSo:indEks




// Alphabets
_ar 'AR2Ab
_cry ts'iR2ill
_he h'e:bER2


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



+ 21
- 3
dictsource/nl_list View File

Vlaander $alt Vlaander $alt




// -s is not a suffix
as $alt
bres $alt
chaos $alt $1
es $alt
fles $alt
fris $alt
glas $alt
mes $alt
moeras $alt
was $alt // gewas

// -s, just remove 's' from the plural
charges $alt2
curves $alt2
droogtes $alt2
groeves $alt2
hoeves $alt2
reserves $alt2
marges $alt2
marge mArZ@


// words where -age is [a:Q@] not French ['a:Z@] // words where -age is [a:Q@] not French ['a:Z@]
drage $alt drage $alt
moesel muz@l moesel muz@l
vondel $alt vondel $alt


// -s is not plural
chaos xa:Os

// all words on _aard are treated as suffix in the rules. // all words on _aard are treated as suffix in the rules.





+ 12
- 2
dictsource/nl_rules View File

m) ach (in %a:S m) ach (in %a:S
_) af (C@P2 'Af _) af (C@P2 'Af
_) affich %AfiS _) affich %AfiS
age (_N 'a:Z@
age (_ 'a:Z@
ages (_S1 s ages (_S1 s
age (_$w_alt a:Q@ age (_$w_alt a:Q@
aille (_ 'Aj@ aille (_ 'Aj@
@) ant (e_ 'Ant @) ant (e_ 'Ant
@) ant (en_ 'Ant @) ant (en_ 'Ant
@) ant (er_ 'Ant @) ant (er_ 'Ant
@) ares (_ a:r'Es
aris (_ 'a:rIs aris (_ 'a:rIs
arissen (_ 'a:rIs@n arissen (_ 'a:rIs@n
a (tor_ 'a: a (tor_ 'a:
@) ent (st_ 'Ent @) ent (st_ 'Ent
@) ent (ste_ 'Ent @) ent (ste_ 'Ent
ag) ent 'Ent ag) ent 'Ent
@j) es (_ @s
@j) es (_S1 s
@z) es (_S1 s
@) es (_S2qd 'Es // double the previous vowel @) es (_S2qd 'Es // double the previous vowel
@) es (_$w_alt2S1 s // just remove 's'
KAC) es (_S2e @s KAC) es (_S2e @s
@) essen (_S5qd 'Es@n @) essen (_S5qd 'Es@n
@) eres (_S4qd @r'Es @) eres (_S4qd @r'Es
_) in (C@P2 'In _) in (C@P2 'In
// _) in (gP2 'In // _) in (gP2 'In
io (nage iO io (nage iO
io (de_ i'o:
iodes (_ i'o:d@s
is (_ Is
@) isch (_ =is @) isch (_ =is
@) ische (_ =is@ @) ische (_ =is@
@) isme (_ 'Ism@ @) isme (_ 'Ism@
management ma:nIdZm@nt management ma:nIdZm@nt
_) mee (@P3 m'e: _) mee (@P3 m'e:
menu (_ m@ny menu (_ m@ny
_) mi (cro mi
_) mi (s@ m%I _) mi (s@ m%I
_) mis (anC miz _) mis (anC miz
_) mis (commP3 m'Is _) mis (commP3 m'Is
_) openings (P8 'o:p@nINs _) openings (P8 'o:p@nINs
_) op (era 'o:p _) op (era 'o:p
_) op (tion Op _) op (tion Op
os (_ Os
ou (che_ u ou (che_ u
ouch (en_ uS ouch (en_ uS
d) ou (blu u d) ou (blu u
sj S sj S
@) sje (_ sj@ @) sje (_ sj@
@) s (_S1 s @) s (_S1 s
@) s (_$w_alt =s


sc (oop sk sc (oop sk
sc (opi sk sc (opi sk
uw (_ yU uw (_ yU


_) uit (@P3 'Wyt _) uit (@P3 'Wyt
us (_ 8s
u (sie_ 'y u (sie_ 'y
@) ute (_ 'yt @) ute (_ 'yt
uu (r_ 'y uu (r_ 'y

+ 26
- 18
dictsource/pt_list View File

_tld tS'iU _tld tS'iU
?1 _tld til ?1 _tld til


// alphabets
_ar 'a*aby
_cyr si*'ilikU
_he eb*'aIkU



// character names // character names


da $u $nounf da $u $nounf
dos $u $nounf dos $u $nounf
das $u $nounf das $u $nounf
dum $u
duma $u
duns $u
dumas $u
dum $u $nounf
duma $u $nounf
duns $u $nounf
dumas $u $nounf


em $u // in,on,at em $u // in,on,at
no nu $u $nounf no nu $u $nounf
na $u $nounf na $u $nounf
num $u
numa $u
nuns $u
numas $u
num $u $nounf
numa $u $nounf
nuns $u $nounf
numas $u $nounf


por $u $nounf // by,for,through por $u $nounf // by,for,through
pelo $u $nounf pelo $u $nounf
?2 pela $u $nounf p'el& ?2 pela $u $nounf p'el&


ao $u
ao $u $nounf
à ,a: à ,a:
à $atend $atstart $accent à $atend $atstart $accent
aos $u
às ,a:s
aos $u $nounf
às ,a:s $nounf


para $u // for,to para $u // for,to
pro $u $nounf pro $u $nounf
pra $u
pros $u
pras $u
prò $u
prà $u
pròs $u
pràs $u
pra $u $nounf
pros $u $nounf
pras $u $nounf
prò $u $nounf
prà $u $nounf
pròs $u $nounf
pràs $u $nounf


com $u // with com $u // with
?2 sem // without ?2 sem // without
austera $alt austera $alt
austero $alt austero $alt
autora $alt2 autora $alt2
avesso $alt2
axé aSE axé aSE
baqueta $alt2 baqueta $alt2
beco $alt2 beco $alt2
catorze $alt2 catorze $alt2
cebola $alt2 cebola $alt2
cefaleia $alt cefaleia $alt
cerca $alt
cerca $alt2 $noun
cerco $alt $verb cerco $alt $verb
cesta $alt2 cesta $alt2
cesto $alt2 cesto $alt2

+ 3
- 0
dictsource/pt_rules View File

_vend) e (L06_ e _vend) e (L06_ e
respond) e (L06_ e // cor- respond) e (L06_ e // cor-
_aborrec) e (L07_ e _aborrec) e (L07_ e
_rejuvenec) e (L07_ e
_adoec) e (L07_ e _adoec) e (L07_ e
_amanhec) e (L07_ e _amanhec) e (L07_ e
_anoitec) e (L07_ e _anoitec) e (L07_ e
padec) e (L07_ e // com- padec) e (L07_ e // com-
parec) e (L07_ e // a- rea- com- desa- parec) e (L07_ e // a- rea- com- desa-
preend) e (L07_ e // sur- com- preend) e (L07_ e // sur- com-
_perec) e (L07_ e
respond) e (L07_ e // cor- respond) e (L07_ e // cor-
torc) e (L07_ e // con- torc) e (L07_ e // con-
venc) e (L07_ e // con- venc) e (L07_ e // con-
_alb) e (rguL02_ E _alb) e (rguL02_ E
_enx) e (rguL02_ E _enx) e (rguL02_ E
_bez) e (rrL03_ e _bez) e (rrL03_ e
_rejuven) e (çL03_ e
_inv) e (rtL03_ e _inv) e (rtL03_ e
_f) e (rvL03_ e _f) e (rvL03_ e
_p) e (scL03_ E _p) e (scL03_ E

+ 19
- 8
phsource/compile_report View File



86 phoneme tables
87 phoneme tables
new total new total
base 109 109 base 109 109
consonants 10 118 consonants 10 118
no 28 134 no 28 134
is 42 141 is 42 141
vi 53 147 vi 53 147
vi-hue 8 147
zhy 41 138 zhy 41 138
zh 64 155 zh 64 155
sw 9 110 sw 9 110
envelope/i_risefall [11] zh envelope/i_risefall [11] zh
envelope/i_risefall2 [+2] rw envelope/i_risefall2 [+2] rw
envelope/p_214 [5] vi envelope/p_214 [5] vi
[5] vi-hue
[214] zh [214] zh
envelope/p_512 [6] vi envelope/p_512 [6] vi
[4] vi-hue
[6] vi-hue
[+] pa [+] pa
envelope/p_fall [2] vi envelope/p_fall [2] vi
[7] vi [7] vi
[2] vi-hue
[4] zhy [4] zhy
[7] zhy [7] zhy
[21] zh [21] zh
[+] rw [+] rw
envelope/p_fallrise [4] vi envelope/p_fallrise [4] vi
envelope/p_level [1] vi envelope/p_level [1] vi
[1] vi-hue
[7] vi-hue
[1] zhy [1] zhy
[3] zhy [3] zhy
[6] zhy [6] zhy
[55] zh [55] zh
envelope/p_rise [3] vi envelope/p_rise [3] vi
[3] vi-hue
[2] zhy [2] zhy
[5] zhy [5] zhy
[44] zh [44] zh
[35] zh [35] zh
envelope/vi_5amp [5] vi envelope/vi_5amp [5] vi
[5] vi-hue
envelope/vi_6amp [6] vi envelope/vi_6amp [6] vi
[2] vi-hue
[6] vi-hue
g2/xg [gh] hi g2/xg [gh] hi
g/g [g] base g/g [g] base
[g-] en [g-] en
[l/] fr [l/] fr
l/l_@ [l/3] base l/l_@ [l/3] base
[l/] fr [l/] fr
l/l@ [h6s] base
l/l@ [h6r] base
[l#] base [l#] base
[l] fr [l] fr
[l/2] fr [l/2] fr
l/L2_uL [l/2] base l/L2_uL [l/2] base
l/l_3 [l/] de l/l_3 [l/] de
l/l_4 [ll] sq l/l_4 [ll] sq
l/la [h6s] base
l/la [h6r] base
[l#] base [l#] base
[l] fr [l] fr
[l/2] fr [l/2] fr
[K] tn [K] tn
l/l_a [l/3] base l/l_a [l/3] base
[l/] fr [l/] fr
l/le [h6s] base
l/le [h6r] base
[l#] base [l#] base
[l] fr [l] fr
[l/2] fr [l/2] fr
[&:] af [&:] af
l/l_front [L] sq l/l_front [L] sq
l/l_front_ [l/4] sq l/l_front_ [l/4] sq
l/li [h6s] base
l/li [h6r] base
[l#] base [l#] base
[l] fr [l] fr
[l/2] fr [l/2] fr
ll/_ll [L] base ll/_ll [L] base
l/l_long [l] base l/l_long [l] base
[l] fr [l] fr
l/lo [h6s] base
l/lo [h6r] base
[l#] base [l#] base
[l/2] fr [l/2] fr
[K] nso [K] nso
[l;] lt [l;] lt
[l] ru [l] ru
[l^] ru [l^] ru
l/lu [h6s] base
l/lu [h6r] base
[l#] base [l#] base
[l] fr [l] fr
[l/2] fr [l/2] fr
[A~] fr [A~] fr
[A~] ht [A~] ht
vnasal/a#_n [&~] pt vnasal/a#_n [&~] pt
vnasal/a#_n2 [&~] pt
vnasal/a#u_n [&U~] pt vnasal/a#u_n [&U~] pt
[&U~] pt-pt [&U~] pt-pt
[o#] vi [o#] vi
vnasal/V_n [V~] hi vnasal/V_n [V~] hi
vnasal/W_n [E~] fr vnasal/W_n [E~] fr
[W~] fr [W~] fr
[&~] pt
[E~] ht [E~] ht
voc/bh [B] base voc/bh [B] base
voc/dh [D] base voc/dh [D] base

+ 7
- 10
phsource/ph_english_us View File

vls alv stop vls alv stop
voicingswitch d voicingswitch d
lengthmod 2 lengthmod 2
Vowelin f1=0 f2=1700 -300 300 f3=-100 80
Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20


// IF prevPhW(isVowel) OR prevPhW(n) THEN
IF prevPhW(isVowel) THEN // test, don't reduce [t] after [n]
IF nextPhW(isVowel) AND nextPh(isUnstressed) THEN
IF next2Ph(n) AND next2Ph(notWordStart) THEN
ELSE
ChangePhoneme(t#)
ENDIF
IF nextPhW(isVowel) AND nextPh(isUnstressed) AND NOT next2PhW(n) THEN
IF prevPhW(isVowel) THEN
ChangePhoneme(t#)
ELIF prevPhW(n) THEN
WAV(ustop/t, 60)
ENDIF ENDIF
ENDIF ENDIF


Vowelin f1=0 f2=1700 -300 300 f3=-100 80
Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20

IF nextPh(isPause2) THEN IF nextPh(isPause2) THEN
WAV(ustop/t_) WAV(ustop/t_)
ELIF nextPh(r) OR nextPh(R) OR nextPh(R2) THEN ELIF nextPh(r) OR nextPh(R) OR nextPh(R2) THEN

+ 1
- 1
phsource/ph_pt_brazil View File

ipa ɐU+0303 ipa ɐU+0303
length 180 length 180
IF thisPh(isFinalVowel) THEN IF thisPh(isFinalVowel) THEN
FMT(vnasal/W_n)
FMT(vnasal/a#_n2)
ELSE ELSE
FMT(vnasal/a#_n) FMT(vnasal/a#_n)
ENDIF ENDIF

+ 3
- 0
phsource/phonemes View File

phonemetable vi base phonemetable vi base
include ph_vietnam include ph_vietnam


phonemetable vi-hue vi
include ph_vietnam_hue

phonemetable zhy base phonemetable zhy base
include ph_zh_yue include ph_zh_yue



BIN
phsource/vowel/&_2 View File


BIN
phsource/vowel/vowelchart.png View File


+ 21
- 3
src/compiledata.cpp View File







static int NextItemMax(int max)
{//==============================
// Get a number, but restrict value to max
int value;
char msg[80];

value = NextItem(tNUMBER);
if(value > max)
{
sprintf(msg, "Value %d is greater than maximum %d", value, max);
error(msg, NULL);
value = max;
}
return(value);
}



static int NextItemBrackets(int type, int control) static int NextItemBrackets(int type, int control)
{//=============================================== {//===============================================
// Expect a parameter inside parantheses // Expect a parameter inside parantheses
break; break;


case i_PAUSE_BEFORE: case i_PAUSE_BEFORE:
value = NextItem(tNUMBER);
value = NextItemMax(255);
*prog_out++ = (i_PAUSE_BEFORE << 8) + value; *prog_out++ = (i_PAUSE_BEFORE << 8) + value;
break; break;


case i_PAUSE_AFTER: case i_PAUSE_AFTER:
value = NextItem(tNUMBER);
value = NextItemMax(255);
*prog_out++ = (i_PAUSE_AFTER << 8) + value; *prog_out++ = (i_PAUSE_AFTER << 8) + value;
break; break;


case i_SET_LENGTH: case i_SET_LENGTH:
value = NextItem(tNUMBER);
value = NextItemMax(511);
if(after_if == 0) if(after_if == 0)
{ {
phoneme_out->std_length = value/2; phoneme_out->std_length = value/2;

+ 8
- 0
src/dictionary.cpp View File

int ix; int ix;
unsigned int digit_count=0; unsigned int digit_count=0;
char *p; char *p;
ALPHABET *alphabet;
int dict_flags0=0; int dict_flags0=0;
MatchRecord match1; MatchRecord match1;
MatchRecord match2; MatchRecord match2;
match1.points = 1; match1.points = 1;
p += (wc_bytes-1); p += (wc_bytes-1);
} }

if(((alphabet = AlphabetFromChar(letter)) != NULL) && (alphabet->language != 0) && (alphabet->offset != tr->letter_bits_offset))
{
// switch to the nominated language for this alphabet
sprintf(phonemes,"%c%s",phonSWITCH, WordToString2(alphabet->language));
return(0);
}
} }
} }



+ 76
- 9
src/numbers.cpp View File

int letter; int letter;
int len; int len;
int ix; int ix;
int save_option_phonemes;
char *p2; char *p2;
char *pbuf; char *pbuf;
ALPHABET *alphabet;
int language;
int phontab_1;
char capital[20]; char capital[20];
char ph_buf[80]; char ph_buf[80];
char ph_buf2[80]; char ph_buf2[80];
char ph_alphabet[80];
char hexbuf[6]; char hexbuf[6];


ph_buf[0] = 0; ph_buf[0] = 0;
ph_alphabet[0] = 0;
capital[0] = 0; capital[0] = 0;


n_bytes = utf8_in(&letter,word); n_bytes = utf8_in(&letter,word);
return(0); return(0);
} }


#ifdef deleted
if((ph_buf[0] == 0) && (tr->translator_name != L('e','n'))) if((ph_buf[0] == 0) && (tr->translator_name != L('e','n')))
{ {
// speak as English, check whether there is a translation for this character // speak as English, check whether there is a translation for this character
return(0); return(0);
} }
} }
#endif

alphabet = AlphabetFromChar(letter);
if(alphabet != current_alphabet)
{
current_alphabet = alphabet;
if((alphabet != NULL) && !(alphabet->flags & AL_DONT_NAME))
{
if(Lookup(translator, alphabet->name, ph_alphabet) == 0) // the original language for the current voice
{
// Can't find the local name for this alphabet, use the English name
phontab_1 = tr->phoneme_tab_ix;
ph_alphabet[2] = SetTranslator2("en"); // overwrites previous contents of translator2
if(Lookup(translator2, alphabet->name, &ph_alphabet[3]) != 0)
{
ph_alphabet[0] = phonPAUSE;
ph_alphabet[1] = phonSWITCH;
len = strlen(&ph_alphabet[3]) + 3;
ph_alphabet[len] = phonSWITCH; // switch back
ph_alphabet[len+1] = phontab_1;
ph_alphabet[len+2] = 0;
}
}
}
}


// caution: SetWordStress() etc don't expect phonSWITCH + phoneme table number
if(ph_buf[0] == 0)
{
if((alphabet != NULL) && (alphabet->language != 0) && !(alphabet->flags & AL_NOT_LETTERS))
language = alphabet->language;
else
language = L('e','n');

if(language != tr->translator_name)
{
// speak in the language for this alphabet (or English)
ph_buf[2] = SetTranslator2(WordToString2(language));
LookupLetter(translator2, letter, word[n_bytes], &ph_buf[3], control & 1);

if(ph_buf[3] == phonSWITCH)
{
// another level of language change
ph_buf[2] = SetTranslator2(&ph_buf[4]);
LookupLetter(translator2, letter, word[n_bytes], &ph_buf[3], control & 1);
}

SelectPhonemeTable(voice->phoneme_tab_ix); // revert to original phoneme table

if(ph_buf[3] != 0)
{
ph_buf[0] = phonPAUSE;
ph_buf[1] = phonSWITCH;
len = strlen(&ph_buf[3]) + 3;
ph_buf[len] = phonSWITCH; // switch back
ph_buf[len+1] = tr->phoneme_tab_ix;
ph_buf[len+2] = 0;
}
}
}


if(ph_buf[0] == 0) if(ph_buf[0] == 0)
{ {
} }


len = strlen(phonemes); len = strlen(phonemes);

if(tr->langopts.accents & 2) if(tr->langopts.accents & 2)
sprintf(ph_buf2,"%c%s%s",0xff,ph_buf,capital);
sprintf(ph_buf2,"%c%s%s%s",0xff,ph_alphabet,ph_buf,capital);
else else
sprintf(ph_buf2,"%c%s%s",0xff,capital,ph_buf); // the 0xff marker will be removed or replaced in SetSpellingStress()
sprintf(ph_buf2,"%c%s%s%s",0xff,ph_alphabet,capital,ph_buf); // the 0xff marker will be removed or replaced in SetSpellingStress()
if((len + strlen(ph_buf2)) < N_WORD_PHONEMES) if((len + strlen(ph_buf2)) < N_WORD_PHONEMES)
{ {
strcpy(&phonemes[len],ph_buf2); strcpy(&phonemes[len],ph_buf2);
int ix; int ix;
unsigned int c; unsigned int c;
int n_stress=0; int n_stress=0;
int prev = 0;
int count; int count;
unsigned char buf[N_WORD_PHONEMES]; unsigned char buf[N_WORD_PHONEMES];


for(ix=0; (c = phonemes[ix]) != 0; ix++) for(ix=0; (c = phonemes[ix]) != 0; ix++)
{ {
if(c == phonSTRESS_P)
if((c == phonSTRESS_P) && (prev != phonSWITCH))
{ {
n_stress++; n_stress++;
} }
buf[ix] = c;
buf[ix] = prev = c;
} }
buf[ix] = 0; buf[ix] = 0;


count = 0; count = 0;
prev = 0;
for(ix=0; (c = buf[ix]) != 0; ix++) for(ix=0; (c = buf[ix]) != 0; ix++)
{ {
if((c == phonSTRESS_P) && (n_chars > 1))
if((c == phonSTRESS_P) && (n_chars > 1) && (prev != phonSWITCH))
{ {
count++; count++;


c = phonPAUSE_NOLINK; // pause following a primary stress c = phonPAUSE_NOLINK; // pause following a primary stress
else else
c = phonPAUSE_VSHORT; c = phonPAUSE_VSHORT;
// else
// continue; // remove marker
} }
*phonemes++ = c;
*phonemes++ = prev = c;
} }
if(control >= 2) if(control >= 2)
*phonemes++ = phonPAUSE_NOLINK; *phonemes++ = phonPAUSE_NOLINK;

+ 25
- 25
src/readclause.cpp View File

/*************************************************************************** /***************************************************************************
* Copyright (C) 2005 to 2011 by Jonathan Duddington *
* Copyright (C) 2005 to 2013 by Jonathan Duddington *
* email: [email protected] * * email: [email protected] *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
static int end_of_input; static int end_of_input;


static int ignore_text=0; // set during <sub> ... </sub> to ignore text which has been replaced by an alias static int ignore_text=0; // set during <sub> ... </sub> to ignore text which has been replaced by an alias
static int audio_text=0; // set during <audio> ... </audio>
static int audio_text=0; // set during <audio> ... </audio>
static int clear_skipping_text = 0; // next clause should clear the skipping_text flag static int clear_skipping_text = 0; // next clause should clear the skipping_text flag
int count_characters = 0; int count_characters = 0;
static int sayas_mode; static int sayas_mode;
0xff1a, // fullwidth colon 0xff1a, // fullwidth colon
0xff1b, // fullwidth semicolon 0xff1b, // fullwidth semicolon
0xff1f, // fullwidth question mark 0xff1f, // fullwidth question mark
0}; 0};




end_of_input = 1; end_of_input = 1;
return(0); return(0);
} }
if(!end_of_input) if(!end_of_input)
{ {
if(option_multibyte == espeakCHARS_16BIT) if(option_multibyte == espeakCHARS_16BIT)
} }




static const char *WordToString2(unsigned int word)
{//================================================
const char *WordToString2(unsigned int word)
{//============================================
// Convert a language mnemonic word into a string // Convert a language mnemonic word into a string
int ix; int ix;
static char buf[5]; static char buf[5];


if(attributes & CLAUSE_BIT_SENTENCE) if(attributes & CLAUSE_BIT_SENTENCE)
return(attributes); return(attributes);
return(short_pause); return(short_pause);
} // end of AnnouncePunctuation } // end of AnnouncePunctuation


} }
p += (strlen(p) + 1); p += (strlen(p) + 1);
} }
if(voice_name_specified == 0) if(voice_name_specified == 0)
voice_name[0] = 0; // forget a previous voice name if a language is specified voice_name[0] = 0; // forget a previous voice name if a language is specified
} }
static int attrcmp(const wchar_t *string1, const char *string2) static int attrcmp(const wchar_t *string1, const char *string2)
{//============================================================ {//============================================================
int ix; int ix;
if(string1 == NULL) if(string1 == NULL)
return(1); return(1);


} }
if(*pw == '-') if(*pw == '-')
{ {
pw++;
pw++;
sign = -1; sign = -1;
} }
value = (double)wcstod(pw,&tail); value = (double)wcstod(pw,&tail);
age = GetSsmlAttribute(pw,"age"); age = GetSsmlAttribute(pw,"age");
gender = GetSsmlAttribute(pw,"gender"); gender = GetSsmlAttribute(pw,"gender");
} }
if((tag_type != SSML_VOICE) && (lang==NULL)) if((tag_type != SSML_VOICE) && (lang==NULL))
return(0); // <s> or <p> without language spec, nothing to do return(0); // <s> or <p> without language spec, nothing to do
ssml_sp = &ssml_stack[n_ssml_stack++]; ssml_sp = &ssml_stack[n_ssml_stack++];


attrcopy_utf8(ssml_sp->language,lang,sizeof(ssml_sp->language)); attrcopy_utf8(ssml_sp->language,lang,sizeof(ssml_sp->language));
{"underscore ", 0xe05f}, {"underscore ", 0xe05f},
{"double-quote ", '"'}, {"double-quote ", '"'},
{NULL, 0}}; {NULL, 0}};
int ix; int ix;
int letter; int letter;
char *p; char *p;
int voice_change_flag; int voice_change_flag;
wchar_t *px; wchar_t *px;
wchar_t *attr1; wchar_t *attr1;
wchar_t *attr2;
wchar_t *attr2;
wchar_t *attr3; wchar_t *attr3;
int terminator; int terminator;
char *uri; char *uri;
tag_name[ix] = 0; tag_name[ix] = 0;


px = &xml_buf[ix]; // the tag's attributes px = &xml_buf[ix]; // the tag's attributes
if(tag_name[0] == '/') if(tag_name[0] == '/')
{ {
// closing tag // closing tag
} }
xml_buf[n_xml_buf] = 0; xml_buf[n_xml_buf] = 0;
c2 = ' '; c2 = ' ';
self_closing = 0; self_closing = 0;
if(xml_buf[n_xml_buf-1] == '/') if(xml_buf[n_xml_buf-1] == '/')
{ {
xml_buf[n_xml_buf-1] = ' '; xml_buf[n_xml_buf-1] = ' ';
self_closing = 1; self_closing = 1;
} }
terminator = ProcessSsmlTag(xml_buf,buf,ix,n_buf,self_closing); terminator = ProcessSsmlTag(xml_buf,buf,ix,n_buf,self_closing);
if(terminator != 0) if(terminator != 0)
{ {
if(end_clause_after_tag) if(end_clause_after_tag)


buf[ix] = ' '; buf[ix] = ' ';
buf[ix++] = 0; buf[ix++] = 0;
if(terminator & CLAUSE_BIT_VOICE) if(terminator & CLAUSE_BIT_VOICE)
{ {
strcpy(voice_change, current_voice_id); strcpy(voice_change, current_voice_id);
if(iswspace(c1)) if(iswspace(c1))
{ {
char *p_word; char *p_word;
if(tr->translator_name == 0x6a626f) if(tr->translator_name == 0x6a626f)
{ {
// language jbo : lojban // language jbo : lojban
// Because of an xml tag, we are waiting for the // Because of an xml tag, we are waiting for the
// next non-blank character to decide whether to end the clause // next non-blank character to decide whether to end the clause
// i.e. is dot followed by an upper-case letter? // i.e. is dot followed by an upper-case letter?
if(!iswspace(c1)) if(!iswspace(c1))
{ {
if(!IsAlpha(c1) || !iswlower(c1)) if(!IsAlpha(c1) || !iswlower(c1))
if((punct = lookupwchar(punct_chars,c1)) != 0) if((punct = lookupwchar(punct_chars,c1)) != 0)
{ {
punct_data = punct_attributes[punct]; punct_data = punct_attributes[punct];
if(punct_data & PUNCT_IN_WORD) if(punct_data & PUNCT_IN_WORD)
{ {
// Armenian punctuation inside a word // Armenian punctuation inside a word
announced_punctuation = c1; announced_punctuation = c1;
} }
} }
if((punct_data & PUNCT_SAY_NAME) && (announced_punctuation == 0)) if((punct_data & PUNCT_SAY_NAME) && (announced_punctuation == 0))
{ {
// used for elipsis (and 3 dots) if a pronunciation for elipsis is given in *_list // used for elipsis (and 3 dots) if a pronunciation for elipsis is given in *_list


if(c1 == '.') if(c1 == '.')
{ {
if((tr->langopts.numbers & NUM_ORDINAL_DOT) &&
if((tr->langopts.numbers & NUM_ORDINAL_DOT) &&
(iswdigit(cprev) || (IsRomanU(cprev) && (IsRomanU(cprev2) || iswspace(cprev2))))) // lang=hu (iswdigit(cprev) || (IsRomanU(cprev) && (IsRomanU(cprev2) || iswspace(cprev2))))) // lang=hu
{ {
// dot after a number indicates an ordinal number // dot after a number indicates an ordinal number
else else
if(c_next == '\'') if(c_next == '\'')
{ {
is_end_clause = 0; // eg. u.s.a.'s
is_end_clause = 0; // eg. u.s.a.'s
} }
if(iswlower(c_next)) if(iswlower(c_next))
{ {

+ 1
- 1
src/synthdata.cpp View File

#include "translate.h" #include "translate.h"
#include "wave.h" #include "wave.h"


const char *version_string = "1.46.37 20.Feb.13";
const char *version_string = "1.46.38 27.Feb.13";
const int version_phdata = 0x014636; const int version_phdata = 0x014636;


int option_device_number = -1; int option_device_number = -1;

+ 79
- 29
src/tr_languages.cpp View File

#define OFFSET_GREEK 0x380 #define OFFSET_GREEK 0x380
#define OFFSET_CYRILLIC 0x420 #define OFFSET_CYRILLIC 0x420
#define OFFSET_ARMENIAN 0x530 #define OFFSET_ARMENIAN 0x530
#define OFFSET_HEBREW 0x590
#define OFFSET_ARABIC 0x600 #define OFFSET_ARABIC 0x600
#define OFFSET_THAANA 0x780 // Divehi/Maldives #define OFFSET_THAANA 0x780 // Divehi/Maldives
#define OFFSET_DEVANAGARI 0x900 #define OFFSET_DEVANAGARI 0x900
#define OFFSET_KANNADA 0xc80 #define OFFSET_KANNADA 0xc80
#define OFFSET_MALAYALAM 0xd00 #define OFFSET_MALAYALAM 0xd00
#define OFFSET_SINHALA 0x0d80 #define OFFSET_SINHALA 0x0d80
#define OFFSET_THAI 0x0e00
#define OFFSET_LAO 0x0e80
#define OFFSET_TIBET 0x0f00 #define OFFSET_TIBET 0x0f00
#define OFFSET_GEORGIAN 0x1080
#define OFFSET_MYANMAR 0x1000
#define OFFSET_GEORGIAN 0x10a0
#define OFFSET_KOREAN 0x1100 #define OFFSET_KOREAN 0x1100
#define OFFSET_ETHIOPIC 0x1200 #define OFFSET_ETHIOPIC 0x1200




ALPHABET alphabets [] = {
{"_el", OFFSET_GREEK, 0x380, 0x3ff, L('e','l'), AL_DONT_NAME | AL_NOT_LETTERS},
{"_cyr", OFFSET_CYRILLIC, 0x400, 0x52f, 0, 0},
{"_hy", OFFSET_ARMENIAN, 0x530, 0x58f, L('h','y'), 0},
{"_he", OFFSET_HEBREW, 0x590, 0x5ff, 0, 0},
{"_ar", OFFSET_ARABIC, 0x600, 0x6ff, 0, 0},
{"_dv", OFFSET_THAANA, 0x780, 0x7bf, 0, 0},
{"_hi", OFFSET_DEVANAGARI, 0x900, 0x97f,L('h','i'), 0},
{"_bn", OFFSET_BENGALI, 0x0980, 0x9ff, 0, 0},
{"_gur", OFFSET_GURMUKHI, 0xa00, 0xa7f, 0, 0},
{"_gu", OFFSET_GUJARATI, 0xa80, 0xaff, 0, 0},
{"_or", OFFSET_ORIYA, 0xb00, 0xb7f, 0, 0},
{"_ta", OFFSET_TAMIL, 0xb80, 0xbff, L('t','a'), 0},
{"_te", OFFSET_TELUGU, 0xc00, 0xc7f, 0, 0},
{"_kn", OFFSET_KANNADA, 0xc80, 0xcff, L('k','n'), 0},
{"_ml", OFFSET_MALAYALAM,0xd00, 0xd7f, L('m','l'), 0},
{"_si", OFFSET_SINHALA, 0xd80, 0xdff, 0, 0},
{"_th", OFFSET_THAI, 0xe00, 0xe7f, 0, 0},
{"_lo", OFFSET_LAO, 0xe80, 0xeff, 0, 0},
{"_ti", OFFSET_TIBET, 0xf00, 0xfff, 0, 0},
{"_my", OFFSET_MYANMAR, 0x1000,0x109f, 0, 0},
{"_ka", OFFSET_GEORGIAN, 0x10a0,0x10ff, L('k','a'), 0},
{"_ko", OFFSET_KOREAN, 0x1100,0x11ff, 0, 0},
{"_eth", OFFSET_ETHIOPIC, 0x1200,0x139f, 0, 0},
{NULL, 0, 0, 0, 0, 0}
};


ALPHABET *AlphabetFromChar(int c)
{//===============================
// Find the alphabet from a character.
ALPHABET *alphabet = alphabets;

while(alphabet->name != NULL)
{
if((c >= alphabet->range_min) && (c <= alphabet->range_max))
{
return(alphabet);
}
alphabet++;
}
return(NULL);
}



static void Translator_Russian(Translator *tr); static void Translator_Russian(Translator *tr);




{//===================================================================== {//=====================================================================
int bits; int bits;
unsigned char c; unsigned char c;
bits = (1L << group); bits = (1L << group);
while((c = *string++) != 0) while((c = *string++) != 0)
tr->letter_bits[c] |= bits; tr->letter_bits[c] |= bits;


// common letter pairs, encode these as a single byte // common letter pairs, encode these as a single byte
// 2 bytes, using the transposed character codes // 2 bytes, using the transposed character codes
static const short pairs_ru[] = {
static const short pairs_ru[] = {
0x010c, // ла 21052 0x23 0x010c, // ла 21052 0x23
0x010e, // на 18400 0x010e, // на 18400
0x0113, // та 14254 0x0113, // та 14254






static const unsigned int replace_cyrillic_latin[] =
static const unsigned int replace_cyrillic_latin[] =
{0x430,'a', {0x430,'a',
0x431,'b', 0x431,'b',
0x446,'c', 0x446,'c',
tr->langopts.param[LOPT_DIERESES] = 1; tr->langopts.param[LOPT_DIERESES] = 1;
tr->langopts.param[LOPT_PREFIXES] = 1; tr->langopts.param[LOPT_PREFIXES] = 1;
SetLetterVowel(tr,'y'); // add 'y' to vowels SetLetterVowel(tr,'y'); // add 'y' to vowels
tr->langopts.numbers = NUM_SWAP_TENS | NUM_HUNDRED_AND | NUM_SINGLE_AND | NUM_ROMAN | NUM_1900; tr->langopts.numbers = NUM_SWAP_TENS | NUM_HUNDRED_AND | NUM_SINGLE_AND | NUM_ROMAN | NUM_1900;
tr->langopts.accents = 1; tr->langopts.accents = 1;
} }
// tr->langopts.intonation_group = 4; // tr->langopts.intonation_group = 4;


// 'diminished' is an unstressed final syllable // 'diminished' is an unstressed final syllable
tr->langopts.stress_flags = 0x6 | 0x10;
tr->langopts.stress_flags = 0x6 | 0x10;
tr->langopts.unstressed_wd1 = 0; tr->langopts.unstressed_wd1 = 0;
tr->langopts.unstressed_wd2 = 2; tr->langopts.unstressed_wd2 = 2;
tr->langopts.param[LOPT_SONORANT_MIN] = 120; // limit the shortening of sonorants before short vowels tr->langopts.param[LOPT_SONORANT_MIN] = 120; // limit the shortening of sonorants before short vowels
tr->langopts.param[LOPT_PREFIXES] = 1; tr->langopts.param[LOPT_PREFIXES] = 1;
tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x100; // devoice at end of word tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x100; // devoice at end of word
tr->langopts.param[LOPT_LONG_VOWEL_THRESHOLD] = 175/2; tr->langopts.param[LOPT_LONG_VOWEL_THRESHOLD] = 175/2;
tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_SWAP_TENS | NUM_ALLOW_SPACE | NUM_ORDINAL_DOT | NUM_ROMAN; tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_SWAP_TENS | NUM_ALLOW_SPACE | NUM_ORDINAL_DOT | NUM_ROMAN;
// tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_SWAP_TENS | NUM_OMIT_1_HUNDRED | NUM_OMIT_1_THOUSAND | NUM_ALLOW_SPACE | NUM_ORDINAL_DOT | NUM_ROMAN; // tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_SWAP_TENS | NUM_OMIT_1_HUNDRED | NUM_OMIT_1_THOUSAND | NUM_ALLOW_SPACE | NUM_ORDINAL_DOT | NUM_ROMAN;
SetLetterVowel(tr,'y'); SetLetterVowel(tr,'y');
tr->langopts.stress_rule = STRESSPOSN_1L; tr->langopts.stress_rule = STRESSPOSN_1L;
tr->langopts.stress_flags = 0x10004; // use 'diminished' for unstressed final syllable tr->langopts.stress_flags = 0x10004; // use 'diminished' for unstressed final syllable
SetLetterBitsRange(tr,LETTERGP_B,0x26,0x30); // vowel signs, and virama SetLetterBitsRange(tr,LETTERGP_B,0x26,0x30); // vowel signs, and virama
tr->langopts.break_numbers = 0x14a8; // 1000, 100,000 10,000,000
tr->langopts.break_numbers = 0x14a8; // 1000, 100,000 10,000,000
tr->langopts.numbers = 1; tr->langopts.numbers = 1;
} }
break; break;
// character codes offset by 0x380 // character codes offset by 0x380
static const char el_vowels[] = {0x10,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x35,0x37,0x39,0x3f,0x45,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0}; static const char el_vowels[] = {0x10,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x35,0x37,0x39,0x3f,0x45,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0};
static const char el_fvowels[] = {0x2d,0x2e,0x2f,0x35,0x37,0x39,0x45,0x4d,0}; // ε η ι υ έ ή ί ύ static const char el_fvowels[] = {0x2d,0x2e,0x2f,0x35,0x37,0x39,0x45,0x4d,0}; // ε η ι υ έ ή ί ύ
static const char el_voiceless[]= {0x38,0x3a,0x3e,0x40,0x42,0x43,0x44,0x46,0x47,0}; // θ κ ξ π ς σ τ φ χ
static const char el_voiceless[]= {0x38,0x3a,0x3e,0x40,0x42,0x43,0x44,0x46,0x47,0}; // θ κ ξ π ς σ τ φ χ
static const char el_consonants[]={0x32,0x33,0x34,0x36,0x38,0x3a,0x3b,0x3c,0x3d,0x3e,0x40,0x41,0x42,0x43,0x44,0x46,0x47,0x48,0}; static const char el_consonants[]={0x32,0x33,0x34,0x36,0x38,0x3a,0x3b,0x3c,0x3d,0x3e,0x40,0x41,0x42,0x43,0x44,0x46,0x47,0x48,0};
static const wchar_t el_char_apostrophe[] = {0x3c3,0}; // σ static const wchar_t el_char_apostrophe[] = {0x3c3,0}; // σ


tr->langopts.unstressed_wd2 = 2; tr->langopts.unstressed_wd2 = 2;
tr->langopts.param[LOPT_SONORANT_MIN] = 130; // limit the shortening of sonorants before short vowels tr->langopts.param[LOPT_SONORANT_MIN] = 130; // limit the shortening of sonorants before short vowels


tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA;
tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA;
tr->langopts.numbers2 = 0x2 | NUM2_MULTIPLE_ORDINAL; // variant form of numbers before thousands tr->langopts.numbers2 = 0x2 | NUM2_MULTIPLE_ORDINAL; // variant form of numbers before thousands


if(name2 == L_grc) if(name2 == L_grc)
static const short stress_lengths_eo[8] = {150, 150, 230, 180, 0, 0, 300, 320}; static const short stress_lengths_eo[8] = {150, 150, 230, 180, 0, 0, 300, 320};
static const unsigned char stress_amps_eo[] = {16,14, 20,20, 20,22, 22,21 }; static const unsigned char stress_amps_eo[] = {16,14, 20,20, 20,22, 22,21 };
static const wchar_t eo_char_apostrophe[2] = {'l',0}; static const wchar_t eo_char_apostrophe[2] = {'l',0};
SetupTranslator(tr,stress_lengths_eo,stress_amps_eo); SetupTranslator(tr,stress_lengths_eo,stress_amps_eo);


tr->charset_a0 = charsets[3]; // ISO-8859-3 tr->charset_a0 = charsets[3]; // ISO-8859-3
// tr->langopts.word_gap = 1; // tr->langopts.word_gap = 1;
tr->langopts.vowel_pause = 2; tr->langopts.vowel_pause = 2;
tr->langopts.stress_rule = STRESSPOSN_2R; tr->langopts.stress_rule = STRESSPOSN_2R;
tr->langopts.stress_flags = 0x6 | 0x10;
tr->langopts.stress_flags = 0x6 | 0x10;
// tr->langopts.unstressed_wd1 = 3; // tr->langopts.unstressed_wd1 = 3;
tr->langopts.unstressed_wd2 = 2; tr->langopts.unstressed_wd2 = 2;




// stress last syllable if it doesn't end in vowel or "s" or "n" // stress last syllable if it doesn't end in vowel or "s" or "n"
// 'diminished' is an unstressed final syllable // 'diminished' is an unstressed final syllable
tr->langopts.stress_flags = 0x200 | 0x6 | 0x10;
tr->langopts.stress_flags = 0x200 | 0x6 | 0x10;
tr->langopts.unstressed_wd1 = 0; tr->langopts.unstressed_wd1 = 0;
tr->langopts.unstressed_wd2 = 2; tr->langopts.unstressed_wd2 = 2;
tr->langopts.param[LOPT_SONORANT_MIN] = 120; // limit the shortening of sonorants before short vowels tr->langopts.param[LOPT_SONORANT_MIN] = 120; // limit the shortening of sonorants before short vowels


tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_AND_UNITS | NUM_OMIT_1_HUNDRED | NUM_OMIT_1_THOUSAND | NUM_ROMAN | NUM_ROMAN_AFTER; tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_AND_UNITS | NUM_OMIT_1_HUNDRED | NUM_OMIT_1_THOUSAND | NUM_ROMAN | NUM_ROMAN_AFTER;
tr->langopts.numbers2 = NUM2_MULTIPLE_ORDINAL;
tr->langopts.numbers2 = NUM2_MULTIPLE_ORDINAL;


if(name2 == L('c','a')) if(name2 == L('c','a'))
{ {
else else
if(name2 == L('a','n')) if(name2 == L('a','n'))
{ {
tr->langopts.stress_flags = 0x200 | 0x6 | 0x10;
tr->langopts.stress_flags = 0x200 | 0x6 | 0x10;
} }
else else
if(name2 == L_pap) if(name2 == L_pap)
tr->charset_a0 = charsets[2]; // ISO-8859-2 tr->charset_a0 = charsets[2]; // ISO-8859-2


tr->langopts.stress_rule = STRESSPOSN_1L; tr->langopts.stress_rule = STRESSPOSN_1L;
tr->langopts.stress_flags = 0x10;
tr->langopts.stress_flags = 0x10;
tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x3; tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x3;
tr->langopts.max_initial_consonants = 5; tr->langopts.max_initial_consonants = 5;
tr->langopts.spelling_stress = 1; tr->langopts.spelling_stress = 1;
SetupTranslator(tr,stress_lengths_id,stress_amps_id); SetupTranslator(tr,stress_lengths_id,stress_amps_id);
tr->langopts.stress_rule = STRESSPOSN_2R; tr->langopts.stress_rule = STRESSPOSN_2R;
tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_ROMAN; tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_ROMAN;
tr->langopts.stress_flags = 0x6 | 0x10;
tr->langopts.stress_flags = 0x6 | 0x10;
tr->langopts.accents = 2; // "capital" after letter name tr->langopts.accents = 2; // "capital" after letter name
} }
break; break;


tr->langopts.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable tr->langopts.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable
tr->langopts.stress_rule = STRESSPOSN_2R; tr->langopts.stress_rule = STRESSPOSN_2R;
tr->langopts.stress_flags = 0x10 | 0x20000;
tr->langopts.stress_flags = 0x10 | 0x20000;
tr->langopts.vowel_pause = 1; tr->langopts.vowel_pause = 1;
tr->langopts.unstressed_wd1 = 2; tr->langopts.unstressed_wd1 = 2;
tr->langopts.unstressed_wd2 = 2; tr->langopts.unstressed_wd2 = 2;
{ {
static const unsigned char stress_amps_tr[8] = {18,16, 20,21, 20,21, 21,20 }; static const unsigned char stress_amps_tr[8] = {18,16, 20,21, 20,21, 21,20 };
static const short stress_lengths_tr[8] = {190,180, 230,230, 0,0, 250,250}; static const short stress_lengths_tr[8] = {190,180, 230,230, 0,0, 250,250};
tr->letter_bits_offset = OFFSET_CYRILLIC; tr->letter_bits_offset = OFFSET_CYRILLIC;
memset(tr->letter_bits,0,sizeof(tr->letter_bits)); memset(tr->letter_bits,0,sizeof(tr->letter_bits));
SetLetterBits(tr,LETTERGP_A,(char *)ru_vowels); SetLetterBits(tr,LETTERGP_A,(char *)ru_vowels);
tr->langopts.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable 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_rule = STRESSPOSN_1R; // stress on final syllable
tr->langopts.stress_flags = 0x6 | 0x10 | 0x2000 | 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; tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_DFRACTION_2 | NUM_HUNDRED_AND | NUM_AND_UNITS | NUM_ROMAN;
tr->langopts.numbers2 = NUM2_MULTIPLE_ORDINAL | NUM2_NO_TEEN_ORDINALS;
tr->langopts.numbers2 = NUM2_MULTIPLE_ORDINAL | NUM2_NO_TEEN_ORDINALS;
SetLetterVowel(tr,'y'); SetLetterVowel(tr,'y');
ResetLetterBits(tr,0x2); ResetLetterBits(tr,0x2);
SetLetterBits(tr,1,"bcdfgjkmnpqstvxz"); // B hard consonants, excluding h,l,r,w,y SetLetterBits(tr,1,"bcdfgjkmnpqstvxz"); // B hard consonants, excluding h,l,r,w,y
tr->charset_a0 = charsets[2]; // ISO-8859-2 tr->charset_a0 = charsets[2]; // ISO-8859-2


tr->langopts.stress_rule = STRESSPOSN_1L; tr->langopts.stress_rule = STRESSPOSN_1L;
tr->langopts.stress_flags = 0x16;
tr->langopts.stress_flags = 0x16;
tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x3; tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x3;
tr->langopts.max_initial_consonants = 5; tr->langopts.max_initial_consonants = 5;
tr->langopts.spelling_stress = 1; tr->langopts.spelling_stress = 1;
memset(tr->letter_bits,0,sizeof(tr->letter_bits)); memset(tr->letter_bits,0,sizeof(tr->letter_bits));
SetLetterBitsRange(tr,LETTERGP_A,0x05,0x16); // vowel letters SetLetterBitsRange(tr,LETTERGP_A,0x05,0x16); // vowel letters
SetLetterBitsRange(tr,LETTERGP_A,0x4a,0x73); // + vowel signs, and virama SetLetterBitsRange(tr,LETTERGP_A,0x4a,0x73); // + vowel signs, and virama
SetLetterBitsRange(tr,LETTERGP_B,0x4a,0x73); // vowel signs, and virama SetLetterBitsRange(tr,LETTERGP_B,0x4a,0x73); // vowel signs, and virama
SetLetterBitsRange(tr,LETTERGP_C,0x1a,0x46); // the main consonant range SetLetterBitsRange(tr,LETTERGP_C,0x1a,0x46); // the main consonant range
tr->langopts.param[LOPT_UNPRONOUNCABLE] = 1; // disable check for unpronouncable words tr->langopts.param[LOPT_UNPRONOUNCABLE] = 1; // disable check for unpronouncable words
tr->langopts.suffix_add_e = tr->letter_bits_offset + 0x4a; //virama tr->langopts.suffix_add_e = tr->letter_bits_offset + 0x4a; //virama
tr->langopts.numbers = NUM_OMIT_1_THOUSAND | NUM_SINGLE_STRESS_L | NUM_DFRACTION_7; tr->langopts.numbers = NUM_OMIT_1_THOUSAND | NUM_SINGLE_STRESS_L | NUM_DFRACTION_7;
SetupTranslator(tr,stress_lengths_sq,stress_amps_sq); SetupTranslator(tr,stress_lengths_sq,stress_amps_sq);


tr->langopts.stress_rule = STRESSPOSN_2R; tr->langopts.stress_rule = STRESSPOSN_2R;
tr->langopts.stress_flags = 0x16 + 0x100;
tr->langopts.stress_flags = 0x16 + 0x100;
SetLetterVowel(tr,'y'); SetLetterVowel(tr,'y');
tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_HUNDRED_AND | NUM_AND_UNITS | NUM_DFRACTION_4; tr->langopts.numbers = NUM_DECIMAL_COMMA | NUM_HUNDRED_AND | NUM_AND_UNITS | NUM_DFRACTION_4;
tr->langopts.accents = 2; // "capital" after letter name tr->langopts.accents = 2; // "capital" after letter name


tr->langopts.vowel_pause = 1; tr->langopts.vowel_pause = 1;
tr->langopts.stress_rule = STRESSPOSN_2R; tr->langopts.stress_rule = STRESSPOSN_2R;
tr->langopts.stress_flags = 0x6 | 0x10;
tr->langopts.stress_flags = 0x6 | 0x10;


tr->langopts.numbers = NUM_AND_UNITS | NUM_HUNDRED_AND | NUM_SINGLE_AND | NUM_OMIT_1_HUNDRED; tr->langopts.numbers = NUM_AND_UNITS | NUM_HUNDRED_AND | NUM_SINGLE_AND | NUM_OMIT_1_HUNDRED;
tr->langopts.break_numbers = 0x49249268; // for languages which have numbers for 100,000 and 1,000,000 tr->langopts.break_numbers = 0x49249268; // for languages which have numbers for 100,000 and 1,000,000
tr->langopts.stress_rule = STRESSPOSN_1L; tr->langopts.stress_rule = STRESSPOSN_1L;
tr->langopts.stress_flags = 0x10004; // use 'diminished' for unstressed final syllable tr->langopts.stress_flags = 0x10004; // use 'diminished' for unstressed final syllable
tr->langopts.spelling_stress = 1; tr->langopts.spelling_stress = 1;
tr->langopts.break_numbers = 0x14a8; // 1000, 100,000 10,000,000
tr->langopts.break_numbers = 0x14a8; // 1000, 100,000 10,000,000


if(name2 == L('t','a')) if(name2 == L('t','a'))
{ {
/*2*/ {'o', '8', '8', 'o', '8', '8'}, // O /*2*/ {'o', '8', '8', 'o', '8', '8'}, // O
/*3*/ {'i', 'I', 'i', 'a', 'I', 'a'}, // I Uses 3,4,5 columns. /*3*/ {'i', 'I', 'i', 'a', 'I', 'a'}, // I Uses 3,4,5 columns.
/*4*/ {'i', PH('I','#'), 'i', 'i', PH('I','#'), 'i'}, // I# /*4*/ {'i', PH('I','#'), 'i', 'i', PH('I','#'), 'i'}, // I#
/*5*/ {'E', PH('E','#'), 'E', 'e', PH('E','#'), 'e'}, // E#
/*5*/ {'E', PH('E','#'), 'E', 'e', PH('E','#'), 'e'}, // E#
/*6*/ {'E', PH('E','2'), 'E', 'e', PH('E','2'), 'e'}, // E2 Uses 3,4,5 columns. /*6*/ {'E', PH('E','2'), 'E', 'e', PH('E','2'), 'e'}, // E2 Uses 3,4,5 columns.
/*7*/ {PH('j','a'), 'V', PH('j','a'), 'A', 'V', 'A'}, // V# /*7*/ {PH('j','a'), 'V', PH('j','a'), 'A', 'V', 'A'}, // V#
/*8*/ {PH('j','a'), 'I', PH('j','a'), 'e', 'I', 'e'}, // I3 Uses 3,4,5 columns. /*8*/ {PH('j','a'), 'I', PH('j','a'), 'e', 'I', 'e'}, // I3 Uses 3,4,5 columns.

+ 30
- 5
src/translate.cpp View File

static int max_clause_pause = 0; static int max_clause_pause = 0;
static int any_stressed_words; static int any_stressed_words;
int pre_pause; int pre_pause;
ALPHABET *current_alphabet;




// these were previously in translator class // these were previously in translator class
unpron_phonemes[0] = 0; unpron_phonemes[0] = 0;
prefix_phonemes[0] = 0; prefix_phonemes[0] = 0;
end_phonemes[0] = 0; end_phonemes[0] = 0;
current_alphabet = NULL;


if(tr->data_dictlist == NULL) if(tr->data_dictlist == NULL)
{ {


spell_word = 0; spell_word = 0;


if((word_length == 1) && (wflags & FLAG_TRANSLATOR2))
{
// retranslating a 1-character word using a different language, say its name
spell_word = 1;
}

if(option_sayas == SAYAS_KEY) if(option_sayas == SAYAS_KEY)
{ {
if(word_length == 1) if(word_length == 1)
return(FLAG_SPELLWORD); // a mixture of languages, retranslate as individual letters, separated by spaces return(FLAG_SPELLWORD); // a mixture of languages, retranslate as individual letters, separated by spaces
return(0); return(0);
} }
strcpy(word_phonemes, phonemes);
return(0); // ??
} }
else else
if(found == 0) if(found == 0)
if(strcmp(&unpron_phonemes[1],"en")==0) if(strcmp(&unpron_phonemes[1],"en")==0)
return(FLAG_SPELLWORD); // _^_en must have been set in TranslateLetter(), not *_rules return(FLAG_SPELLWORD); // _^_en must have been set in TranslateLetter(), not *_rules
return(0); return(0);
}
}


#ifdef deleted #ifdef deleted
p = &wordx[word_length-3]; // this looks wrong. Doesn't consider multi-byte chars. p = &wordx[word_length-3]; // this looks wrong. Doesn't consider multi-byte chars.
{ {
return(0); return(0);
} }
strcpy(word_phonemes, phonemes);
return(0);
} }
} }


new_phoneme_tab = -1; new_phoneme_tab = -1;
translator2_language[0] = 0; translator2_language[0] = 0;
} }
translator2->phoneme_tab_ix = new_phoneme_tab;
} }
} }
return(new_phoneme_tab); return(new_phoneme_tab);
if(switch_phonemes >= 0) if(switch_phonemes >= 0)
{ {
// re-translate the word using the new translator // re-translate the word using the new translator
wtab[0].flags |= FLAG_TRANSLATOR2;
flags = TranslateWord(translator2, word, next_pause, wtab); flags = TranslateWord(translator2, word, next_pause, wtab);
// strcpy((char *)p,translator2->word_phonemes); // strcpy((char *)p,translator2->word_phonemes);
if(p[0] == phonSWITCH) if(p[0] == phonSWITCH)
{ {
// the second translator doesn't want to process this word // the second translator doesn't want to process this word
switch_phonemes = -1;
// switch_phonemes = -1;
return(FLAG_SPELLWORD);
} }
} }
if(switch_phonemes < 0) if(switch_phonemes < 0)
if(switch_phonemes >= 0) if(switch_phonemes >= 0)
{ {
// this word uses a different phoneme table // this word uses a different phoneme table
SetPlist2(&ph_list2[n_ph_list2],phonSWITCH);
ph_list2[n_ph_list2++].tone_ph = switch_phonemes; // temporary phoneme table number
if(ph_list2[n_ph_list2-1].phcode == phonSWITCH)
{
//previous phoneme is also a phonSWITCH, just change its phoneme table number
n_ph_list2--;
}
else
{
SetPlist2(&ph_list2[n_ph_list2],phonSWITCH);
}
ph_list2[n_ph_list2++].tone_ph = switch_phonemes; // temporary phoneme table number
} }


// remove initial pause from a word if it follows a hyphen // remove initial pause from a word if it follows a hyphen
ph_list2[n_ph_list2].phcode = ph_code; ph_list2[n_ph_list2].phcode = ph_code;
ph_list2[n_ph_list2].sourceix = 0; ph_list2[n_ph_list2].sourceix = 0;
ph_list2[n_ph_list2].synthflags = embedded_flag; ph_list2[n_ph_list2].synthflags = embedded_flag;
ph_list2[n_ph_list2++].tone_ph = *p++;
ph_list2[n_ph_list2++].tone_ph = *p;
SelectPhonemeTable(*p);
p++;
} }
else else
if(ph->type == phSTRESS) if(ph->type == phSTRESS)

+ 18
- 0
src/translate.h View File

#define FLAG_INDIVIDUAL_DIGITS 0x80000 // speak number as individual digits #define FLAG_INDIVIDUAL_DIGITS 0x80000 // speak number as individual digits
#define FLAG_DELETE_WORD 0x100000 // don't speak this word, it has been spoken as part of the previous word #define FLAG_DELETE_WORD 0x100000 // don't speak this word, it has been spoken as part of the previous word
#define FLAG_CHAR_REPLACED 0x200000 // characters have been replaced by .replace in the *_rules #define FLAG_CHAR_REPLACED 0x200000 // characters have been replaced by .replace in the *_rules
#define FLAG_TRANSLATOR2 0x400000 // retranslating using a different language


#define FLAG_SUFFIX_VOWEL 0x08000000 // remember an initial vowel from the suffix #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_TRACE 0x10000000 // passed to TranslateRules() to suppress dictionary lookup printout
extern const int param_defaults[N_SPEECH_PARAM]; extern const int param_defaults[N_SPEECH_PARAM];




typedef struct {
const char *name;
int offset;
unsigned short range_min, range_max;
int language;
int flags;
} ALPHABET;

extern ALPHABET alphabets[];
extern ALPHABET *current_alphabet;
// alphabet flags
#define AL_DONT_NAME 0x01 // don't speak the alphabet name
#define AL_NOT_LETTERS 0x02 // don't use the language for speaking letters
#define AL_NOT_WORDS 0x04 // don't use the language to speak words



#define N_LOPTS 21 #define N_LOPTS 21
#define LOPT_DIERESES 1 #define LOPT_DIERESES 1
int isspace2(unsigned int c); int isspace2(unsigned int c);
int towlower2(unsigned int c); int towlower2(unsigned int c);
void GetTranslatedPhonemeString(char *phon_out, int n_phon_out, int use_ipa); void GetTranslatedPhonemeString(char *phon_out, int n_phon_out, int use_ipa);
const char *WordToString2(unsigned int word);
ALPHABET *AlphabetFromChar(int c);


Translator *SelectTranslator(const char *name); Translator *SelectTranslator(const char *name);
int SetTranslator2(const char *name); int SetTranslator2(const char *name);

Loading…
Cancel
Save