Browse Source

[1.46.42]

Command line option -X now lists *_list flags by name.


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

+ 8
- 8
dictsource/dict_phonemes View File

ts v x z ts v x z




Dictionary en_dict 2013-03-02
Dictionary en_dict 2013-03-06


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
t. th th. v w x z t. th th. v w x z




Dictionary ta_dict 2013-03-03
Dictionary ta_dict 2013-03-05


a a: aI aU e E e: i a a: aI aU e E e: i
I i: o o: u U u2 u: I i: o o: u U u2 u:
t tS v w x t tS v w x




Dictionary nl_dict 2013-03-03
Dictionary nl_dict 2013-03-05


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
y Y: yU y Y: yU


* : ; b d D dZ f * : ; b d D dZ f
g h j k l m n N
n^ p Q r s S t tS
v v# w x z Z
g h j k l L m n
N n^ p Q r s S t
tS v v# w x z Z




Dictionary no_dict 2011-03-07 Dictionary no_dict 2011-03-07
ts; v w x z Z Z; ts; v w x z Z Z;




Dictionary pt_dict 2013-03-02
Dictionary pt_dict 2013-03-06


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




Dictionary ro_dict 2011-07-21
Dictionary ro_dict 2013-03-04


@ @- @I @U a aI aU e @ @- @I @U a aI aU e
ea eI eo eU i i/ I^ iI ea eI eo eU i i/ I^ iI

+ 8
- 3
dictsource/en_list View File

// $alt1 use strong ending (-table, -inal) // $alt1 use strong ending (-table, -inal)
// $alt2 use weak ending // $alt2 use weak ending
// $alt3 use weak first vowel, a->[a#], e->[@], o->[0#] // $alt3 use weak first vowel, a->[a#], e->[@], o->[0#]
// $alt6 'to'




// letter names, as they are spoken as a single character in text // letter names, as they are spoken as a single character in text
_bn bEng'A:li _bn bEng'A:li
_gur g'U@mUki _gur g'U@mUki
_gu gu:dZ3r'A:ti _gu gu:dZ3r'A:ti
_or 0r'i@
_or O:r'ia:
_ta t'amI2l _ta t'amI2l
_te t'Elugu
_kn k'A:na#d@ _kn k'A:na#d@
_ml maleI'A:l@m _ml maleI'A:l@m
_si sI2nh'A:l@
_si s'INh@l@
_th t'aI _th t'aI
_lo l'aU _lo l'aU
_ti tI2b'Et@n _ti tI2b'Et@n
(for a while) f@@||w'aIl (for a while) f@@||w'aIl
(for one) fO@w0n $2 $atend (for one) fO@w0n $2 $atend


to t@5 $verbf // @ change to U before vowel
to t@5 $verbf $alt6 // @ change to U before vowel
(to be) t@b%i $pastf (to be) t@b%i $pastf
(to be) t@||'bi: $atend (to be) t@||'bi: $atend
(to to) %tU_t@5 $verbf (to to) %tU_t@5 $verbf
thy ,DaI thy ,DaI
thine ,DaIn thine ,DaIn


(i had) aI||h'ad $atend
(he had) hi:||h'ad $atend

me ,mi: $only me ,mi: $only
me mi: $atstart $atend me mi: $atstart $atend
him ,hIm $only him ,hIm $only

+ 1
- 0
dictsource/en_rules View File

h (_ h (_
_B) h _B) h
@) hammed h'amId @) hammed h'amId
d) h (am_
A) han (_ han // places A) han (_ han // places
e) han (_ h@n e) han (_ h@n
ha (st heI ha (st heI

+ 31
- 8
dictsource/ml_rules View File

// A means vowel letters (not vowel signs) // A means vowel letters (not vowel signs)
// B means a combining vowel sign or a virama // B means a combining vowel sign or a virama


// change (k t. t p) to (g d. d b) if followed by a vowel, unless at start of a word or preceeded by an unvoiced stop consonant ??
.L01 _ ക് ച് ട് ത് പ്



.replace .replace
൦ 0 // Convert Malayalam numbers ൦ 0 // Convert Malayalam numbers




.group ക .group ക
ക ka
ക (B k
ക് k
L01) ക ka
L01) ക (B k
ക ga
ക (B g
ക്ക k:a
ക്ക (B k:


.group ഖ .group ഖ
ഖ kha ഖ kha
ഞ (B n^ ഞ (B n^


.group ട .group ട
ട t.a
ട (B t.
ട് t.
L01) ട t.a
L01) ട (B t.
ട d.a
ട (B d.
ട്ട t.:a
ട്ട (B t.:


.group ഠ .group ഠ
ഠ th.a ഠ th.a
ണ (B n. ണ (B n.


.group ത .group ത
ത ta
ത (B t
ത് t
L01) ത ta
L01) ത (B t
ത da
ത (B d
ത്ത t:a
ത്ത (B t:


.group ഥ .group ഥ
ഥ tha ഥ tha
ന (B n ന (B n


.group പ .group പ
പ pa
പ (B p
പ് p
L01) പ pa
L01) പ (B p
പ ba
പ (B b
പ്പ p:a
പ്പ (B p:


.group ഫ .group ഫ
ഫ pha ഫ pha

+ 5
- 0
dictsource/nl_list View File



// This file in UTF8 encoded // This file in UTF8 encoded


// $alt2, remove s from plural, remove en from plural
// Use $alt3 where 'ng' and 'nk' is 'n+g' not [N] // Use $alt3 where 'ng' and 'nk' is 'n+g' not [N]


// Letters // Letters
augustus VUQ'8st8s augustus VUQ'8st8s
bacterie bAkt'I:ri bacterie bAkt'I:ri
banengids $alt3 banengids $alt3
bascule $2
beha be:_h'a: beha be:_h'a:
beige bEZ@ beige bEZ@
benard b@nArt benard b@nArt
december $2 december $2
dieet $2 dieet $2
diesel diz@l diesel diz@l
discipline $3
//discussie $2
divers div'Ers divers div'Ers
diftongering dIft,ON'e:rIN diftongering dIft,ON'e:rIN
doordat $2 doordat $2
kadaster $2 kadaster $2
mangat $alt3 mangat $alt3
materie ma:t'e:ri materie ma:t'e:ri
maatregel ma:tre:Q@l $alt2
maxima $1 maxima $1
meteen mEt'e:n meteen mEt'e:n
metro me:tro: metro me:tro:

+ 16
- 4
dictsource/nl_rules View File

// Suffix rule: SUFX_E eg. S2e means double the vowel before the final consonant // Suffix rule: SUFX_E eg. S2e means double the vowel before the final consonant


.L01 g k .L01 g k
.L02 _ t_ d_ de_ den_ // verb endings




.group a .group a
&) bare (_S4 =ba:r@ &) bare (_S4 =ba:r@
_) bij (C@P3 b'EI _) bij (C@P3 b'EI
bij (zond b%i bij (zond b%i
_) bijeen bEI'e:n
_) binnen (P6 b'In@n _) binnen (P6 b'In@n
_) boven (P5 b'o:v@n _) boven (P5 b'o:v@n
_) brand br'And _) brand br'And
ig) e (_+S1qd @ ig) e (_+S1qd @


ea (_ 'e:a: ea (_ 'e:a:
eau o: //words with French origin
eau 'o: //words with French origin
// eau (_ 'o:
@) ee (_ 'e: @) ee (_ 'e:
@) ee (X_ 'e: @) ee (X_ 'e:
@) ee (r_ 'I @) ee (r_ 'I
&) el (ingen_$p_alt =@l &) el (ingen_$p_alt =@l


@) elen (_ 'e:l@n @) elen (_ 'e:l@n
@) el (en_$p_alt2 @L
&) elijks @l@ks &) elijks @l@ks
&) em (_ @m &) em (_ @m
&) e (ment @ &) e (ment @
@) etten (_S3 @n @) etten (_S3 @n
@) es (_$p_alt @s // for wors which end on [@] with multiple on 's'. @) es (_$p_alt @s // for wors which end on [@] with multiple on 's'.


eau (_ 'o:
euille @'y euille @'y
eum (_$w_alt 'e:8m eum (_$w_alt 'e:8m
@mus) eum (_ ,e:8m // compounds @mus) eum (_ ,e:8m // compounds
ie i ie i
ieuw iw ieuw iw
iee ie: iee ie:
ii i


d) ie (_ 'i d) ie (_ 'i
g) ie (_ 'i g) ie (_ 'i
m) ie (_ 'i m) ie (_ 'i
p) ie (_ 'i p) ie (_ 'i
ss) ie (_ =i
ieus (_ ij'Y:s ieus (_ ij'Y:s
ieuze (_ ij'Y:z@ ieuze (_ ij'Y:z@
ieuzer (_ ij'Y:z@r ieuzer (_ ij'Y:z@r
io (nage iO io (nage iO
io (de_ i'o: io (de_ i'o:
iodes (_ i'o:d@s iodes (_ i'o:d@s
_) in (scrip In
is (_ Is is (_ Is
@) isch (_ =is @) isch (_ =is
@) ische (_ =is@ @) ische (_ =is@
@@C) o (_ =o: @@C) o (_ =o:
obsc (u opsk obsc (u opsk
oe (X_ 'u oe (X_ 'u
office Of@s
oir (_ 'v#a:r oir (_ 'v#a:r
pl) oi (t v#A pl) oi (t v#A
c) oi (ffu v#A c) oi (ffu v#A
_) oost (@P4 o:st _) oost (@P4 o:st
_) op (@@P2 'Op _) op (@@P2 'Op
_) open (@P4 'o:p@n _) open (@P4 'o:p@n
_) op (enen 'o:p
_) openings (P8 'o:p@nINs _) openings (P8 'o:p@nINs
_) op (era 'o:p _) op (era 'o:p
_) op (tion Op _) op (tion Op
A) s (A z A) s (A z
s (b z s (b z
s (d z s (d z
sc s
sc (e s
sc (i s
sch sx sch sx
sch (_ s sch (_ s
sch (e_ s sch (e_ s
a) s (_ s a) s (_ s
@) s (_$w_alt =s @) s (_$w_alt =s


_) samen(@P5 s'a:m@n
_) samen(@P5 s'a:m@n
_) scan (L02 skEn
science saI@ns
sc (oop sk sc (oop sk
sc (opi sk sc (opi sk
&) sel (_ =s@l &) sel (_ =s@l
&) selen (_ =s@l@n &) selen (_ =s@l@n
service s8v@s
@) si (o S @) si (o S
A) si (o Z A) si (o Z
@) ssi (o S @) ssi (o S

+ 3
- 44
dictsource/pt_list View File

abordo $alt abordo $alt
aborto $alt $verb aborto $alt $verb
acerto $alt2 $noun acerto $alt2 $noun
acordo $alt $verb
acertos $alt2 acertos $alt2
acordo $alt $verb
acervo $alt2 acervo $alt2
adepto $alt adepto $alt
adereço $alt2 adereço $alt2
aterro $alt2 $noun aterro $alt2 $noun
atmosfera $alt atmosfera $alt
atrozes $alt atrozes $alt
austera $alt
austero $alt
autora $alt2 autora $alt2
avesso $alt2 avesso $alt2
axé aSE axé aSE
cerca $alt cerca $alt
cerca $alt2 $noun cerca $alt2 $noun
cerco $alt $verb cerco $alt $verb
cesta $alt2
cesto $alt2
chamego $alt2 chamego $alt2
chefe $alt chefe $alt
checam $alt checam $alt
contivermos $alt contivermos $alt
controle $alt2 $noun controle $alt2 $noun
controlo $alt2 $noun controlo $alt2 $noun
copa $alt
copo $alt
coreia $alt coreia $alt
corneta $alt2 corneta $alt2
cornos $alt cornos $alt
coubermos $alt coubermos $alt
cratera $alt cratera $alt
crede $alt2 crede $alt2
cresce $alt
crescem $alt
der $alt der $alt
derdes $alt derdes $alt
desapego $alt2 $noun desapego $alt2 $noun
endereço $alt2 endereço $alt2
endereço $alt $verb endereço $alt $verb
enforco $alt enforco $alt
enforque $alt
enforquem $alt
engordo $alt engordo $alt
ensopa $alt
ensopam $alt
ensope $alt
ensopem $alt
ensopo $alt
enredo $alt $verb enredo $alt $verb
enterro $alt2 $noun enterro $alt2 $noun
enumerem $alt enumerem $alt
ideia $alt ideia $alt
insonoro $alt insonoro $alt
interesse $alt2 $noun interesse $alt2 $noun
joga $alt
jogam$alt
jogo $alt $verb
jogos $alt
jogue $alt
joguem $alt
jogo $alt2 $noun
joguete $alt2 joguete $alt2
lambreta $alt2 lambreta $alt2
lebre $alt lebre $alt
líderes $alt2
lopes $alt lopes $alt
maior $alt maior $alt
maleta $alt2 maleta $alt2
miolo $alt2 miolo $alt2
miolos $alt miolos $alt
moeda $alt moeda $alt
modo $alt
modos $alt modos $alt
molho $alt2 $noun molho $alt2 $noun
monera $alt monera $alt
relevo $alt2 $noun relevo $alt2 $noun
remorso $alt remorso $alt
reprovo $alt reprovo $alt
resolve $alt
resolvem $alt
retorno $alt $verb retorno $alt $verb
rixa x'iS& rixa x'iS&
rocha $alt rocha $alt
rock $alt rock $alt
rogas $alt
rola $alt2 $noun rola $alt2 $noun
rolo $alt2 $noun rolo $alt2 $noun
rosna $alt
rosnam $alt
rosne $alt
rosnem $alt
rosno $alt
rumores $alt2 rumores $alt2
saleta $alt2 saleta $alt2
sarjeta $alt sarjeta $alt
?1 senhora $alt2 ?1 senhora $alt2
senhores $alt2 senhores $alt2
sinopse $alt sinopse $alt
sobe $alt
sobem $alt
soco $alt2 soco $alt2
soco $alt $verb soco $alt $verb
sofrem $alt
sofre $alt
sofreste $alt2
sogra $alt sogra $alt
sopre $alt
soprem $alt
sopro $alt $verb
sopro $alt2 $noun
soro $alt2 soro $alt2
sorvete $alt2 sorvete $alt2
sossego $alt2 $noun sossego $alt2 $noun
tivermos $alt tivermos $alt
tocha $alt tocha $alt
toga $alt toga $alt
tola $alt2
tolo $alt2
tolhe $alt
tolhem $alt
topo $alt $verb topo $alt $verb
torno $alt $verb torno $alt $verb
torre $alt2 $noun torre $alt2 $noun

+ 20
- 10
dictsource/pt_rules View File

_estr) ei (L03_ EI _estr) ei (L03_ EI
_inv) e (jL04_ E _inv) e (jL04_ E
_dec) e (pL04_ E _dec) e (pL04_ E
_s) e (quL02_ E
_p) e (quL02_ E _p) e (quL02_ E
_s) e (quL02_ E
l) e (que_ E l) e (que_ E
_sug) e (rL02_ E _sug) e (rL02_ E
_imp) e (rL03_ E _imp) e (rL03_ E
_f) e (rvL03_ e _f) e (rvL03_ e
_p) e (sL01_ E _p) e (sL01_ E
_d) e (scL02_ E _d) e (scL02_ E
_cr) e (scL02_ E
_p) e (scL03_ E _p) e (scL03_ E
_m) e (sclL04 E _m) e (sclL04 E
_l) e (ssL02_ e _l) e (ssL02_ e
_esp) e (ssL03_ e _esp) e (ssL03_ e
_c) e (stL03_ e
_m) e (tL03_ e _m) e (tL03_ e
_pr) e (tL03_ e
_com) e (tL03_ e _com) e (tL03_ e
_rem) e (tL03_ e _rem) e (tL03_ e
prom) e (tL03_ e // com- prom) e (tL03_ e // com-
_derr) e (tL03_ e _derr) e (tL03_ e
_obsol) e (tL03_ e _obsol) e (tL03_ e
_pr) e (tL03_ e
_sol) e (trL03_ E _sol) e (trL03_ E
_pen) e (trL04_ E _pen) e (trL04_ E
scr) e (vL03_ e // e- in- pre- ree- de-
_d) e (vL03_ e _d) e (vL03_ e
scr) e (vL03_ e // e- in- pre- ree- de-
_atr) e (vL03_ e _atr) e (vL03_ e
_embel) e (zL04_ E
pr) e (zL04_ E / des- menos- pr) e (zL04_ E / des- menos-
_embel) e (zL04_ E
_acont) e (çL01_ e _acont) e (çL01_ e
_arref) e (çL01_ e _arref) e (çL01_ e
par) e (çL03_ e // a- re- com- rea- desa- par) e (çL03_ e // a- re- com- rea- desa-
_mer) e (çL03_ e _mer) e (çL03_ e
_pad) e (çL03_ e // com- _pad) e (çL03_ e // com-
_per) e (çL03_ e _per) e (çL03_ e
_rejuven) e (çL03_ e
conh) e (çL03_ e // re- conh) e (çL03_ e // re-
_esqu) e (çL03_ e _esqu) e (çL03_ e
_forn) e (çL03_ e _forn) e (çL03_ e
_esclar) e (çL03_ e _esclar) e (çL03_ e
_estrem) e (çL03_ e _estrem) e (çL03_ e
_fortal) e (çL03_ e _fortal) e (çL03_ e
_rejuven) e (çL03_ e
//endsort //endsort






//sort //sort
_engl) o (bL01_ O _engl) o (bL01_ O
_s) o (bL02_ O
_esn) o (bL04_ O _esn) o (bL04_ O
_deb) o (chL04_ O _deb) o (chL04_ O
_desabr) o (chL04_ O _desabr) o (chL04_ O
_s) o (frL02_ O
_j) o (gL04_ O
_r) o (gL04_ O _r) o (gL04_ O
_adv) o (gL04_ O _adv) o (gL04_ O
_ref) o (gL04_ O _ref) o (gL04_ O
_ap) oi (L01_ OI _ap) oi (L01_ OI
_esc) o (lhL02_ O
_t) o (lL03_ o
c) o (lhL02_ O / es- en- re-
_t) o (lhL02_ O
_m) o (lhL04_ O _m) o (lhL04_ O
env) o (lvL02_ O / des-
_abs) o (lvL02_ O _abs) o (lvL02_ O
_env) o (lvL02_ O
_res) o (lvL02_ O
_rev) o (lvL02_ O _rev) o (lvL02_ O
_desenv) o (lvL02_ O
_ent) o (pL02_ O _ent) o (pL02_ O
_c) o (pL03_ O
_ens) o (pL04_ O
_s) o (prL04_ O
_enf) o (rquL02_ O
c) o (rrL01_ o // escorra, incorra, corra, recorra c) o (rrL01_ o // escorra, incorra, corra, recorra
_m) o (rrL01_ o _m) o (rrL01_ o
_r) o (snL04_ O
_c) o (spL02_ O _c) o (spL02_ O
p) ostos (_ Ost=Us# // dispostos etc. p) ostos (_ Ost=Us# // dispostos etc.
_s) o (bL02_ O
_s) o (prL02_ O
//endsort //endsort


.group ô .group ô

+ 1
- 1
dictsource/ro_list View File

vinovăţi $alt vinovăţi $alt
vinovăţii $4 vinovăţii $4
virgulă $1 virgulă $1
vis-a-vis vizav'i
(vis-a vis) vizav'i
viscol $1 viscol $1
vitreg $1 vitreg $1
vitrege $1 vitrege $1

+ 2
- 0
dictsource/ro_rules View File

ţi-) i (_ _ // combined with previous word as [iI] ţi-) i (_ _ // combined with previous word as [iI]
Cr) i (_+++ i Cr) i (_+++ i
V&) i (N_ 'i // verb V&) i (N_ 'i // verb
@) i (A$p_alt1 i // i is not [j]
ăC) ia (_ 'ia ăC) ia (_ 'ia
âC) ia (_ 'ia âC) ia (_ 'ia
ăC) ie (_ 'ie ăC) ie (_ 'ie

+ 6
- 0
dictsource/ta_list View File

½ araI ½ araI
¾ mukka:l ¾ mukka:l


// alphabet names
_ar arVbU
_cyr sirillik
_he ;ebire:jVm


// abbreviations // abbreviations
ரூ ru:ba:j $dot $only ரூ ru:ba:j $dot $only
(பி . ஏ) bije: $dot (பி . ஏ) bije: $dot

+ 12
- 12
phsource/compile_report View File

[l/] fr [l/] fr
l/l_@ [l/3] base l/l_@ [l/3] base
[l/] fr [l/] fr
l/l@ [l#] base
[X)]] base
l/l@ [¨\-] base
[l#] base
[l] fr [l] fr
[l/2] fr [l/2] fr
[K] nso [K] nso
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 [l#] base
[X)]] base
l/la [¨\-] base
[l#] base
[l] fr [l] fr
[l/2] fr [l/2] fr
[K] nso [K] nso
[K] tn [K] tn
l/l_a [l/3] base l/l_a [l/3] base
[l/] fr [l/] fr
l/le [l#] base
[X)]] base
l/le [¨\-] base
[l#] base
[l] fr [l] fr
[l/2] fr [l/2] fr
[K] nso [K] nso
[&:] 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 [l#] base
[X)]] base
l/li [¨\-] base
[l#] base
[l] fr [l] fr
[l/2] fr [l/2] fr
[l] zh [l] zh
ll/_ll [L] base ll/_ll [L] base
l/l_long [l] base l/l_long [l] base
[l] fr [l] fr
l/lo [l#] base
[X)]] base
l/lo [¨\-] base
[l#] base
[l/2] fr [l/2] fr
[K] nso [K] nso
[K] tn [K] tn
[l;] lt [l;] lt
[l] ru [l] ru
[l^] ru [l^] ru
l/lu [l#] base
[X)]] base
l/lu [¨\-] base
[l#] base
[l] fr [l] fr
[l/2] fr [l/2] fr
[K] nso [K] nso

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

#define mkdir(p1,p2) mkdir(p1) #define mkdir(p1,p2) mkdir(p1)
#define PATHSEP '\\' #define PATHSEP '\\'
#define USE_PORTAUDIO
//#define USE_PORTAUDIO
//#define USE_NANOSLEEP //#define USE_NANOSLEEP
#define NO_VARIADIC_MACROS #define NO_VARIADIC_MACROS
#define __cdecl #define __cdecl

+ 1
- 1
platforms/windows/espeakedit/src_copy/speech.h View File

#define mkdir(p1,p2) mkdir(p1) #define mkdir(p1,p2) mkdir(p1)
#define PATHSEP '\\' #define PATHSEP '\\'
#define USE_PORTAUDIO
//#define USE_PORTAUDIO
//#define USE_NANOSLEEP //#define USE_NANOSLEEP
#define NO_VARIADIC_MACROS #define NO_VARIADIC_MACROS
#define __cdecl #define __cdecl

+ 9
- 1
platforms/windows/make_espeak.iss View File

[Setup] [Setup]
AppName=eSpeak AppName=eSpeak
AppVerName=eSpeak version 1.46.31
AppVerName=eSpeak version 1.46.42
AppCopyright=Licensed under GNU General Public License version 3. (See file License.txt for details). AppCopyright=Licensed under GNU General Public License version 3. (See file License.txt for details).
WindowVisible=yes WindowVisible=yes
[InstallDelete] [InstallDelete]
Type: files; Name: "{app}\espeak.dll" Type: files; Name: "{app}\espeak.dll"
Type: files; Name: "{app}\espeak-data\voices\*"
Type: filesandordirs; Name: "{app}\espeak-data\voices\en"
Type: filesandordirs; Name: "{app}\espeak-data\voices\asia"
Type: filesandordirs; Name: "{app}\espeak-data\voices\europe"
Type: filesandordirs; Name: "{app}\espeak-data\voices\other"
Type: filesandordirs; Name: "{app}\espeak-data\voices\test" Type: filesandordirs; Name: "{app}\espeak-data\voices\test"
Type: filesandordirs; Name: "{app}\docs" Type: filesandordirs; Name: "{app}\docs"
$41: Result := 'sw'; $41: Result := 'sw';
//$44: Result := 'tt'; //$44: Result := 'tt';
$49: Result := 'ta'; $49: Result := 'ta';
$46: Result := 'pa';
$4b: Result := 'kn'; $4b: Result := 'kn';
//$50: Result := 'mn'; //$50: Result := 'mn';
$52: Result := 'cy'; $52: Result := 'cy';
'an': value := $40a; // Aragon, use code for Spanish 'an': value := $40a; // Aragon, use code for Spanish
'az': value := $42c; 'az': value := $42c;
'bg': value := $402; 'bg': value := $402;
'bn': value := $445;
'bs': value := $41a; // should be $141a but Jaws crashes on startup 'bs': value := $41a; // should be $141a but Jaws crashes on startup
'ca': value := $403; 'ca': value := $403;
'cs': value := $405; 'cs': value := $405;
'ne': value := $461; 'ne': value := $461;
'nl': value := $413; 'nl': value := $413;
'no': value := $414; 'no': value := $414;
'pa': value := $446;
'pl': value := $415; 'pl': value := $415;
'pt': value := $416; 'pt': value := $416;
'ro': value := $418; 'ro': value := $418;

+ 28
- 5
src/compiledict.cpp View File

} /* end of LookupMnemValue */ } /* end of LookupMnemValue */




char *print_dictionary_flags(unsigned int *flags)
{//==============================================
static char buf[20];
void print_dictionary_flags(unsigned int *flags, char *buf, int buf_len)
{//========================================================================
int stress;
int ix;
const char *name;
int len;
int total = 0;

buf[0] = 0;
if((stress = flags[0] & 0xf) != 0)
{
sprintf(buf, "%s", LookupMnemName(mnem_flags, stress + 0x40));
total = strlen(buf);
buf += total;
}


sprintf(buf,"%s 0x%x/%x",LookupMnemName(mnem_flags,(flags[0] & 0xf)+0x40), flags[0], flags[1]);
return(buf);
for(ix=8; ix<64; ix++)
{
if(((ix < 30) && (flags[0] & (1 << ix))) || ((ix >= 0x20) && (flags[1] & (1 << (ix-0x20)))))
{
name = LookupMnemName(mnem_flags, ix);
len = strlen(name) + 1;
total += len;
if(total >= buf_len)
continue;
sprintf(buf, " %s", name);
buf += len;
}
}
} }





+ 16
- 50
src/dictionary.cpp View File

int dictionary_skipwords; int dictionary_skipwords;
char dictionary_name[40]; char dictionary_name[40];


extern char *print_dictionary_flags(unsigned int *flags);
extern void print_dictionary_flags(unsigned int *flags, char *buf, int buf_len);
extern char *DecodeRule(const char *group_chars, int group_length, char *rule, int control); extern char *DecodeRule(const char *group_chars, int group_length, char *rule, int control);


// accented characters which indicate (in some languages) the start of a separate syllable // accented characters which indicate (in some languages) the start of a separate syllable
{ {
w = word; w = word;
} }
while(*p == *w)
while((*p == *w) && (*w != 0))
{ {
w++; w++;
p++; p++;
p += (wc_bytes-1); p += (wc_bytes-1);
} }


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


// any language specific changes ?
ApplySpecialAttribute(tr,phonemes,dict_flags0);
memcpy(p_start,word_copy,strlen(word_copy)); memcpy(p_start,word_copy,strlen(word_copy));


return(0); return(0);
} // end of ApplySpecialAttribute2 } // end of ApplySpecialAttribute2




void ApplySpecialAttribute(Translator *tr, char *phonemes, int dict_flags)
{//=======================================================================
// Amend the translated phonemes according to an attribute which is specific for the language.
int len;
char *p_end;

if((dict_flags & (FLAG_ALT_TRANS | FLAG_ALT2_TRANS)) == 0)
return;

len = strlen(phonemes);
p_end = &phonemes[len-1];

switch(tr->translator_name)
{
#ifdef deleted
// this is now done in de_rules
case L('d','e'):
if(p_end[0] == PhonemeCode2('i',':'))
{
// words ends in ['i:], change to [=I@]
p_end[-1] = phonSTRESS_PREV;
p_end[0] = PhonemeCode('I');
p_end[1] = phonSCHWA;
p_end[2] = 0;
}
break;
#endif

case L('r','o'):
if(p_end[0] == PhonemeCode('j'))
{
// word end in [j], change to ['i]
p_end[0] = phonSTRESS_P;
p_end[1] = PhonemeCode('i');
p_end[2] = 0;
}
break;
}
} // end of ApplySpecialAttribute





//============================================================================================= //=============================================================================================
const char *word1; const char *word1;
int wflags = 0; int wflags = 0;
char word_buf[N_WORD_BYTES+1]; char word_buf[N_WORD_BYTES+1];
char dict_flags_buf[80];


if(wtab != NULL) if(wtab != NULL)
{ {
if(tr->expect_verb || (tr->expect_verb_s && (end_flags & FLAG_SUFX_S))) if(tr->expect_verb || (tr->expect_verb_s && (end_flags & FLAG_SUFX_S)))
{ {
// OK, we are expecting a verb // OK, we are expecting a verb
if((tr->translator_name == L('e','n')) && (tr->prev_dict_flags[0] & FLAG_ALT6_TRANS) && (end_flags & FLAG_SUFX_S))
{
// lang=en, don't use verb form after 'to' if the word has 's' suffix
continue;
}
} }
else else
{ {
if(dictionary_flags & FLAG_ALT2_TRANS) if(dictionary_flags & FLAG_ALT2_TRANS)
{ {
// language specific // language specific
if((tr->translator_name == L('h','u')) && !(tr->prev_dict_flags & FLAG_ALT_TRANS))
if((tr->translator_name == L('h','u')) && !(tr->prev_dict_flags[0] & FLAG_ALT_TRANS))
continue; continue;
} }


{ {
if(option_phonemes == 2) if(option_phonemes == 2)
{ {
fprintf(f_trans,"Flags: %s %s\n",word1,print_dictionary_flags(flags));
print_dictionary_flags(flags, dict_flags_buf, sizeof(dict_flags_buf));
fprintf(f_trans,"Flags: %s %s\n", word1, dict_flags_buf);
} }
return(0); // no phoneme translation found here, only flags. So use rules return(0); // no phoneme translation found here, only flags. So use rules
} }
if(textmode == translator->langopts.textmode) if(textmode == translator->langopts.textmode)
{ {
// only show this line if the word translates to phonemes, not replacement text // only show this line if the word translates to phonemes, not replacement text
if((dictionary_skipwords) && (wtab != NULL))
if((dictionary_flags & FLAG_SKIPWORDS) && (wtab != NULL))
{ {
// matched more than one word // matched more than one word
// (check for wtab prevents showing RULE_SPELLING byte when speaking individual letters) // (check for wtab prevents showing RULE_SPELLING byte when speaking individual letters)
memcpy(word_buf,word2,word_end-word2); memcpy(word_buf,word2,word_end-word2);
word_buf[word_end-word2-1] = 0; word_buf[word_end-word2-1] = 0;
fprintf(f_trans,"Found: '%s %s",word1,word_buf);
fprintf(f_trans,"Found: '%s %s\n",word1,word_buf);
} }
else else
{ {
fprintf(f_trans,"Found: '%s",word1); fprintf(f_trans,"Found: '%s",word1);
} }
fprintf(f_trans,"' [%s] %s\n",ph_decoded,print_dictionary_flags(flags));
print_dictionary_flags(flags, dict_flags_buf, sizeof(dict_flags_buf));
fprintf(f_trans,"' [%s] %s\n", ph_decoded,dict_flags_buf);
} }
} }



+ 23
- 23
src/espeak_command.cpp View File

{ {
goto text_error; goto text_error;
} }
a_text = malloc( size );
a_text = malloc( size+1 );
if (!a_text) if (!a_text)
{ {
goto text_error; goto text_error;
} }
memcpy(a_text, text, size); memcpy(a_text, text, size);
a_command->type = ET_TEXT; a_command->type = ET_TEXT;
a_command->state = CS_UNDEFINED; a_command->state = CS_UNDEFINED;
data = &(a_command->u.my_text); data = &(a_command->u.my_text);
{ {
goto msg_error; goto msg_error;
} }
a_command->type = ET_TERMINATED_MSG; a_command->type = ET_TERMINATED_MSG;
a_command->state = CS_UNDEFINED; a_command->state = CS_UNDEFINED;
data = &(a_command->u.my_terminated_msg); data = &(a_command->u.my_terminated_msg);
{ {
goto char_error; goto char_error;
} }
a_command->type = ET_CHAR; a_command->type = ET_CHAR;
a_command->state = CS_UNDEFINED; a_command->state = CS_UNDEFINED;
a_command->u.my_char.user_data = user_data; a_command->u.my_char.user_data = user_data;
{ {
goto param_error; goto param_error;
} }
a_command->type = ET_PARAMETER; a_command->type = ET_PARAMETER;
a_command->state = CS_UNDEFINED; a_command->state = CS_UNDEFINED;
data = &(a_command->u.my_param); data = &(a_command->u.my_param);
data->parameter = parameter;
data->parameter = parameter;
data->value = value; data->value = value;
data->relative = relative; data->relative = relative;
a_error=0; a_error=0;
{ {
goto list_error; goto list_error;
} }
a_command->type = ET_PUNCTUATION_LIST; a_command->type = ET_PUNCTUATION_LIST;
a_command->state = CS_UNDEFINED; a_command->state = CS_UNDEFINED;


{ {
goto name_error; goto name_error;
} }
a_command->type = ET_VOICE_NAME; a_command->type = ET_VOICE_NAME;
a_command->state = CS_UNDEFINED; a_command->state = CS_UNDEFINED;
a_command->u.my_voice_name = strdup( name); a_command->u.my_voice_name = strdup( name);
{ {
goto spec_error; goto spec_error;
} }
a_command->type = ET_VOICE_SPEC; a_command->type = ET_VOICE_SPEC;
a_command->state = CS_UNDEFINED; a_command->state = CS_UNDEFINED;
{ {
break; break;


case ET_TERMINATED_MSG: case ET_TERMINATED_MSG:
{
{
// if the terminated msg is pending, // if the terminated msg is pending,
// it must be processed here for informing the calling program
// it must be processed here for informing the calling program
// that its message is finished. // that its message is finished.
// This can be important for cleaning the related user data.
// This can be important for cleaning the related user data.
t_espeak_terminated_msg* data = &(the_command->u.my_terminated_msg); t_espeak_terminated_msg* data = &(the_command->u.my_terminated_msg);
if (the_command->state == CS_PENDING) if (the_command->state == CS_PENDING)
{ {
free((void*)(the_command->u.my_voice_name)); free((void*)(the_command->u.my_voice_name));
} }
break; break;
case ET_VOICE_SPEC: case ET_VOICE_SPEC:
{ {
espeak_VOICE* data = &(the_command->u.my_voice_spec); espeak_VOICE* data = &(the_command->u.my_voice_spec);
case ET_TEXT: case ET_TEXT:
{ {
t_espeak_text* data = &(the_command->u.my_text); t_espeak_text* data = &(the_command->u.my_text);
sync_espeak_Synth( data->unique_identifier, data->text, data->size,
data->position, data->position_type,
data->end_position, data->flags, data->user_data);
sync_espeak_Synth( data->unique_identifier, data->text, data->size,
data->position, data->position_type,
data->end_position, data->flags, data->user_data);
} }
break; break;


case ET_MARK: case ET_MARK:
{ {
t_espeak_mark* data = &(the_command->u.my_mark); t_espeak_mark* data = &(the_command->u.my_mark);
sync_espeak_Synth_Mark( data->unique_identifier, data->text, data->size,
data->index_mark, data->end_position, data->flags,
sync_espeak_Synth_Mark( data->unique_identifier, data->text, data->size,
data->index_mark, data->end_position, data->flags,
data->user_data); data->user_data);
} }
break; break;


case ET_TERMINATED_MSG: case ET_TERMINATED_MSG:
{
{
t_espeak_terminated_msg* data = &(the_command->u.my_terminated_msg); t_espeak_terminated_msg* data = &(the_command->u.my_terminated_msg);
sync_espeak_terminated_msg( data->unique_identifier, data->user_data); sync_espeak_terminated_msg( data->unique_identifier, data->user_data);
} }
{ {
t_espeak_terminated_msg* data = &(the_command->u.my_terminated_msg); t_espeak_terminated_msg* data = &(the_command->u.my_terminated_msg);


SHOW("display_espeak_command > (0x%x) TERMINATED_MSG uid=%d, user_data=0x%x, state=%d\n",
the_command, data->unique_identifier, data->user_data,
SHOW("display_espeak_command > (0x%x) TERMINATED_MSG uid=%d, user_data=0x%x, state=%d\n",
the_command, data->unique_identifier, data->user_data,
the_command->state); the_command->state);
} }
break; break;
case ET_PARAMETER: case ET_PARAMETER:
{ {
t_espeak_parameter* data = &(the_command->u.my_param); t_espeak_parameter* data = &(the_command->u.my_param);
SHOW("display_espeak_command > (0x%x) PARAMETER=%d, value=%d, relative=%d\n",
SHOW("display_espeak_command > (0x%x) PARAMETER=%d, value=%d, relative=%d\n",
the_command, data->parameter, data->value, data->relative); the_command, data->parameter, data->value, data->relative);
} }
break; break;

+ 4
- 22
src/numbers.cpp View File

return(0); return(0);
} }


#ifdef deleted
if((ph_buf[0] == 0) && (tr->translator_name != L('e','n')))
{
// speak as English, check whether there is a translation for this character
SetTranslator2("en");
save_option_phonemes = option_phonemes;
option_phonemes = 0;
LookupLetter(translator2, letter, word[n_bytes], ph_buf, control & 1);
SelectPhonemeTable(voice->phoneme_tab_ix); // revert to original phoneme table
option_phonemes = save_option_phonemes;

if(ph_buf[0] != 0)
{
sprintf(phonemes,"%cen",phonSWITCH);
return(0);
}
}
#endif

alphabet = AlphabetFromChar(letter); alphabet = AlphabetFromChar(letter);
if(alphabet != current_alphabet) if(alphabet != current_alphabet)
{ {
nextflags = TranslateWord(tr, &word_end[2], 0, NULL, NULL); nextflags = TranslateWord(tr, &word_end[2], 0, NULL, NULL);
} }


if((tr->prev_dict_flags & FLAG_ALT_TRANS) && ((c2 == 0) || (wtab[0].flags & FLAG_COMMA_AFTER) || iswdigit(c2)))
if((tr->prev_dict_flags[0] & FLAG_ALT_TRANS) && ((c2 == 0) || (wtab[0].flags & FLAG_COMMA_AFTER) || iswdigit(c2)))
ordinal = 0; // TEST 09.02.10 ordinal = 0; // TEST 09.02.10


if(nextflags & FLAG_ALT_TRANS) if(nextflags & FLAG_ALT_TRANS)
if(word[-2] == '-') if(word[-2] == '-')
ordinal = 0; // eg. december 2-5. között ordinal = 0; // eg. december 2-5. között


if(tr->prev_dict_flags & (FLAG_ALT_TRANS | FLAG_ALT3_TRANS))
if(tr->prev_dict_flags[0] & (FLAG_ALT_TRANS | FLAG_ALT3_TRANS))
ordinal = 0x22; ordinal = 0x22;
} }
} }
} }
} }


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


if(tr->langopts.numbers & NUM_ROMAN_AFTER) if(tr->langopts.numbers & NUM_ROMAN_AFTER)

+ 1
- 1
src/speech.h View File

#endif #endif


#ifdef _ESPEAKEDIT #ifdef _ESPEAKEDIT
#define USE_PORTAUDIO
//#define USE_PORTAUDIO
#define USE_ASYNC #define USE_ASYNC
#define LOG_FRAMES // write keyframe info to log-espeakedit #define LOG_FRAMES // write keyframe info to log-espeakedit
#endif #endif

+ 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.41 03.Mar.13";
const char *version_string = "1.46.42 06.Mar.13";
const int version_phdata = 0x014640; const int version_phdata = 0x014640;


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

+ 7
- 7
src/tr_languages.cpp View File

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

+ 6
- 7
src/translate.cpp View File

{ {
// don't retranslate, use the original lookup result // don't retranslate, use the original lookup result
strcpy(phonemes,phonemes2); strcpy(phonemes,phonemes2);

// language specific changes
ApplySpecialAttribute(tr,phonemes,dictionary_flags[0]);
} }
else else
{ {
pre_pause--; pre_pause--;
} }
tr->end_stressed_vowel = 0; // forget about the previous word tr->end_stressed_vowel = 0; // forget about the previous word
tr->prev_dict_flags = 0;
tr->prev_dict_flags[0] = 0;
tr->prev_dict_flags[1] = 0;
} }


if((option_capitals==1) && (word_flags & FLAG_FIRST_UPPER)) if((option_capitals==1) && (word_flags & FLAG_FIRST_UPPER))
{ {
if(first_phoneme && tr->langopts.param[LOPT_IT_DOUBLING]) if(first_phoneme && tr->langopts.param[LOPT_IT_DOUBLING])
{ {
if(((tr->prev_dict_flags & FLAG_DOUBLING) && (tr->langopts.param[LOPT_IT_DOUBLING] & 1)) ||
if(((tr->prev_dict_flags[0] & FLAG_DOUBLING) && (tr->langopts.param[LOPT_IT_DOUBLING] & 1)) ||
(tr->end_stressed_vowel && (tr->langopts.param[LOPT_IT_DOUBLING] & 2))) (tr->end_stressed_vowel && (tr->langopts.param[LOPT_IT_DOUBLING] & 2)))
{ {
// italian, double the initial consonant if the previous word ends with a // italian, double the initial consonant if the previous word ends with a
ph_list2[max_stress_ix].synthflags |= SFLAG_PROMOTE_STRESS; ph_list2[max_stress_ix].synthflags |= SFLAG_PROMOTE_STRESS;
} }


tr->prev_dict_flags = flags;
tr->prev_dict_flags[0] = flags;
return(flags); return(flags);
} // end of TranslateWord2 } // end of TranslateWord2


tr->expect_verb_s=0; tr->expect_verb_s=0;
tr->phonemes_repeat_count = 0; tr->phonemes_repeat_count = 0;
tr->end_stressed_vowel=0; tr->end_stressed_vowel=0;
tr->prev_dict_flags = 0;
tr->prev_dict_flags[0] = 0;
tr->prev_dict_flags[1] = 0;


word_count = 0; word_count = 0;
single_quoted = 0; single_quoted = 0;

+ 7
- 6
src/translate.h View File

#define FLAG_ALT_TRANS 0x8000 // language specific #define FLAG_ALT_TRANS 0x8000 // language specific
#define FLAG_ALT2_TRANS 0x10000 // language specific #define FLAG_ALT2_TRANS 0x10000 // language specific
#define FLAG_ALT3_TRANS 0x20000 // language specific #define FLAG_ALT3_TRANS 0x20000 // language specific
#define FLAG_COMBINE 0x40000 // combine with the next word
#define FLAG_ALT4_TRANS 0x40000 // language specific
#define FLAG_ALT5_TRANS 0x80000 // language specific
#define FLAG_ALT6_TRANS 0x100000 // language specific


#define FLAG_COMBINE 0x800000 // combine with the next word
#define FLAG_ALLOW_DOT 0x01000000 // ignore '.' after word (abbreviation) #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_NEEDS_DOT 0x02000000 // only if the word is followed by a dot
#define FLAG_WAS_UNPRONOUNCABLE 0x04000000 // the unpronounceable routine was used #define FLAG_WAS_UNPRONOUNCABLE 0x04000000 // the unpronounceable routine was used
#define FLAG_ONLY_S 0x8000 #define FLAG_ONLY_S 0x8000
#define FLAG_STEM 0x10000 // must have a suffix #define FLAG_STEM 0x10000 // must have a suffix
#define FLAG_ATEND 0x20000 /* use this pronunciation if at end of clause */ #define FLAG_ATEND 0x20000 /* use this pronunciation if at end of clause */
#define FLAG_ATSTART 0x30000 // use this pronunciation if at start of clause
#define FLAG_ATSTART 0x40000 // use this pronunciation if at start of clause


#define BITNUM_FLAG_ALLCAPS 0x2a #define BITNUM_FLAG_ALLCAPS 0x2a
#define BITNUM_FLAG_HYPHENATED 0x2c #define BITNUM_FLAG_HYPHENATED 0x2c
// alphabet flags // alphabet flags
#define AL_DONT_NAME 0x01 // don't speak the alphabet name #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_LETTERS 0x02 // don't use the language for speaking letters
#define AL_NOT_WORDS 0x04 // don't use the language to speak words
#define AL_WORDS 0x04 // use the language to speak words




#define N_LOPTS 21 #define N_LOPTS 21
unsigned char groups2_start[256]; // index into groups2 unsigned char groups2_start[256]; // index into groups2
const short *frequent_pairs; // list of frequent pairs of letters, for use in compressed *_list const short *frequent_pairs; // list of frequent pairs of letters, for use in compressed *_list



int expect_verb; int expect_verb;
int expect_past; // expect past tense int expect_past; // expect past tense
int expect_verb_s; int expect_verb_s;


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




void MakePhonemeList(Translator *tr, int post_pause, int new_sentence); 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); 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 ApplySpecialAttribute2(Translator *tr, char *phonemes, int dict_flags);
void AppendPhonemes(Translator *tr, char *string, int size, const char *ph); void AppendPhonemes(Translator *tr, char *string, int size, const char *ph);



+ 33
- 19
src/voices.cpp View File

const char *language_type; const char *language_type;
char buf[200]; char buf[200];
char path_voices[sizeof(path_home)+12]; char path_voices[sizeof(path_home)+12];
char langname[4];


int stress_amps[8]; int stress_amps[8];
int stress_lengths[8]; int stress_lengths[8];
int stress_add[8]; int stress_add[8];
char names[8][40]; char names[8][40];
char name2[80];
const char *voice_dir;


int pitch1; int pitch1;
int pitch2; int pitch2;
static char voice_name[40]; // voice name for current_voice_selected static char voice_name[40]; // voice name for current_voice_selected
static char voice_languages[100]; // list of languages and priorities for current_voice_selected static char voice_languages[100]; // list of languages and priorities for current_voice_selected


// which directory to look for a named voice
static const char *voices_asia =
"fa fa-pin hi hy hy-west id ka kn ku ml ne pa ta tr vi vi-hue zh zh-yue ";
static const char *voices_europe =
"bg bs ca cs cy da el es et fi fr-be hr hu is it lt lv mk nl no pl pt-pt ro ru sk sq sr sv ";

strcpy(voicename,vname); strcpy(voicename,vname);
if(voicename[0]==0) if(voicename[0]==0)
strcpy(voicename,"default"); strcpy(voicename,"default");
else else
{ {
sprintf(path_voices,"%s%cvoices%c",path_home,PATHSEP,PATHSEP); sprintf(path_voices,"%s%cvoices%c",path_home,PATHSEP,PATHSEP);
sprintf(buf,"%s%s",path_voices,voicename);
sprintf(buf,"%s%s",path_voices,voicename); // first, look in the main voices directory


if(GetFileLength(buf) <= 0) if(GetFileLength(buf) <= 0)
{ {
// look for the voice in a sub-directory of the language name
langname[0] = voicename[0];
langname[1] = voicename[1];
langname[2] = 0;
sprintf(buf,"%s%s%c%s",path_voices,langname,PATHSEP,voicename);

if(GetFileLength(buf) <= 0)
{
// look in "extra" sub-directory
sprintf(buf,"%sextra%c%s",path_voices,PATHSEP,voicename);

if(GetFileLength(buf) <= 0)
{
// look in "test" sub-directory
sprintf(buf,"%stest%c%s",path_voices,PATHSEP,voicename);
}
}
// then look in the appropriate subdirectory
if((voicename[0]=='m') && (voicename[1]=='b'))
{
voice_dir = "mb"; // mbrola voices
}
else
{
sprintf(name2, "%s ", voicename);
if(strstr(voices_europe, voicename) != NULL)
voice_dir = "europe";
else
if(strstr(voices_asia, voicename) != NULL)
voice_dir = "asia";
else
voice_dir = "other";

sprintf(buf,"%s%s%c%s", path_voices,voice_dir,PATHSEP,voicename);

if(GetFileLength(buf) <= 0)
{
// if not found, look in "test" sub-directory
sprintf(buf,"%stest%c%s",path_voices,PATHSEP,voicename);
}
}
} }
} }



+ 1
- 1
src/wave.cpp View File

// notdef USE_PORTAUDIO // notdef USE_PORTAUDIO




int wave_init(int srate) {}
int wave_init(int srate) {return 1;}
void* wave_open(const char* the_api) {return (void *)1;} void* wave_open(const char* the_api) {return (void *)1;}
size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize) {return theSize;} size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize) {return theSize;}
int wave_close(void* theHandler) {return 0;} int wave_close(void* theHandler) {return 0;}

+ 1
- 1
src/wave_pulse.cpp View File

// notdef USE_PULSEAUDIO // notdef USE_PULSEAUDIO




int wave_init() {}
int wave_init(return 1;) {}
void* wave_open(const char* the_api) {return (void *)1;} void* wave_open(const char* the_api) {return (void *)1;}
size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize) {return theSize;} size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize) {return theSize;}
int wave_close(void* theHandler) {return 0;} int wave_close(void* theHandler) {return 0;}

+ 1
- 1
src/wave_sada.cpp View File

#else #else
// notdef USE_SADA // notdef USE_SADA


init wave_init() {}
init wave_init() {return 1;}
void* wave_open(const char* the_api) {return (void *)1;} void* wave_open(const char* the_api) {return (void *)1;}
size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize) {return theSize;} size_t wave_write(void* theHandler, char* theMono16BitsWaveBuffer, size_t theSize) {return theSize;}
int wave_close(void* theHandler) {return 0;} int wave_close(void* theHandler) {return 0;}

Loading…
Cancel
Save