Browse Source

[1.31.03]

lang=en-r: change to phoneme [t#] (reduced "t")
Added "consonants" attribute to voice files.
Minor change to intonation types 2 and 3.
lang=zh: adjust tone levels
lang=fr: adjust stressAmp, adjust consonant strengths.
Platform RISC_OS. Disable the "breath" attribute in voices because floating point is not allowed in callbacks.
Platform RISC_OS. Implement ListVoices()


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@132 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 17 years ago
parent
commit
e69ec3a676

+ 16
- 13
dictsource/dict_phonemes View File

@- a aI e E eI eU i @- a aI e E eI eU i
o oI u o oI u


* b B d D f g j
J J^ k l l^ m n n^
p Q r R s t T tS
v w x
* ** b B d D f g
j J J^ k l l^ m n
n^ p Q r R s t T
tS v w x




Dictionary fi_dict Dictionary fi_dict
E~ i i: o O O~ u W E~ i i: o O O~ u W
w^i W~ y Y w^i W~ y Y


* - : ; b c d dZ
f g h j k l L m
n N n^ p r R s S
t t2 tS v w z Z z2
z3
* : ; b c d dZ f
g h j k l L m n
N n^ p r R s S t
t2 tS v w z Z z2 z3




Dictionary hi_dict Dictionary hi_dict
l- l: o o: oU r- r: u l- l: o o: oU r- r: u
u: u:


* b d d; dZ f g h
j k l l^ m n N n^
p r R R^ R^/ s S t
t; tS ts v x z Z
* : b d d; dZ f g
h j k l l^ m n N
n^ p r R R^ R^/ s S
t t; tS ts v x z Z




Dictionary sv_dict Dictionary sv_dict
j k l m n N n^ p j k l m n N n^ p
r R s S t tS v w r R s S t tS v w
x z x z


Dictionary ja_dict


+ 1
- 0
dictsource/en_list View File

she %Si: $only $verbsf she %Si: $only $verbsf
it %It $verbsf it %It $verbsf
(it has) I2t||h'az $atend (it has) I2t||h'az $atend
it $allcaps $abbrev
we %wi: $verbf $only we %wi: $verbf $only
you %ju: $verbf you %ju: $verbf
they %DeI $verbf they %DeI $verbf

+ 3
- 1
dictsource/en_rules View File

lle (_ l lle (_ l
@@o) lled (_$3v d @@o) lled (_$3v d
@@) lled (_$3v d @@) lled (_$3v d
B) l (_N @L
B) l (_ @L
w) l (_ l w) l (_ l
r) l (_ l r) l (_ l
Al) l (_ Al) l (_
j) une (_ u:n j) une (_ u:n
l) une (_ u:n l) une (_ u:n
r) une (_ u:n r) une (_ u:n
?3 t) une (_ u:n
_) una (b ,Vna2 _) una (b ,Vna2
t) un (e ju:n t) un (e ju:n
?3 t) un (e u:n
_) un (if ju:n _) un (if ju:n
un (ani %ju:n un (ani %ju:n
_) under (@P5 ,Vnd3 // prefix _) under (@P5 ,Vnd3 // prefix

+ 1
- 1
dictsource/es_list View File

porque $pause // because porque $pause // because


// questions // questions
que $u+ $pause // what
que $u $pause // what
cuál $pause // which cuál $pause // which
cuáles $pause cuáles $pause
cómo $pause // how cómo $pause // how

+ 1
- 1
dictsource/es_rules View File

_) r (_ E*e _) r (_ E*e
r R r R
_) r R _) r R
A) r (A *
A) r (A **
C) r (A @-* C) r (A @-*
rr *R rr *R



+ 27
- 34
dictsource/fr_list View File






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


// 2006-11-18 Gilles Casse <[email protected]> // 2006-11-18 Gilles Casse <[email protected]>
// //
// Updated 2008-01-21 Michel Such <[email protected]>
// Updated 2008-01-25 Michel Such <[email protected]>
// //
// * Numbers, a few abbreviations and exceptions. // * Numbers, a few abbreviations and exceptions.
// //
abc $abbrev abc $abbrev
ac $abbrev ac $abbrev
adsl $abbrev adsl $abbrev
alt $pause
amd $abbrev amd $abbrev
api $abbrev api $abbrev
avh $abbrev
cci $abbrev cci $abbrev
cio $abbrev cio $abbrev
ctrl kO~tRol
ctrl kO~tRol $pause
dept depaRt@mA~ dept depaRt@mA~
etc etseteRa etc etseteRa
hmm h@m hmm h@m
// pronunciation exceptions // pronunciation exceptions


consent kO~s'A~t2 consent kO~s'A~t2
divers div'Erz2
scient si scient si
bénéficient benefisi $verb bénéficient benefisi $verb
président pRezid'A~
président pRezidt2 $verb
résident Rezid'A~
résident Rezidt2 $verb
ressent r@s'A~t2
concurrent kO~kyR'A~
couvent k'uvt2 $verb
dessus d@sy
dessous d@su
divers divErz2
►évident evid'A~ ►évident evid'A~
évident evidt2 $verb évident evidt2 $verb
couvent k'uvt2 $verb
concurrent kO~kyR'A~
récurrent RekyR'A~
ferment fErm'A~ ferment fErm'A~
ferment f'Ermt2 $verb ferment f'Ermt2 $verb
parent paR'A~ parent paR'A~
parent p'art2 $verb parent p'art2 $verb
pastis pastis
président pRezid'A~
président pRezidt2 $verb
résident Rezid'A~
résident Rezidt2 $verb
ressent r@s'A~t2
récurrent RekyR'A~
riz ri
sergent sErZ'A~ sergent sErZ'A~
serment sErm'A~ serment sErm'A~
serpent sErp'A~ serpent sErp'A~
adéquat adekuat2 adéquat adekuat2
adéquate adekuat adéquate adekuat
ardent aRdA~ ardent aRdA~
boeufs bY
bus bys bus bys
choeur kWr
choeur k@r
discident disidA~ discident disidA~
fils fis fils fis
haillon _|ajO~
haricot _|aRiko
imprudent E~pRydA~ imprudent E~pRydA~
juin ZwE~
juin ZuE~
mars maRs mars maRs
occident OksidA~ occident OksidA~
oeufs Y
orient ORjA~ orient ORjA~
pays pEi pays pEi
prudent pRydA~ prudent pRydA~
secret sYkRE secret sYkRE
secrets sYkREz2
souris suri souris suri




qu'y ki $verbf qu'y ki $verbf
(sud est) sydEst (sud est) sydEst
(nord est) nOREst (nord est) nOREst
cci $abbrev
nvda $abbrev
open Op'@n
potentiomètre pOtA~sjOmEtR@- potentiomètre pOtA~sjOmEtR@-


processus pROsEsys processus pROsEsys
rut Ryt rut Ryt
scorbut skORbyt scorbut skORbyt
scout skut scout skut
scouts skut
stout staut stout staut
uppercut ypERkyt uppercut ypERkyt
ut yt ut yt
zut syt
zut zyt




// et (t is said) // et (t is said)
(sweat shirt) swEtS@Rt (sweat shirt) swEtS@Rt
(tee shirt) tiS@Rt (tee shirt) tiS@Rt


parfum paRfW~
forum fOROm


// words from other languages // words from other languages
amazon amaz'On amazon amaz'On
news nj'uz news nj'uz
night najt night najt
ok oke ok oke
open Op'@n
outlook autluk outlook autluk
player plEj'@r player plEj'@r
reader Ri:d@R reader Ri:d@R
spybot spajbOt spybot spajbOt
sun s@n sun s@n
sunlight s@nlajt sunlight s@nlajt
(text aloud) tEkst||@lau-d
(text aloud) tEkst||@lawd
thunderbird f@ndERb@Rd thunderbird f@ndERb@Rd
ubuntu ubuntu ubuntu ubuntu
update @pd'E:jt update @pd'E:jt


// tions (tjO~ instead of sjO~) // tions (tjO~ instead of sjO~)
achetions aS@tjO~z2 achetions aS@tjO~z2
ajoutions aZutjO~z2
apportions apORtjO~z2 apportions apORtjO~z2
apprêtions apREtjO~z2 apprêtions apREtjO~z2
arrêtions aREtjO~z2 arrêtions aREtjO~z2
chantions SA~tjO~z2 chantions SA~tjO~z2
citions sitjO~z2
comptions kO~tjO~z2 comptions kO~tjO~z2
constations kO~statjO~z2 constations kO~statjO~z2
contentions kO~tA~tjO~z2 contentions kO~tA~tjO~z2
dations datjO~z2 dations datjO~z2
discutions diskytjO~z2 discutions diskytjO~z2
doutions dutjO~z2
débutions debytjO~z2 débutions debytjO~z2
désertions dezERtjO~z2
désertions dezERtjO~z2 $verb
détentions detA~tjO~z2 détentions detA~tjO~z2
escomptions EskO~tjO~z2 escomptions EskO~tjO~z2
exploitions EksplwatjO~z2 exploitions EksplwatjO~z2
exportions EkspORtjO~z2 exportions EkspORtjO~z2
habitions abitjO~z2 habitions abitjO~z2
heurtions @RtjO~z2
heurtions _!@RtjO~z2
jetions Z@tjO~z2 jetions Z@tjO~z2
limitions limitjO~z2 limitions limitjO~z2
méritions meRitjO~z2 méritions meRitjO~z2
pressentions pREsA~tjO~z2 pressentions pREsA~tjO~z2
présentions pRezA~tjO~z2 présentions pRezA~tjO~z2
prêtions pREtjO~z2 prêtions pREtjO~z2
rations RatjO~z2
redoutions R@dutjO~z2
rations RatjO~z2 $verb
représentions R@pRezA~tjO~z2 représentions R@pRezA~tjO~z2
respections REspEktjO~z2 respections REspEktjO~z2
ressentions R@sA~tjO~z2 ressentions R@sA~tjO~z2
tentions tA~tjO~z2 tentions tA~tjO~z2
traitions tREtjO~z2 traitions tREtjO~z2
votions vOtjO~z2 $u votions vOtjO~z2 $u
écoutions ekutjO~z2
étions etjO~z2 étions etjO~z2
évitions evitjO~z2 évitions evitjO~z2










+ 32
- 24
dictsource/fr_rules View File



// 2006-11-18 Gilles Casse <[email protected]> // 2006-11-18 Gilles Casse <[email protected]>
// //
// Updated: 2008-01-21 Michel Such <[email protected]>
// Updated: 2008-01-25 Michel Such <[email protected]>
// //
// * The rules are based on Cicero TTS. // * The rules are based on Cicero TTS.
// //
quon) d (_ t2 quon) d (_ t2


dt (_ t // Schmidt dt (_ t // Schmidt
_ni) d (_ // nid
_noeu) d (_ // noeud
r) d (_ // lourd placard r) d (_ // lourd placard
d d // don bled d d // don bled




.group e .group e
e (Ce_ E e (Ce_ E
AC) e (_ @- // e muet
CC) e (_ @- // e muet
gu) e (_ @- // e muet
eau o // bateau cheveaux eau o // bateau cheveaux
j) e (a // Jean Jeanne j) e (a // Jean Jeanne
sp) ea (k i: // speak speaker sp) ea (k i: // speak speaker
en (s_ A~ en (s_ A~
en (CA A~ // pentathlon en (CA A~ // pentathlon
en (CC A~ // entre en (CC A~ // entre
en (ch_ En // french


_C) er (_ ER // fer _C) er (_ ER // fer
_Ch) er (_ ER // cher _Ch) er (_ ER // cher
_r) es (A @s // resaisir resaluer _r) es (A @s // resaisir resaluer


_r) e (ss @ // ressembler _r) e (ss @ // ressembler
_r) e (ssu e // ressusciter
_r) e (stra @ _r) e (stra @
_r) e (stre @ _r) e (stre @
_r) e (stro @ _r) e (stro @
_r) e (stru @ // restructurer _r) e (stru @ // restructurer
-) est (_ Est // -est -) est (_ Est // -est


@Cr) es (_C =@
rC) es (_C =@ // fortes dames
@Cr) es (_C @-
rC) es (_C @- // fortes dames


') eu (_ y // eu ') eu (_ y // eu
eu (r_ @ // peur eu (r_ @ // peur


ez (_ ez2 // nez mangez chez ez (_ ez2 // nez mangez chez
_C) e (_ @ // je te _C) e (_ @ // je te
_CC) e (_ @
_CC) e (_ @-
_qu) e (_ @ // que _qu) e (_ @ // que


@Cr) e (_C =@ // quatre pattes
rC) e (_C =@
@Cr) e (_C @- // quatre pattes
CC) e (_C @-
ch) e (_C @-
gu) e (_C @-
qu) e (_C @-


e (_ // montre e (_ // montre


g) e (A // mangeons g) e (A // mangeons


AC) e (ment // vitement sûrement
AC) e (ment @- // vitement sûrement
Aqu) e (ment Aqu) e (ment
enC) e (ment enC) e (ment
enqu) e (ment enqu) e (ment


.group h .group h
_) h (ac _! // hache _) h (ac _! // hache
_) h (ai _! // haine haillon
_) h (al _! // halte _) h (al _! // halte
_) h (amp _! // hampe _) h (amp _! // hampe
_) h (an _! // hanche _) h (an _! // hanche
_) h (app _! // happer _) h (app _! // happer
_) h (arc _! // harceler _) h (arc _! // harceler
_) h (ari _! // haricot haridelle
_) h (arna _! // harnais _) h (arna _! // harnais
_) h (ard _! // hardi _) h (ard _! // hardi
_) h (arp _! // harpe _) h (arp _! // harpe
_) h (av _! // havre _) h (av _! // havre
_) h (ern _! // hernie _) h (ern _! // hernie
_) h (ers _! // herse _) h (ers _! // herse
_) h (eurt _! // heurter
_) h (ibo _! // hibou _) h (ibo _! // hibou
_) h (ide _! // hideux _) h (ide _! // hideux
_) h (oll _! // hollandais _) h (oll _! // hollandais
cr) oc (_ o // escroc cr) oc (_ o // escroc


o (ch o // cochon o (ch o // cochon
o (che_ O // poche, cloche
oe (ll wa // moelleux oe (ll wa // moelleux
_) oe (C Y // oesophage _) oe (C Y // oesophage
o (eu // soeur oeuf
oeu @ // soeur coeur
oeufs @ // oeufs boeufs
o (eC o // coefficient o (eC o // coefficient
_) oi (gnon O // oignons _) oi (gnon O // oignons
oin (C wE~ oin (C wE~
oin (_ wE~ // coin oin (_ wE~ // coin
oi wa // poil oi wa // poil
oid (_ wa // froid oid (_ wa // froid
oê (l wE // poêle
oê (l wa // poêle
oî wa // boîte oî wa // boîte
o (mm O // comme o (mm O // comme
dr) o (me_ o // vélodrome
radi) o (C o // radiophonique
dr) o (me_ O // vélodrome
ph) o (ne_ O // téléphone ph) o (ne_ O // téléphone
om (b O~ // bombe om (b O~ // bombe
om (p O~ // pompe om (p O~ // pompe
_A) qu (a ku // équateur _A) qu (a ku // équateur
qu k // quatre qu k // quatre
_) que (_ k@ // que _) que (_ k@ // que
que (_ k@- // puisque banque...
_) qu' (P3 k // qu'il _) qu' (P3 k // qu'il
n) q (_ k // cinq cent n) q (_ k // cinq cent


_su) rr RR // surréaliste _su) rr RR // surréaliste
cou) rr RR // courrai cou) rr RR // courrai
mou) rr RR // mourrai mou) rr RR // mourrai
rre (_ R@- // barre
C) re (_ R@- // litre
rr R // erreur rr R // erreur
r r // rien r r // rien


Vn) t (_ t2 // silent at end of verb unless next word starts with a vowel Vn) t (_ t2 // silent at end of verb unless next word starts with a vowel
n) t (_ // silent at end of word n) t (_ // silent at end of word
r) t (_ t2 // fort r) t (_ t2 // fort
tte (_ t@- // fillette
C) te (_ t@- // patte C) te (_ t@- // patte
a) te (_ t@- // tomate


aul) t (_ // Renault aul) t (_ // Renault


tt t // attitude tt t // attitude
tte (_ t@- // fillette
A) te (_ t@- // tomate
C) te (_ t@- // pente


s) th (m // asthme s) th (m // asthme
th t // théorie th t // théorie




t (ion s // programmation t (ion s // programmation
Cisi) t (ion t // visitions
ci) t (ion t // citions
ou) t (ion t // ajoutions
s) t (ion t // gestion s) t (ion t // gestion
t) t (ion t // combattions t) t (ion t // combattions


u y // cruel nuage brut u y // cruel nuage brut
ui w^i ui w^i


c) ueill Wj // cueillir
c) ueil (_ Wj // recueil
g) ueill Wj // orgueilleux g) ueill Wj // orgueilleux
g) ueil (_ Wj // orgueil g) ueil (_ Wj // orgueil


c) ueill Wj
c) ueil (_ Wj


um (_ Om // album um (_ Om // album
f) um (_ W~ // parfum
um (b W~ // humble um (b W~ // humble
um (p W~ um (p W~
un (C W~ // emprunt lundi un (C W~ // emprunt lundi


.group w .group w
w w w w
ware (_ _^_EN // hardware, software
wa (Ce_ wE // hardware software wave
w (agon v // wagon




.group x .group x








+ 85
- 45
dictsource/sk_list View File

// This file is UTF-8 encoded // This file is UTF-8 encoded


// Letters // Letters
_a a:
á d,l-he:'a:
ä 'a:prehlasovane:
b be:
c tse:
č tSe:
d de:
ď d;e:
e e:
é d,l-he:'e:
f ef
g ge:
h ha:
i i:
í d,l-he:'i:
j je:
_k ka:
l el
ľ el^
ĺ d,l-he:'el
m em
n en
ň en^
_o o:
ó d,l-he:'o:
ô 'o:sv,oka:n^om
p pe:
q kve:
r er
_s es
š eS
t te:
ť t;e:
u u:
ú dl-he:'u:
_v ve:
w dv'ojite:,ve:
x iks
y ipsilon
ý d,l-he:'i:
_z zet
ž Zet
_a a:
á d,l-he:'a:
ä 'a:pRehlasovane:
b be:
c tse:
č tSe:
d de:
ď d;e:
e e:
é d,l-he:'e:
f ef
g ge:
h ha:
i i:
í d,l-he:'i:
j je:
_k ka:
l el
ľ el^
ĺ d,l-he:'el
m em
n en
ň en^
_o o:
ó d,l-he:'o:
ô 'o:sv,oka:n^om
p pe:
q kve:
r eR
ř eR^
_s es
š eS
t te:
ť t;e:
u u:
ú dl-he:'u:
ů 'u:s_kR'oUZkem
_v ve:
w dv'ojite:,ve:
x iks
y ipsilon
ý d,l-he:'i:
_z zet
ž Zet


// character names
_cap vel^ke:
_?? simbol
_#9 tab
_#32 'medzeRa
_?A znak

_! vi:kRitSn^i:k
_" u:vodzovki
_# kRi:Zik
_$ dola:R
_& ampeRsand
_' apostRof
_( za:tvoRka
_) zatvoRit;
_* hviezda
+ plus
_, tSiaRka
_- pomltSka
_. bodka
_/ lomeno
_: dvojbodka
_; bodkotSiaRka
_< menSi:
_= Rovna:sa
_> vetSSi:
_? ota:zn^ik
_@ zavin:atS
_[ hRanata:||za:tvoRka
_\ opatSne:||lomeno
_] hRanata:||zatvoRit;
_^ stRieZka
_` aktsent
_{ zloZena:||za:tvoRka
_| zvisla:||tSiaRa
_} zloZena:||zatvoRit;
_~ vlnovka
€ euRo




// Numbers // Numbers
_0 n'ula _0 n'ula
_1 j'ed;en
_1 j'eden
_2 dv'a _2 dv'a
_3 t'@-*i _3 t'@-*i
_4 St'i*i _4 St'i*i
_8 'osem _8 'osem
_9 d;'ev&t; _9 d;'ev&t;
_10 d;'esat; _10 d;'esat;
_11 j'ed;ena:st;
_11 j'edena:st;
_12 dv'ana:st; _12 dv'ana:st;
_13 t@-*'ina:st; _13 t@-*'ina:st;
_14 Str-n'a:st; _14 Str-n'a:st;
_1M1 t;'isi:ts _1M1 t;'isi:ts
_2M1 dv'et;'isi:ts _2M1 dv'et;'isi:ts
_0M2 m'ilio:n _0M2 m'ilio:n
_0M3 m'iljarda
_0M3 m'iljaRda
_dpt _:tSj,arka_ _dpt _:tSj,arka_





+ 3
- 3
dictsource/sk_rules View File

.group .group
ě e ě e
ů u: // czech ů u: // czech
$ dola:r
% pertsento
+ plus
$ dola:R
% peRtsento
D_) % peRtsent



+ 39
- 9
phsource/compile_report View File

45 phoneme tables
46 phoneme tables
new total new total
base 98 98 base 98 98
base2 24 117 base2 24 117
eo 13 110 eo 13 110
jbo 4 111 jbo 4 111
fi 40 129 fi 40 129
fr 38 122
fr 42 122
fr_ca 11 122 fr_ca 11 122
hi 50 134 hi 50 134
ta 15 136 ta 15 136
sw 14 107 sw 14 107
th 50 141 th 50 141
id 14 119 id 14 119
ja 7 103


Data file Used by Data file Used by
b/b [b] base b/b [b] base
[d[] base [d[] base
[d] base2 [d] base2
[d] fi [d] fi
[d] fr
[d] hi [d] hi
[d.] hi [d.] hi
[d] hu [d] hu
[d[] base [d[] base
[d] base2 [d] base2
[d] fi [d] fi
[d] fr
[d] hi [d] hi
[d.] hi [d.] hi
[d] hu [d] hu
[d[] base [d[] base
[d] base2 [d] base2
[d] fi [d] fi
[d] fr
[d] hi [d] hi
[d.] hi [d.] hi
[d] hu [d] hu
[d] sw [d] sw
d/tap [*;] ro d/tap [*;] ro
d/tap1 [*] base d/tap1 [*] base
d/tap2 [t#] en_us
d/tap3 [*] base d/tap3 [*] base
d/tap4 [r] es d/tap4 [r] es
d/tap_i [*;] ro d/tap_i [*;] ro
[d[] base [d[] base
[d] base2 [d] base2
[d] fi [d] fi
[d] fr
[d] hi [d] hi
[d.] hi [d.] hi
[d] hu [d] hu
[d] sw [d] sw
d/xd_pzd [d;] pl d/xd_pzd [d;] pl
[d;] ru [d;] ru
d/x_tap [t#] en_us
dzh/dzh [dZ] base dzh/dzh [dZ] base
[dZ;] base [dZ;] base
[dz;] base [dz;] base
envelope/p_level [1] vi envelope/p_level [1] vi
[3] zhy [3] zhy
[6] zhy [6] zhy
[44] zh
[55] zh [55] zh
envelope/p_rise [3] vi envelope/p_rise [3] vi
[2] zhy [2] zhy
[5] zhy [5] zhy
[44] zh
[35] zh [35] zh
[4] th [4] th
envelope/vi_5 [5] vi envelope/vi_5 [5] vi
[g] hi [g] hi
g/g [g] base g/g [g] base
[g] cy [g] cy
[g] fr
[g] hi [g] hi
[g] es [g] es
g/g_ [g] base g/g_ [g] base
[g] cy [g] cy
[g] fr
[g] hi [g] hi
[g] es [g] es
g/xg [g] base g/xg [g] base
[g] cy [g] cy
[g] fr
[g] es [g] es
h/h_ [h] base h/h_ [h] base
[h] fi [h] fi
[l] en_wi [l] en_wi
[l] af [l] af
[l/] de [l/] de
[l] fr
[l] hu [l] hu
[l] sk [l] sk
[l] ru [l] ru
[l] en [l] en
[l] en_wi [l] en_wi
[l] af [l] af
[l] fr
[l] hu [l] hu
[l] sk [l] sk
[l] ru [l] ru
ufric/ll [L] base ufric/ll [L] base
[l#] is [l#] is
ufric/s [s] base ufric/s [s] base
[s] fr
[s] es [s] es
[s#] pt [s#] pt
ufric/s_ [s] base ufric/s_ [s] base
[z] base [z] base
[s2] fi [s2] fi
[s] fr
[z] fr
[z2] fr [z2] fr
[z3] fr [z3] fr
[s2] hu [s2] hu
[z;] ro [z;] ro
ufric/s! [s] base ufric/s! [s] base
[s2] fi [s2] fi
[s] fr
[s2] hu [s2] hu
[s] es [s] es
[s#] pt [s#] pt
ufric/s_continue [s2] fi ufric/s_continue [s2] fi
[s2] hu [s2] hu
ufric/sh [S] base ufric/sh [S] base
[S] fr
[s#] pt_pt [s#] pt_pt
ufric/sh_ [S] base ufric/sh_ [S] base
[S] fr
[s#] pt_pt [s#] pt_pt
ufric/sh_pzd [S;] base ufric/sh_pzd [S;] base
[S;] ro [S;] ro
ustop/tr [t] base ustop/tr [t] base
[t[] base [t[] base
[t2] en [t2] en
[t] fr
[t.h] hi [t.h] hi
[t] ru [t] ru
ustop/ts [ts] base2 ustop/ts [ts] base2
[eoi] zhy [eoi] zhy
vdiph/y#y_3 [Y:] nl vdiph/y#y_3 [Y:] nl
vnasal/aa_n [A~] en vnasal/aa_n [A~] en
vnasal/aa_n2 [A~] fr
vnasal/aa_n3 [A~] af vnasal/aa_n3 [A~] af
[A~] fr
vnasal/a#_n [&~] pt vnasal/a#_n [&~] pt
vnasal/a#u_n [&U~] pt vnasal/a#u_n [&U~] pt
[&U~] pt_pt [&U~] pt_pt
[v;] ro [v;] ro
[v] is [v] is
voc/vj [v] base voc/vj [v] base
[v] fr
vocw/dh [D] base vocw/dh [D] base
[D] es [D] es
vocw/Q [Q] base vocw/Q [Q] base
[Z;] ro [Z;] ro
vocw/zh_rfx [z.] base vocw/zh_rfx [z.] base
voc/z [z] base voc/z [z] base
[z] fr
[z2] fr [z2] fr
[z3] fr [z3] fr
[z;] ro [z;] ro
voc/z_ [z] base voc/z_ [z] base
[z] fr
[z2] fr [z2] fr
[z3] fr [z3] fr
[z;] ro [z;] ro
[@4] hi [@4] hi
[@] th [@] th
vowel/@- [@-] base vowel/@- [@-] base
[@-] fr
[r*] hr [r*] hr
vowel/& [a] en_rp vowel/& [a] en_rp
[&] fi [&] fi
vowel/0_3 [O] en_sc vowel/0_3 [O] en_sc
[0] en_rp [0] en_rp
[A] hu [A] hu
vowel/@_2 [@] fr
[W] fr
vowel/@_2 [W] fr
vowel/@_3 [@] en_sc vowel/@_3 [@] en_sc
[I] en_sc [I] en_sc
[@2] en_sc [@2] en_sc
[a] th [a] th
[a:] th [a:] th
[a] id [a] id
[a] ja
vowel/a# [a/] base2 vowel/a# [a/] base2
[a2] en_sc [a2] en_sc
[a2] en_wi [a2] en_wi
[E] is [E] is
[E] id [E] id
[E2] id [E2] id
[e] ja
vowel/e_mid2 [E] af vowel/e_mid2 [E] af
[E] de [E] de
[E2] de [E2] de
vowel/@_fnt [@] en_wi vowel/@_fnt [@] en_wi
[@2] en_wi [@2] en_wi
[@2] hr [@2] hr
vowel/@_fr [@] fr
vowel/@_hgh [@] hr vowel/@_hgh [@] hr
vowel/i [i] base2 vowel/i [i] base2
[i:] en_n [i:] en_n
[i] sw [i] sw
[i] th [i] th
[i:] th [i:] th
[i] ja
vowel/i# [i] en_us vowel/i# [i] en_us
[i] en_rp [i] en_rp
[y:] cy [y:] cy
[O] th [O] th
[O:] th [O:] th
[O] id [O] id
[o] ja
vowel/oo_1 [O:] en_n vowel/oo_1 [O:] en_n
[O:] en_rp [O:] en_rp
[O@] en_rp [O@] en_rp
vowel/u# [u-] en vowel/u# [u-] en
[u:] en_sc [u:] en_sc
vowel/u_2 [u1] fi vowel/u_2 [u1] fi
[u] fr
[u] sk [u] sk
[U] hr [U] hr
[u] ro [u] ro
vowel/u#_4 [U] en_sc vowel/u#_4 [U] en_sc
[u:] en_sc [u:] en_sc
vowel/u_5 [u] sw vowel/u_5 [u] sw
vowel/u#_5 [u:] en_us
vowel/u_6 [U] pt_pt vowel/u_6 [U] pt_pt
[u] pt_pt [u] pt_pt
vowel/u#_6 [u:] en_us
vowel/u_7 [u] vi vowel/u_7 [u] vi
vowel/u_bck [u] base2 vowel/u_bck [u] base2
[U] cy [U] cy
[u] fi [u] fi
[u] fr
[u] fr_ca [u] fr_ca
[u:] hi [u:] hi
[u:] hu [u:] hu
[U] pt [U] pt
[U] no [U] no
[u] zhy [u] zhy
vowel/u_unr [u] ja
vowel/V [3] en_sc vowel/V [3] en_sc
vowel/V_2 [V] en vowel/V_2 [V] en
[a] af [a] af
x/b_ [b] base x/b_ [b] base
x/d [d] base x/d [d] base
[t#] en_us [t#] en_us
[d] fr
[d.] hi [d.] hi
[d] hr [d] hr
[d] el [d] el
[d[] base [d[] base
[d] base2 [d] base2
[d] fi [d] fi
[d] fr
[d] hi [d] hi
[d.] hi [d.] hi
[d] pl [d] pl
x/dz_pzd_ [J2] hi x/dz_pzd_ [J2] hi
x/g_ [g] base x/g_ [g] base
[g] cy [g] cy
[g] fr
[g] es [g] es
[g] is [g] is
x/g2 [g] base x/g2 [g] base
[g] cy [g] cy
[g] fr
[g] hi [g] hi
[g] es [g] es
[g] is [g] is

BIN
phsource/d/tap2 View File


BIN
phsource/d/tap4 View File


+ 12
- 13
phsource/ph_english_us View File



phoneme a phoneme a
vowel starttype (a) endtype (@) vowel starttype (a) endtype (@)
length 200
length 210
formants vwl_en_us/a formants vwl_en_us/a
reduceto a2 0 reduceto a2 0
endphoneme endphoneme


phoneme E phoneme E
vowel starttype (e) endtype (e) vowel starttype (e) endtype (e)
length 180
length 185
// formants vowel/ee_2 // formants vowel/ee_2
formants vwl_en_us/ee formants vwl_en_us/ee
reduceto I 0 reduceto I 0


phoneme o@ phoneme o@
vowel starttype (o) endtype (@) vowel starttype (o) endtype (@)
length 260
length 250
formants vwl_en_us/or formants vwl_en_us/or
appendph r appendph r
endphoneme endphoneme
phoneme u: phoneme u:
vowel starttype (u) endtype (u) vowel starttype (u) endtype (u)
length 170 length 170
formants vowel/u#_5
// before l/2 vwl_en/u_L-40+l/L2_uL
formants vowel/u#_6
// formants vowel/u#_5
endphoneme endphoneme






phoneme i@3 phoneme i@3
vowel starttype (i) endtype (@) vowel starttype (i) endtype (@)
length 260
length 250
formants vwl_en_us/ir formants vwl_en_us/ir
appendph r appendph r
endphoneme endphoneme




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





+ 150
- 94
phsource/ph_french View File

vowel starttype (@) endtype (@) vowel starttype (@) endtype (@)
unstressed unstressed
length 170 length 170
formants vowel/@_2
endphoneme


phoneme @- // very short schwa
vowel nonsyllabic
starttype (@) endtype (@)
formants vowel/@-
unstressed
length 20
formants vowel/@_fr
endphoneme endphoneme






phoneme u phoneme u
vowel starttype (u) endtype (u) vowel starttype (u) endtype (u)
length 170
formants vowel/u_2
length 160
formants vowel/u_bck
endphoneme endphoneme






phoneme w phoneme w
liquid liquid
length 130
unstressed
length 100
beforenotvowel w/ beforenotvowel w/
lengthmod 7 lengthmod 7
formants w/w formants w/w
phoneme A~ phoneme A~
vowel starttype (a) endtype (a) vowel starttype (a) endtype (a)
length 180 length 180
formants vnasal/aa_n3
formants vnasal/aa_n2
endphoneme endphoneme




//=========== //===========
// uses the consonants in file "phonemes", unless overridden here // uses the consonants in file "phonemes", unless overridden here


phoneme b
vcd blb stop
vowelout f1=0 f2=1000 -500 -300 f3=-300 80 brk
formants b/b+x/b%45
before _ b/b_+x/b%45
before (a) b/ba+x/b%45
before (@) b/b@+x/b%45
before (e) b/be+x/b%45
before (i) b/bi+x/b%45
before (o) b/bo+x/b%45
before (u) b/bu+x/b%45
before @- b/b@2+x/b%45
after _ NULL
after @ b/xb%45
lengthmod 5
switchvoicing p
endphoneme


phoneme d
vcd alv stop
vowelin f1=0 f2=1700 -300 300 f3=-100 80
vowelout f1=0 f2=1700 -300 300 f3=-100 80
formants d/d%30+x/d%30
before _ d/d_%30+x/d_%30
before r d/dr%60+x/d%60
after _ NULL
after @ d/xd%40
lengthmod 5
switchvoicing t
endphoneme


phoneme g
vcd vel stop
vowelin f1=2 f2=2300 200 300 f3=-300 80
vowelout f1=2 f2=2300 250 300 f3=-300 80 brk
formants g/g%30+x/g2%30
before _ g/g_+x/g_
after _ NULL
after @ g/xg%30
lengthmod 5
switchvoicing k
endphoneme


phoneme k
vls vel stop
vowelin f1=0 f2=2300 200 400 f3=-100 80
vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20
lengthmod 2
wave ustop/k%45 // reduce strength of noise burst
before _ ustop/k_%45
before r ustop/kr%45
before l ustop/kl%45
before (i) ustop/ki%45
switchvoicing g
endphoneme


phoneme l phoneme l
liquid liquid
length 100 length 100
lengthmod 7 lengthmod 7
// beforenotvowel l/ // beforenotvowel l/
formants l/l formants l/l
// after _ l/_l
// after t l/tl
after _ l/_l
after t l/tl
after l/ l/l_long // double l, make it longer after l/ l/l_long // double l, make it longer
before (a) l/la before (a) l/la
before (e) l/le before (e) l/le
endphoneme endphoneme




phoneme p
vls blb stop
vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11
vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22
lengthmod 2
wave ustop/p%45
before _ ustop/p_%45
before r ustop/pr%45
before R ustop/pr%45
before @- ustop/p_unasp%45
before l ustop/pl%45
switchvoicing b
endphoneme


phoneme r phoneme r
vcd uvl frc vcd uvl frc
vowelin f1=0 f2=800 -100 100 f3=-400 100 vowelin f1=0 f2=800 -100 100 f3=-400 100
vowelout f1=0 f2=800 -100 100 f3=-400 100 len=0 rms=20
length 100 length 100
lengthmod 7 lengthmod 7
beforenotvowel r/ beforenotvowel r/
formants vwl_fr/@R%40
after t r/tr
before _ r3/r_
formants vwl_fr/@R%60
after t r/tr%60
before _ r3/r_%60
endphoneme endphoneme




length 100 length 100
lengthmod 7 lengthmod 7
beforenotvowel r/ beforenotvowel r/
formants vwl_fr/@R%40
after r r/rr
formants vwl_fr/@R%60
after r r/rr%60
endphoneme endphoneme




vcd uvl frc vcd uvl frc
length 100 length 100
lengthmod 2 // lengthmod 2 //
formants r3/r_+r3/rx
before n r3/r_n+r3/rx
formants r3/r_+r3/rx%60
before n r3/r_n+r3/rx%60
endphoneme


phoneme s
vls alv frc sibilant
vowelin f1=0 f2=1700 -300 300 f3=-100 80
vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
lengthmod 3
wave ufric/s%45
before _ ufric/s_%45
before p ufric/s!%45
before t ufric/s!%45
before k ufric/s!%45
switchvoicing z
endphoneme


phoneme S
vls pla frc sibilant
vowelin f1=0 f2=2100 100 300 f3=-100 80
vowelout f1=0 f2=2100 100 300 f3=-100 80
length 100
lengthmod 3
wave ufric/sh%45
before _ ufric/sh_%45
switchvoicing Z
endphoneme endphoneme




vowelin f1=0 f2=1700 -100 100 f3=-100 80 vowelin f1=0 f2=1700 -100 100 f3=-100 80
vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
lengthmod 2 lengthmod 2
wave ustop/t%50
before _ ustop/t_%40
before @- ustop/t%50
// before r ustop/tr
// before R ustop/tr
wave ustop/t%30
before _ ustop/t_%30
before @- ustop/t%30
before r ustop/tr%30
before R ustop/tr%30
switchvoicing d switchvoicing d
endphoneme endphoneme


vowelin f1=0 f2=1600 -300 300 f3=-100 80 vowelin f1=0 f2=1600 -300 300 f3=-100 80
vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20
lengthmod 2 lengthmod 2
wave ustop/t
before _ ustop/t_
wave ustop/t%45
before _ ustop/t_%45
endphoneme


phoneme v
vcd lbd frc
vowelin f1=0 f2=1000 -300 -200 f3=-300 100
vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=10
lengthmod 6
formants voc/v+vocw/v%75
before (r) voc/vj+vocw/v%75
before _ voc/v_+vocw/v%75
switchvoicing f
endphoneme


phoneme z
vcd alv frc sibilant
vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50
formants voc/z+ufric/s_%45
before _ voc/z_+ufric/s_%45
lengthmod 6
switchvoicing s
endphoneme endphoneme




beforenotvowel NULL beforenotvowel NULL
vcd alv frc sibilant vcd alv frc sibilant
vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50
formants voc/z+ufric/s_
before _ voc/z_+ufric/s_
formants voc/z+ufric/s_%45
before _ voc/z_+ufric/s_%45
lengthmod 6 lengthmod 6
endphoneme endphoneme


beforenotvowel NULL beforenotvowel NULL
vcd alv frc sibilant vcd alv frc sibilant
vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50
formants voc/z+ufric/s_
before _ voc/z_+ufric/s_
lengthmod 6
endphoneme



phoneme k
vls vel stop
vowelin f1=0 f2=2300 200 400 f3=-100 80
vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20
lengthmod 2
wave ustop/k%60 // reduce strength of noise burst
before _ ustop/k_
before r ustop/kr
before l ustop/kl
before (i) ustop/ki
switchvoicing g
endphoneme


phoneme v
vcd lbd frc
vowelin f1=0 f2=1000 -300 -200 f3=-300 100
vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50
formants voc/z+ufric/s_%45
before _ voc/z_+ufric/s_%45
lengthmod 6 lengthmod 6
formants voc/v+vocw/v
before _ voc/v_+vocw/v
switchvoicing f
endphoneme


phoneme p
vls blb stop
vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11
vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22
lengthmod 2
wave ustop/p
before _ ustop/p_
before r ustop/pr%70
before R ustop/pr
before @- ustop/p_unasp
before l ustop/pl
switchvoicing b
endphoneme


phoneme b
vcd blb stop
vowelout f1=0 f2=1000 -500 -300 f3=-300 80 brk
formants b/b+x/b
before _ b/b_+x/b
before (a) b/ba+x/b
before (@) b/b@+x/b
before (e) b/be+x/b
before (i) b/bi+x/b
before (o) b/bo+x/b
before (u) b/bu+x/b
before @- b/b@2+x/b
after _ NULL
after @ b/xb
lengthmod 5
switchvoicing p
endphoneme endphoneme



+ 4
- 4
phsource/ph_zh View File



phoneme 11 // tone: low level phoneme 11 // tone: low level
stress stress
tone 15 10 envelope/p_fall NULL
tone 12 9 envelope/p_fall NULL
endphoneme endphoneme


phoneme 21 // tone: low fall phoneme 21 // tone: low fall


phoneme 22 // tone: mid-low level phoneme 22 // tone: mid-low level
stress stress
tone 21 19 envelope/p_fall NULL
tone 22 20 envelope/p_fall NULL
endphoneme endphoneme


phoneme 33 // tone: mid level phoneme 33 // tone: mid level
stress stress
tone 31 29 envelope/p_fall NULL
tone 32 30 envelope/p_fall NULL
endphoneme endphoneme


phoneme 35 // tone: mid rise phoneme 35 // tone: mid rise


phoneme 44 // tone: mid-high level phoneme 44 // tone: mid-high level
stress stress
tone 41 39 envelope/p_level NULL
tone 38 41 envelope/p_rise NULL
endphoneme endphoneme


phoneme 51 // tone: high fall phoneme 51 // tone: high fall

+ 6
- 4
phsource/phonemes View File



phoneme ** // TEST flap after consonant phoneme ** // TEST flap after consonant
liquid alv liquid alv
vowelout f1=3 f2=1700 -300 300 f3=-300 80 rms=35 len=15
vowelin f1=0 f2=1700 -300 300 f3=-300 80
vowelout f1=3 f2=1600 -300 300 f3=-300 80 rms=35 len=15
vowelin f1=0 f2=1600 -300 300 f3=-300 80
formants r3/@tap+r3/rx formants r3/@tap+r3/rx
vowelin f1=0 f2=1700 -300 300 f3=-400 80
vowelin f1=3 f2=1600 -300 300 f3=-300 80
before (i) r3/@tap_i+r3/rx before (i) r3/@tap_i+r3/rx
before (e) r3/@tap_i+r3/rx before (e) r3/@tap_i+r3/rx
vowelin f1=2 f2=1700 -300 300 f3=-300 80
vowelin f1=2 f2=1600 -300 300 f3=-300 80
before (a) r3/@tap+r3/rx before (a) r3/@tap+r3/rx
endphoneme endphoneme


phonemetable id base2 phonemetable id base2
include ph_indonesian include ph_indonesian


phonemetable ja base
include ph_japanese

BIN
phsource/r3/@tap View File


BIN
phsource/r3/@tap_i View File


BIN
phsource/vdiph/8u View File


BIN
phsource/vdiph/aoo View File


BIN
phsource/vdiph/ooi_4 View File


BIN
phsource/vdiph2/ei_4 View File


BIN
phsource/vowel/V_6 View File


BIN
phsource/vowel/aa_4 View File


BIN
phsource/vowel/ee View File


BIN
phsource/vowel/i#_5 View File


BIN
phsource/vowel/u#_3 View File


BIN
phsource/vowel/u#_5 View File


BIN
phsource/vowel/u_bck View File


BIN
phsource/vowel/u_unr View File


BIN
phsource/vowel/vowelchart.png View File


BIN
phsource/vwl_en_us/a View File


BIN
phsource/vwl_en_us/ir View File


BIN
phsource/vwl_en_us/or View File


+ 1
- 1
src/dictionary.cpp View File

length = pw[1]; length = pw[1];
if(size <= (N_HASH_DICT + sizeof(int)*2)) if(size <= (N_HASH_DICT + sizeof(int)*2))
{ {
fprintf(stderr,"Empty dictionary: '%s\n",fname);
fprintf(stderr,"Empty _dict file: '%s\n",fname);
return(2); return(2);
} }
if((pw[0] != N_HASH_DICT) || (length <= 0) || (length > 0x8000000)) if((pw[0] != N_HASH_DICT) || (length <= 0) || (length > 0x8000000))

+ 21
- 13
src/intonation.cpp View File



static short oflow[] = {0, 20, 12, 4, 0}; static short oflow[] = {0, 20, 12, 4, 0};
static short oflow_emf[] = {5, 24, 15, 10, 5}; static short oflow_emf[] = {5, 24, 15, 10, 5};
static short oflow_less[] = {1, 17, 10, 5, 1};
static short oflow_less[] = {3, 19, 12, 7, 2};
static short oflow_test2[] = {20, 0, 20, 0, 20};
static short back_emf[] = {35, 32, 0}; static short back_emf[] = {35, 32, 0};


typedef struct { typedef struct {
unsigned char tail_shape; unsigned char tail_shape;
} TONE_TABLE; } TONE_TABLE;


#define N_TONE_TABLE 11
#define N_TONE_TABLE 13


static TONE_TABLE tone_table[N_TONE_TABLE] = { static TONE_TABLE tone_table[N_TONE_TABLE] = {
{PITCHfall, 30, 5, PITCHfall, 30, 8, // 0 statement {PITCHfall, 30, 5, PITCHfall, 30, 8, // 0 statement
20, 25, 34, 22, drops_0, 3, 3, 5, oflow, NULL, 15, 5, 0}, 20, 25, 34, 22, drops_0, 3, 3, 5, oflow, NULL, 15, 5, 0},




{PITCHfall, 28, 6, PITCHfall, 28, 10, // 5 statement, less intonation
20, 25, 30, 22, drops_0, 4, 3, 5, oflow_less, NULL, 12, 6, 0},
{PITCHfall, 28, 5, PITCHfall, 28, 9, // 5 statement, less intonation
20, 25, 32, 24, drops_0, 4, 3, 5, oflow_less, NULL, 12, 7, 0},


{PITCHfrise2, 33,11, PITCHfall, 28,10, // 6 comma, less intonation
20, 25, 30, 22, drops_0, 4, 3, 5, oflow_less, NULL, 9,14, 0},
{PITCHfrise2, 32,8, PITCHfrise2, 28,9, // 6 comma, less intonation
20, 25, 32, 24, drops_0, 4, 3, 5, oflow_less, NULL, 10,16, 0},


{PITCHfrise2, 28, 7, PITCHfall, 28, 12, // 7 comma, less intonation, less rise
20, 25, 30, 22, drops_0, 4, 3, 5, oflow_less, NULL, 14, 8, 0},
{PITCHfrise2, 28, 7, PITCHfall, 29, 14, // 7 comma, less intonation, less rise
20, 25, 32, 24, drops_0, 4, 3, 5, oflow_less, NULL, 14, 8, 0},


{PITCHrise, 30, 20, PITCHfall, 19, 14, // 8 pitch raises at end of sentence {PITCHrise, 30, 20, PITCHfall, 19, 14, // 8 pitch raises at end of sentence
20, 25, 34, 22, drops_0, 3, 3, 5, oflow, NULL, 24, 30, 0}, 20, 25, 34, 22, drops_0, 3, 3, 5, oflow, NULL, 24, 30, 0},
{PITCHfrise, 39, 15, PITCHfall, 28, 14, // 10 question {PITCHfrise, 39, 15, PITCHfall, 28, 14, // 10 question
20, 25, 34, 22, drops_0, 3, 3, 5, oflow, NULL, 20, 36, 0}, 20, 25, 34, 22, drops_0, 3, 3, 5, oflow, NULL, 20, 36, 0},


{PITCHfall, 28, 6, PITCHfall, 28, 10, // 11 test
20, 25, 24, 22, drops_0, 3, 3, 5, oflow_less, NULL, 12, 6, 0},

{PITCHfall, 35, 9, PITCHfall, 35, 12, // 12 test
19, 26, 36, 20, drops_0, 2, 4, 5, oflow_test2, NULL, 16, 10, 0},

}; };


{5,7,1,0,0,4}, {5,7,1,0,0,4},
{8,9,10,3,0,0}, {8,9,10,3,0,0},
{8,8,10,3,0,0}, {8,8,10,3,0,0},
{0,1,2,3,0,4},
{0,1,2,3,0,0} };
{11,11,11,11,0,0}, // 6 test
{12,12,12,12,0,0}
};






PHONEME_TAB *prev2_tph; // 2 tones previous PHONEME_TAB *prev2_tph; // 2 tones previous
PHONEME_LIST *prev_p; PHONEME_LIST *prev_p;


int pitch_adjust = 10; // pitch gradient through the clause - inital value
int pitch_adjust = 0; // pitch gradient through the clause - inital value
int pitch_decrement = 0; // decrease by this for each stressed syllable int pitch_decrement = 0; // decrease by this for each stressed syllable
int pitch_low = 10; // until it drops to this
int pitch_high = 10; // then reset to this
int pitch_low = 0; // until it drops to this
int pitch_high = 0; // then reset to this


p = &phoneme_list[0]; p = &phoneme_list[0];



+ 6
- 2
src/readclause.cpp View File

c2 = GetC(); c2 = GetC();
} }


while(!Eof())
while(!Eof() || (ungot_char != 0))
{ {
if(!iswalnum(c1)) if(!iswalnum(c1))
{ {


if((option_ssml) && (phoneme_mode==0)) if((option_ssml) && (phoneme_mode==0))
{ {
if((c1 == '&') && ((c2=='#') || isalpha(c2)))
if((c1 == '&') && ((c2=='#') || ((c2 >= 'a') && (c2 <= 'z'))))
{ {
n_xml_buf = 0; n_xml_buf = 0;
c1 = c2; c1 = c2;
{ {
c1 = j; c1 = j;
} }
else
{
c1 = '&';
}
} }
if((sayas_mode == 0x14) && (c1 <= 0x20)) if((sayas_mode == 0x14) && (c1 <= 0x20))
{ {

+ 119
- 12
src/speak_riscos.cpp View File

int sample_rate_index; // current value int sample_rate_index; // current value
int current_voice_num=0; int current_voice_num=0;
int n_voice_files = 0; int n_voice_files = 0;
int n_voice_variant_files = 0;


// output sound buffer, 2 bytes per sample // output sound buffer, 2 bytes per sample
static unsigned short SoundBuf[4096]; static unsigned short SoundBuf[4096];
static int more_text=0; static int more_text=0;


#define N_VOICE_NAMES 60 #define N_VOICE_NAMES 60
static char *voice_names[40];
#define N_VOICE_VARIANT_NAMES 30
static char *voice_names[N_VOICE_NAMES];
static char *voice_variant_names[N_VOICE_VARIANT_NAMES];


#define N_STATIC_BUF 8000 #define N_STATIC_BUF 8000
static char static_buf[N_STATIC_BUF]; static char static_buf[N_STATIC_BUF];
"--punct=\"<characters>\"\n" "--punct=\"<characters>\"\n"
"\t Speak the names of punctuation characters during speaking. If\n" "\t Speak the names of punctuation characters during speaking. If\n"
"\t =<characters> is omitted, all punctuation is spoken.\n" "\t =<characters> is omitted, all punctuation is spoken.\n"
//"--voices=<langauge>\n"
//"\t List the available voices for the specified language.\n"
//"\t If <language> is omitted, then list all voices.\n"
"--voices=<langauge>\n"
"\t List the available voices for the specified language.\n"
"\t If <language> is omitted, then list all voices.\n"
"-k <integer>\n" "-k <integer>\n"
"\t Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n" "\t Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n"
"\t higher values = a pitch increase (try -k20).\n"; "\t higher values = a pitch increase (try -k20).\n";
void ReadVoiceNames2(char *directory) void ReadVoiceNames2(char *directory)
{//================================== {//==================================
int len; int len;
int path_len;
int *type; int *type;
char *p; char *p;
_kernel_swi_regs regs; _kernel_swi_regs regs;
regs.r[5] = sizeof(buf); regs.r[5] = sizeof(buf);
regs.r[6] = 0; regs.r[6] = 0;


path_len = strlen(directory);

while(regs.r[3] > 0) while(regs.r[3] > 0)
{ {
error = _kernel_swi(0x0c+os_X,&regs,&regs); /* OS_GBPB 10, read directory entries */ error = _kernel_swi(0x0c+os_X,&regs,&regs); /* OS_GBPB 10, read directory entries */
} }
else else
{ {
p = Alloc(len+1);
p = (char *)malloc(len+1);
strcpy(p,&buf[20]); strcpy(p,&buf[20]);
voice_names[n_voice_files++] = p;
if(n_voice_files >= (N_VOICE_NAMES-1))
break;

if(strcmp(&directory[path_len-3],".!v")==0)
{
if(n_voice_variant_files >= (N_VOICE_VARIANT_NAMES-1))
continue;
voice_variant_names[n_voice_variant_files++] = p;
}
else
{
if(n_voice_files >= (N_VOICE_NAMES-1))
continue;
voice_names[n_voice_files++] = p;
if(strcmp(p,"en")==0)
{
voice_names[n_voice_files++] = "en+f2";
}
}
} }
} }
} }
{//=================== {//===================
char directory[sizeof(path_home)+10]; char directory[sizeof(path_home)+10];


for(n_voice_files=0; n_voice_files<N_VOICE_NAMES; n_voice_files++)
voice_names[n_voice_files] = NULL;

n_voice_files = 0; n_voice_files = 0;
n_voice_variant_files = 0;

sprintf(directory,"%s.voices",path_home); sprintf(directory,"%s.voices",path_home);


ReadVoiceNames2(directory); ReadVoiceNames2(directory);

voice_names[n_voice_files] = NULL;
voice_variant_names[n_voice_variant_files] = NULL;
} }




void jsd_swi_functions(int *r) void jsd_swi_functions(int *r)
/****************************/ /****************************/
{ {
espeak_VOICE voice_select;

switch(r[0]) switch(r[0])
{ {
case 0: /* major version */ case 0: /* major version */
r[0] = 3;
r[0] = 4;
r[1] = 331;
break; break;


case 1: /* register user */ case 1: /* register user */


case 5: /* get table of voice names */ case 5: /* get table of voice names */
r[0] = (int)voice_names; r[0] = (int)voice_names;
r[1] = (int)voice_variant_names;
break; break;


case 6: /* update voice data, r1 = voice_number */ case 6: /* update voice data, r1 = voice_number */
// init_voice((char *)r[1]); // init_voice((char *)r[1]);
break; break;


case 8:
// list voices, r[1] contains optional language name (or "variant")
voice_select.languages = (char *)r[1];
voice_select.age = 0;
voice_select.gender = 0;
voice_select.name = NULL;
r[0] = (int)espeak_ListVoices(&voice_select);
break;

default: default:
r[0] = 0; r[0] = 0;
r[1] = 0; r[1] = 0;






void DisplayVoices(FILE *f_out, char *language)
{//============================================
int ix;
const char *p;
int len;
int count;
int scores = 0;
const espeak_VOICE *v;
const char *lang_name;
char age_buf[12];
const espeak_VOICE **voices;
espeak_VOICE voice_select;

static char genders[4] = {' ','M','F',' '};

if(language[0] == '=')
{
// display only voices for the specified language, in order of priority
voice_select.languages = &language[1];
voice_select.age = 0;
voice_select.gender = 0;
voice_select.name = NULL;
voices = espeak_ListVoices(&voice_select);
scores = 1;
}
else
{
voices = espeak_ListVoices(NULL);
}

fprintf(f_out,"Pty Language Age/Gender VoiceName File Other Langs\n");

for(ix=0; (v = voices[ix]) != NULL; ix++)
{
count = 0;
p = v->languages;
while(*p != 0)
{
len = strlen(p+1);
lang_name = p+1;

if(v->age == 0)
strcpy(age_buf," ");
else
sprintf(age_buf,"%3d",v->age);

if(count==0)
{
fprintf(f_out,"%2d %-12s%s%c %-17s %-11s ",
p[0],lang_name,age_buf,genders[v->gender],v->name,v->identifier);
}
else
{
fprintf(f_out,"(%s %d)",lang_name,p[0]);
}
count++;
p += len+2;
}
// if(scores)
// fprintf(f_out,"%3d ",v->score);
fputc('\n',f_out);
}
} // end of DisplayVoices



char *param_string(char **argp) char *param_string(char **argp)
{//============================ {//============================
char *p; char *p;
return; return;
} }
else else
if(memcmp(command,"voices",6)==0)
{
DisplayVoices(stdout,&command[6]);
return;
}
else
if(strcmp(command,"help")==0) if(strcmp(command,"help")==0)
{ {
printf("\nspeak text-to-speech: %s\n%s",version_string,help_text); printf("\nspeak text-to-speech: %s\n%s",version_string,help_text);

+ 1
- 1
src/synthdata.cpp View File

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


const char *version_string = "1.31.01 23.Jan.08";
const char *version_string = "1.31.03 26.Jan.08";
const int version_phdata = 0x013100; const int version_phdata = 0x013100;


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

+ 6
- 1
src/tr_languages.cpp View File

case L('f','r'): // french case L('f','r'): // french
{ {
static const short stress_lengths_fr[8] = {190, 170, 190, 200, 0, 0, 235, 235}; static const short stress_lengths_fr[8] = {190, 170, 190, 200, 0, 0, 235, 235};
static const unsigned char stress_amps_fr[8] = {16,14, 20,20, 20,24, 24,22 };
static const unsigned char stress_amps_fr[8] = {18,16, 20,20, 20,22, 22,22 };


tr = new Translator(); tr = new Translator();
SetupTranslator(tr,stress_lengths_fr,stress_amps_fr); SetupTranslator(tr,stress_lengths_fr,stress_amps_fr);
} }
break; break;


case L('j','a'): // TEST
tr = new Translator();
tr->langopts.param[LOPT_UNPRONOUNCABLE] = 1; // disable check for unpronouncable words
break;

case L_jbo: // Lojban case L_jbo: // Lojban
{ {
static const short stress_lengths_jbo[8] = {185,170, 200,200, 0,0, 290,300}; static const short stress_lengths_jbo[8] = {185,170, 200,200, 0,0, 290,300};

+ 2
- 0
src/voice.h View File

int peak_shape; // alternative shape for formant peaks (0=standard 1=squarer) int peak_shape; // alternative shape for formant peaks (0=standard 1=squarer)
int voicing; // 100% = 64, level of formant-synthesized sound int voicing; // 100% = 64, level of formant-synthesized sound
int formant_factor; // adjust nominal formant frequencies by this because of the voice's pitch (256ths) int formant_factor; // adjust nominal formant frequencies by this because of the voice's pitch (256ths)
int consonant_amp; // amplitude of unvoiced consonants
int consonant_ampv; // amplitude of the noise component of voiced consonants


// parameters used by Wavegen // parameters used by Wavegen
short freq[N_PEAKS]; // 100% = 256 short freq[N_PEAKS]; // 100% = 256

+ 65
- 5
src/voices.cpp View File

#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS
#include "windows.h" #include "windows.h"
#else #else
#ifndef PLATFORM_RISCOS
#ifdef PLATFORM_RISCOS
#include "kernel.h"
#else
#include "dirent.h" #include "dirent.h"
#endif #endif
#endif #endif


// these need a phoneme table to have been specified // these need a phoneme table to have been specified
#define V_REPLACE 28 #define V_REPLACE 28
#define V_CONSONANTS 29




typedef struct { typedef struct {
{"numbers", V_NUMBERS}, {"numbers", V_NUMBERS},
{"option", V_OPTION}, {"option", V_OPTION},
{"mbrola", V_MBROLA}, {"mbrola", V_MBROLA},
{"consonants", V_CONSONANTS},


// these just set a value in langopts.param[] // these just set a value in langopts.param[]
{"l_dieresis", 0x100+LOPT_DIERESES}, {"l_dieresis", 0x100+LOPT_DIERESES},
voice->n_harmonic_peaks = 5; voice->n_harmonic_peaks = 5;
voice->peak_shape = 1; voice->peak_shape = 1;
voice->voicing = 64; voice->voicing = 64;
voice->consonant_amp = 100;
voice->consonant_ampv = 100;

#ifdef PLATFORM_RISCOS #ifdef PLATFORM_RISCOS
voice->roughness = 1; voice->roughness = 1;
#else #else
voice->breathw[0] = Read8Numbers(p,&voice->breathw[1]); voice->breathw[0] = Read8Numbers(p,&voice->breathw[1]);
break; break;


case V_CONSONANTS:
value = sscanf(p,"%d %d",&voice->consonant_amp, &voice->consonant_ampv);
break;

case V_MBROLA: case V_MBROLA:
{ {
int srate = 16000; int srate = 16000;


char *p; char *p;
static char variant_name[20]; static char variant_name[20];
char variant_prefix[5];


variant_name[0] = 0; variant_name[0] = 0;
sprintf(variant_prefix,"!v%c",PATHSEP);


if(vname != NULL) if(vname != NULL)
{ {
else else
{ {
// voice variant name, not number // voice variant name, not number
strcpy(variant_name,"!v/");
strcpy(variant_name,variant_prefix);
strncpy0(&variant_name[3],p,sizeof(variant_name)-3); strncpy0(&variant_name[3],p,sizeof(variant_name)-3);
} }
} }
if(variant_num > 0) if(variant_num > 0)
{ {
if(variant_num < 10) if(variant_num < 10)
sprintf(variant_name,"!v/m%d",variant_num); // male
sprintf(variant_name,"%sm%d",variant_prefix, variant_num); // male
else else
sprintf(variant_name,"!v/f%d",variant_num-10); // female
sprintf(variant_name,"%sf%d",variant_prefix, variant_num-10); // female
} }


return(variant_name); return(variant_name);
char fname[sizeof(path_home)+100]; char fname[sizeof(path_home)+100];


#ifdef PLATFORM_RISCOS #ifdef PLATFORM_RISCOS
int len;
int *type;
char *p;
_kernel_swi_regs regs;
_kernel_oserror *error;
char buf[80];
char directory2[sizeof(path_home)+100];

regs.r[0] = 10;
regs.r[1] = (int)path;
regs.r[2] = (int)buf;
regs.r[3] = 1;
regs.r[4] = 0;
regs.r[5] = sizeof(buf);
regs.r[6] = 0;

while(regs.r[3] > 0)
{
error = _kernel_swi(0x0c+0x20000,&regs,&regs); /* OS_GBPB 10, read directory entries */
if((error != NULL) || (regs.r[3] == 0))
{
break;
}
type = (int *)(&buf[16]);
len = strlen(&buf[20]);
sprintf(fname,"%s.%s",path,&buf[20]);

if(*type == 2)
{
// a sub-directory
GetVoices(fname);
}
else
{
// a regular line, add it to the voices list
if((f_voice = fopen(fname,"r")) == NULL)
continue;
// pass voice file name within the voices directory
voice_data = ReadVoiceFile(f_voice, fname+len_path_voices, &buf[20]);
fclose(f_voice);

if(voice_data != NULL)
{
voices_list[n_voices_list++] = voice_data;
}
}
}
#else #else
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS
WIN32_FIND_DATA FindFileData; WIN32_FIND_DATA FindFileData;

+ 18
- 10
src/wavegen.cpp View File

for(ix=0; ix<N_EMBEDDED_VALUES; ix++) for(ix=0; ix<N_EMBEDDED_VALUES; ix++)
embedded_value[ix] = embedded_default[ix]; embedded_value[ix] = embedded_default[ix];


if(rate <= 11000)
{
// adjust some parameters for telephony with low sample rates
consonant_amp = 50;
option_harmonic1 = 6;
}


// set up window to generate a spread of harmonics from a // set up window to generate a spread of harmonics from a
// single peak for HF peaks // single peak for HF peaks
} // end of AdvanceParameters } // end of AdvanceParameters




#ifndef PLATFORM_RISCOS
static double resonator(RESONATOR *r, double input) static double resonator(RESONATOR *r, double input)
{//================================================ {//================================================
double x; double x;
// a = 1.0 - b - c // a = 1.0 - b - c
rp->a = 1.0 - rp->b - rp->c; rp->a = 1.0 - rp->b - rp->c;
} // end if setresonator } // end if setresonator
#endif




void InitBreath(void) void InitBreath(void)
{//================== {//==================
#ifndef PLATFORM_RISCOS
int ix; int ix;


minus_pi_t = -PI / samplerate; minus_pi_t = -PI / samplerate;
{ {
setresonator(&rbreath[ix],2000,200,1); setresonator(&rbreath[ix],2000,200,1);
} }
#endif
} // end of InitBreath } // end of InitBreath






void SetBreath() void SetBreath()
{//============= {//=============
#ifndef PLATFORM_RISCOS
int pk; int pk;


if(wvoice->breath[0] == 0) if(wvoice->breath[0] == 0)
setresonator(&rbreath[pk], peaks[pk].freq >> 16, wvoice->breathw[pk],0); setresonator(&rbreath[pk], peaks[pk].freq >> 16, wvoice->breathw[pk],0);
} }
} }
#endif
} // end of SetBreath } // end of SetBreath




int ApplyBreath(void) int ApplyBreath(void)
{//================== {//==================
int value = 0;
#ifndef PLATFORM_RISCOS
int noise; int noise;
int ix; int ix;
int amp; int amp;
int value = 0;


// use two random numbers, for alternate formants // use two random numbers, for alternate formants
noise = (rand() & 0x3fff) - 0x2000; noise = (rand() & 0x3fff) - 0x2000;
value += int(resonator(&rbreath[ix],noise) * amp); value += int(resonator(&rbreath[ix],noise) * amp);
} }
} }
#endif
return (value); return (value);
} }


total = (total >> 6) * voicing; total = (total >> 6) * voicing;
} }


#ifndef PLATFORM_RISCOS
if(wvoice->breath[0]) if(wvoice->breath[0])
{ {
total += ApplyBreath(); total += ApplyBreath();
} }
#endif


// mix with sampled wave if required // mix with sampled wave if required
z2 = 0; z2 = 0;
else else
pk_shape = pk_shape2; pk_shape = pk_shape2;


consonant_amp = (v->consonant_amp * 26) /100;
if(samplerate <= 11000)
{
consonant_amp = consonant_amp*2; // emphasize consonants at low sample rates
option_harmonic1 = 6;
}
WavegenSetEcho(); WavegenSetEcho();
} }


amp_inc = (256 * ENV_LEN * STEPSIZE)/length; amp_inc = (256 * ENV_LEN * STEPSIZE)/length;


amplitude = (value * general_amplitude)/16; amplitude = (value * general_amplitude)/16;
amplitude_v = amplitude * 15; // for wave mixed with voiced sounds
amplitude_v = (amplitude * wvoice->consonant_ampv * 15)/100; // for wave mixed with voiced sounds


amplitude_env = amp_env; amplitude_env = amp_env;
} }

Loading…
Cancel
Save