Browse Source

[1.27.09] Fix for --punct option when used with <say-as>.

lang=hu, shorten "ll". Test: remove differences in vowel lengths depending on the following phoneme.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@64 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 18 years ago
parent
commit
0def252307

+ 142
- 139
dictsource/cs_list View File

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


// Letters // Letters
_a a:
á dl'oUhe:,a:
b be:
c tse:
č tSe:
ch xa:
d de:
ď Je:
e e:
é dl'oUhe:,e:
ě ije
f ef
g ge:
h ha:
_i i:
í dl'oUhe:,i:
j je:
_k ka:
l el
ľ el^
ĺ dl'oUhe:,el
m em
n en
ň en^
_o o:
ó dl'oUhe:,o:
ô uo:
p pe:
q kve:
r eR
ř eR^
_s es
š eS
t te:
ť ce:
u u:
ú dl'oUhe:,u:
ů 'u:s_kR'oUZkem
_v ve:
w dv'ojve:
x iks
y ipsilon
ý dl'oUe:,ipsilon
_z zet
ž Zet

: dv'ojtetSka
% pRotsento
+ plus
€ eURo
@ zavina:tS
& ampr-sent
# gR^i:Zek
/ lomeno
\\ beksleS
! vigR^itSn^i:k
° stupen^
× kRa:t
÷ Jeleno
§ paRagRaf
~ tilda
^ zdR^i:Ska
© k'opiRajt

_$ dola:R
_' apostRof
_" uvozovki
_, tSa:Rka
_- mi:nus
_; zdR^edn^i:k
_= Rovno
_* hvjezJitSka
_? otazn^i:k
__ pottr-Zen^i:
_` 'obRa:ts,ena:||tS'a:Rka
_( za:voRka
_) za:vorkazavR^i:t
_[ hR'anata:||z'a:voRka
_] hR'anata:||z'avR^i:t
_{ sl'oZena:||z'a:voRka
_} sl'oZena:||z'avR^i:t
_< menSi:
_> vjetSi:
_| sv'isla:||tS'a:Ra
_?? simbol
_?A znak
_a a:
á dl'oUhe:,a:
b be:
c tse:
č tSe:
ch xa:
d de:
ď Je:
e e:
é dl'oUhe:,e:
ě ije
f ef
g ge:
h ha:
_i i:
í dl'oUhe:,i:
j je:
_k ka:
l el
ľ el^
ĺ dl'oUhe:,el
m em
n en
ň en^
_o o:
ó dl'oUhe:,o:
ô uo:
p pe:
q kve:
r eR
ř eR^
_s es
š eS
t te:
ť ce:
u u:
ú dl'oUhe:,u:
ů 'u:s_kR'oUZkem
_v ve:
w dv'ojve:
x iks
y ipsilon
ý dl'oUe:,ipsilon
_z zet
ž Zet

: dv'ojtetSka
% pRotsento
+ plus
€ eURo
@ zavina:tS
& ampr-sent
# gR^i:Zek
/ lomeno
\\ beksleS
! vigR^itSn^i:k
° stupen^
× kRa:t
÷ Jeleno
§ paRagRaf
~ tilda
^ zdR^i:Ska
© k'opiRajt

_#9 t'ap
_#32 m'ezeRa // space

_$ dola:R
_' apostRof
_" uvozovki
_, tSa:Rka
_- mi:nus
_; zdR^edn^i:k
_= Rovno
_* hvjezJitSka
_? otazn^i:k
__ pottr-Zen^i:
_` 'obRa:ts,ena:||tS'a:Rka
_( za:voRka
_) za:vorkazavR^i:t
_[ hR'anata:||z'a:voRka
_] hR'anata:||z'avR^i:t
_{ sl'oZena:||z'a:voRka
_} sl'oZena:||z'avR^i:t
_< menSi:
_> vjetSi:
_| sv'isla:||tS'a:Ra
_?? simbol
_?A znak




// Numbers // Numbers
_0 n'ula
_1 j'eden
_2 dv'a
_2f dvj'e
_3 tR^/i
_4 tSt'iR^i
_5 p'jet
_6 S'est
_7 s'edum
_8 'osum
_9 d'evjet
_10 d'eset
_11 j'edena:tst
_12 dv'ana:tst
_13 tR^/'ina:tst
_14 tSt'r-na:tst
_15 p'atna:tst
_16 S'estna:tst
_17 s'edumna:tst
_18 'osumna:tst
_19 d'evatena:tst
_2X dv'atset
_3X tR^/'itset
_4X tSt'iR^itset
_5X p'adesa:t
_6X S'edesa:t
_7X s'edumdesa:t
_8X 'osumdesa:t
_9X d'evadesa:t
_0C s'et
_1C st'o
_2C dvj'esc'e
_3C tR^/'ist'a
_4C tStiR^ist'a
_1M1 c'isi:ts
_0MA1 c'isi:tse
_0M1 c'isi:ts
_1M2 m'ilio:n
_0MA2 m'ilio:ni
_0M2 m'ilio:nu:
_1M3 m'iliaRda
_0MA3 m'iliaRdi
_0M3 m'iliaRd
_1M4 b'ilio:n
_0MA4 b'ilio:ni
_0M4 b'ilio:nu:
_dpt _:tSa:Rka_
_. tetSka
_0 n'ula
_1 j'eden
_2 dv'a
_2f dvj'e
_3 tR^/i
_4 tSt'iR^i
_5 p'jet
_6 S'est
_7 s'edum
_8 'osum
_9 d'evjet
_10 d'eset
_11 j'edena:tst
_12 dv'ana:tst
_13 tR^/'ina:tst
_14 tSt'r-na:tst
_15 p'atna:tst
_16 S'estna:tst
_17 s'edumna:tst
_18 'osumna:tst
_19 d'evatena:tst
_2X dv'atset
_3X tR^/'itset
_4X tSt'iR^itset
_5X p'adesa:t
_6X S'edesa:t
_7X s'edumdesa:t
_8X 'osumdesa:t
_9X d'evadesa:t
_0C s'et
_1C st'o
_2C dvj'esc'e
_3C tR^/'ist'a
_4C tStiR^ist'a
_1M1 c'isi:ts
_0MA1 c'isi:tse
_0M1 c'isi:ts
_1M2 m'ilio:n
_0MA2 m'ilio:ni
_0M2 m'ilio:nu:
_1M3 m'iliaRda
_0MA3 m'iliaRdi
_0M3 m'iliaRd
_1M4 b'ilio:n
_0MA4 b'ilio:ni
_0M4 b'ilio:nu:
_dpt _:tSa:Rka_
_. tetSka




// Pronouns // Pronouns

+ 3
- 0
dictsource/de_list View File

_^ sI*kUmflEks _^ sI*kUmflEks
_— g@d'ank@nSt@-*,IC _— g@d'ank@nSt@-*,IC


_#9 t,abu:l'Ato:*
_#32 l'e:*ts'aIC@n



// Numbers // Numbers
//======== //========

+ 9
- 9
dictsource/dict_phonemes View File



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




Dictionary hi_dict Dictionary hi_dict
Dictionary ru_dict Dictionary ru_dict


8 @- A a E e E# E2 8 @- A a E e E# E2
E3 i I I# I2 I3 ja ju
o O u u" u# V V# y
Y
E3 i I I# I2 I3 I^ ja
ju o O u u" u# V V#
y Y


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




Dictionary sk_dict Dictionary sk_dict

+ 7
- 1
dictsource/en_list View File

mc m@k mc m@k
oem $abbrev oem $abbrev
ok $abbrev ok $abbrev
otoh $abbrev
os $abbrev os $abbrev
riscos rIskoUEs riscos rIskoUEs
sae $abbrev sae $abbrev
amount a2maUnt amount a2maUnt
amply amplI2 $verbf amply amplI2 $verbf
anal eIn@L anal eIn@L
analogous a2nal@g@s
analog an@l0g analog an@l0g
analogue an@l0g analogue an@l0g
analyses a2nal@si:z analyses a2nal@si:z
definitive dI2fInItIv definitive dI2fInItIv
deity deI@tI2 deity deI@tI2
deja deIZA: $only deja deIZA: $only
deli dElI2
deliberate dI2lIb@r@t deliberate dI2lIb@r@t
delicate dElIk@t delicate dElIk@t
delimit dI2lImIt // delimited delimit dI2lImIt // delimited
demolish dI2m0lIS demolish dI2m0lIS
demon di:m@n demon di:m@n
demo dEmoU demo dEmoU
demonstrative $2
denouement deIn'u:mO~ denouement deIn'u:mO~
denier dI2naI3 denier dI2naI3
deny dI2naI deny dI2naI
fishnet fISnEt fishnet fISnEt
fiord fi:O@d fiord fi:O@d
fix fIks // for fixer fix fIks // for fixer
flagellum fla2dZEl@m
flexible flEksIb@L flexible flEksIb@L
flier flaI3 flier flaI3
flourish flVrI2S flourish flVrI2S
heroe hi@oU heroe hi@oU
heroic hI2roUIk heroic hI2roUIk
heroin hEroUIn heroin hEroUIn
heroism hEroUIz@m
heroine hEroUIn heroine hEroUIn
herpes h3:pi:z herpes h3:pi:z
hideout haIdaUt hideout haIdaUt
reply rI2plaI // for replied reply rI2plaI // for replied
repost r,i:p'oUst repost r,i:p'oUst
reprisal rI2praIz@L reprisal rI2praIz@L
reputable rEpju:t@b@L
reputation rEpju:t'eIS@n reputation rEpju:t'eIS@n
requiem rEkwIEm requiem rEkwIEm
rescue 'rEskju: rescue 'rEskju:
Sarah se@r@ Sarah se@r@
Seamus SeIm@s Seamus SeIm@s
Sean SO:n Sean SO:n
Sebastian $2
Sheila Si:l@ Sheila Si:l@
Sonia s0nj@ Sonia s0nj@
Sophie soUfI2 Sophie soUfI2

+ 4928
- 4925
dictsource/en_rules
File diff suppressed because it is too large
View File


+ 1
- 1
dictsource/fr_list View File

fils fis fils fis
haillon _|ajO~ haillon _|ajO~
haricot _|aRiko haricot _|aRiko
haricots _|aRikoz2
imprudent E~pRydA~ imprudent E~pRydA~
juin ZwE~ juin ZwE~
mars maRs mars maRs
vincent vE~sA~ vincent vE~sA~






+ 55
- 54
dictsource/hu_list View File



// Numbers // Numbers


_0 nullA
_1 EJ
_2 kEttY:
_3 ha:R2om
_4 ne:J
_5 Yt
_6 hAt
_7 he:t
_8 n^olts
_9 kilEnts
_10 ti:z
_1X tizEn
_20 hu:s
_2X huson
_3X hAR2mints
_4X nEJvEn
_5X YtvEn
_6X hAtvAn
_7X hEtvEn
_8X n^oltsvAn
_9X kilEntsvEn
_0C sa:z
_1C sa:z
_0M1 EzER2
_1M1 EzER2
_2M1 ke:tEzER2
_0M2 millio:
_1M2 millio:
_2M2 ke:tmillio:
_0M3 millia:R2d
_1M3 millia:R2d
_2M3 ke:tmillia:R2d
_0M4 billio:
_1M4 billio:
_2M4 ke:tbillio:
_dpt ||_vEss2Y:_
_0 nullA
_1 EJ
_2 kEttY:
_3 ha:R2om
_4 ne:J
_5 Yt
_6 hAt
_7 he:t
_8 n^olts
_9 kilEnts
_10 ti:z
_1X tizEn
_20 hu:s
_2X huson
_3X hAR2mints
_4X nEJvEn
_5X YtvEn
_6X hAtvAn
_7X hEtvEn
_8X n^oltsvAn
_9X kilEntsvEn
_0C sa:z
_1C sa:z
_0M1 EzER2
_1M1 EzER2
_2M1 ke:tEzER2
_0M2 millio:
_1M2 millio:
_2M2 ke:tmillio:
_0M3 millia:R2d
_1M3 millia:R2d
_1M3 ke:tmillia:R2d
_0M4 billio:
_1M4 billio:
_2M4 ke:tbillio:
_dpt ||_vEss2Y:_




// Abbreviations // Abbreviations
km kilo:me:tER2 km kilo:me:tER2
mm milime:tER2
mm milime:tER2


a.m An^n^i||m'int $dot a.m An^n^i||m'int $dot
dr doktoR2 $dot dr doktoR2 $dot




// Conjunctions // Conjunctions
és $u $pause $strend2 // and
és $u $strend2 // and
de $u+ $pause // but de $u+ $pause // but
vagy $u+ $pause // or vagy $u+ $pause // or


mert $pause // because
miatt $pause // because
bár $pause // although
habár $pause // although
mert $u $pause // because
miatt $u // because
bár $u $pause // although
habár $u $pause // although


ha $u $pause // if ha $u $pause // if
noha $u $pause // even thought noha $u $pause // even thought
nem $alt2 $strend nem $alt2 $strend
ne $u+ ne $u+


e $u // "-e" question
e $atend // stressed at end of sentence

// Unstressed adverbs prepositions etc. // Unstressed adverbs prepositions etc.
néhány $u+ néhány $u+
is $u // also is $u // also
höz $u höz $u
ig $u // up to ig $u // up to
ik $u // -th ik $u // -th
nak $u // of, him/her
nak $u // of, him/her
nek $u nek $u
nál $u // by nál $u // by
nél $u nél $u
ra $u // onto ra $u // onto
re $u re $u
ról $u // from top of, about ról $u // from top of, about
röl $u
röl $u
ről $u ről $u
szer $u szer $u
szor $u // times szor $u // times
szór $u
szór $u
ször $u ször $u
tól $u // from
töl $u
tól $u // from
töl $u
től $u től $u
val $u // with val $u // with
vel $u vel $u
án $u // on that day án $u // on that day
é $u // his, her
éi $u // his, her multiple
é $u // his, her
éi $u // his, her multiple
én $u én $u
ón $u ón $u
ós $u ós $u


sok $u // many sok $u // many
kevés $u // few kevés $u // few
se $u $pause // neither
sem $u $pause // nor
miatt $u $pause // because
se $u // neither
sem $u // nor




be $u //into be $u //into
c tse: c tse:
d de: d de:
_e E _e E
e $atend // stressed at end of sentence
f Eff f Eff
g ge: g ge:
h ha: h ha:

+ 7
- 0
dictsource/hu_rules View File

szé) ch tS szé) ch tS
_zi) ch (y tS _zi) ch (y tS


c (szín tS

dA) c (sz ts dA) c (sz ts
kilen) c (sz ts kilen) c (sz ts
kvar) c (sz ts kvar) c (sz ts
ly j ly j
lly jj lly jj


A) lj (A lj_|

C) ly (_ li C) ly (_ li
_kéth) ly li _kéth) ly li
szamue) lly lli szamue) lly lli
sz s sz s
ssz ss2 ssz ss2


s (színű S
hel) s (inki z hel) s (inki z
ki) s (ebb SS ki) s (ebb SS
_má) s (szó S
_munká) s S _munká) s S
_o) slo slo: _o) slo slo:
_o) sló slo: _o) sló slo:
má) zc (sz z má) zc (sz z
mé) zc (sz z mé) zc (sz z
nehé) z (sé z nehé) z (sé z
szá) z (sz z
tű) z (sz z tű) z (sz z
ví) z (sz z ví) z (sz z
tor) z (szülött z tor) z (szülött z

+ 1
- 1
dictsource/ru_rules View File



.group м .group м
_) м (_ Em _) м (_ Em
м (ь m;
м (ь m;I^
м (Y m; м (Y m;
м (бь m; м (бь m;
м (бY m; м (бY m;

+ 3
- 2
docs/speak_lib.h View File

* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write see: *
* along with this program; if not, see: *
* <http://www.gnu.org/licenses/>. * * <http://www.gnu.org/licenses/>. *
***************************************************************************/ ***************************************************************************/


sometimes be zero (which does NOT indicate end of synthesis). sometimes be zero (which does NOT indicate end of synthesis).


events: an array of espeak_EVENT items which indicate word and sentence events, and events: an array of espeak_EVENT items which indicate word and sentence events, and
also the occurance if <mark> and <audio> elements within the text.
also the occurance if <mark> and <audio> elements within the text. The list of
events is terminated by an event of type = 0.




Callback returns: 0=continue synthesis, 1=abort synthesis. Callback returns: 0=continue synthesis, 1=abort synthesis.

+ 10
- 10
phsource/compile_report View File

fr 35 118 fr 35 118
fr_ca 11 118 fr_ca 11 118
hi 50 132 hi 50 132
hu 22 112
hu 23 112
nl 26 117 nl 26 117
pl 15 107 pl 15 107
sk 29 125 sk 29 125
hr 19 129 hr 19 129
mk 21 130 mk 21 130
sr 2 129 sr 2 129
ru 36 124
ru 38 126
it 17 117 it 17 117
la 21 114 la 21 114
es 6 114 es 6 114
1 l^/j2u base 1 l^/j2u base
1 l^/_l^ base 1 l^/_l^ base
1 l^/l^ base 1 l^/l^ base
8 l/l base en af sk ru la pt ro
10 l/_l base en af de sk ru la pt ro
9 l/l base en af hu sk ru la pt ro
11 l/_l base en af de hu sk ru la pt ro
1 l/l_ base 1 l/l_ base
2 l/l@ base 2 l/l@ base
1 l/L1_aL base 1 l/L1_aL base
4 l/l_long base fr la ro 4 l/l_long base fr la ro
2 l/lo base 2 l/lo base
2 l/lu base 2 l/lu base
8 l/tl base en af sk ru la pt ro
9 l/tl base en af hu sk ru la pt ro
6 l/xl base 6 l/xl base
2 m/_m base ro
2 m/m_ base ro
3 m/_m base ru ro
3 m/m_ base ru ro
1 m/m@ base 1 m/m@ base
1 m/m#_ is 1 m/m#_ is
1 m/ma base 1 m/ma base
1 m/me base 1 m/me base
1 m/mi base 1 m/mi base
2 m/mj base ro
3 m/mj base ru ro
1 m/mo base 1 m/mo base
1 m/mu base 1 m/mu base
1 n^/_n^ base 1 n^/_n^ base
1 vwl_no/u#2 no 1 vwl_no/u#2 no
1 vwl_no/y# no 1 vwl_no/y# no
1 vwl_no/y#y no 1 vwl_no/y#y no
1 vwl_ro/ii- ro
2 vwl_ro/ii- ru ro
1 vwl_ro/li ro 1 vwl_ro/li ro
1 vwl_ro/mi ro
2 vwl_ro/mi ru ro
1 vwl_ro/ni ro 1 vwl_ro/ni ro
1 vwl_ru/8 ru 1 vwl_ru/8 ru
1 vwl_ru/a ru 1 vwl_ru/a ru

BIN
phsource/l/L1_aL View File


+ 11
- 0
phsource/ph_hungarian View File

switchvoicing z switchvoicing z
endphoneme endphoneme


phoneme l
liquid
length 100
lengthmod 7
beforenotvowel l/
formants l/l
after _ l/_l
after t l/tl
// after l/ l/l_long // double l, make it longer
endphoneme




+ 22
- 0
phsource/ph_russian View File

endphoneme endphoneme




phoneme I^ // "silent i", palatilizes the preceding consonant
vowel starttype (i) endtype (i)
length 70
unstressed nonsyllabic
formants vwl_ro/ii-
beforevowel ;
after m; vwl_ro/mi
endphoneme

phoneme m;
vcd blb nasal
vowelout f1=2 f2=1000 -500 -350 f3=200 80 brk colr=1
starttype m endtype m
length 100
lengthmod 4
formants NULL
after _ m/_m
before _ m/m_
before (r) m/mj
endphoneme




//******************************************************************* //*******************************************************************
// VOWELS // VOWELS

+ 1
- 1
phsource/phonemes View File





phoneme @- // very short schwa phoneme @- // very short schwa
vowel
vowel nonsyllabic
starttype (@) endtype (@) starttype (@) endtype (@)
formants vowel/@- formants vowel/@-
unstressed unstressed

+ 1
- 0
src/compiledata.cpp View File

{"palatal", 0x2000000+phPALATAL}, {"palatal", 0x2000000+phPALATAL},
{"long", 0x2000000+phLONG}, {"long", 0x2000000+phLONG},
{"brkafter", 0x2000000+phBRKAFTER}, {"brkafter", 0x2000000+phBRKAFTER},
{"nonsyllabic",0x2000000+phNONSYLLABIC},


// voiced / unvoiced // voiced / unvoiced
{"vcd", 0x2000000+phVOICED}, {"vcd", 0x2000000+phVOICED},

+ 4
- 4
src/dictionary.cpp View File

continue; continue;
} }


if((ph->type == phVOWEL) && (ph->code != phonSCHWA_SHORT))
if((ph->type == phVOWEL) && !(ph->phflags & phNONSYLLABIC))
{ {
vowel_stress[count] = (char)stress; vowel_stress[count] = (char)stress;
if((stress >= 4) && (stress >= max_stress)) if((stress >= 4) && (stress >= max_stress))
p = phonetic; p = phonetic;
while(*p != 0) while(*p != 0)
{ {
if((phoneme_tab[*p]->type == phVOWEL) && (*p != phonSCHWA_SHORT))
if((phoneme_tab[*p]->type == phVOWEL) && !(phoneme_tab[*p]->phflags & phNONSYLLABIC))
{ {
if(vowel_stress[ix] != 0) if(vowel_stress[ix] != 0)
*word++ = stress_phonemes[vowel_stress[ix]]; *word++ = stress_phonemes[vowel_stress[ix]];
ix = 1; ix = 1;
for(p = phonetic; *p != 0; p++) for(p = phonetic; *p != 0; p++)
{ {
if((phoneme_tab[p[0]]->type == phVOWEL) && (p[0] != phonSCHWA_SHORT))
if((phoneme_tab[p[0]]->type == phVOWEL) && !(phoneme_tab[p[0]]->phflags & phNONSYLLABIC))
{ {
int weight = 0; int weight = 0;
int lengthened = 0; int lengthened = 0;
prev_last_stress = 0; prev_last_stress = 0;
} }
else else
if(((ph->type == phVOWEL) && (ph->code != phonSCHWA_SHORT)) || (*p == phonSYLLABIC))
if(((ph->type == phVOWEL) && !(ph->phflags & phNONSYLLABIC)) || (*p == phonSYLLABIC))
{ {
// a vowel, or a consonant followed by a syllabic consonant marker // a vowel, or a consonant followed by a syllabic consonant marker



+ 3
- 2
src/extras.cpp View File







void DecodePhonemes2(const char *inptr, char *outptr)
static void DecodePhonemes2(const char *inptr, char *outptr)
//=================================================== //===================================================
// Translate from internal phoneme codes into phoneme mnemonics // Translate from internal phoneme codes into phoneme mnemonics
// This version is for Lexicon_De()
{ {
unsigned char phcode; unsigned char phcode;
unsigned char c; unsigned char c;
} }
} }
*outptr = 0; /* string terminator */ *outptr = 0; /* string terminator */
} // end of DecodePhonemes
} // end of DecodePhonemes2




void Lexicon_De() void Lexicon_De()

+ 2
- 0
src/phoneme.h View File

#define phBEFORENOTVOWEL 0x0c00 #define phBEFORENOTVOWEL 0x0c00
#define phSWITCHVOICING 0x0800 #define phSWITCHVOICING 0x0800


#define phNONSYLLABIC 0x100000 // don't count this vowel as a syllable when finding the stress position

// fixed phoneme code numbers, these can be used from the program code // fixed phoneme code numbers, these can be used from the program code
#define phonCONTROL 1 #define phonCONTROL 1
#define phonSTRESS_U 2 #define phonSTRESS_U 2

+ 6
- 3
src/readclause.cpp View File



if(option_phoneme_input) if(option_phoneme_input)
{ {
if(phoneme_mode > 0)
phoneme_mode--;
else
if((c1 == '[') && (c2 == '[')) if((c1 == '[') && (c2 == '['))
phoneme_mode = 1; // input is phoneme mnemonics, so don't look for punctuation
phoneme_mode = -1; // input is phoneme mnemonics, so don't look for punctuation
else else
if((c1 == ']') && (c2 == ']')) if((c1 == ']') && (c2 == ']'))
phoneme_mode = 0;
phoneme_mode = 2; // set phoneme_mode to zero after the next two characters
} }


if(c1 == '\n') if(c1 == '\n')
linelength = 0; linelength = 0;
} }


if(option_punctuation && (phoneme_mode==0) && iswpunct(c1))
if(option_punctuation && (phoneme_mode==0) && (sayas_mode==0) && iswpunct(c1))
{ {
// option is set to explicitly speak punctuation characters // option is set to explicitly speak punctuation characters
// if a list of allowed punctuation has been set up, check whether the character is in it // if a list of allowed punctuation has been set up, check whether the character is in it

+ 1
- 1
src/setlengths.cpp View File

end_of_clause = 0; end_of_clause = 0;
for(p2 = p+1; p2->newword== 0; p2++) for(p2 = p+1; p2->newword== 0; p2++)
{ {
if(p2->type == phVOWEL)
if((p2->type == phVOWEL) && !(p2->ph->phflags & phNONSYLLABIC))
more_syllables++; more_syllables++;
} }
if((p2->newword & 2) && (more_syllables==0)) if((p2->newword & 2) && (more_syllables==0))

+ 1
- 0
src/speak.cpp View File

char path_home[120]; char path_home[120];
char wavefile[120]; char wavefile[120];
int (* uri_callback)(int, const char *, const char *) = NULL; int (* uri_callback)(int, const char *, const char *) = NULL;
int (* phoneme_callback)(const char *) = NULL;




static const char *help_text = static const char *help_text =

+ 7
- 0
src/speak_lib.cpp View File

static int synchronous_mode = 1; static int synchronous_mode = 1;
t_espeak_callback* synth_callback = NULL; t_espeak_callback* synth_callback = NULL;
int (* uri_callback)(int, const char *, const char *) = NULL; int (* uri_callback)(int, const char *, const char *) = NULL;
int (* phoneme_callback)(const char *) = NULL;


char path_home[120]; char path_home[120];


uri_callback = UriCallback; uri_callback = UriCallback;
} }



ESPEAK_API void espeak_SetPhonemeCallback(int (* PhonemeCallback)(const char*))
{//===========================================================================
phoneme_callback = PhonemeCallback;
}

ESPEAK_API int espeak_Initialize(espeak_AUDIO_OUTPUT output_type, int buf_length, const char *path, int options) ESPEAK_API int espeak_Initialize(espeak_AUDIO_OUTPUT output_type, int buf_length, const char *path, int options)
{//============================================================================================================= {//=============================================================================================================
ENTER("espeak_Initialize"); ENTER("espeak_Initialize");

+ 3
- 2
src/speak_lib.h View File

sometimes be zero (which does NOT indicate end of synthesis). sometimes be zero (which does NOT indicate end of synthesis).


events: an array of espeak_EVENT items which indicate word and sentence events, and events: an array of espeak_EVENT items which indicate word and sentence events, and
also the occurance if <mark> and <audio> elements within the text.
also the occurance if <mark> and <audio> elements within the text. The list of
events is terminated by an event of type = 0.




Callback returns: 0=continue synthesis, 1=abort synthesis. Callback returns: 0=continue synthesis, 1=abort synthesis.


espeakSSML Elements within < > are treated as SSML elements, or if not recognised are ignored. espeakSSML Elements within < > are treated as SSML elements, or if not recognised are ignored.


espeakPHONEMES Text within [[ ]] is treated as phonemes codes (in espeak's Hirschenbaum encoding).
espeakPHONEMES Text within [[ ]] is treated as phonemes codes (in espeak's Hirshenbaum encoding).


espeakENDPAUSE If set then a sentence pause is added at the end of the text. If not set then espeakENDPAUSE If set then a sentence pause is added at the end of the text. If not set then
this pause is suppressed. this pause is suppressed.

+ 1
- 1
src/synthdata.cpp View File

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


const char *version_string = "1.27.08 09.Jul.07";
const char *version_string = "1.27.09 12.Jul.07";
const int version_phdata = 0x012701; const int version_phdata = 0x012701;


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

+ 5
- 0
src/synthesize.cpp View File

{ {
fprintf(f_trans,"%s\n",translator->phon_out); fprintf(f_trans,"%s\n",translator->phon_out);
} }
if(phoneme_callback != NULL)
{
phoneme_callback(translator->phon_out);
}

translator->CalcPitches(clause_tone); translator->CalcPitches(clause_tone);
translator->CalcLengths(); translator->CalcLengths();



+ 1
- 2
src/tr_languages.cpp View File

// tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x4; // don't propagate over word boundaries // tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x4; // don't propagate over word boundaries
tr->langopts.param[LOPT_IT_DOUBLING] = 1; tr->langopts.param[LOPT_IT_DOUBLING] = 1;
tr->langopts.param[LOPT_COMBINE_WORDS] = 99; // combine some prepositions with the following word tr->langopts.param[LOPT_COMBINE_WORDS] = 99; // combine some prepositions with the following word
tr->langopts.long_stop = 130;


tr->langopts.numbers = 0x1809 + NUM_ROMAN; tr->langopts.numbers = 0x1809 + NUM_ROMAN;
SetLetterVowel(tr,'y'); SetLetterVowel(tr,'y');
tr->langopts.spelling_stress = 1; tr->langopts.spelling_stress = 1;
//SetLengthMods(tr,3); // all equal
SetLengthMods(tr,3); // all equal
} }
break; break;



+ 1
- 0
src/translate.h View File

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


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

Loading…
Cancel
Save