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

@@ -2,148 +2,151 @@
// This file is UTF-8 encoded

// 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
_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

+ 3
- 0
dictsource/de_list View File

@@ -50,6 +50,9 @@ _` g@-*A:v
_^ sI*kUmflEks
_— g@d'ank@nSt@-*,IC

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


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

+ 9
- 9
dictsource/dict_phonemes View File

@@ -121,8 +121,8 @@ y Y

: ; b c d dZ f g
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
@@ -214,15 +214,15 @@ z Z Z;
Dictionary ru_dict

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
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

+ 7
- 1
dictsource/en_list View File

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

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


+ 1
- 1
dictsource/fr_list View File

@@ -404,7 +404,6 @@ echo Eko
fils fis
haillon _|ajO~
haricot _|aRiko
haricots _|aRikoz2
imprudent E~pRydA~
juin ZwE~
mars maRs
@@ -611,3 +610,4 @@ pourcent puRsA~
vincent vE~sA~




+ 55
- 54
dictsource/hu_list View File

@@ -7,48 +7,48 @@

// 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
km kilo:me:tER2
mm milime:tER2
mm milime:tER2

a.m An^n^i||m'int $dot
dr doktoR2 $dot
@@ -88,14 +88,14 @@ ez $u+ // this


// Conjunctions
és $u $pause $strend2 // and
és $u $strend2 // and
de $u+ $pause // but
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
noha $u $pause // even thought
@@ -108,6 +108,9 @@ noha $u $pause // even thought
nem $alt2 $strend
ne $u+

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

// Unstressed adverbs prepositions etc.
néhány $u+
is $u // also
@@ -159,7 +162,7 @@ hoz $u // to
höz $u
ig $u // up to
ik $u // -th
nak $u // of, him/her
nak $u // of, him/her
nek $u
nál $u // by
nél $u
@@ -169,20 +172,20 @@ os $u
ra $u // onto
re $u
ról $u // from top of, about
röl $u
röl $u
ről $u
szer $u
szor $u // times
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
val $u // with
vel $u
á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
ós $u
@@ -195,9 +198,8 @@ elé $u // before

sok $u // many
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
@@ -287,7 +289,6 @@ b be:
c tse:
d de:
_e E
e $atend // stressed at end of sentence
f Eff
g ge:
h ha:

+ 7
- 0
dictsource/hu_rules View File

@@ -34,6 +34,8 @@ hierar) ch (i C
szé) ch tS
_zi) ch (y tS

c (szín tS

dA) c (sz ts
kilen) c (sz ts
kvar) c (sz ts
@@ -141,6 +143,8 @@ _minde) gy (ik J:
ly j
lly jj

A) lj (A lj_|

C) ly (_ li
_kéth) ly li
szamue) lly lli
@@ -210,8 +214,10 @@ szamue) ly lli
sz s
ssz ss2

s (színű S
hel) s (inki z
ki) s (ebb SS
_má) s (szó S
_munká) s S
_o) slo slo:
_o) sló slo:
@@ -289,6 +295,7 @@ vörösmar) ty ti
má) zc (sz z
mé) zc (sz z
nehé) z (sé z
szá) z (sz z
tű) z (sz z
ví) z (sz z
tor) z (szülött z

+ 1
- 1
dictsource/ru_rules View File

@@ -288,7 +288,7 @@

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

+ 3
- 2
docs/speak_lib.h View File

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

@@ -180,7 +180,8 @@ int SynthCallback(short *wav, int numsamples, espeak_EVENT *events);
sometimes be zero (which does NOT indicate end of synthesis).

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.

+ 10
- 10
phsource/compile_report View File

@@ -16,7 +16,7 @@
fr 35 118
fr_ca 11 118
hi 50 132
hu 22 112
hu 23 112
nl 26 117
pl 15 107
sk 29 125
@@ -24,7 +24,7 @@
hr 19 129
mk 21 130
sr 2 129
ru 36 124
ru 38 126
it 17 117
la 21 114
es 6 114
@@ -105,8 +105,8 @@
1 l^/j2u 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
2 l/l@ base
1 l/L1_aL base
@@ -129,16 +129,16 @@
4 l/l_long base fr la ro
2 l/lo 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
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#_ is
1 m/ma base
1 m/me base
1 m/mi base
2 m/mj base ro
3 m/mj base ru ro
1 m/mo base
1 m/mu base
1 n^/_n^ base
@@ -574,9 +574,9 @@
1 vwl_no/u#2 no
1 vwl_no/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/mi ro
2 vwl_ro/mi ru ro
1 vwl_ro/ni ro
1 vwl_ru/8 ru
1 vwl_ru/a ru

BIN
phsource/l/L1_aL View File


+ 11
- 0
phsource/ph_hungarian View File

@@ -185,4 +185,15 @@ phoneme s2 // second part of geminated [s:]
switchvoicing z
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

@@ -117,6 +117,28 @@ phoneme d;
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

+ 1
- 1
phsource/phonemes View File

@@ -172,7 +172,7 @@ endphoneme


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

+ 1
- 0
src/compiledata.cpp View File

@@ -242,6 +242,7 @@ static keywtab_t keywords[] = {
{"palatal", 0x2000000+phPALATAL},
{"long", 0x2000000+phLONG},
{"brkafter", 0x2000000+phBRKAFTER},
{"nonsyllabic",0x2000000+phNONSYLLABIC},

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

+ 4
- 4
src/dictionary.cpp View File

@@ -779,7 +779,7 @@ static int GetVowelStress(Translator *tr, unsigned char *phonemes, unsigned char
continue;
}

if((ph->type == phVOWEL) && (ph->code != phonSCHWA_SHORT))
if((ph->type == phVOWEL) && !(ph->phflags & phNONSYLLABIC))
{
vowel_stress[count] = (char)stress;
if((stress >= 4) && (stress >= max_stress))
@@ -892,7 +892,7 @@ void ChangeWordStress(Translator *tr, char *word, int new_stress)
p = phonetic;
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)
*word++ = stress_phonemes[vowel_stress[ix]];
@@ -982,7 +982,7 @@ void Translator::SetWordStress(char *output, unsigned int dictionary_flags, int
ix = 1;
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 lengthened = 0;
@@ -1314,7 +1314,7 @@ void Translator::SetWordStress(char *output, unsigned int dictionary_flags, int
prev_last_stress = 0;
}
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


+ 3
- 2
src/extras.cpp View File

@@ -200,9 +200,10 @@ int unicode[80];



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


void Lexicon_De()

+ 2
- 0
src/phoneme.h View File

@@ -55,6 +55,8 @@
#define phBEFORENOTVOWEL 0x0c00
#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
#define phonCONTROL 1
#define phonSTRESS_U 2

+ 6
- 3
src/readclause.cpp View File

@@ -1718,11 +1718,14 @@ f_input = f_in; // for GetC etc

if(option_phoneme_input)
{
if(phoneme_mode > 0)
phoneme_mode--;
else
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
if((c1 == ']') && (c2 == ']'))
phoneme_mode = 0;
phoneme_mode = 2; // set phoneme_mode to zero after the next two characters
}

if(c1 == '\n')
@@ -1761,7 +1764,7 @@ if(option_ssml) parag=1;
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
// if a list of allowed punctuation has been set up, check whether the character is in it

+ 1
- 1
src/setlengths.cpp View File

@@ -442,7 +442,7 @@ p->pitch1 = p->pitch2 - 20; // post vocalic [r/]
end_of_clause = 0;
for(p2 = p+1; p2->newword== 0; p2++)
{
if(p2->type == phVOWEL)
if((p2->type == phVOWEL) && !(p2->ph->phflags & phNONSYLLABIC))
more_syllables++;
}
if((p2->newword & 2) && (more_syllables==0))

+ 1
- 0
src/speak.cpp View File

@@ -49,6 +49,7 @@
char path_home[120];
char wavefile[120];
int (* uri_callback)(int, const char *, const char *) = NULL;
int (* phoneme_callback)(const char *) = NULL;


static const char *help_text =

+ 7
- 0
src/speak_lib.cpp View File

@@ -61,6 +61,7 @@ static espeak_AUDIO_OUTPUT my_mode=AUDIO_OUTPUT_SYNCHRONOUS;
static int synchronous_mode = 1;
t_espeak_callback* synth_callback = NULL;
int (* uri_callback)(int, const char *, const char *) = NULL;
int (* phoneme_callback)(const char *) = NULL;

char path_home[120];

@@ -657,6 +658,12 @@ ESPEAK_API void espeak_SetUriCallback(int (* UriCallback)(int, const char*, cons
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)
{//=============================================================================================================
ENTER("espeak_Initialize");

+ 3
- 2
src/speak_lib.h View File

@@ -180,7 +180,8 @@ int SynthCallback(short *wav, int numsamples, espeak_EVENT *events);
sometimes be zero (which does NOT indicate end of synthesis).

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.
@@ -266,7 +267,7 @@ espeak_ERROR espeak_Synth(const void *text,

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
this pause is suppressed.

+ 1
- 1
src/synthdata.cpp View File

@@ -35,7 +35,7 @@
#include "translate.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;

int option_device_number = -1;

+ 5
- 0
src/synthesize.cpp View File

@@ -1547,6 +1547,11 @@ int SpeakNextClause(FILE *f_in, const void *text_in, int control)
{
fprintf(f_trans,"%s\n",translator->phon_out);
}
if(phoneme_callback != NULL)
{
phoneme_callback(translator->phon_out);
}

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


+ 1
- 2
src/tr_languages.cpp View File

@@ -335,12 +335,11 @@ Translator *SelectTranslator(const char *name)
// tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x4; // don't propagate over word boundaries
tr->langopts.param[LOPT_IT_DOUBLING] = 1;
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;
SetLetterVowel(tr,'y');
tr->langopts.spelling_stress = 1;
//SetLengthMods(tr,3); // all equal
SetLengthMods(tr,3); // all equal
}
break;


+ 1
- 0
src/translate.h View File

@@ -502,6 +502,7 @@ extern char *p_textinput;
extern wchar_t *p_wchar_input;
extern int ungot_char;
extern int (* uri_callback)(int, const char *, const char *);
extern int (* phoneme_callback)(const char *);
extern void SetLengthMods(Translator *tr, int value);

Translator *SelectTranslator(const char *name);

Loading…
Cancel
Save