mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
[1.43.52]
espeakedit --compile also compiles the intonation data Added feature to produce phonemes as International Phonetic Alphabet. phoneme definitions: Added "ipa" instruction to specify IPA phoneme name. When spelling as individual characters, calculate the stress position for each character name. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@249 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+1
-1
@@ -229,7 +229,7 @@ místo $pause // instead of
|
||||
i $u $brk // ???
|
||||
|
||||
// Conjunctions
|
||||
a $u $pause // and
|
||||
a $u $brk $pause // and
|
||||
nebo $u $pause // or
|
||||
však $pause // but
|
||||
krom $pause // except
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
// This file is UTF8 encoded
|
||||
// Spelling-to-phoneme rules for Danish
|
||||
|
||||
@@ -1537,7 +1537,7 @@ L06L06) er V // PB klipper
|
||||
år) ede (_+ 3D@ // PB sårede
|
||||
odr) ede (_+ 3D@ // PB fodrede
|
||||
obr) ede (_ 3D@ // PB erobrede
|
||||
tr) ede (_+ 3D-@ // PB splintrede
|
||||
tr) ede (_+ 3D@ // PB splintrede
|
||||
hundr) ed (+ @:D // PB hundred
|
||||
rn) ed (e eD // PB dernede
|
||||
&k) ede (+ eD@ // PB dødkede
|
||||
|
||||
+8
-1
@@ -115,6 +115,7 @@
|
||||
r) al (_ 'A:l
|
||||
t) al (_ 'A:l
|
||||
m) a (lt_ A:l
|
||||
ker) am (ik 'A:m
|
||||
@) an (_ 'A:n
|
||||
ein) an (der 'an
|
||||
@) ant (_ 'ant
|
||||
@@ -444,6 +445,7 @@
|
||||
_) farb (C@P4 f'arp
|
||||
_) farb (l@P4 f'arb
|
||||
_) fein (@P4 f'aIn
|
||||
_) fertig (CP6 f'ErtiC
|
||||
_) fest (@P4 f'Est
|
||||
_) flug fl'u:g
|
||||
foto fo:to:
|
||||
@@ -577,7 +579,7 @@
|
||||
i (d_ 'i:
|
||||
i (dee %i:
|
||||
i (erin =i:
|
||||
ig (+ Ig# // [ig] or [iC]
|
||||
&) ig (+ Ig# // [ig] or [iC]
|
||||
igh aI
|
||||
|
||||
i (i i:_!
|
||||
@@ -685,6 +687,7 @@ formal) ie =I@
|
||||
// @) keit (_S4 kaIt
|
||||
// @) keiten (_S6 kaIt@n
|
||||
|
||||
ka (rtoff k%a
|
||||
ko (e@ ko:
|
||||
kolleg k%Ole:g
|
||||
_) komme (C@ k%OmE
|
||||
@@ -818,6 +821,9 @@ formal) ie =I@
|
||||
o (lsam o:
|
||||
o (m_ 'o:
|
||||
@A) o (n_ 'o:
|
||||
one (_ 'o:n@
|
||||
onen (_ 'o:n@n
|
||||
zitr) on 'on
|
||||
@) oo (_ u:
|
||||
r) oo (m u:
|
||||
z) oo (m u:
|
||||
@@ -858,6 +864,7 @@ formal) ie =I@
|
||||
pool _^_EN
|
||||
power paU@r
|
||||
_) preß (@P4 pr'Es
|
||||
_) primär (P6 pri:m'E:r
|
||||
_) prinzipien (@P9 prInts'i:pI@
|
||||
_) privat (@P6 pri:v'A:t
|
||||
problem pr%o:ble:m
|
||||
|
||||
@@ -79,9 +79,9 @@ t tS ts v z Z
|
||||
Dictionary de_dict
|
||||
|
||||
3 3: @ @- a A A: aI
|
||||
aU E E2 E: e: EI I i2
|
||||
i: n- O o: OY U u: W
|
||||
y y: Y:
|
||||
aU E E2 E: e: EI i I
|
||||
i2 i: n- o O o: OY U
|
||||
u: W y y: Y:
|
||||
|
||||
* : ; b C d D dZ
|
||||
f g g# h j k l m
|
||||
@@ -507,9 +507,9 @@ uei uo y y& y@ yE yi yu
|
||||
|
||||
; C f h j k kh l
|
||||
l# m n N p ph Q q
|
||||
Q" Q^ r R r" R2 R3 s
|
||||
s. S; t th ts ts. ts. tS;
|
||||
tS; tsh v w x X z.
|
||||
Q" Q^ r R R2 R3 s s.
|
||||
S; t th ts ts. ts. tS; tS;
|
||||
tsh v w x X z.
|
||||
|
||||
|
||||
Dictionary zhy_dict
|
||||
@@ -626,3 +626,13 @@ u
|
||||
h j J k l l# m n
|
||||
N n^ p Q r R R3 s
|
||||
S t T tS v w x z
|
||||
|
||||
|
||||
Dictionary ht_dict
|
||||
|
||||
a A~ e E E~ i o O
|
||||
O~ u w y
|
||||
|
||||
; b d f g j k l
|
||||
m n N p r s S t
|
||||
tS v z Z
|
||||
|
||||
@@ -2307,6 +2307,7 @@ workstation w'3:kst,eIS@n
|
||||
?5 workstation w'VRkst,eIS@n
|
||||
wound wu:nd
|
||||
wound waUnd $past
|
||||
(wound down) w,aUnd||'daUn
|
||||
(wound up) w,aUnd||'Vp
|
||||
wounded wu:ndI2d
|
||||
wretched rEtSI2d
|
||||
@@ -2554,6 +2555,7 @@ Taipei t,aIp'eI
|
||||
Taiwan taI'wan
|
||||
(tel aviv) t,El||a#v'i:v
|
||||
Tenerife tEn3r'i:f
|
||||
Texas tEks@s
|
||||
Toronto t@r0ntoU
|
||||
Timor ti:mo@
|
||||
Tokyo toUkIoU
|
||||
@@ -3154,6 +3156,8 @@ while w,aIl $pause $strend
|
||||
whilst w,aIlst $pause
|
||||
|
||||
|
||||
(do so) du:||soU $atend
|
||||
|
||||
//some adverbs
|
||||
just $verbf
|
||||
never $verbf
|
||||
|
||||
+2
-1
@@ -24,7 +24,7 @@
|
||||
|
||||
// 2006-11-18 Gilles Casse <gcasse@oralux.org>
|
||||
//
|
||||
// Updated 2010-06-15 Michel Such <michel.such@free.fr>
|
||||
// Updated 2010-06-22 Michel Such <michel.such@free.fr>
|
||||
//
|
||||
// * Numbers, a few abbreviations and exceptions.
|
||||
//
|
||||
@@ -667,6 +667,7 @@ couscous kuskus
|
||||
delete _^_en
|
||||
dernier dErnjer2
|
||||
doppler doplEr
|
||||
dot dOt
|
||||
éloquent elokA~t2
|
||||
enfer A~fEr
|
||||
fahrenheit far@najt
|
||||
|
||||
+3
-1
@@ -23,7 +23,7 @@
|
||||
|
||||
// 2006-11-18 Gilles Casse <gcasse@oralux.org>
|
||||
//
|
||||
// Updated: 2010-06-18 Michel Such <michel.such@free.fr>
|
||||
// Updated: 2010-06-29 Michel Such <michel.such@free.fr>
|
||||
//
|
||||
|
||||
// Letter classes:
|
||||
@@ -77,6 +77,7 @@
|
||||
an (n_ a
|
||||
_h) an (_ an
|
||||
_) anti (@@P4 A~ti
|
||||
_) anti (CAXP4 A~ti
|
||||
_) arché (@P5 arke // archéologue
|
||||
_) archéo (@P6 arkeo // archéologue
|
||||
_) arch (aP4 ark // archange
|
||||
@@ -1087,6 +1088,7 @@ _quatrevin) gts (_ z2
|
||||
ss s // assez
|
||||
|
||||
ai) s (em s // vraisemblable
|
||||
_al) s (ac z // Alsace
|
||||
aCè) s (_ s
|
||||
nè) s (_ s
|
||||
kansa) s (_ s // Kansas, Arkansas
|
||||
|
||||
@@ -990,6 +990,10 @@ kulcs $unstressend
|
||||
nyit $unstressend
|
||||
lő $unstressend
|
||||
támad $unstressend
|
||||
halt $unstressend
|
||||
ész $unstressend
|
||||
kapta $unstressend
|
||||
kaptak $unstressend
|
||||
|
||||
// word pairs
|
||||
|
||||
|
||||
@@ -207,6 +207,7 @@ menetren) dsz (erű d|s
|
||||
honvé) d (sereg d
|
||||
va) d (szeder d
|
||||
twee) d (sapk d
|
||||
fe) dd (hetetlen d
|
||||
|
||||
.group dz
|
||||
fogó) dz (kod ts
|
||||
@@ -399,6 +400,7 @@ tizene) gy (en J:
|
||||
_e) gy (oldal J:
|
||||
_e) gy (év J:
|
||||
_e) gy (órá J:
|
||||
_e) gy (se J
|
||||
|
||||
.group h
|
||||
h h
|
||||
@@ -424,6 +426,7 @@ tizene) gy (en J:
|
||||
sz) í (ve i
|
||||
t) í (zes i
|
||||
sz) í (vel i:
|
||||
_t) í (zük i
|
||||
|
||||
.group j
|
||||
j j
|
||||
@@ -582,6 +585,8 @@ tulajdo) n (jog n
|
||||
teljesítmé) ny (javu n^
|
||||
törvé) ny (java n^
|
||||
ajá) nl l:
|
||||
_feddhetetle) n (jelle n
|
||||
állomá) ny (jel n^
|
||||
|
||||
.group o
|
||||
o o
|
||||
|
||||
+30
-21
@@ -100,7 +100,7 @@ _17 z'e:f@ntin
|
||||
_18 'Axtin
|
||||
_19 n'e:x@ntin
|
||||
_2X tv#'Int@x
|
||||
_3X d'e:rt@x
|
||||
_3X d'Ert@x
|
||||
_4X f'e:rt@x
|
||||
_5X f'EIft@x
|
||||
_6X z'Est@x
|
||||
@@ -183,27 +183,27 @@ er $u
|
||||
waar $pause
|
||||
|
||||
// prepositions
|
||||
in $u+ $brk // in
|
||||
op $u+ $brk // in
|
||||
aan $u+ $brk // at, on
|
||||
bij $u+ $pause // at, near
|
||||
om $u+ $brk // at
|
||||
met $u+ $brk // with, by
|
||||
over $u+ $pause // about
|
||||
na $u+ $pause // after
|
||||
naar $u+ // to
|
||||
door $u+ $brk // through, by
|
||||
te $u+ $brk // to
|
||||
tot $u+ $pause // until
|
||||
uit $u+ $brk // from, out of
|
||||
voor $u+ $pause // for, in front of
|
||||
van $u+ // from, of
|
||||
zonder $u+ $pause // without
|
||||
in $only $u+ $brk // in
|
||||
op $only $u+ $brk // in
|
||||
aan $only $u+ $brk // at, on
|
||||
bij $only $u+ $pause // at, near
|
||||
om $only $u+ $brk // at
|
||||
met $only $u+ $brk // with, by
|
||||
over $only $u+ $pause // about
|
||||
na $only $u+ $pause // after
|
||||
naar $only $u+ // to
|
||||
door $only $u+ $brk // through, by
|
||||
te $only $u+ $brk // to
|
||||
tot $only $u+ $pause // until
|
||||
uit $only $u+ $brk // from, out of
|
||||
voor $only $u+ $pause // for, in front of
|
||||
van $only $u+ // from, of
|
||||
zonder $only $u+ $pause // without
|
||||
|
||||
// adverbs, etc.
|
||||
ook $u+ // any
|
||||
zo $u+
|
||||
sommige $u+ // some
|
||||
ook $only $u+ // any
|
||||
zo $only $u+
|
||||
sommige $only $u+ // some
|
||||
|
||||
|
||||
// conjunctions
|
||||
@@ -308,10 +308,11 @@ the _^_EN
|
||||
up _^_EN
|
||||
|
||||
|
||||
// words where -eren is not a verb ending
|
||||
// words where -eren is not a stressed verb ending
|
||||
ander $alt
|
||||
kinder $alt
|
||||
ouder $alt
|
||||
sputter $alt
|
||||
|
||||
// pronunciation exceptions
|
||||
aangrijpend $2
|
||||
@@ -327,6 +328,7 @@ ingevolge $3
|
||||
ingrediënt $4
|
||||
ingenieur Inzj@nj'Y:r
|
||||
journaal Surn'a:l
|
||||
natuur na:t'yr
|
||||
ongastvrij OnQAstv@-*'EI
|
||||
ongelooflijk $3
|
||||
ongemakkelijk $3
|
||||
@@ -335,6 +337,13 @@ ongerieflijk $3
|
||||
ongrondwettig $3
|
||||
proces $2
|
||||
renaissance rEne:s'A~s@
|
||||
tegenaan $3
|
||||
tegenin $3
|
||||
tegenover $3
|
||||
tegendraads $3
|
||||
tegennatuur $4
|
||||
tegenstrijdig $3
|
||||
tegenwoordig $3
|
||||
waarschijnlijk $2
|
||||
|
||||
|
||||
|
||||
+44
-1
@@ -25,6 +25,7 @@
|
||||
_) be (ren bI:
|
||||
_) be (ter be:
|
||||
_) beu bY:
|
||||
&) baar (_ =ba:r
|
||||
|
||||
|
||||
.group c
|
||||
@@ -88,7 +89,7 @@
|
||||
|
||||
|
||||
.group g
|
||||
g Q // ph_dutch changes this to [x] before unvoiced
|
||||
g Q // ph_dutch changes to [x] before unvoiced, NULL after [x]
|
||||
gg Q
|
||||
|
||||
_) ge (@P2 Q@
|
||||
@@ -114,9 +115,17 @@
|
||||
ie i
|
||||
ieuw iw
|
||||
|
||||
d) ie (_ 'i
|
||||
g) ie (_ 'i
|
||||
m) ie (_ 'i
|
||||
p) ie (_ 'i
|
||||
|
||||
ie (r_ 'i
|
||||
ie (rd_ 'i
|
||||
@) ig (_ @x
|
||||
_) in (gP2 'In
|
||||
@) isch (_ =is
|
||||
@) ische (_ =is@
|
||||
|
||||
|
||||
.group j
|
||||
@@ -133,6 +142,7 @@
|
||||
ll l
|
||||
@) lijk (_S4 l@k
|
||||
&) laan (_S4 la:n
|
||||
@) loog (_ lo:x
|
||||
|
||||
|
||||
.group m
|
||||
@@ -159,9 +169,14 @@
|
||||
oei uj
|
||||
ou VU
|
||||
|
||||
telef) oo (n 'o:
|
||||
|
||||
|
||||
.group on
|
||||
_) onaan (@P5 On'a:n
|
||||
_) onge (@P4 ,OnQ@
|
||||
_) ont (@P3 Ont
|
||||
_) on (te@P2 On // ontegecht
|
||||
_) onder Ond@r
|
||||
|
||||
_) ong (aarn ,OnQ'
|
||||
@@ -214,6 +229,34 @@
|
||||
c) tie (_ si
|
||||
tj t;
|
||||
tsj tS
|
||||
_) th t
|
||||
th t
|
||||
t (haar t // th is not [t]
|
||||
t (hav t
|
||||
|
||||
.group te
|
||||
_) tegen (P5 t'e:Q@n
|
||||
_) terug (P5 t@r'8x
|
||||
_) te (gelijk t@
|
||||
_) te (gemoetP2 t@
|
||||
_) te (goed t@
|
||||
_) te (hui t@ // tehuis
|
||||
_) te (keer t@
|
||||
_) te (kort t@
|
||||
_) te (leur t@
|
||||
_) te (loor t@
|
||||
_) te (meer t@
|
||||
_) te (midd t@ // temidden
|
||||
_) te (na t@
|
||||
_) te (neer t@
|
||||
_) te (recht t@
|
||||
_) te (sam t@ // tesamen
|
||||
_) te (veel t@
|
||||
_) te (vergreefP2 t@
|
||||
_) te (voorschijn t@
|
||||
_) te (vor t@ // tevoren
|
||||
_) te (vred t@ // tevreden
|
||||
_) teweeg (P6 t@v#'e:x
|
||||
|
||||
|
||||
.group u
|
||||
|
||||
+1
-1
@@ -356,4 +356,4 @@ tamil தமிழ் $text
|
||||
ஆகா a:Ha:
|
||||
ஓகோ o:Ho:
|
||||
கப் kVp
|
||||
|
||||
செட் set.
|
||||
|
||||
+36
-17
@@ -191,6 +191,7 @@
|
||||
|
||||
//sort
|
||||
அலை) க (டல kV
|
||||
சமையல்) க (ட் kV
|
||||
_கல்) க (ண்ட kV
|
||||
_நற்) க (தி gV
|
||||
வீண்) க (தை kV
|
||||
@@ -248,8 +249,11 @@
|
||||
க (ுல k
|
||||
_அங்) க (ுல g
|
||||
_) குல்க (ந்த gulkV
|
||||
நீல) க (ேசி k
|
||||
புலி) க (ேசி k
|
||||
குண்டல) க (ேசி k
|
||||
ம) க (ேசுவர H // need to restrict to _ம) and _வீரம) ??
|
||||
சீர்) க (ேட k
|
||||
ம) க (ேந்திர H
|
||||
ம) க (ேஷ்வ H
|
||||
ம) க (ேஸ்வர H
|
||||
@@ -269,6 +273,7 @@
|
||||
ஆரோ) க்க (ிய gg
|
||||
வைரா) க்க (ிய gg
|
||||
_வி) க்க (ிரக gg
|
||||
கு) க்கி (ராம gg
|
||||
ஜன) க்க (ும்பல gg
|
||||
வி) க்ட (ோரியா kt. // victoria
|
||||
வி) க (்ரம k
|
||||
@@ -394,6 +399,7 @@
|
||||
_) ட (வர t.V
|
||||
_) ட (ேப t.
|
||||
_) டாக (்ஸி t.a:k
|
||||
_ல) ட்ட d.d.V#
|
||||
|
||||
.group ண
|
||||
ண n.V
|
||||
@@ -552,6 +558,7 @@
|
||||
_) த (ுச்சம d
|
||||
_) த (ுச்சாதனன d
|
||||
_) த (ுட்ட d
|
||||
_) த (ுபாய d
|
||||
_) த (ுரதிர்ஷ்ட d
|
||||
_) த (ுராசை d
|
||||
_) த (ுரியோதனன d
|
||||
@@ -597,12 +604,12 @@
|
||||
_) த (ொம் d
|
||||
_) த (ோசை d
|
||||
_) த (ோஷ d
|
||||
_) த (ுபாய d
|
||||
//endsort
|
||||
|
||||
//sort
|
||||
|
||||
_வசந்) த tV#
|
||||
_ப) த (ஞ்சலி tV
|
||||
_கீழ்) த (ட்ட tV
|
||||
_மேல்) த (ட்ட tV
|
||||
முட்டாள்) த (ன tV
|
||||
@@ -672,7 +679,6 @@ _பார்வ) த (ி t
|
||||
ச) த (்ரு t
|
||||
த) த (்ரூப t
|
||||
பா) த (்ரூம t
|
||||
_ப) த (ஞ்சலி tV
|
||||
//endsort
|
||||
|
||||
|
||||
@@ -854,6 +860,7 @@ _முகத்தின்_) ப (ாவ b
|
||||
_) ப (ிக்கு b
|
||||
_) ப (ிக்ஷு b
|
||||
_) ப (ிக்ஷூ b
|
||||
_) ப (ிம்ப b
|
||||
_) ப (ிரகதீ b
|
||||
_) ப (ிரகஸ்பதி b
|
||||
_) ப (ிரம்ம b
|
||||
@@ -947,6 +954,7 @@ _முகத்தின்_) ப (ாவ b
|
||||
சீதா) பதி pVti
|
||||
சேது) பதி pVti
|
||||
தரணி) பதி pVti
|
||||
திரௌ) ப (தி pV
|
||||
பிரஜா) பத (ி pVt
|
||||
மகுட) பதி pVti
|
||||
பிரகஸ்) பதி pVti
|
||||
@@ -965,6 +973,7 @@ _முகத்தின்_) ப (ாவ b
|
||||
அனு) ப (மா pV
|
||||
_க) ப (ம்_ bV
|
||||
_ஊடு) ப (யிர pV
|
||||
நாகா) ப (ரண bV
|
||||
கரம்) ப (ற் pV
|
||||
ப (ற்றி_ pV
|
||||
பல) ப (ல pV
|
||||
@@ -986,8 +995,11 @@ _முகத்தின்_) ப (ாவ b
|
||||
அடி) ப (ாவி p
|
||||
கோ) ப (ி p
|
||||
_முன்) ப (ின்_ p
|
||||
_) ப (ிப்ரவரி f
|
||||
உடன்) ப (ிற p
|
||||
ப (ிறகு+ p
|
||||
தேய்) ப (ிறை p
|
||||
வளர்) ப (ிறை p
|
||||
சிறு) ப (ிள்ளை p
|
||||
ஆண்) ப (ிள்ளை p
|
||||
பெண்) ப (ிள்ளை p
|
||||
@@ -1146,9 +1158,10 @@ _முகத்தின்_) ப (ாவ b
|
||||
_) பி (ரே p
|
||||
_) பி (ரோகிதர p
|
||||
_) பி (ளாட்பார p
|
||||
_) பி (ளாஸ்க் f
|
||||
_) பி (ளாஸ்க் f // flask
|
||||
_) பீ (ராமண b
|
||||
அதிக) ப்பி (ரசங்க pp
|
||||
_பர) ப்பி (ரம்ம pb
|
||||
//endsort
|
||||
|
||||
// musical notes
|
||||
@@ -1273,6 +1286,25 @@ _முகத்தின்_) ப (ாவ b
|
||||
|
||||
// vowel letters
|
||||
|
||||
.group இ
|
||||
//sort
|
||||
இ i
|
||||
_) இ (ரகசிய // silent
|
||||
_) இ (ரசாயன
|
||||
_) இ (ரத்த
|
||||
_) இ (ராஜ
|
||||
_) இ (ராணி
|
||||
_) இ (ராணுவ
|
||||
_) இ (ராத்த
|
||||
_) இ (ராம
|
||||
_) இ (ராவண
|
||||
_) இ (லகுவாக
|
||||
_) இ (லட்சண
|
||||
_) இ (லட்சிய // silent
|
||||
_) இ (லவங்க
|
||||
_) இ (லேச // silent
|
||||
//endsort
|
||||
|
||||
.group 0xe0ae // characters which start with UTF-8 bytes: [e0 ae]
|
||||
|
||||
ஂ // anusvara
|
||||
@@ -1281,20 +1313,6 @@ _முகத்தின்_) ப (ாவ b
|
||||
|
||||
ஆ a:
|
||||
|
||||
இ i
|
||||
_) இ (லட்சிய // silent
|
||||
_) இ (ரகசிய // silent
|
||||
_) இ (லேச // silent
|
||||
_) இ (ரத்த
|
||||
_) இ (ராம
|
||||
_) இ (ராவண
|
||||
_) இ (ராத்த
|
||||
_) இ (ராஜ
|
||||
_) இ (ராணுவ
|
||||
_) இ (லகுவாக
|
||||
_) இ (ராணி
|
||||
_) இ (லட்சண
|
||||
|
||||
ஈ i:
|
||||
|
||||
உ u
|
||||
@@ -1303,6 +1321,7 @@ _முகத்தின்_) ப (ாவ b
|
||||
|
||||
எ e
|
||||
_) எ ;e // add a short [j] sound at start of word ?
|
||||
எப (்ரல ;e:p
|
||||
|
||||
ஏ e:
|
||||
_) ஏ ;e: // add a short [j] sound at start of word ?
|
||||
|
||||
+57
-48
@@ -1,4 +1,4 @@
|
||||
63 phoneme tables
|
||||
64 phoneme tables
|
||||
new total
|
||||
base 107 107
|
||||
consonants 9 115
|
||||
@@ -20,7 +20,7 @@ consonants 9 115
|
||||
fr 56 138
|
||||
fr-ca 11 138
|
||||
hi 58 149
|
||||
ta 21 152
|
||||
ta 20 151
|
||||
hu 24 121
|
||||
lv 29 125
|
||||
nl 24 125
|
||||
@@ -63,6 +63,7 @@ consonants 9 115
|
||||
gd 6 107
|
||||
bg 10 119
|
||||
nso 8 107
|
||||
ht 11 138
|
||||
|
||||
Data file Used by
|
||||
b/b [b] base
|
||||
@@ -340,8 +341,8 @@ l/l_ [l/] base
|
||||
[l/] fr
|
||||
l/l_@ [l/3] base
|
||||
[l/] fr
|
||||
l/l@ [l#] base
|
||||
[߸] base
|
||||
l/l@ [á3m] base
|
||||
[l#] base
|
||||
[l] fr
|
||||
[l/2] fr
|
||||
l/L1_aL [l/] base
|
||||
@@ -366,14 +367,14 @@ l/L2_oL [l/2] base
|
||||
l/L2_uL [l/2] base
|
||||
l/l_3 [l/] de
|
||||
l/l_4 [ll] sq
|
||||
l/la [l#] base
|
||||
[߸] base
|
||||
l/la [á3m] base
|
||||
[l#] base
|
||||
[l] fr
|
||||
[l/2] fr
|
||||
l/l_a [l/3] base
|
||||
[l/] fr
|
||||
l/le [l#] base
|
||||
[߸] base
|
||||
l/le [á3m] base
|
||||
[l#] base
|
||||
[l] fr
|
||||
[l/2] fr
|
||||
l/l_e [l/3] base
|
||||
@@ -382,8 +383,8 @@ l/L_eL_af [&] af
|
||||
[&:] af
|
||||
l/l_front [L] sq
|
||||
l/l_front_ [l/4] sq
|
||||
l/li [l#] base
|
||||
[߸] base
|
||||
l/li [á3m] base
|
||||
[l#] base
|
||||
[l] fr
|
||||
[l/2] fr
|
||||
[l] zh
|
||||
@@ -394,15 +395,15 @@ ll/ll [L] bg
|
||||
ll/_ll [L] bg
|
||||
l/l_long [l] base
|
||||
[l] fr
|
||||
l/lo [l#] base
|
||||
[߸] base
|
||||
l/lo [á3m] base
|
||||
[l#] base
|
||||
[l] fr
|
||||
[l/2] fr
|
||||
l/l_o [l/3] base
|
||||
[l/] fr
|
||||
l^/l_rfx [l.] base
|
||||
l/lu [l#] base
|
||||
[߸] base
|
||||
l/lu [á3m] base
|
||||
[l#] base
|
||||
[l] fr
|
||||
[l/2] fr
|
||||
l/l_u [l/3] base
|
||||
@@ -1083,6 +1084,7 @@ vnasal/aa_n [a~] hi
|
||||
vnasal/aa_n2 [A~] en
|
||||
vnasal/aa_n3 [A~] af
|
||||
vnasal/aa_n4 [A~] fr
|
||||
[A~] ht
|
||||
vnasal/a#_n [&~] pt
|
||||
vnasal/a#u_n [&U~] pt
|
||||
[&U~] pt-pt
|
||||
@@ -1100,6 +1102,7 @@ vnasal/i_n2 [i~] hi
|
||||
vnasal/oi_n [oI~] pt
|
||||
vnasal/o_n [o~] hi
|
||||
[o~] pt
|
||||
[O~] ht
|
||||
vnasal/o_n2 [o~] af
|
||||
[O~] fr
|
||||
vnasal/oo_n2 [O~] en
|
||||
@@ -1113,6 +1116,7 @@ vnasal/u_n [U~] hi
|
||||
vnasal/V_n [V~] hi
|
||||
vnasal/W_n [E~] fr
|
||||
[W~] fr
|
||||
[E~] ht
|
||||
voc/bh [B] base
|
||||
voc/dh [D] base
|
||||
voc/dh_ [D] base
|
||||
@@ -1180,7 +1184,6 @@ voc/z_pzd [Z;] base
|
||||
voc/z_pzd_ [Z;] base
|
||||
[z;] base
|
||||
vowel/@ [@] base
|
||||
[3] en
|
||||
[@] en
|
||||
[@2] en
|
||||
[@5] en
|
||||
@@ -1233,8 +1236,7 @@ vowel/@_4 [@] en-us
|
||||
[@] de
|
||||
[@] nl
|
||||
[@] no
|
||||
vowel/@_6 [3] en
|
||||
[@] en
|
||||
vowel/@_6 [@] en
|
||||
[W] fr
|
||||
vowel/8 [o-] zh
|
||||
vowel/8_2 [U] en-us
|
||||
@@ -1335,6 +1337,7 @@ vowel/a_6 [a] ca
|
||||
[a:] vi
|
||||
vowel/a_7 [a] en
|
||||
[a] fr
|
||||
[a] ht
|
||||
vowel/aa [A] fr-ca
|
||||
[A] no
|
||||
[A:] no
|
||||
@@ -1416,7 +1419,9 @@ vowel/e_3 [i] en-n
|
||||
[e:] hu
|
||||
[e] ku
|
||||
vowel/e_5 [i] en-sc
|
||||
vowel/e_8 [e] fr
|
||||
vowel/e_6 [e] ht
|
||||
vowel/e_8 [E:] de
|
||||
[e] fr
|
||||
vowel/e_9 [E2] fr
|
||||
vowel/ee [E] en-n
|
||||
[E] sv
|
||||
@@ -1474,10 +1479,10 @@ vowel/e_mid [E] en-rp
|
||||
[e] hy
|
||||
[E] prs
|
||||
[e] bg
|
||||
[E] ht
|
||||
vowel/e_mid2 [E] af
|
||||
[E] de
|
||||
[E2] de
|
||||
[E:] de
|
||||
[e] jbo
|
||||
[e] nci
|
||||
[e] fi
|
||||
@@ -1557,6 +1562,7 @@ vowel/i_7 [i] pl
|
||||
[i] sq
|
||||
vowel/i#_7 [i[] zh
|
||||
vowel/i_8 [i] fr
|
||||
[i] ht
|
||||
vowel/i_en [i:] en
|
||||
[i:] en-us
|
||||
vowel/i_fnt [i:] en-wi
|
||||
@@ -1671,6 +1677,7 @@ vowel/o_6 [O:] nl
|
||||
vowel/o_7 [o] ku
|
||||
vowel/o_8 [o] fr
|
||||
[o2] fr
|
||||
[o] ht
|
||||
vowel/oe [W] af
|
||||
[W] de
|
||||
[W] hy
|
||||
@@ -1684,6 +1691,7 @@ vowel/o_mid [U@] en-rp
|
||||
[o] bg
|
||||
vowel/o_mid2 [O] fr
|
||||
[o] fr
|
||||
[O] ht
|
||||
vowel/oo [o] base
|
||||
[O:] en-sc
|
||||
[O] en-wi
|
||||
@@ -1772,8 +1780,7 @@ vowel/u_2 [u1] fi
|
||||
[u] is
|
||||
[u] tr
|
||||
[u] bg
|
||||
vowel/u#_2 [u-] ta
|
||||
[u-] sv
|
||||
vowel/u#_2 [u-] sv
|
||||
vowel/u#_3 [U] ta
|
||||
[U:] ta
|
||||
vowel/u#_4 [U] en-sc
|
||||
@@ -1818,7 +1825,10 @@ vowel/u_bck [u] base2
|
||||
[u] bg
|
||||
vowel/u_bck2 [u] fr
|
||||
[u:] fr
|
||||
[u] ta
|
||||
[u:] ta
|
||||
[u:] la
|
||||
[u] ht
|
||||
vowel/uu [U] en
|
||||
[U] en-n
|
||||
[U] en-wm
|
||||
@@ -1937,57 +1947,56 @@ vwl_en_us/aU@ [aU@] en-us
|
||||
vwl_en_us/ee [E] en-us
|
||||
vwl_en_us/er [e@] en-us
|
||||
vwl_en_us/ir [i@3] en-us
|
||||
vwl_en_us/oor [0] en-us
|
||||
[O:] en-us
|
||||
vwl_en_us/oor [O:] en-us
|
||||
[O@] en-us
|
||||
vwl_en_us/or [o@] en-us
|
||||
[O:] en-sc
|
||||
vwl_en_us/ur [U@] en-us
|
||||
vwl_fr/@2r [߸] fr
|
||||
vwl_fr/a2r [߸] fr
|
||||
vwl_fr/aa2r [߸] fr
|
||||
vwl_fr/@2r [�æ] fr
|
||||
vwl_fr/a2r [�æ] fr
|
||||
vwl_fr/aa2r [�æ] fr
|
||||
vwl_fr/br [r/2] fr
|
||||
vwl_fr/e2r [߸] fr
|
||||
vwl_fr/e_2r [߸] fr
|
||||
vwl_fr/ee2r [߸] fr
|
||||
vwl_fr/i2r [߸] fr
|
||||
vwl_fr/e2r [�æ] fr
|
||||
vwl_fr/e_2r [�æ] fr
|
||||
vwl_fr/ee2r [�æ] fr
|
||||
vwl_fr/i2r [�æ] fr
|
||||
vwl_fr/j [j/] fr
|
||||
vwl_fr/o2r [߸] fr
|
||||
vwl_fr/oo2r [߸] fr
|
||||
vwl_fr/o2r [�æ] fr
|
||||
vwl_fr/oo2r [�æ] fr
|
||||
vwl_fr/r [r] fr
|
||||
[r/2] fr
|
||||
vwl_fr/r_ [r/] fr
|
||||
vwl_fr/r_@ [r/] fr
|
||||
vwl_fr/r@ [߸] fr
|
||||
vwl_fr/r@ [�æ] fr
|
||||
vwl_fr/@R [x] pt-pt
|
||||
vwl_fr/r@2 [߸] fr
|
||||
vwl_fr/r@2 [�æ] fr
|
||||
vwl_fr/@R2 [R] fr-ca
|
||||
vwl_fr/ra [߸] fr
|
||||
vwl_fr/ra [�æ] fr
|
||||
vwl_fr/r_a [r/] fr
|
||||
vwl_fr/raa [߸] fr
|
||||
vwl_fr/re [߸] fr
|
||||
vwl_fr/raa [�æ] fr
|
||||
vwl_fr/re [�æ] fr
|
||||
vwl_fr/r_e [r/] fr
|
||||
vwl_fr/re2 [߸] fr
|
||||
vwl_fr/ree [߸] fr
|
||||
vwl_fr/ri [߸] fr
|
||||
vwl_fr/re2 [�æ] fr
|
||||
vwl_fr/ree [�æ] fr
|
||||
vwl_fr/ri [�æ] fr
|
||||
vwl_fr/r_i [r/] fr
|
||||
vwl_fr/rj [߸] fr
|
||||
vwl_fr/rj [�æ] fr
|
||||
vwl_fr/r_n [r/] fr
|
||||
vwl_fr/ro [߸] fr
|
||||
vwl_fr/ro [�æ] fr
|
||||
vwl_fr/r_o [r/] fr
|
||||
vwl_fr/roo [߸] fr
|
||||
vwl_fr/roo [�æ] fr
|
||||
vwl_fr/rr [r/] fr
|
||||
vwl_fr/ru [߸] fr
|
||||
vwl_fr/ru [�æ] fr
|
||||
vwl_fr/r_u [r/] fr
|
||||
vwl_fr/rw [߸] fr
|
||||
vwl_fr/ry [߸] fr
|
||||
vwl_fr/rw [�æ] fr
|
||||
vwl_fr/ry [�æ] fr
|
||||
vwl_fr/r_y [r/] fr
|
||||
vwl_fr/tr [r/2] fr
|
||||
vwl_fr/trr [r/] fr
|
||||
vwl_fr/u2r [߸] fr
|
||||
vwl_fr/u2r [�æ] fr
|
||||
vwl_fr/wa [w] fr
|
||||
[w/] fr
|
||||
vwl_fr/y2r [߸] fr
|
||||
vwl_fr/y2r [�æ] fr
|
||||
vwl_hi/l-voc [l-] base
|
||||
[l-] sk
|
||||
[l:] sk
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -243,6 +243,7 @@ endphoneme
|
||||
phoneme r*
|
||||
vowel nonsyllabic
|
||||
unstressed
|
||||
ipa r
|
||||
length 50
|
||||
starttype #@ endtype #@
|
||||
AppendPhoneme(*)
|
||||
|
||||
@@ -149,6 +149,7 @@ endphoneme
|
||||
phoneme R
|
||||
lengthmod 7
|
||||
liquid
|
||||
ipa ʁ
|
||||
FMT(r/aa)
|
||||
endphoneme
|
||||
|
||||
|
||||
@@ -169,6 +169,9 @@ phoneme Q
|
||||
Vowelin f1=2 f2=2300 200 300 f3=-300 80
|
||||
Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk
|
||||
|
||||
IF prevPhW(x) THEN
|
||||
ChangePhoneme(NULL)
|
||||
ENDIF
|
||||
IF nextPhW(isVoiced) THEN
|
||||
ELSE
|
||||
ChangePhoneme(x)
|
||||
|
||||
+25
-8
@@ -6,6 +6,7 @@ endphoneme
|
||||
|
||||
phoneme t# // reduced [t] as in "city"
|
||||
vcd alv stop
|
||||
ipa ɾ
|
||||
lengthmod 5
|
||||
Vowelin f1=1 f2=1700 -300 300 f3=-100 80
|
||||
Vowelout f1=2 f2=1700 -300 300 f3=-100 80
|
||||
@@ -28,7 +29,8 @@ phoneme l // use dark [l/2] before not-vowel
|
||||
liquid
|
||||
lengthmod 7
|
||||
|
||||
IF nextPh(isNotVowel) THEN
|
||||
IF nextPhW(isVowel) THEN
|
||||
ELSE
|
||||
IF prevPh(isNotVowel) THEN
|
||||
ChangePhoneme(l/)
|
||||
ELSE
|
||||
@@ -59,6 +61,7 @@ endphoneme
|
||||
|
||||
phoneme r- // linking r, used in English between certain vowels and a following vowel
|
||||
liquid rhotic
|
||||
ipa ɹ
|
||||
lengthmod 0
|
||||
|
||||
NextVowelStarts
|
||||
@@ -113,11 +116,8 @@ phoneme 3 // Schwa, used for rhotic schwa in American
|
||||
vowel starttype #@ endtype #@
|
||||
unstressed
|
||||
length 140
|
||||
IfNextVowelAppend(r-)
|
||||
IF thisPh(isWordEnd) THEN
|
||||
FMT(vowel/@_6)
|
||||
ENDIF
|
||||
FMT(vowel/@)
|
||||
ipa ə
|
||||
CALL @
|
||||
endphoneme
|
||||
|
||||
|
||||
@@ -165,6 +165,7 @@ endphoneme
|
||||
|
||||
phoneme a#
|
||||
vowel starttype #@ endtype #@
|
||||
ipa ɐ
|
||||
unstressed
|
||||
length 150
|
||||
FMT(vowel/a#_3)
|
||||
@@ -173,7 +174,8 @@ endphoneme
|
||||
|
||||
phoneme aa // 'bath' etc.
|
||||
vowel starttype #a endtype #a
|
||||
length 190
|
||||
ipa a
|
||||
length 185
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowel/a)
|
||||
endphoneme
|
||||
@@ -246,6 +248,7 @@ endphoneme
|
||||
|
||||
phoneme A@ // Used for [A:] when followed by 'r'
|
||||
vowel starttype #a endtype #a
|
||||
ipa ɑː
|
||||
length 230
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowel/aa_2)
|
||||
@@ -263,7 +266,7 @@ endphoneme
|
||||
|
||||
phoneme i:
|
||||
vowel starttype #i endtype #i
|
||||
length 175 long
|
||||
length 175
|
||||
IfNextVowelAppend(;)
|
||||
IF prevPh(w) THEN
|
||||
VowelStart(w/wi2)
|
||||
@@ -290,6 +293,7 @@ endphoneme
|
||||
|
||||
phoneme O@
|
||||
vowel starttype #o endtype #o
|
||||
ipa ɔː
|
||||
length 240
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowel/oo_en)
|
||||
@@ -298,6 +302,7 @@ endphoneme
|
||||
|
||||
phoneme o@
|
||||
vowel starttype #o endtype #o
|
||||
ipa ɔː
|
||||
length 250
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowel/oo_en)
|
||||
@@ -323,6 +328,7 @@ endphoneme
|
||||
|
||||
phoneme oU
|
||||
vowel starttype #@ endtype #u
|
||||
ipa əʊ
|
||||
length 220
|
||||
FMT(vdiph/@u_en)
|
||||
endphoneme
|
||||
@@ -331,6 +337,9 @@ endphoneme
|
||||
phoneme aI
|
||||
vowel starttype #a endtype #i
|
||||
length 240
|
||||
IF nextPh(#a) OR nextPh(#o) THEN
|
||||
AppendPhoneme(;)
|
||||
ENDIF
|
||||
FMT(vdiph/ai_2)
|
||||
endphoneme
|
||||
|
||||
@@ -402,6 +411,10 @@ endphoneme
|
||||
phoneme IR // used for "ir" when [3:] is split (Scottish)
|
||||
vowel starttype #@ endtype #@
|
||||
length 190
|
||||
ipa əɹ
|
||||
IF nextPhW(r-) THEN
|
||||
ipa ə
|
||||
ENDIF
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowelr/V_r)
|
||||
endphoneme
|
||||
@@ -410,6 +423,10 @@ endphoneme
|
||||
phoneme VR // used for "or"/"ur" when [3:] is split (Scottish)
|
||||
vowel starttype #@ endtype #@
|
||||
length 210
|
||||
ipa ʌɹ
|
||||
IF nextPhW(r-) THEN
|
||||
ipa ʌ
|
||||
ENDIF
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowelr/V3_r)
|
||||
endphoneme
|
||||
|
||||
@@ -14,6 +14,7 @@ endphoneme
|
||||
|
||||
phoneme 3 // Schwa, used for rhotic schwa in American
|
||||
vowel starttype #@ endtype #@
|
||||
ipa ə
|
||||
unstressed
|
||||
length 140
|
||||
IfNextVowelAppend(r-)
|
||||
@@ -72,6 +73,7 @@ endphoneme
|
||||
|
||||
phoneme V
|
||||
vowel starttype #o endtype #o
|
||||
ipa ʊ
|
||||
length 140
|
||||
ChangeIfDiminished(@)
|
||||
FMT(vowel/o-_2)
|
||||
@@ -88,6 +90,7 @@ endphoneme
|
||||
|
||||
phoneme a#
|
||||
vowel starttype #@ endtype #@
|
||||
ipa ɐ
|
||||
unstressed
|
||||
length 140
|
||||
IfNextVowelAppend(r-)
|
||||
@@ -105,6 +108,7 @@ endphoneme
|
||||
|
||||
phoneme A@
|
||||
vowel starttype #a endtype #@
|
||||
ipa ɑː
|
||||
length 250
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowel/aa_5)
|
||||
@@ -113,6 +117,7 @@ endphoneme
|
||||
|
||||
phoneme aa // 'bath' etc.
|
||||
vowel starttype #a endtype #a
|
||||
ipa a
|
||||
length 150
|
||||
FMT(vowel/a)
|
||||
endphoneme
|
||||
@@ -149,6 +154,7 @@ endphoneme
|
||||
|
||||
phoneme O@
|
||||
vowel starttype #o endtype #@
|
||||
ipa ɔː
|
||||
length 240
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vwl_en_n/O@)
|
||||
@@ -157,6 +163,7 @@ endphoneme
|
||||
|
||||
phoneme o@
|
||||
vowel starttype #o endtype #@
|
||||
ipa ɔː
|
||||
length 240
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vwl_en_n/O@)
|
||||
@@ -180,6 +187,7 @@ endphoneme
|
||||
|
||||
phoneme aU
|
||||
vowel starttype #e endtype #u
|
||||
ipa æʊ
|
||||
length 230
|
||||
FMT(vdiph/eeu_3)
|
||||
endphoneme
|
||||
@@ -187,6 +195,7 @@ endphoneme
|
||||
|
||||
phoneme oU
|
||||
vowel starttype #o endtype #o
|
||||
ipa oː
|
||||
length 220
|
||||
FMT(vowel/o)
|
||||
endphoneme
|
||||
@@ -201,6 +210,7 @@ endphoneme
|
||||
|
||||
phoneme eI
|
||||
vowel starttype #i endtype #i
|
||||
ipa eː
|
||||
length 210
|
||||
FMT(vowel/e)
|
||||
endphoneme
|
||||
|
||||
+15
-1
@@ -17,7 +17,11 @@ endphoneme
|
||||
|
||||
|
||||
phoneme 3 // Schwa, used for rhotic schwa in American
|
||||
import_phoneme @
|
||||
vowel starttype #@ endtype #@
|
||||
unstressed
|
||||
length 140
|
||||
ipa ə
|
||||
CALL @
|
||||
endphoneme
|
||||
|
||||
|
||||
@@ -45,6 +49,7 @@ endphoneme
|
||||
|
||||
phoneme a
|
||||
vowel starttype #a endtype #a
|
||||
ipa æ
|
||||
length 175
|
||||
ChangeIfDiminished(a#)
|
||||
FMT(vowel/&)
|
||||
@@ -109,6 +114,7 @@ endphoneme
|
||||
|
||||
phoneme a#
|
||||
vowel starttype #@ endtype #@
|
||||
ipa ɐ
|
||||
unstressed
|
||||
length 150
|
||||
IfNextVowelAppend(r-)
|
||||
@@ -126,6 +132,7 @@ endphoneme
|
||||
|
||||
phoneme A@
|
||||
vowel starttype #a endtype #a
|
||||
ipa ɑː
|
||||
length 240
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vwl_en_rp/aa)
|
||||
@@ -134,6 +141,7 @@ endphoneme
|
||||
|
||||
phoneme aa // 'bath' etc.
|
||||
vowel starttype #a endtype #a
|
||||
ipa ɑː
|
||||
length 200
|
||||
FMT(vwl_en_rp/aa)
|
||||
endphoneme
|
||||
@@ -170,6 +178,7 @@ endphoneme
|
||||
|
||||
phoneme O@
|
||||
vowel starttype #o endtype #@
|
||||
ipa ɔː
|
||||
length 230
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowel/oo_1)
|
||||
@@ -200,6 +209,7 @@ endphoneme
|
||||
|
||||
phoneme oU
|
||||
vowel starttype #@ endtype #u
|
||||
ipa əʊ
|
||||
length 220
|
||||
FMT(vdiph/@u_2)
|
||||
endphoneme
|
||||
@@ -208,6 +218,9 @@ endphoneme
|
||||
phoneme aI
|
||||
vowel starttype #a endtype #i
|
||||
length 230
|
||||
IF nextPh(#a) OR nextPh(#o) THEN
|
||||
AppendPhoneme(;)
|
||||
ENDIF
|
||||
FMT(vdiph/ai_6)
|
||||
endphoneme
|
||||
|
||||
@@ -244,6 +257,7 @@ endphoneme
|
||||
|
||||
phoneme U@
|
||||
vowel starttype #u endtype #@
|
||||
ipa ɔː
|
||||
length 230
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowel/o_mid)
|
||||
|
||||
@@ -79,6 +79,7 @@ endphoneme
|
||||
|
||||
phoneme aa // 'bath' etc.
|
||||
vowel starttype #a endtype #a
|
||||
ipa a:
|
||||
length 220
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowel/a_3)
|
||||
@@ -114,6 +115,7 @@ endphoneme
|
||||
|
||||
phoneme i // optional variant of [I] for end of words
|
||||
vowel starttype #i endtype #e
|
||||
ipa e
|
||||
length 150
|
||||
IfNextVowelAppend(;)
|
||||
FMT(vowel/e_5)
|
||||
@@ -138,6 +140,7 @@ endphoneme
|
||||
|
||||
phoneme U
|
||||
vowel starttype #u endtype #u
|
||||
ipa ʉ
|
||||
length 140
|
||||
FMT(vowel/u#_4)
|
||||
endphoneme
|
||||
@@ -146,6 +149,7 @@ endphoneme
|
||||
phoneme A:
|
||||
vowel starttype #a endtype #a
|
||||
length 220
|
||||
ipa a:
|
||||
IfNextVowelAppend(r-)
|
||||
IF nextPh(r) THEN
|
||||
FMT(vowelr/aa_r, 30)
|
||||
@@ -157,6 +161,7 @@ endphoneme
|
||||
phoneme A@ // Used for [A:] when followed by 'r', becomes [A:]+[r] in American
|
||||
vowel starttype #a endtype #@
|
||||
length 250
|
||||
ipa aː
|
||||
AppendPhoneme(r)
|
||||
FMT(vowelr/aa_r)
|
||||
endphoneme
|
||||
@@ -166,6 +171,7 @@ phoneme 3:
|
||||
vowel starttype #e endtype #@
|
||||
length 210
|
||||
ChangeIfNotStressed(VR) // also need "replace 02 3: VR" in voice file
|
||||
ipa e
|
||||
AppendPhoneme(r)
|
||||
FMT(vdiph2/e@)
|
||||
endphoneme
|
||||
@@ -199,6 +205,7 @@ endphoneme
|
||||
phoneme O@
|
||||
vowel starttype #o endtype #@
|
||||
length 230
|
||||
ipa ɔ
|
||||
AppendPhoneme(r)
|
||||
FMT(vowelr/oo_r)
|
||||
endphoneme
|
||||
@@ -206,6 +213,7 @@ endphoneme
|
||||
phoneme o@
|
||||
vowel starttype #o endtype #@
|
||||
length 230
|
||||
ipa o
|
||||
AppendPhoneme(r)
|
||||
FMT(vowelr/o_r)
|
||||
endphoneme
|
||||
@@ -221,6 +229,7 @@ endphoneme
|
||||
|
||||
phoneme u:
|
||||
vowel starttype #u endtype #u
|
||||
ipa ʉː
|
||||
length 160
|
||||
IF nextPh(isVFricative) THEN
|
||||
Length 200
|
||||
@@ -234,6 +243,7 @@ endphoneme
|
||||
|
||||
phoneme aU
|
||||
vowel starttype #a endtype #u
|
||||
ipa ʌʉ
|
||||
length 200
|
||||
FMT(vdiph/au#)
|
||||
endphoneme
|
||||
@@ -241,6 +251,7 @@ endphoneme
|
||||
|
||||
phoneme oU
|
||||
vowel starttype #o endtype #u
|
||||
ipa oː
|
||||
length 190
|
||||
FMT(vowel/o_3)
|
||||
endphoneme
|
||||
@@ -271,6 +282,7 @@ endphoneme
|
||||
|
||||
phoneme eI
|
||||
vowel starttype #e endtype #i
|
||||
ipa eː
|
||||
length 190
|
||||
FMT(vowel/e_2)
|
||||
endphoneme
|
||||
@@ -286,6 +298,7 @@ endphoneme
|
||||
phoneme e@
|
||||
vowel starttype #e endtype #@
|
||||
length 220
|
||||
ipa e
|
||||
AppendPhoneme(r)
|
||||
FMT(vdiph2/e@)
|
||||
endphoneme
|
||||
@@ -293,6 +306,7 @@ endphoneme
|
||||
|
||||
phoneme i@3
|
||||
vowel starttype #i endtype #@
|
||||
ipa ɪ
|
||||
length 220
|
||||
AppendPhoneme(r)
|
||||
FMT(vowelr/i_r)
|
||||
@@ -301,6 +315,10 @@ endphoneme
|
||||
|
||||
phoneme U@
|
||||
vowel starttype #u endtype #@
|
||||
ipa ʉɹ
|
||||
IF nextPh(r-) THEN
|
||||
ipa ʉ
|
||||
ENDIF
|
||||
length 240
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vdiph2/u#@)
|
||||
|
||||
+42
-2
@@ -6,6 +6,7 @@
|
||||
|
||||
phoneme 3 // Schwa, used for rhotic schwa in American
|
||||
vowel starttype #@ endtype #@
|
||||
ipa ɚ
|
||||
unstressed
|
||||
length 210
|
||||
IfNextVowelAppend(r-)
|
||||
@@ -50,6 +51,7 @@ endphoneme
|
||||
|
||||
phoneme a
|
||||
vowel starttype #e endtype #@
|
||||
ipa æ
|
||||
length 210
|
||||
|
||||
ChangeIfDiminished(a#)
|
||||
@@ -68,6 +70,7 @@ endphoneme
|
||||
|
||||
phoneme a#
|
||||
vowel starttype #@ endtype #@
|
||||
ipa ɐ
|
||||
unstressed
|
||||
length 150
|
||||
FMT(vowel/a#_3)
|
||||
@@ -112,9 +115,11 @@ endphoneme
|
||||
phoneme 0
|
||||
vowel starttype #a endtype #a
|
||||
length 200
|
||||
ipa ɑː
|
||||
ChangeIfDiminished(@)
|
||||
IF nextPh(r) THEN
|
||||
FMT(vwl_en_us/oor)
|
||||
ChangePhoneme(O:)
|
||||
// FMT(vwl_en_us/oor)
|
||||
ENDIF
|
||||
FMT(vowel/aa_8)
|
||||
endphoneme
|
||||
@@ -147,6 +152,10 @@ endphoneme
|
||||
|
||||
phoneme A@ // Used for [A:] when followed by 'r', becomes [A:]+[r] in American
|
||||
vowel starttype #a endtype #a
|
||||
ipa ɑːɹ
|
||||
IF nextPh(r-) THEN
|
||||
ipa ɑː
|
||||
ENDIF
|
||||
length 260
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vwl_en_us/ar)
|
||||
@@ -183,6 +192,10 @@ endphoneme
|
||||
phoneme O@
|
||||
vowel starttype #o endtype #@
|
||||
length 250
|
||||
ipa ɔːɹ
|
||||
IF nextPhW(r) THEN
|
||||
ipa ɔː
|
||||
ENDIF
|
||||
IfNextVowelAppend(r)
|
||||
FMT(vwl_en_us/oor)
|
||||
endphoneme
|
||||
@@ -191,6 +204,10 @@ endphoneme
|
||||
phoneme o@
|
||||
vowel starttype #o endtype #@
|
||||
length 250
|
||||
ipa oːɹ
|
||||
IF nextPhW(r) THEN
|
||||
ipa oː
|
||||
ENDIF
|
||||
IfNextVowelAppend(r)
|
||||
FMT(vwl_en_us/or)
|
||||
endphoneme
|
||||
@@ -228,6 +245,9 @@ endphoneme
|
||||
phoneme aI
|
||||
vowel starttype #a endtype #i
|
||||
length 250
|
||||
IF nextPh(#a) OR nextPh(#o) THEN
|
||||
AppendPhoneme(;)
|
||||
ENDIF
|
||||
FMT(vdiph/aae)
|
||||
endphoneme
|
||||
|
||||
@@ -249,6 +269,10 @@ endphoneme
|
||||
phoneme e@
|
||||
vowel starttype #e endtype #@
|
||||
length 280
|
||||
ipa ɛɹ
|
||||
IF nextPhW(r) THEN
|
||||
ipa ɛ
|
||||
ENDIF
|
||||
IfNextVowelAppend(r)
|
||||
FMT(vwl_en_us/er)
|
||||
endphoneme
|
||||
@@ -257,6 +281,10 @@ endphoneme
|
||||
phoneme i@3
|
||||
vowel starttype #i endtype #@
|
||||
length 280
|
||||
ipa ɪɹ
|
||||
IF nextPhW(r) THEN
|
||||
ipa ɪ
|
||||
ENDIF
|
||||
IfNextVowelAppend(r)
|
||||
FMT(vwl_en_us/ir)
|
||||
endphoneme
|
||||
@@ -265,6 +293,10 @@ endphoneme
|
||||
phoneme U@
|
||||
vowel starttype #@ endtype #@
|
||||
length 250
|
||||
ipa ʊɹ
|
||||
IF nextPhW(r-) THEN
|
||||
ipa ʊ
|
||||
ENDIF
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vwl_en_us/ur)
|
||||
endphoneme
|
||||
@@ -273,6 +305,10 @@ endphoneme
|
||||
phoneme aI@
|
||||
vowel starttype #a endtype #@
|
||||
length 300
|
||||
ipa aɪəɹ
|
||||
IF nextPhW(r-) THEN
|
||||
ipa aɪə
|
||||
ENDIF
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vwl_en_us/ai@)
|
||||
endphoneme
|
||||
@@ -281,7 +317,11 @@ endphoneme
|
||||
phoneme aU@
|
||||
vowel starttype #a endtype #@
|
||||
length 300
|
||||
IfNextVowelAppend(r-)
|
||||
ipa aɪʊɹ
|
||||
IF nextPhW(r) THEN
|
||||
ipa aɪʊ
|
||||
ENDIF
|
||||
IfNextVowelAppend(r)
|
||||
FMT(vwl_en_us/aU@)
|
||||
endphoneme
|
||||
|
||||
|
||||
+15
-2
@@ -18,7 +18,7 @@ endphoneme
|
||||
|
||||
phoneme a
|
||||
vowel starttype #a endtype #a
|
||||
length 170
|
||||
length 160
|
||||
ChangeIfDiminished(a#)
|
||||
FMT(vowel/a)
|
||||
endphoneme
|
||||
@@ -67,6 +67,7 @@ endphoneme
|
||||
|
||||
phoneme V
|
||||
vowel starttype #o endtype #o
|
||||
ipa ʊ
|
||||
length 140
|
||||
ChangeIfDiminished(@)
|
||||
FMT(vowel/o-_2)
|
||||
@@ -83,6 +84,7 @@ endphoneme
|
||||
|
||||
phoneme a#
|
||||
vowel starttype #@ endtype #@
|
||||
ipa ɐ
|
||||
unstressed
|
||||
length 140
|
||||
FMT(vowel/a#_3)
|
||||
@@ -99,6 +101,7 @@ endphoneme
|
||||
|
||||
phoneme A@
|
||||
vowel starttype #a endtype #a
|
||||
ipa ɑː
|
||||
length 240
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowel/aa_5)
|
||||
@@ -107,7 +110,8 @@ endphoneme
|
||||
|
||||
phoneme aa // 'bath' etc.
|
||||
vowel starttype #a endtype #a
|
||||
length 150
|
||||
ipa a
|
||||
length 160
|
||||
FMT(vowel/a)
|
||||
endphoneme
|
||||
|
||||
@@ -123,6 +127,7 @@ endphoneme
|
||||
|
||||
phoneme i:
|
||||
vowel starttype #e endtype #i
|
||||
ipa ei
|
||||
length 220
|
||||
IfNextVowelAppend(;)
|
||||
FMT(vdiph2/ei_3)
|
||||
@@ -140,6 +145,7 @@ endphoneme
|
||||
|
||||
phoneme O@
|
||||
vowel starttype #o endtype #@
|
||||
ipa ɔː
|
||||
length 240
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowel/oo_1)
|
||||
@@ -156,6 +162,7 @@ endphoneme
|
||||
|
||||
phoneme u:
|
||||
vowel starttype #u endtype #u
|
||||
ipa əu
|
||||
length 200
|
||||
FMT(vdiph/@u)
|
||||
endphoneme
|
||||
@@ -163,6 +170,7 @@ endphoneme
|
||||
|
||||
phoneme aU
|
||||
vowel starttype #a endtype #u
|
||||
ipa æʊ
|
||||
length 230
|
||||
FMT(vdiph/eeu_3)
|
||||
endphoneme
|
||||
@@ -170,6 +178,7 @@ endphoneme
|
||||
|
||||
phoneme oU
|
||||
vowel starttype #@ endtype #u
|
||||
ipa ʌʊ
|
||||
length 220
|
||||
FMT(vdiph/Vu_2)
|
||||
endphoneme
|
||||
@@ -177,6 +186,7 @@ endphoneme
|
||||
|
||||
phoneme aI
|
||||
vowel starttype #o endtype #i
|
||||
ipa ɔɪ
|
||||
length 240
|
||||
FMT(vdiph/ooi_3)
|
||||
endphoneme
|
||||
@@ -184,6 +194,7 @@ endphoneme
|
||||
|
||||
phoneme eI
|
||||
vowel starttype #@ endtype #i
|
||||
ipa eː
|
||||
length 240
|
||||
FMT(vdiph/@i_3)
|
||||
endphoneme
|
||||
@@ -191,6 +202,7 @@ endphoneme
|
||||
|
||||
phoneme OI
|
||||
vowel starttype #o endtype #i
|
||||
ipa oɪ
|
||||
length 230
|
||||
FMT(vdiph/oi)
|
||||
endphoneme
|
||||
@@ -198,6 +210,7 @@ endphoneme
|
||||
|
||||
phoneme e@
|
||||
vowel starttype #@ endtype #@
|
||||
ipa ɜː
|
||||
length 240
|
||||
IfNextVowelAppend(r-)
|
||||
FMT(vowel/3_en)
|
||||
|
||||
@@ -241,6 +241,7 @@ phoneme R2 // this is [R2], but shorter
|
||||
liquid
|
||||
trill
|
||||
lengthmod 6
|
||||
ipa r
|
||||
Vowelin f1=0 f2=1700 -300 300 f3=-300 80
|
||||
Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
|
||||
FMT(r3/r_trill_short) addWav(r3/r_trill.wav, 50)
|
||||
|
||||
+9
-3
@@ -1,7 +1,7 @@
|
||||
//====================================================
|
||||
// French
|
||||
//====================================================
|
||||
// Updated 2010-06-16 Michel Such <michel.such@free.fr>
|
||||
// Updated 2010-06-22 Michel Such <michel.such@free.fr>
|
||||
|
||||
phoneme #l virtual
|
||||
// Used for l and l/
|
||||
@@ -82,6 +82,7 @@ phoneme r
|
||||
starttype #r endtype #r
|
||||
Vowelin f1=0 f2=1500 -400 400 f3=-400 80
|
||||
lengthmod 7
|
||||
ipa U+0281
|
||||
|
||||
IF nextPh(isNotVowel) THEN
|
||||
ChangePhoneme(r/)
|
||||
@@ -100,6 +101,7 @@ phoneme r2 // silent unless followed by vowel
|
||||
vcd uvl frc
|
||||
rhotic
|
||||
starttype #r endtype #r
|
||||
ipa U+0281
|
||||
|
||||
IF nextPh(isNotVowel) THEN
|
||||
ChangePhoneme(NULL)
|
||||
@@ -115,6 +117,7 @@ phoneme r/ // variant of [r] when not preceding a vowel
|
||||
starttype #r endtype #r
|
||||
Vowelout f1=1 f2=1200 -400 800 f3=200 100 len=30
|
||||
lengthmod 7
|
||||
ipa U+0281
|
||||
|
||||
IF prevPhW(t) OR prevPhW(p) OR prevPhW(k) THEN
|
||||
FMT(vwl_fr/trr) addWav(r3/rx, 15)
|
||||
@@ -148,6 +151,7 @@ phoneme r/2
|
||||
liquid rhotic uvl nopause
|
||||
starttype #r endtype #r
|
||||
Vowelin f1=0 f2=1500 -400 400 f3=-400 80
|
||||
ipa U+0281
|
||||
|
||||
CALL post_r
|
||||
IF prevPhW(f) OR prevPhW(k) OR prevPhW(p) OR prevPhW(s) OR prevPhW(t) OR prevPhW(S) THEN
|
||||
@@ -349,6 +353,7 @@ phoneme I // longer than i
|
||||
vowel starttype #i endtype #i
|
||||
palatal
|
||||
length 240
|
||||
ipa i
|
||||
|
||||
IfNextVowelAppend(;)
|
||||
|
||||
@@ -470,12 +475,13 @@ endphoneme
|
||||
|
||||
phoneme y
|
||||
vowel starttype #u endtype #u
|
||||
length 170
|
||||
|
||||
IF nextPhW(E~) OR nextPhW(#i) THEN
|
||||
FMT(vowel/y, -40)
|
||||
length 110
|
||||
FMT(vowel/y)
|
||||
ENDIF
|
||||
|
||||
length 180
|
||||
FMT(vowel/y)
|
||||
endphoneme
|
||||
|
||||
|
||||
+40
-33
@@ -175,7 +175,7 @@ endphoneme
|
||||
phoneme E:
|
||||
vowel starttype #e endtype #e
|
||||
length 200
|
||||
FMT(vowel/e_mid2)
|
||||
FMT(vowel/e_8)
|
||||
endphoneme
|
||||
|
||||
|
||||
@@ -202,6 +202,7 @@ endphoneme
|
||||
|
||||
phoneme y
|
||||
vowel starttype #u endtype #u
|
||||
ipa ʏ
|
||||
length 110
|
||||
FMT(vowel/yy_4)
|
||||
endphoneme
|
||||
@@ -232,6 +233,7 @@ endphoneme
|
||||
|
||||
phoneme pF
|
||||
vls blb afr
|
||||
ipa pf
|
||||
Vowelout f1=0 f2=1000 -500 -350 f3=-200 80
|
||||
lengthmod 2
|
||||
WAV(ufric/f) // could replace this with a [pf] wav file
|
||||
@@ -300,10 +302,9 @@ endphoneme
|
||||
|
||||
|
||||
|
||||
// TESTING
|
||||
|
||||
phoneme r // uvular trill
|
||||
phoneme r // uvular trill or fricative
|
||||
vcd uvl frc
|
||||
ipa ʀ
|
||||
lengthmod 6
|
||||
length 110
|
||||
IF nextPhW(isVowel) THEN
|
||||
@@ -318,14 +319,36 @@ phoneme r // uvular trill
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme UR
|
||||
vowel starttype #u endtype #@
|
||||
flag1
|
||||
length 180
|
||||
FMT(vwl_de/uu_@)
|
||||
|
||||
|
||||
phoneme V# // used for 'r' after a vowel (to create a diphthong)
|
||||
liquid
|
||||
lengthmod 7
|
||||
IF nextPhW(isVowel) THEN
|
||||
ChangePhoneme(r)
|
||||
ENDIF
|
||||
|
||||
ipa ɐ
|
||||
IF prevPh(#a) OR prevPh(E) THEN
|
||||
FMT(r/V_2_)
|
||||
ENDIF
|
||||
IF prevPh(#u) THEN
|
||||
FMT(r/@_)
|
||||
ENDIF
|
||||
FMT(r/V_)
|
||||
endphoneme
|
||||
|
||||
|
||||
// TESTING
|
||||
|
||||
phoneme V1#
|
||||
liquid
|
||||
lengthmod 7
|
||||
IF nextPhW(isVowel) THEN
|
||||
ChangePhoneme(r")
|
||||
ENDIF
|
||||
FMT(r/V_)
|
||||
endphoneme
|
||||
|
||||
phoneme V2# // used for 'r' after a vowel (to create a diphthong)
|
||||
liquid
|
||||
@@ -336,23 +359,6 @@ phoneme V2# // used for 'r' after a vowel (to create a diphthong)
|
||||
FMT(r/V_2_)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme V# // used for 'r' after a vowel (to create a diphthong)
|
||||
liquid
|
||||
lengthmod 7
|
||||
IF nextPhW(isVowel) THEN
|
||||
ChangePhoneme(r")
|
||||
ENDIF
|
||||
|
||||
IF prevPh(#a) OR prevPh(E) THEN
|
||||
FMT(r/V_2_)
|
||||
ENDIF
|
||||
IF prevPh(#u) THEN
|
||||
FMT(r/@_)
|
||||
ENDIF
|
||||
FMT(r/V_)
|
||||
endphoneme
|
||||
|
||||
phoneme V3#
|
||||
liquid
|
||||
lengthmod 7
|
||||
@@ -362,11 +368,12 @@ phoneme V3#
|
||||
FMT(r/@_)
|
||||
endphoneme
|
||||
|
||||
phoneme V1#
|
||||
liquid
|
||||
lengthmod 7
|
||||
IF nextPhW(isVowel) THEN
|
||||
ChangePhoneme(r")
|
||||
ENDIF
|
||||
FMT(r/V_)
|
||||
phoneme UR
|
||||
vowel starttype #u endtype #@
|
||||
ipa ʊɐ
|
||||
flag1
|
||||
length 180
|
||||
FMT(vwl_de/uu_@)
|
||||
endphoneme
|
||||
|
||||
|
||||
|
||||
@@ -346,6 +346,7 @@ endphoneme
|
||||
phoneme t.
|
||||
vls rfx stop
|
||||
lengthmod 2
|
||||
ipa ʈ
|
||||
voicingswitch d.
|
||||
Vowelin f1=0 f2=1800 -300 300 f3=-400 80
|
||||
Vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2
|
||||
@@ -355,6 +356,7 @@ endphoneme
|
||||
phoneme th.
|
||||
vls rfx stop
|
||||
lengthmod 2
|
||||
ipa ʈh
|
||||
voicingswitch dh.
|
||||
Vowelin f1=0 f2=1800 -300 300 f3=-400 80
|
||||
Vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2
|
||||
@@ -366,6 +368,7 @@ phoneme d.
|
||||
vcd rfx stop
|
||||
lengthmod 5
|
||||
voicingswitch t.
|
||||
ipa ɖ
|
||||
Vowelin f1=1 f2=1800 -300 300 f3=-400 80
|
||||
Vowelout f1=1 f2=1800 -300 300 f3=-400 80 colr=2
|
||||
|
||||
@@ -384,6 +387,7 @@ endphoneme
|
||||
phoneme dh.
|
||||
vcd rfx stop
|
||||
lengthmod 5
|
||||
ipa ɖh
|
||||
voicingswitch th.
|
||||
Vowelin f1=1 f2=1800 -300 300 f3=-400 80
|
||||
Vowelout f1=1 f2=1800 -300 300 f3=-400 80 colr=2
|
||||
|
||||
@@ -223,6 +223,7 @@ endphoneme
|
||||
phoneme m#
|
||||
vcd blb nasal
|
||||
lengthmod 6
|
||||
ipa m#
|
||||
Vowelout f1=2 f2=1000 -500 -350 f3=-200 80 brk
|
||||
FMT(m/m#_)
|
||||
endphoneme
|
||||
@@ -231,6 +232,7 @@ endphoneme
|
||||
phoneme n#
|
||||
vcd alv nasal
|
||||
lengthmod 6
|
||||
ipa n#
|
||||
Vowelout f1=2 f2=1700 -300 250 f3=-100 80 rms=20 brk
|
||||
|
||||
NextVowelStarts
|
||||
@@ -249,6 +251,7 @@ endphoneme
|
||||
phoneme n^#
|
||||
vcd pal nasal palatal
|
||||
lengthmod 6
|
||||
ipa ɲ#
|
||||
Vowelout f1=3 f2=2300 300 400 f3=100 80 brk rate
|
||||
FMT(n^/n^#_)
|
||||
endphoneme
|
||||
@@ -258,6 +261,7 @@ endphoneme
|
||||
phoneme N#
|
||||
vcd vel nasal
|
||||
lengthmod 6
|
||||
ipa ŋ#
|
||||
Vowelout f1=3 f2=2300 300 400 f3=-200 80 len=40 rms=20 brk
|
||||
|
||||
NextVowelStarts
|
||||
@@ -276,6 +280,7 @@ endphoneme
|
||||
phoneme l#
|
||||
vls alv frc
|
||||
lengthmod 3
|
||||
ipa l#
|
||||
WAV(ufric/l#, 25)
|
||||
endphoneme
|
||||
|
||||
@@ -283,6 +288,7 @@ endphoneme
|
||||
phoneme tl#
|
||||
vls alv stop
|
||||
lengthmod 2
|
||||
ipa tl#
|
||||
Vowelin f1=0 f2=1700 -300 300 f3=-100 80
|
||||
Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
|
||||
WAV(ufric/tl#, 50)
|
||||
@@ -292,6 +298,7 @@ endphoneme
|
||||
phoneme r# // used for [r] when not preceding a vowel
|
||||
liquid
|
||||
lengthmod 2 //
|
||||
ipa r#
|
||||
FMT(r3/r#_) addWav(r3/rx)
|
||||
// before n r3/r_n+r3/rx
|
||||
endphoneme
|
||||
|
||||
@@ -141,6 +141,7 @@ phoneme <h>
|
||||
vls glt apr
|
||||
length 50
|
||||
lengthmod 3
|
||||
ipa ʰ
|
||||
|
||||
IF nextPh(#@) THEN
|
||||
WAV(h/h@)
|
||||
|
||||
@@ -61,6 +61,7 @@ endphoneme
|
||||
|
||||
phoneme a#
|
||||
vowel starttype #a endtype #a
|
||||
ipa ɐ
|
||||
length 120
|
||||
FMT(vowel/V_6)
|
||||
endphoneme
|
||||
|
||||
@@ -135,12 +135,14 @@ endphoneme
|
||||
|
||||
phoneme u-
|
||||
vowel starttype #u endtype #u
|
||||
ipa ʉ
|
||||
length 120
|
||||
FMT(vwl_no/u#)
|
||||
endphoneme
|
||||
|
||||
phoneme u-:
|
||||
vowel starttype #u endtype #u
|
||||
ipa ʉː
|
||||
length 260
|
||||
FMT(vwl_no/u#2)
|
||||
endphoneme
|
||||
@@ -171,6 +173,7 @@ endphoneme
|
||||
|
||||
phoneme u-I
|
||||
vowel starttype #u endtype #i
|
||||
ipa ʉɪ
|
||||
length 270
|
||||
IfNextVowelAppend(;)
|
||||
FMT(vdiph/yi)
|
||||
|
||||
@@ -13,6 +13,7 @@ endphoneme
|
||||
|
||||
phoneme a#
|
||||
vowel starttype #a endtype #a
|
||||
ipa ɐ
|
||||
length 170
|
||||
FMT(vowel/a#_2)
|
||||
endphoneme
|
||||
@@ -60,6 +61,7 @@ endphoneme
|
||||
|
||||
phoneme y // close central unrounded (i-bar)
|
||||
vowel starttype #i endtype #i
|
||||
ipa ɨ
|
||||
length 180
|
||||
FMT(vowel/ii#_2)
|
||||
endphoneme
|
||||
@@ -85,6 +87,7 @@ endphoneme
|
||||
phoneme R
|
||||
liquid
|
||||
trill
|
||||
ipa r
|
||||
lengthmod 6
|
||||
Vowelin f1=0 f2=1700 -300 300 f3=-300 80
|
||||
Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
|
||||
|
||||
+13
-2
@@ -8,6 +8,7 @@
|
||||
phoneme &
|
||||
vowel starttype #@ endtype #@
|
||||
length 180
|
||||
ipa ɐ
|
||||
FMT(vowel/a#_3)
|
||||
unstressed
|
||||
endphoneme
|
||||
@@ -15,6 +16,7 @@ endphoneme
|
||||
phoneme &/ // Used for final "a" when next word starts with "a"
|
||||
vowel starttype #@ endtype #@
|
||||
length 180
|
||||
ipa ɐ
|
||||
IF nextPh(isVowel) THEN
|
||||
ChangePhoneme(NULL)
|
||||
ENDIF
|
||||
@@ -30,12 +32,14 @@ endphoneme
|
||||
|
||||
phoneme &~
|
||||
vowel starttype #e endtype #@
|
||||
ipa ɐU+0303
|
||||
length 240
|
||||
FMT(vnasal/ee_n2)
|
||||
endphoneme
|
||||
|
||||
phoneme &U~
|
||||
vowel starttype #@ endtype #u
|
||||
ipa ɐU+0303ʊU+0303
|
||||
length 240
|
||||
FMT(vnasal/a#u_n)
|
||||
endphoneme
|
||||
@@ -59,6 +63,7 @@ endphoneme
|
||||
phoneme y
|
||||
vowel starttype #@ endtype #@
|
||||
length 110
|
||||
ipa ɨ
|
||||
FMT(vowel/i#_5)
|
||||
endphoneme
|
||||
|
||||
@@ -74,6 +79,7 @@ endphoneme
|
||||
phoneme i/ // changes to NULL before a vowel
|
||||
vowel starttype #i endtype #i
|
||||
length 100
|
||||
ipa ɨ
|
||||
IF nextPh(isVowel) THEN
|
||||
ChangePhoneme(NULL)
|
||||
ENDIF
|
||||
@@ -131,6 +137,7 @@ endphoneme
|
||||
phoneme x // [r] for Portugal
|
||||
liquid
|
||||
trill
|
||||
ipa ʁ
|
||||
lengthmod 7
|
||||
Vowelin f1=0 f2=1500 -400 400 f3=-400 80
|
||||
IF nextPh(isNotVowel) THEN
|
||||
@@ -145,8 +152,12 @@ phoneme R // for Portugal this is same the as [r]
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme s# // This is [s] for Brazi;, [S] for Portugal
|
||||
import_phoneme base/S
|
||||
phoneme s# // This is [s] for Brazil, [S] for Portugal
|
||||
vls pla frc sibilant
|
||||
lengthmod 3
|
||||
ipa ʃ
|
||||
CALL base/S
|
||||
// import_phoneme base/S
|
||||
endphoneme
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ endphoneme
|
||||
|
||||
phoneme &~
|
||||
vowel starttype #@ endtype #@
|
||||
ipa ɐU+0303
|
||||
length 180
|
||||
// ChangeIfNotStressed(&)
|
||||
FMT(vnasal/a#_n)
|
||||
@@ -44,12 +45,14 @@ endphoneme
|
||||
|
||||
phoneme &U~
|
||||
vowel starttype #@ endtype #u
|
||||
ipa ɐU+0303ʊU+0303
|
||||
length 240
|
||||
FMT(vnasal/a#u_n)
|
||||
endphoneme
|
||||
|
||||
phoneme oI~
|
||||
vowel starttype #o endtype #i
|
||||
ipa oU+0303ɪU+0303
|
||||
length 260
|
||||
FMT(vnasal/oi_n)
|
||||
endphoneme
|
||||
@@ -183,6 +186,7 @@ endphoneme
|
||||
phoneme x // this is [R] from Slovak/Czech
|
||||
liquid
|
||||
trill
|
||||
ipa r
|
||||
lengthmod 6
|
||||
Vowelin f1=0 f2=1700 -300 300 f3=-300 80
|
||||
Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
|
||||
@@ -196,13 +200,17 @@ endphoneme
|
||||
|
||||
|
||||
phoneme s# // This is [s] for Brazi;, [S] for Portugal
|
||||
import_phoneme base/s
|
||||
vls alv frc sibilant
|
||||
lengthmod 3
|
||||
ipa s
|
||||
CALL base/s
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme *
|
||||
vcd alv stop
|
||||
lengthmod 6
|
||||
ipa ɾ
|
||||
Vowelin f1=1 f2=1700 -300 300 f3=0 80
|
||||
Vowelout f1=2 f2=1700 -300 300 f3=0 80
|
||||
IF PreVoicing THEN
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
phoneme I^ // "silent i", palatilizes the preceding consonant
|
||||
vowel starttype #i endtype #i
|
||||
unstressed
|
||||
ipa ʲ
|
||||
length 70
|
||||
IF nextPh(isVowel) THEN
|
||||
ChangePhoneme(;)
|
||||
@@ -41,6 +42,7 @@ endphoneme
|
||||
|
||||
phoneme y
|
||||
vowel starttype #@ endtype #@
|
||||
ipa ɨ
|
||||
length 180
|
||||
FMT(vowel/i#_5)
|
||||
endphoneme
|
||||
|
||||
@@ -13,6 +13,7 @@ endphoneme
|
||||
|
||||
phoneme &
|
||||
vowel starttype #a endtype #a
|
||||
ipa ɐ
|
||||
length 140
|
||||
FMT(vowel/a#)
|
||||
endphoneme
|
||||
@@ -21,6 +22,7 @@ endphoneme
|
||||
phoneme r* // this is [R] from Slovak/Czech
|
||||
liquid
|
||||
trill
|
||||
ipa r
|
||||
lengthmod 6
|
||||
Vowelin f1=0 f2=1700 -300 300 f3=-300 80
|
||||
Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
|
||||
|
||||
@@ -104,12 +104,14 @@ endphoneme
|
||||
|
||||
phoneme r-
|
||||
vowel starttype #@ endtype #@
|
||||
ipa rU+0329
|
||||
length 220
|
||||
FMT(vowelr/r-voc)
|
||||
endphoneme
|
||||
|
||||
phoneme r:
|
||||
vowel starttype #@ endtype #@
|
||||
ipa rU+0329ː
|
||||
length 300
|
||||
FMT(vowelr/r-voc)
|
||||
endphoneme
|
||||
@@ -118,6 +120,7 @@ endphoneme
|
||||
|
||||
phoneme R^ // Czech r-caron
|
||||
vcd pla frc sibilant
|
||||
ipa rU+031d
|
||||
lengthmod 6
|
||||
Vowelin f1=0 f2=1700 -300 300 f3=-300 80
|
||||
Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
|
||||
@@ -126,6 +129,7 @@ endphoneme
|
||||
|
||||
phoneme R^/ // Czech r-caron (weaker, for after p,f,t,k)
|
||||
vcd pla frc sibilant
|
||||
ipa rU+031dU+030a
|
||||
lengthmod 6
|
||||
Vowelin f1=0 f2=1700 -300 300 f3=-300 80
|
||||
Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
|
||||
@@ -135,6 +139,7 @@ endphoneme
|
||||
|
||||
phoneme l-
|
||||
vowel starttype #@ endtype #@
|
||||
ipa lU+0329
|
||||
length 140
|
||||
FMT(vwl_hi/l-voc)
|
||||
endphoneme
|
||||
@@ -142,6 +147,7 @@ endphoneme
|
||||
|
||||
phoneme l:
|
||||
vowel starttype #@ endtype #@
|
||||
ipa lU+0329ː
|
||||
length 250
|
||||
FMT(vwl_hi/l-voc)
|
||||
endphoneme
|
||||
|
||||
@@ -71,6 +71,7 @@ endphoneme
|
||||
|
||||
phoneme v# // a shorter [v], a little towards [b]
|
||||
vcd lbd frc
|
||||
ipa v
|
||||
lengthmod 6
|
||||
voicingswitch f
|
||||
Vowelin f1=1 f2=1000 -300 -200 f3=-300 100
|
||||
|
||||
+5
-6
@@ -13,6 +13,7 @@ endphoneme
|
||||
|
||||
phoneme V
|
||||
vowel starttype #@ endtype #@
|
||||
ipa ɐ
|
||||
length 130
|
||||
FMT(vowel/V_3)
|
||||
endphoneme
|
||||
@@ -81,6 +82,7 @@ phoneme u
|
||||
vowel starttype #u endtype #u
|
||||
length 110
|
||||
IF prevPhW(isVel) THEN
|
||||
FMT(vowel/u_bck2)
|
||||
ELSE
|
||||
ChangeIfNotStressed(U)
|
||||
ENDIF
|
||||
@@ -90,6 +92,7 @@ endphoneme
|
||||
phoneme U
|
||||
vowel starttype #u endtype #u
|
||||
length 110
|
||||
ipa ʉ
|
||||
FMT(vowel/u#_3)
|
||||
endphoneme
|
||||
|
||||
@@ -97,6 +100,7 @@ phoneme u:
|
||||
vowel starttype #u endtype #u
|
||||
length 260
|
||||
IF prevPhW(isVel) THEN
|
||||
FMT(vowel/u_bck2)
|
||||
ELSE
|
||||
ChangeIfNotStressed(U:)
|
||||
ENDIF
|
||||
@@ -105,16 +109,11 @@ endphoneme
|
||||
|
||||
phoneme U:
|
||||
vowel starttype #u endtype #u
|
||||
ipa ʉː
|
||||
length 240
|
||||
FMT(vowel/u#_3)
|
||||
endphoneme
|
||||
|
||||
phoneme u-
|
||||
vowel starttype #u endtype #u
|
||||
length 130
|
||||
FMT(vowel/u#_2)
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme aI
|
||||
vowel starttype #a endtype #i
|
||||
|
||||
@@ -23,6 +23,7 @@ endphoneme
|
||||
|
||||
phoneme I
|
||||
vowel starttype #i endtype #i
|
||||
ipa ɨ
|
||||
length 150
|
||||
FMT(vowel/ii_3)
|
||||
endphoneme
|
||||
@@ -69,6 +70,7 @@ endphoneme
|
||||
|
||||
phoneme y: // symbol used in place of i" (i bar)
|
||||
vowel starttype #i endtype #i
|
||||
ipa ɨː
|
||||
length 180
|
||||
ChangeIfNotStressed(Y)
|
||||
FMT(vowel/i#)
|
||||
@@ -112,6 +114,7 @@ endphoneme
|
||||
|
||||
phoneme AY
|
||||
vowel starttype #a endtype #i
|
||||
ipa ɑɨ
|
||||
length 250
|
||||
FMT(vdiph/aai_2)
|
||||
endphoneme
|
||||
@@ -126,6 +129,7 @@ endphoneme
|
||||
|
||||
phoneme aY
|
||||
vowel starttype #a endtype #i
|
||||
ipa aɨ
|
||||
length 210
|
||||
FMT(vdiph/ai_2)
|
||||
endphoneme
|
||||
@@ -147,6 +151,7 @@ endphoneme
|
||||
|
||||
phoneme @Y
|
||||
vowel starttype #@ endtype #i
|
||||
ipa əɨ
|
||||
length 210
|
||||
FMT(vdiph/@i_2)
|
||||
endphoneme
|
||||
@@ -168,6 +173,7 @@ endphoneme
|
||||
|
||||
phoneme Yu
|
||||
vowel starttype #i endtype #u
|
||||
ipa ɨu
|
||||
length 210
|
||||
FMT(vdiph2/iu_4)
|
||||
endphoneme
|
||||
@@ -182,6 +188,7 @@ endphoneme
|
||||
|
||||
phoneme OY
|
||||
vowel starttype #o endtype #i
|
||||
ipa ɔɨ
|
||||
length 210
|
||||
FMT(vdiph/ooi)
|
||||
endphoneme
|
||||
@@ -196,6 +203,7 @@ endphoneme
|
||||
|
||||
phoneme uY
|
||||
vowel starttype #u endtype #i
|
||||
ipa uɨ
|
||||
length 210
|
||||
FMT(vdiph/ui_3)
|
||||
endphoneme
|
||||
|
||||
+45
-5
@@ -145,9 +145,13 @@ endphoneme
|
||||
|
||||
|
||||
phoneme @- // very short schwa
|
||||
vowel nonsyllabic
|
||||
starttype #@ endtype #@
|
||||
unstressed
|
||||
vowel starttype #@ endtype #@
|
||||
unstressed nonsyllabic
|
||||
|
||||
ipa ə
|
||||
IF nextPhW(*) THEN
|
||||
ipa NULL
|
||||
ENDIF
|
||||
length 50
|
||||
FMT(vowel/@-)
|
||||
endphoneme
|
||||
@@ -267,6 +271,7 @@ endphoneme
|
||||
|
||||
phoneme r- // syllabic r
|
||||
vowel starttype #@ endtype #@
|
||||
ipa rU+0329
|
||||
unstressed
|
||||
length 220
|
||||
FMT(vowelr/r-voc)
|
||||
@@ -274,6 +279,7 @@ endphoneme
|
||||
|
||||
phoneme l- // syllabic l
|
||||
vowel starttype #@ endtype #@
|
||||
ipa lU+0329
|
||||
unstressed
|
||||
length 200
|
||||
FMT(vwl_hi/l-voc)
|
||||
@@ -282,6 +288,7 @@ endphoneme
|
||||
|
||||
phoneme r
|
||||
liquid rhotic
|
||||
ipa ɹ
|
||||
lengthmod 7
|
||||
|
||||
IF nextPh(isNotVowel) THEN
|
||||
@@ -337,6 +344,10 @@ phoneme R
|
||||
liquid
|
||||
trill
|
||||
lengthmod 6
|
||||
ipa r
|
||||
IF nextPhW(R2) THEN
|
||||
ipa NULL
|
||||
ENDIF
|
||||
Vowelin f1=0 f2=1600 -300 300 f3=-200 80
|
||||
Vowelout f1=2 f2=1600 -300 300 f3=-200 80 brk
|
||||
FMT(r3/r_trill2) addWav(r3/r_trill2.wav, 65)
|
||||
@@ -346,6 +357,7 @@ phoneme R2 // this is [R] from Slovak/Czech
|
||||
liquid
|
||||
trill
|
||||
lengthmod 6
|
||||
ipa r
|
||||
Vowelin f1=0 f2=1700 -300 300 f3=-300 80
|
||||
Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
|
||||
FMT(r3/r_trill) addWav(r3/r_trill.wav, 50)
|
||||
@@ -356,6 +368,7 @@ phoneme R3 // Afrikaans
|
||||
trill
|
||||
lengthmod 6
|
||||
length 60
|
||||
ipa r
|
||||
Vowelin f1=2 f2=2700 -300 -200 f3=-1300 80
|
||||
Vowelout f1=2 f2=1700 -300 -200 f3=-1300 80
|
||||
|
||||
@@ -379,6 +392,7 @@ endphoneme
|
||||
|
||||
phoneme r" // uvular trill
|
||||
vcd uvl frc
|
||||
ipa ʀ
|
||||
lengthmod 6
|
||||
IF nextPh(isNotVowel) THEN
|
||||
FMT(r3/r_uvl) addWav(r3/r_uvl.wav, 50)
|
||||
@@ -497,6 +511,7 @@ endphoneme
|
||||
|
||||
phoneme l^ // palatal l
|
||||
liquid
|
||||
ipa ʎ
|
||||
lengthmod 7
|
||||
Vowelout len=60 lenadd rate
|
||||
length 100
|
||||
@@ -520,6 +535,7 @@ endphoneme
|
||||
|
||||
phoneme l.
|
||||
liquid rfx
|
||||
ipa ɭ
|
||||
lengthmod 7
|
||||
FMT(l^/l_rfx)
|
||||
endphoneme
|
||||
@@ -563,7 +579,7 @@ phoneme j
|
||||
liquid palatal
|
||||
lengthmod 7
|
||||
|
||||
IF nextPh(isVowel) THEN
|
||||
IF nextPhW(isVowel) THEN
|
||||
NextVowelStarts
|
||||
VowelStart(j/j@)
|
||||
VowelStart(j/ja)
|
||||
@@ -591,6 +607,10 @@ phoneme ; // linking j, used between (i) vowels and a following vowel
|
||||
liquid palatal
|
||||
lengthmod 0
|
||||
|
||||
IF prevPh(#i) THEN
|
||||
ipa NULL // linking after i vowel, don't show in ipa
|
||||
ENDIF
|
||||
|
||||
IF nextPh(isNotVowel) THEN
|
||||
ChangePhoneme(NULL) // this is to ignore this phoneme if not before a vowel
|
||||
ENDIF
|
||||
@@ -682,6 +702,7 @@ endphoneme
|
||||
|
||||
phoneme n.
|
||||
vcd rfx nasal
|
||||
ipa ɳ
|
||||
starttype n endtype n
|
||||
Vowelin f1=2 f2=1200 -300 250 f3=-500 80 rms=20 colr=2
|
||||
Vowelout f1=2 f2=1200 -300 250 f3=-500 80 rms=20 brk colr=2
|
||||
@@ -712,6 +733,7 @@ endphoneme
|
||||
|
||||
phoneme n^
|
||||
vcd pal nasal palatal
|
||||
ipa ɲ
|
||||
Vowelout f1=3 f2=2500 300 500 f3=100 80 len=45 brk rate
|
||||
lengthmod 4
|
||||
|
||||
@@ -777,6 +799,7 @@ endphoneme
|
||||
|
||||
phoneme ** // TEST flap
|
||||
liquid alv
|
||||
ipa ɾ
|
||||
lengthmod 3
|
||||
Vowelout f1=3 f2=1600 -300 300 f3=-300 80 rms=35 len=15
|
||||
Vowelin f1=2 f2=1600 -300 300 f3=-100 80 len=20
|
||||
@@ -792,8 +815,13 @@ endphoneme
|
||||
phoneme * // flap
|
||||
vcd alv flp
|
||||
brkafter
|
||||
ipa ɾ
|
||||
lengthmod 3
|
||||
|
||||
IF prevPhW(@-) THEN
|
||||
ipa r // @-* sequence for [r]
|
||||
ENDIF
|
||||
|
||||
IF nextPh(#e) OR nextPh(#i) THEN
|
||||
Vowelin f1=0 f2=1500 -300 300 f3=-200 80
|
||||
FMT(d/tap1) addWav(r3/rx, 150)
|
||||
@@ -1052,6 +1080,7 @@ endphoneme
|
||||
|
||||
phoneme v# // approximant, not fricative
|
||||
vcd lbd frc
|
||||
ipa ʋ
|
||||
lengthmod 6
|
||||
voicingswitch f
|
||||
Vowelin f1=0 f2=1000 -300 -200 f3=-300 100
|
||||
@@ -1121,6 +1150,7 @@ endphoneme
|
||||
|
||||
phoneme z.
|
||||
vcd pla frc sibilant
|
||||
ipa ʐ
|
||||
voicingswitch s.
|
||||
lengthmod 6
|
||||
Vowelin f1=0 f2=1800 -100 300 f3=-300 80
|
||||
@@ -1142,6 +1172,7 @@ endphoneme
|
||||
|
||||
phoneme z;
|
||||
vcd pal frc sibilant palatal
|
||||
ipa ʑ
|
||||
voicingswitch s;
|
||||
lengthmod 6
|
||||
Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70
|
||||
@@ -1170,6 +1201,7 @@ endphoneme
|
||||
|
||||
phoneme J^ // palatal fricative (Kirshenbaum C<vcd>)
|
||||
vcd pal frc palatal
|
||||
ipa ʝ
|
||||
voicingswitch C
|
||||
lengthmod 6
|
||||
Vowelin f1=1 f2=2700 400 600 f3=200 70
|
||||
@@ -1213,8 +1245,9 @@ phoneme Q^
|
||||
endphoneme
|
||||
|
||||
|
||||
phoneme Q" // voiced velar fricative
|
||||
phoneme Q"
|
||||
vcd uvl frc
|
||||
ipa ʁ
|
||||
lengthmod 6
|
||||
|
||||
IF nextPh(isPause2) THEN
|
||||
@@ -1430,6 +1463,7 @@ endphoneme
|
||||
|
||||
phoneme s.
|
||||
vls pla frc sibilant
|
||||
ipa ʂ
|
||||
voicingswitch z.
|
||||
lengthmod 3
|
||||
Vowelin f1=0 f2=1800 -100 300 f3=-300 80
|
||||
@@ -1444,6 +1478,7 @@ endphoneme
|
||||
|
||||
phoneme s;
|
||||
vls pal frc sibilant palatal
|
||||
ipa ʂ
|
||||
voicingswitch z;
|
||||
lengthmod 3
|
||||
Vowelin f1=1 f2=2700 400 600 f3=200 70 rate len=70
|
||||
@@ -1472,6 +1507,7 @@ endphoneme
|
||||
|
||||
phoneme l# // Lateral fricative (eg. Welsh "ll")
|
||||
vls alv frc
|
||||
ipa ɬ
|
||||
lengthmod 3
|
||||
|
||||
NextVowelStarts
|
||||
@@ -1533,6 +1569,7 @@ endphoneme
|
||||
phoneme h
|
||||
vls glt apr
|
||||
lengthmod 3
|
||||
ipa h
|
||||
|
||||
IF nextPh(#@) THEN
|
||||
WAV(h/h@)
|
||||
@@ -1767,3 +1804,6 @@ include ph_bulgarian
|
||||
|
||||
phonemetable nso base
|
||||
include ph_northern-sotho
|
||||
|
||||
phonemetable ht fr
|
||||
include ph_haitian
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -50,12 +50,13 @@ Revision 5
|
||||
typedef enum {
|
||||
espeakEVENT_LIST_TERMINATED = 0, // Retrieval mode: terminates the event list.
|
||||
espeakEVENT_WORD = 1, // Start of word
|
||||
espeakEVENT_SENTENCE, // Start of sentence
|
||||
espeakEVENT_MARK, // Mark
|
||||
espeakEVENT_PLAY, // Audio element
|
||||
espeakEVENT_END, // End of sentence or clause
|
||||
espeakEVENT_MSG_TERMINATED, // End of message
|
||||
espeakEVENT_PHONEME // Phoneme, if enabled in espeak_Initialize()
|
||||
espeakEVENT_SENTENCE = 2, // Start of sentence
|
||||
espeakEVENT_MARK = 3, // Mark
|
||||
espeakEVENT_PLAY = 4, // Audio element
|
||||
espeakEVENT_END = 5, // End of sentence or clause
|
||||
espeakEVENT_MSG_TERMINATED = 6, // End of message
|
||||
espeakEVENT_PHONEME = 7, // Phoneme, if enabled in espeak_Initialize()
|
||||
espeakEVENT_SAMPLERATE = 8 // internal use, set sample rate
|
||||
} espeak_EVENT_TYPE;
|
||||
|
||||
|
||||
@@ -73,7 +74,7 @@ typedef struct {
|
||||
const char *name; // used for MARK and PLAY events. UTF8 string
|
||||
} id;
|
||||
} espeak_EVENT;
|
||||
/*
|
||||
/*
|
||||
When a message is supplied to espeak_synth, the request is buffered and espeak_synth returns. When the message is really processed, the callback function will be repetedly called.
|
||||
|
||||
|
||||
@@ -81,16 +82,16 @@ typedef struct {
|
||||
|
||||
In PLAYBACK mode, the callback function is called as soon as an event happens.
|
||||
|
||||
For example suppose that the following message is supplied to espeak_Synth:
|
||||
For example suppose that the following message is supplied to espeak_Synth:
|
||||
"hello, hello."
|
||||
|
||||
|
||||
* Once processed in RETRIEVAL mode, it could lead to 3 calls of the callback function :
|
||||
|
||||
** Block 1:
|
||||
<audio data> +
|
||||
<audio data> +
|
||||
List of events: SENTENCE + WORD + LIST_TERMINATED
|
||||
|
||||
|
||||
** Block 2:
|
||||
<audio data> +
|
||||
List of events: WORD + END + LIST_TERMINATED
|
||||
@@ -127,11 +128,11 @@ typedef enum {
|
||||
|
||||
typedef enum {
|
||||
/* PLAYBACK mode: plays the audio data, supplies events to the calling program*/
|
||||
AUDIO_OUTPUT_PLAYBACK,
|
||||
AUDIO_OUTPUT_PLAYBACK,
|
||||
|
||||
/* RETRIEVAL mode: supplies audio data and events to the calling program */
|
||||
AUDIO_OUTPUT_RETRIEVAL,
|
||||
|
||||
|
||||
/* SYNCHRONOUS mode: as RETRIEVAL but doesn't return until synthesis is completed */
|
||||
AUDIO_OUTPUT_SYNCHRONOUS,
|
||||
|
||||
@@ -174,7 +175,7 @@ extern "C"
|
||||
ESPEAK_API void espeak_SetSynthCallback(t_espeak_callback* SynthCallback);
|
||||
/* Must be called before any synthesis functions are called.
|
||||
This specifies a function in the calling program which is called when a buffer of
|
||||
speech sound data has been produced.
|
||||
speech sound data has been produced.
|
||||
|
||||
|
||||
The callback function is of the form:
|
||||
@@ -263,7 +264,7 @@ ESPEAK_API espeak_ERROR espeak_Synth(const void *text,
|
||||
start of the text.
|
||||
|
||||
position_type: Determines whether "position" is a number of characters, words, or sentences.
|
||||
Values:
|
||||
Values:
|
||||
|
||||
end_position: If set, this gives a character position at which speaking will stop. A value
|
||||
of zero indicates no end position.
|
||||
@@ -282,13 +283,13 @@ ESPEAK_API espeak_ERROR espeak_Synth(const void *text,
|
||||
espeakENDPAUSE If set then a sentence pause is added at the end of the text. If not set then
|
||||
this pause is suppressed.
|
||||
|
||||
unique_identifier: message identifier; helpful for identifying later
|
||||
unique_identifier: message identifier; helpful for identifying later
|
||||
data supplied to the callback.
|
||||
|
||||
user_data: pointer which will be passed to the callback function.
|
||||
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
you may try after a while to call the function again.
|
||||
EE_INTERNAL_ERROR.
|
||||
*/
|
||||
@@ -311,8 +312,8 @@ ESPEAK_API espeak_ERROR espeak_Synth_Mark(const void *text,
|
||||
|
||||
For the other parameters, see espeak_Synth()
|
||||
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
you may try after a while to call the function again.
|
||||
EE_INTERNAL_ERROR.
|
||||
*/
|
||||
@@ -325,8 +326,8 @@ ESPEAK_API espeak_ERROR espeak_Key(const char *key_name);
|
||||
If key_name is a single character, it speaks the name of the character.
|
||||
Otherwise, it speaks key_name as a text string.
|
||||
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
you may try after a while to call the function again.
|
||||
EE_INTERNAL_ERROR.
|
||||
*/
|
||||
@@ -335,10 +336,10 @@ ESPEAK_API espeak_ERROR espeak_Key(const char *key_name);
|
||||
extern "C"
|
||||
#endif
|
||||
ESPEAK_API espeak_ERROR espeak_Char(wchar_t character);
|
||||
/* Speak the name of the given character
|
||||
/* Speak the name of the given character
|
||||
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
you may try after a while to call the function again.
|
||||
EE_INTERNAL_ERROR.
|
||||
*/
|
||||
@@ -394,7 +395,7 @@ ESPEAK_API espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int valu
|
||||
espeakRANGE: pitch range, range 0-100. 0-monotone, 50=normal
|
||||
|
||||
espeakPUNCTUATION: which punctuation characters to announce:
|
||||
value in espeak_PUNCT_TYPE (none, all, some),
|
||||
value in espeak_PUNCT_TYPE (none, all, some),
|
||||
see espeak_GetParameter() to specify which characters are announced.
|
||||
|
||||
espeakCAPITALS: announce capital letters by:
|
||||
@@ -406,8 +407,8 @@ ESPEAK_API espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int valu
|
||||
|
||||
espeakWORDGAP: pause between words, units of 10mS (at the default speed)
|
||||
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
you may try after a while to call the function again.
|
||||
EE_INTERNAL_ERROR.
|
||||
*/
|
||||
@@ -429,8 +430,8 @@ ESPEAK_API espeak_ERROR espeak_SetPunctuationList(const wchar_t *punctlist);
|
||||
|
||||
punctlist: A list of character codes, terminated by a zero character.
|
||||
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
you may try after a while to call the function again.
|
||||
EE_INTERNAL_ERROR.
|
||||
*/
|
||||
@@ -474,7 +475,7 @@ typedef struct {
|
||||
unsigned char gender; // 0=none 1=male, 2=female,
|
||||
unsigned char age; // 0=not specified, or age in years
|
||||
unsigned char variant; // only used when passed as a parameter to espeak_SetVoiceByProperties
|
||||
unsigned char xx1; // for internal use
|
||||
unsigned char xx1; // for internal use
|
||||
int score; // for internal use
|
||||
void *spare; // for internal use
|
||||
} espeak_VOICE;
|
||||
@@ -519,8 +520,8 @@ ESPEAK_API espeak_ERROR espeak_SetVoiceByName(const char *name);
|
||||
/* Searches for a voice with a matching "name" field. Language is not considered.
|
||||
"name" is a UTF8 string.
|
||||
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
you may try after a while to call the function again.
|
||||
EE_INTERNAL_ERROR.
|
||||
*/
|
||||
@@ -561,7 +562,7 @@ ESPEAK_API espeak_ERROR espeak_Cancel(void);
|
||||
function returns, the audio output is fully stopped and the synthesizer is ready to
|
||||
synthesize a new message.
|
||||
|
||||
Return: EE_OK: operation achieved
|
||||
Return: EE_OK: operation achieved
|
||||
EE_INTERNAL_ERROR.
|
||||
*/
|
||||
|
||||
@@ -578,7 +579,7 @@ extern "C"
|
||||
#endif
|
||||
ESPEAK_API espeak_ERROR espeak_Synchronize(void);
|
||||
/* This function returns when all data have been spoken.
|
||||
Return: EE_OK: operation achieved
|
||||
Return: EE_OK: operation achieved
|
||||
EE_INTERNAL_ERROR.
|
||||
*/
|
||||
|
||||
@@ -587,7 +588,7 @@ extern "C"
|
||||
#endif
|
||||
ESPEAK_API espeak_ERROR espeak_Terminate(void);
|
||||
/* last function to be called.
|
||||
Return: EE_OK: operation achieved
|
||||
Return: EE_OK: operation achieved
|
||||
EE_INTERNAL_ERROR.
|
||||
*/
|
||||
|
||||
@@ -600,3 +601,4 @@ ESPEAK_API const char *espeak_Info(void* ptr);
|
||||
The parameter is for future use, and should be set to NULL
|
||||
*/
|
||||
#endif
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
extern void FindPhonemesUsed(void);
|
||||
extern void DisplayErrorFile(const char *fname);
|
||||
extern int utf8_out(unsigned int c, char *buf);
|
||||
char path_source[sizeof(path_home)+20];
|
||||
|
||||
|
||||
@@ -290,6 +291,7 @@ static keywtab_t keywords[] = {
|
||||
{"LengthAdd", tINSTRN1, i_ADD_LENGTH},
|
||||
{"Lengthmod", tINSTRN1, i_LENGTH_MOD},
|
||||
{"lengthmod", tINSTRN1, i_LENGTH_MOD},
|
||||
{"ipa", tINSTRN1, i_IPA_NAME},
|
||||
|
||||
// flags
|
||||
{"wavef", tPHONEME_FLAG, phWAVE},
|
||||
@@ -392,6 +394,7 @@ static void DecompilePhoneme(FILE *f_out, PHONEME_TAB *ph, int compile_phoneme)
|
||||
int ix;
|
||||
int any;
|
||||
const char *name;
|
||||
char buf[120];
|
||||
|
||||
static const char *INV = "Invalid";
|
||||
|
||||
@@ -456,6 +459,18 @@ return;
|
||||
fprintf(f_out,"%s",instn0_string[data1]);
|
||||
}
|
||||
else
|
||||
if(type2 == i_IPA_NAME)
|
||||
{
|
||||
for(ix = 0; ix < data1; ix += 2)
|
||||
{
|
||||
instn = *pc++;
|
||||
buf[ix] = instn >> 8;
|
||||
buf[ix+1] = instn & 0xff;
|
||||
}
|
||||
buf[ix] = 0;
|
||||
fprintf(f_out,"ipa %s",buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(f_out,"%s(",KeyToMnem(keywords, tINSTRN1, type2));
|
||||
switch(instn1_paramtype[type2])
|
||||
@@ -2541,6 +2556,11 @@ int CompilePhoneme(int compile_phoneme)
|
||||
int keyword;
|
||||
int value;
|
||||
int phcode = 0;
|
||||
int ix;
|
||||
unsigned int c;
|
||||
char *p;
|
||||
char number_buf[12];
|
||||
char ipa_buf[N_ITEM_STRING];
|
||||
PHONEME_TAB phoneme_out2;
|
||||
PHONEME_PROG_LOG phoneme_prog_log;
|
||||
|
||||
@@ -2657,6 +2677,42 @@ int CompilePhoneme(int compile_phoneme)
|
||||
value = NextItem(tNUMBER);
|
||||
phoneme_out->length_mod = value;
|
||||
break;
|
||||
|
||||
case i_IPA_NAME:
|
||||
NextItem(tSTRING);
|
||||
|
||||
if(strcmp(item_string,"NULL")==0)
|
||||
strcpy(item_string," ");
|
||||
|
||||
// copy the string, recognize characters in the form U+9999
|
||||
p = item_string;
|
||||
ix = 0;
|
||||
while((c = *p++) != 0)
|
||||
{
|
||||
if((c=='U') && (p[0]=='+'))
|
||||
{
|
||||
// U+9999
|
||||
memcpy(number_buf,&p[1],4); // U+ should be followed by 4 hex digits
|
||||
number_buf[4] = 0;
|
||||
c = 0;
|
||||
sscanf(number_buf,"%x",&c);
|
||||
p += 5;
|
||||
ix += utf8_out(c, &ipa_buf[ix]);
|
||||
}
|
||||
else
|
||||
{
|
||||
ipa_buf[ix++] = c;
|
||||
}
|
||||
}
|
||||
ipa_buf[ix] = 0;
|
||||
value = strlen(ipa_buf); // number of UTF-8 bytes
|
||||
|
||||
*prog_out++ = (i_IPA_NAME << 8) + value;
|
||||
for(ix=0; ix < value; ix += 2)
|
||||
{
|
||||
*prog_out++ = (ipa_buf[ix] << 8) + (ipa_buf[ix+1] & 0xff);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2702,6 +2758,11 @@ int CompilePhoneme(int compile_phoneme)
|
||||
case kSTRESSTYPE:
|
||||
value = NextItem(tNUMBER);
|
||||
phoneme_out->std_length = value;
|
||||
if(prog_out > prog_buf)
|
||||
{
|
||||
error("stress phonemes can't contain program instructions",NULL);
|
||||
prog_out = prog_buf;
|
||||
}
|
||||
break;
|
||||
|
||||
case kIF:
|
||||
|
||||
+104
-20
@@ -506,20 +506,84 @@ void DecodePhonemes(const char *inptr, char *outptr)
|
||||
} // end of DecodePhonemes
|
||||
|
||||
|
||||
// using Kirschenbaum to IPA translation, ascii 0x20 to 0x7f
|
||||
unsigned short ipa1[96] = {
|
||||
0x20,0x21,0x22,0x2b0,0x24,0x25,0x0e6,0x2c8,0x28,0x27e,0x2a,0x2b,0x2cc,0x2d,0x2e,0x2f,
|
||||
0x252,0x31,0x32,0x25c,0x34,0x35,0x36,0x37,0x275,0x39,0x2d0,0x2b2,0x3c,0x3d,0x3e,0x294,
|
||||
0x259,0x251,0x3b2,0xe7,0xf0,0x25b,0x46,0x262,0x127,0x26a,0x25f,0x4b,0x4c,0x271,0x14b,0x254,
|
||||
0x3a6,0x263,0x280,0x283,0x3b8,0x28a,0x28c,0x153,0x3c7,0xf8,0x292,0x32a,0x5c,0x5d,0x5e,0x5f,
|
||||
0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
|
||||
0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x303,0x7f
|
||||
};
|
||||
|
||||
static void WriteMnemonic(char *phon_out, int *ix, int mnem)
|
||||
{//=========================================================
|
||||
unsigned char c;
|
||||
|
||||
while((c = mnem & 0xff) != 0)
|
||||
static void WritePhMnemonic(char *phon_out, int *ix, PHONEME_TAB *ph, PHONEME_LIST *plist)
|
||||
{//=======================================================================================
|
||||
int c;
|
||||
int mnem;
|
||||
int len;
|
||||
int first;
|
||||
unsigned int ipa_control=0; // first byte of ipa string may control the phoneme name interpretation. 0x20 = ignore this phoneme
|
||||
PHONEME_DATA phdata;
|
||||
|
||||
if(option_phonemes == 3)
|
||||
{
|
||||
// has an ipa name been defined for this phoneme ?
|
||||
phdata.ipa_string[0] = 0;
|
||||
|
||||
if(plist == NULL)
|
||||
{
|
||||
InterpretPhoneme2(ph->code, &phdata);
|
||||
}
|
||||
else
|
||||
{
|
||||
InterpretPhoneme(NULL, 0, plist, &phdata);
|
||||
}
|
||||
|
||||
len = strlen(phdata.ipa_string);
|
||||
if(len > 0)
|
||||
{
|
||||
if((ipa_control = phdata.ipa_string[0]) > 0x20)
|
||||
{
|
||||
strcpy(&phon_out[*ix], phdata.ipa_string);
|
||||
*ix += len;
|
||||
}
|
||||
if(ipa_control >= 0x20)
|
||||
return; // 0x20 = ignore phoneme
|
||||
}
|
||||
}
|
||||
|
||||
first = 1;
|
||||
for(mnem = ph->mnemonic; (c = mnem & 0xff) != 0; mnem = mnem >> 8)
|
||||
{
|
||||
if((c == '/') && (option_phoneme_variants==0))
|
||||
break; // discard phoneme variant indicator
|
||||
phon_out[(*ix)++]= c;
|
||||
// phon_out[phon_out_ix++]= ipa1[c];
|
||||
mnem = mnem >> 8;
|
||||
|
||||
if(option_phonemes == 3)
|
||||
{
|
||||
// convert from ascii to ipa
|
||||
if(first && (c == '_'))
|
||||
break; // don't show pause phonemes
|
||||
|
||||
if((c == '#') && (ph->type == phVOWEL))
|
||||
break; // # is subscript-h, but only for consonants
|
||||
|
||||
// ignore digits after the first character
|
||||
if(!first && isdigit(c))
|
||||
continue;
|
||||
|
||||
if((c >= 0x20) && (c < 128))
|
||||
c = ipa1[c-0x20];
|
||||
|
||||
*ix += utf8_out(c, &phon_out[*ix]);
|
||||
}
|
||||
else
|
||||
{
|
||||
phon_out[(*ix)++]= c;
|
||||
}
|
||||
first = 0;
|
||||
}
|
||||
}
|
||||
} // end of WritePhMnemonic
|
||||
|
||||
|
||||
|
||||
@@ -532,6 +596,7 @@ void GetTranslatedPhonemeString(char *phon_out, int n_phon_out)
|
||||
int ix;
|
||||
int phon_out_ix=0;
|
||||
int stress;
|
||||
unsigned int c;
|
||||
char *p;
|
||||
PHONEME_LIST *plist;
|
||||
|
||||
@@ -549,35 +614,52 @@ void GetTranslatedPhonemeString(char *phon_out, int n_phon_out)
|
||||
{
|
||||
if((stress = plist->stresslevel) > 1)
|
||||
{
|
||||
c = 0;
|
||||
if(stress > 5) stress = 5;
|
||||
phon_out[phon_out_ix++] = stress_chars[stress];
|
||||
|
||||
if(option_phonemes == 3)
|
||||
{
|
||||
c = 0x2cc; // ipa, secondary stress
|
||||
if(stress > 3)
|
||||
c = 0x02c8; // ipa, primary stress
|
||||
}
|
||||
else
|
||||
{
|
||||
c = stress_chars[stress];
|
||||
}
|
||||
|
||||
if(c != 0)
|
||||
{
|
||||
phon_out_ix += utf8_out(c, &phon_out[phon_out_ix]);
|
||||
}
|
||||
}
|
||||
}
|
||||
WriteMnemonic(phon_out, &phon_out_ix, plist->ph->mnemonic);
|
||||
WritePhMnemonic(phon_out, &phon_out_ix, plist->ph, plist);
|
||||
|
||||
if(plist->synthflags & SFLAG_LENGTHEN)
|
||||
{
|
||||
WriteMnemonic(phon_out, &phon_out_ix, phoneme_tab[phonLENGTHEN]->mnemonic);
|
||||
WritePhMnemonic(phon_out, &phon_out_ix, phoneme_tab[phonLENGTHEN], NULL);
|
||||
}
|
||||
if((plist->synthflags & SFLAG_SYLLABLE) && (plist->type != phVOWEL))
|
||||
{
|
||||
// syllablic consonant
|
||||
WriteMnemonic(phon_out, &phon_out_ix, phoneme_tab[phonSYLLABIC]->mnemonic);
|
||||
WritePhMnemonic(phon_out, &phon_out_ix, phoneme_tab[phonSYLLABIC], NULL);
|
||||
}
|
||||
if(plist->ph->code == phonSWITCH)
|
||||
{
|
||||
// the tone_ph field contains a phoneme table number
|
||||
p = phoneme_tab_list[plist->tone_ph].name;
|
||||
while(*p != 0)
|
||||
while((c = *p++) != 0)
|
||||
{
|
||||
phon_out[phon_out_ix++] = *p++;
|
||||
if(option_phonemes != 3)
|
||||
phon_out[phon_out_ix++] = c;
|
||||
}
|
||||
phon_out[phon_out_ix++] = ' ';
|
||||
}
|
||||
else
|
||||
if(plist->tone_ph > 0)
|
||||
{
|
||||
WriteMnemonic(phon_out, &phon_out_ix, phoneme_tab[plist->tone_ph]->mnemonic);
|
||||
WritePhMnemonic(phon_out, &phon_out_ix, phoneme_tab[plist->tone_ph], NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1049,17 +1131,19 @@ void ChangeWordStress(Translator *tr, char *word, int new_stress)
|
||||
|
||||
|
||||
|
||||
void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, int tonic, int prev_stress)
|
||||
{//=========================================================================================================
|
||||
void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, int tonic, int control)
|
||||
{//=====================================================================================================
|
||||
/* Guess stress pattern of word. This is language specific
|
||||
|
||||
'output' is used for input and output
|
||||
|
||||
'dictionary_flags' has bits 0-3 position of stressed vowel (if > 0)
|
||||
or unstressed (if == 7) or syllables 1 and 2 (if == 6)
|
||||
bits 8... dictionary flags
|
||||
|
||||
If 'tonic' is set (>= 0), replace highest stress by this value.
|
||||
|
||||
Parameter used for input and output
|
||||
control: bit 0 This is an individual symbol, not a word
|
||||
*/
|
||||
|
||||
unsigned char phcode;
|
||||
@@ -1495,7 +1579,7 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags,
|
||||
p = phonetic;
|
||||
v = 1;
|
||||
|
||||
if((ph = phoneme_tab[*p]) != NULL)
|
||||
if(!(control & 1) && ((ph = phoneme_tab[*p]) != NULL))
|
||||
{
|
||||
|
||||
if(ph->type == phSTRESS)
|
||||
@@ -2564,7 +2648,7 @@ int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, c
|
||||
}
|
||||
else
|
||||
{
|
||||
LookupLetter(tr, wc, -1, ph_buf);
|
||||
LookupLetter(tr, wc, -1, ph_buf, 0);
|
||||
if(ph_buf[0])
|
||||
{
|
||||
match1.phonemes = ph_buf;
|
||||
|
||||
+19
-14
@@ -34,7 +34,7 @@
|
||||
|
||||
|
||||
static const char *help_text =
|
||||
"\nspeak [options] [\"<words>\"]\n\n"
|
||||
"\nespeak [options] [\"<words>\"]\n\n"
|
||||
"-f <text file> Text file to speak\n"
|
||||
"--stdin Read text input from stdin instead of a file\n\n"
|
||||
"If neither -f nor --stdin, then <words> are spoken, or if none then text\n"
|
||||
@@ -43,6 +43,9 @@ static const char *help_text =
|
||||
"\t Amplitude, 0 to 200, default is 100\n"
|
||||
"-g <integer>\n"
|
||||
"\t Word gap. Pause between words, units of 10mS at the default speed\n"
|
||||
"-k <integer>\n"
|
||||
"\t Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n"
|
||||
"\t higher values indicate a pitch increase (try -k20).\n"
|
||||
"-l <integer>\n"
|
||||
"\t Line length. If not zero (which is the default), consider\n"
|
||||
"\t lines less than this length as end-of-clause\n"
|
||||
@@ -53,34 +56,31 @@ static const char *help_text =
|
||||
"-v <voice name>\n"
|
||||
"\t Use voice file of this name from espeak-data/voices\n"
|
||||
"-w <wave file name>\n"
|
||||
"\t Write output to this WAV file, rather than speaking it directly\n"
|
||||
"\t Write speech to this WAV file, rather than speaking it directly\n"
|
||||
"-b\t Input text encoding, 1=UTF8, 2=8 bit, 4=16 bit \n"
|
||||
"-m\t Interpret SSML markup, and ignore other < > tags\n"
|
||||
"-q\t Quiet, don't produce any speech (may be useful with -x)\n"
|
||||
"-x\t Write phoneme mnemonics to stdout\n"
|
||||
"-X\t Write phonemes mnemonics and translation trace to stdout\n"
|
||||
"-z\t No final sentence pause at the end of the text\n"
|
||||
"--stdout Write speech output to stdout\n"
|
||||
"--compile=<voice name>\n"
|
||||
"\t Compile the pronunciation rules and dictionary in the current\n"
|
||||
"\t Compile pronunciation rules and dictionary from the current\n"
|
||||
"\t directory. <voice name> specifies the language\n"
|
||||
"--ipa Write phonemes to stdout using International Phonetic Alphabet\n"
|
||||
"--path=\"<path>\"\n"
|
||||
"\t Specifies the directory containing the espeak-data directory\n"
|
||||
"--pho\n"
|
||||
"\t Write mbrola phoneme data (.pho) to stdout, or to the file in --phonout\n"
|
||||
"--pho Write mbrola phoneme data (.pho) to stdout or to the file in --phonout\n"
|
||||
"--phonout=\"<filename>\"\n"
|
||||
"\t Write phoneme output from -x -X and --pho to this file\n"
|
||||
"\t Write phoneme output from -x -X --ipa and --pho to this file\n"
|
||||
"--punct=\"<characters>\"\n"
|
||||
"\t Speak the names of punctuation characters during speaking. If\n"
|
||||
"\t =<characters> is omitted, all punctuation is spoken.\n"
|
||||
"--split=\"<minutes>\"\n"
|
||||
"\t Starts a new WAV file every <minutes>. Used with -w\n"
|
||||
"--stdout Write speech output to stdout\n"
|
||||
"--voices=<language>\n"
|
||||
"\t List the available voices for the specified language.\n"
|
||||
"\t If <language> is omitted, then list all voices.\n"
|
||||
"-k <integer>\n"
|
||||
"\t Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n"
|
||||
"\t higher values indicate a pitch increase (try -k20).\n";
|
||||
"\t If <language> is omitted, then list all voices.\n";
|
||||
|
||||
|
||||
|
||||
@@ -355,6 +355,7 @@ int main (int argc, char **argv)
|
||||
{"path", required_argument, 0, 0x107},
|
||||
{"phonout", required_argument, 0, 0x108},
|
||||
{"pho", no_argument, 0, 0x109},
|
||||
{"ipa", no_argument, 0, 0x10a},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
@@ -573,9 +574,9 @@ int main (int argc, char **argv)
|
||||
|
||||
case 0x106: // -- split
|
||||
if(optarg2 == NULL)
|
||||
samples_split = 30 * 60; // default 30 minutes
|
||||
samples_split_seconds = 30 * 60; // default 30 minutes
|
||||
else
|
||||
samples_split = atoi(optarg2) * 60;
|
||||
samples_split_seconds = atoi(optarg2) * 60;
|
||||
break;
|
||||
|
||||
case 0x107: // --path
|
||||
@@ -590,7 +591,11 @@ int main (int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 0x109: // --pho
|
||||
option_mbrola_phonemes = 8;
|
||||
option_mbrola_phonemes = 16;
|
||||
break;
|
||||
|
||||
case 0x10a: // --ipa
|
||||
option_phonemes = 3;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
+19
-2
@@ -148,6 +148,7 @@ if(argc > 1)
|
||||
if(strcmp(param,"--compile")==0)
|
||||
{
|
||||
CompilePhonemeData();
|
||||
CompileIntonation();
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
@@ -197,7 +198,9 @@ BEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame)
|
||||
EVT_MENU(MENU_SPECTRUM, MyFrame::OnNewWindow)
|
||||
EVT_MENU(MENU_SPECTRUM2, MyFrame::OnNewWindow)
|
||||
EVT_MENU(MENU_PROSODY, MyFrame::OnProsody)
|
||||
EVT_MENU(MENU_PARAMS, MyFrame::OnOptions)
|
||||
EVT_MENU(MENU_OPT_SPEED, MyFrame::OnOptions)
|
||||
EVT_MENU(MENU_OPT_PUNCT, MyFrame::OnOptions)
|
||||
EVT_MENU(MENU_OPT_SPELL, MyFrame::OnOptions)
|
||||
EVT_MENU(MENU_PATH0, MyFrame::OnOptions)
|
||||
EVT_MENU(MENU_PATH1, MyFrame::OnOptions)
|
||||
EVT_MENU(MENU_PATH2, MyFrame::OnOptions)
|
||||
@@ -214,6 +217,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame)
|
||||
EVT_MENU(MENU_QUIT, MyFrame::OnQuit)
|
||||
EVT_MENU(MENU_SPEAK_TRANSLATE, MyFrame::OnSpeak)
|
||||
EVT_MENU(MENU_SPEAK_RULES, MyFrame::OnSpeak)
|
||||
EVT_MENU(MENU_SPEAK_IPA, MyFrame::OnSpeak)
|
||||
EVT_MENU(MENU_SPEAK_TEXT, MyFrame::OnSpeak)
|
||||
EVT_MENU(MENU_SPEAK_FILE, MyFrame::OnSpeak)
|
||||
EVT_MENU(MENU_SPEAK_STOP, MyFrame::OnSpeak)
|
||||
@@ -473,7 +477,7 @@ void OnOptions2(int event_id)
|
||||
|
||||
switch(event_id)
|
||||
{
|
||||
case MENU_PARAMS:
|
||||
case MENU_OPT_SPEED:
|
||||
value = wxGetNumberFromUser(_T(""),_T(""),_T("Speed"),option_speed,80,500);
|
||||
if(value > 0)
|
||||
{
|
||||
@@ -483,6 +487,18 @@ void OnOptions2(int event_id)
|
||||
}
|
||||
break;
|
||||
|
||||
case MENU_OPT_PUNCT:
|
||||
transldlg->t_source->SetValue(_T("<tts:style field=\"punctuation\" mode=\"all\">\n"));
|
||||
transldlg->t_source->SetInsertionPointEnd();
|
||||
notebook->SetSelection(1);
|
||||
break;
|
||||
|
||||
case MENU_OPT_SPELL:
|
||||
transldlg->t_source->SetValue(_T("<say-as interpret-as=\"tts:char\">\n"));
|
||||
transldlg->t_source->SetInsertionPointEnd();
|
||||
notebook->SetSelection(1);
|
||||
break;
|
||||
|
||||
case MENU_PATH0:
|
||||
string = wxFileSelector(_T("Master phonemes file"),wxFileName(path_phfile).GetPath(),
|
||||
_T(""),_T(""),_T("*"),wxOPEN);
|
||||
@@ -677,6 +693,7 @@ void MyFrame::OnSpeak(wxCommandEvent& event)
|
||||
{
|
||||
case MENU_SPEAK_TRANSLATE:
|
||||
case MENU_SPEAK_RULES:
|
||||
case MENU_SPEAK_IPA:
|
||||
case MENU_SPEAK_TEXT:
|
||||
transldlg->OnCommand(event);
|
||||
break;
|
||||
|
||||
+1
-1
@@ -192,7 +192,7 @@ static unsigned char env_risefallrise[128] = {
|
||||
|
||||
|
||||
|
||||
unsigned char *envelope_data[20] = {
|
||||
unsigned char *envelope_data[N_ENVELOPE_DATA] = {
|
||||
env_fall, env_fall,
|
||||
env_rise, env_rise,
|
||||
env_frise, env_r_frise,
|
||||
|
||||
+9
-9
@@ -458,7 +458,7 @@ if(option_log_frames)
|
||||
temp = (temp * kt_globals.fadeout) / 64;
|
||||
}
|
||||
|
||||
value = int(temp) + ((echo_buf[echo_tail++]*echo_amp) >> 8);
|
||||
value = (int)temp + ((echo_buf[echo_tail++]*echo_amp) >> 8);
|
||||
if(echo_tail >= N_ECHO_BUF)
|
||||
echo_tail=0;
|
||||
|
||||
@@ -973,7 +973,7 @@ static double DBtoLIN(long dB)
|
||||
return(0);
|
||||
}
|
||||
|
||||
return(double(amptable[dB]) * 0.001);
|
||||
return((double)(amptable[dB]) * 0.001);
|
||||
}
|
||||
|
||||
|
||||
@@ -1050,7 +1050,7 @@ int Wavegen_Klatt(int resume)
|
||||
for(ix=0; ix < N_KLATTP; ix++)
|
||||
{
|
||||
klattp1[ix] += klattp_inc[ix];
|
||||
klattp[ix] = int(klattp1[ix]);
|
||||
klattp[ix] = (int)klattp1[ix];
|
||||
}
|
||||
|
||||
for(ix=0; ix<=6; ix++)
|
||||
@@ -1213,7 +1213,7 @@ if(option_log_frames)
|
||||
else
|
||||
{
|
||||
klattp1[ix] = klattp[ix] = fr1->klattp[ix];
|
||||
klattp_inc[ix] = double((fr2->klattp[ix] - klattp[ix]) * STEPSIZE)/length;
|
||||
klattp_inc[ix] = (double)((fr2->klattp[ix] - klattp[ix]) * STEPSIZE)/length;
|
||||
}
|
||||
|
||||
// get klatt parameter adjustments for the voice
|
||||
@@ -1226,7 +1226,7 @@ if(option_log_frames)
|
||||
for(ix=1; ix < 6; ix++)
|
||||
{
|
||||
peaks[ix].freq1 = (fr1->ffreq[ix] * v->freq[ix] / 256.0) + v->freqadd[ix];
|
||||
peaks[ix].freq = int(peaks[ix].freq1);
|
||||
peaks[ix].freq = (int)peaks[ix].freq1;
|
||||
next = (fr2->ffreq[ix] * v->freq[ix] / 256.0) + v->freqadd[ix];
|
||||
peaks[ix].freq_inc = ((next - peaks[ix].freq1) * STEPSIZE) / length;
|
||||
|
||||
@@ -1234,7 +1234,7 @@ if(option_log_frames)
|
||||
{
|
||||
// klatt bandwidth for f1, f2, f3 (others are fixed)
|
||||
peaks[ix].bw1 = fr1->bw[ix] * 2;
|
||||
peaks[ix].bw = int(peaks[ix].bw1);
|
||||
peaks[ix].bw = (int)peaks[ix].bw1;
|
||||
next = fr2->bw[ix] * 2;
|
||||
peaks[ix].bw_inc = ((next - peaks[ix].bw1) * STEPSIZE) / length;
|
||||
}
|
||||
@@ -1245,7 +1245,7 @@ if(option_log_frames)
|
||||
if(peaks[0].freq1 == 0)
|
||||
peaks[0].freq1 = kt_frame.Fhz[F_NP]; // if no nasal zero, set it to same freq as nasal pole
|
||||
|
||||
peaks[0].freq = int(peaks[0].freq1);
|
||||
peaks[0].freq = (int)peaks[0].freq1;
|
||||
next = fr2->klattp[KLATT_FNZ] * 2;
|
||||
if(next == 0)
|
||||
next = kt_frame.Fhz[F_NP];
|
||||
@@ -1262,12 +1262,12 @@ if(option_log_frames)
|
||||
for(ix=1; ix < 7; ix++)
|
||||
{
|
||||
peaks[ix].bp1 = fr1->klatt_bp[ix] * 4; // parallel bandwidth
|
||||
peaks[ix].bp = int(peaks[ix].bp1);
|
||||
peaks[ix].bp = (int)peaks[ix].bp1;
|
||||
next = fr2->klatt_bp[ix] * 2;
|
||||
peaks[ix].bp_inc = ((next - peaks[ix].bp1) * STEPSIZE) / length;
|
||||
|
||||
peaks[ix].ap1 = fr1->klatt_ap[ix]; // parallal amplitude
|
||||
peaks[ix].ap = int(peaks[ix].ap1);
|
||||
peaks[ix].ap = (int)peaks[ix].ap1;
|
||||
next = fr2->klatt_ap[ix] * 2;
|
||||
peaks[ix].ap_inc = ((next - peaks[ix].ap1) * STEPSIZE) / length;
|
||||
}
|
||||
|
||||
+5
-2
@@ -94,11 +94,11 @@ public:
|
||||
void SpeakFile(void);
|
||||
void ReadVoice(int variant);
|
||||
void OnCommand(wxCommandEvent& event);
|
||||
wxTextCtrl* t_source;
|
||||
|
||||
private:
|
||||
wxButton *t_translate;
|
||||
wxButton *t_process;
|
||||
wxTextCtrl* t_source;
|
||||
wxTextCtrl* t_phonetic;
|
||||
|
||||
|
||||
@@ -124,7 +124,9 @@ enum {
|
||||
MENU_DOCS,
|
||||
|
||||
MENU_OPTIONS,
|
||||
MENU_PARAMS,
|
||||
MENU_OPT_SPEED,
|
||||
MENU_OPT_PUNCT,
|
||||
MENU_OPT_SPELL,
|
||||
MENU_PATHS,
|
||||
MENU_PATH0,
|
||||
MENU_PATH1,
|
||||
@@ -143,6 +145,7 @@ enum {
|
||||
|
||||
MENU_SPEAK_TRANSLATE,
|
||||
MENU_SPEAK_RULES,
|
||||
MENU_SPEAK_IPA,
|
||||
MENU_SPEAK_TEXT,
|
||||
MENU_SPEAK_FILE,
|
||||
MENU_SPEAK_PAUSE,
|
||||
|
||||
+89
-62
@@ -74,19 +74,19 @@ static void log(const char *msg, ...)
|
||||
va_end(params);
|
||||
}
|
||||
|
||||
static void err(const char *err, ...)
|
||||
static void err(const char *errmsg, ...)
|
||||
{
|
||||
va_list params;
|
||||
|
||||
va_start(params, err);
|
||||
vsnprintf(mbr_errorbuf, sizeof(mbr_errorbuf), err, params);
|
||||
va_start(params, errmsg);
|
||||
vsnprintf(mbr_errorbuf, sizeof(mbr_errorbuf), errmsg, params);
|
||||
va_end(params);
|
||||
log("mbrola error: \"%s\"", mbr_errorbuf);
|
||||
log("mbrowrap error: %s", mbr_errorbuf);
|
||||
}
|
||||
|
||||
static int create_pipes(int p1[2], int p2[2], int p3[2])
|
||||
{
|
||||
int error=0;
|
||||
int error;
|
||||
|
||||
if (pipe(p1) != -1) {
|
||||
if (pipe(p2) != -1) {
|
||||
@@ -100,7 +100,8 @@ static int create_pipes(int p1[2], int p2[2], int p3[2])
|
||||
error = errno;
|
||||
close(p1[0]);
|
||||
close(p1[1]);
|
||||
}
|
||||
} else
|
||||
error = errno;
|
||||
|
||||
err("pipe(): %s", strerror(error));
|
||||
return -1;
|
||||
@@ -231,67 +232,89 @@ static void free_pending_data(void)
|
||||
mbr_pending_data_tail = NULL;
|
||||
}
|
||||
|
||||
static int mbrola_died(void)
|
||||
{
|
||||
pid_t pid;
|
||||
int status, len;
|
||||
const char *msg;
|
||||
char msgbuf[80];
|
||||
|
||||
pid = waitpid(mbr_pid, &status, WNOHANG);
|
||||
if (!pid) {
|
||||
msg = "mbrola closed stderr and did not exit";
|
||||
} else if (pid != mbr_pid) {
|
||||
msg = "waitpid() is confused";
|
||||
} else {
|
||||
mbr_pid = 0;
|
||||
if (WIFSIGNALED(status)) {
|
||||
int sig = WTERMSIG(status);
|
||||
snprintf(msgbuf, sizeof(msgbuf),
|
||||
"mbrola died by signal %d", sig);
|
||||
msg = msgbuf;
|
||||
} else if (WIFEXITED(status)) {
|
||||
int exst = WEXITSTATUS(status);
|
||||
snprintf(msgbuf, sizeof(msgbuf),
|
||||
"mbrola exited with status %d", exst);
|
||||
msg = msgbuf;
|
||||
} else {
|
||||
msg = "mbrola died and wait status is weird";
|
||||
}
|
||||
}
|
||||
|
||||
log("mbrowrap error: %s", msg);
|
||||
|
||||
len = strlen(mbr_errorbuf);
|
||||
if (!len)
|
||||
snprintf(mbr_errorbuf, sizeof(mbr_errorbuf), "%s", msg);
|
||||
else
|
||||
snprintf(mbr_errorbuf + len, sizeof(mbr_errorbuf) - len,
|
||||
", (%s)", msg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int mbrola_has_errors(void)
|
||||
{
|
||||
int result, error;
|
||||
int result;
|
||||
char buffer[256];
|
||||
char *buf_ptr, *lf;
|
||||
|
||||
result = read(mbr_error_fd, mbr_errorbuf, sizeof(mbr_errorbuf)-1);
|
||||
|
||||
if (result == -1) {
|
||||
if (errno == EAGAIN)
|
||||
return 0;
|
||||
err("read(error): %s", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (result != 0) {
|
||||
mbr_errorbuf[result] = 0;
|
||||
if (mbr_errorbuf[result - 1] == '\n')
|
||||
mbr_errorbuf[result - 1] = 0;
|
||||
/* inhibit the reset signal message */
|
||||
if (strncmp(mbr_errorbuf, "Got a reset signal", 18) == 0) {
|
||||
mbr_errorbuf[0] = 0;
|
||||
return 0;
|
||||
buf_ptr = buffer;
|
||||
for (;;) {
|
||||
result = read(mbr_error_fd, buf_ptr,
|
||||
sizeof(buffer) - (buf_ptr - buffer) - 1);
|
||||
if (result == -1) {
|
||||
if (errno == EAGAIN)
|
||||
return 0;
|
||||
err("read(error): %s", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
/* don't consider this fatal at this point */
|
||||
error = 0;
|
||||
} else {
|
||||
/* EOF on stderr, assume mbrola died. */
|
||||
pid_t pid;
|
||||
int status, len;
|
||||
const char *msg;
|
||||
char msgbuf[80];
|
||||
|
||||
pid = waitpid(mbr_pid, &status, WNOHANG);
|
||||
if (!pid) {
|
||||
msg = "mbrola closed stderr and did not exit";
|
||||
} else {
|
||||
mbr_pid = 0;
|
||||
if (WIFSIGNALED(status)) {
|
||||
int sig = WTERMSIG(status);
|
||||
snprintf(msgbuf, sizeof(msgbuf),
|
||||
"mbrola died by signal %d", sig);
|
||||
msg = msgbuf;
|
||||
} else if (WIFEXITED(status)) {
|
||||
int exst = WEXITSTATUS(status);
|
||||
snprintf(msgbuf, sizeof(msgbuf),
|
||||
"mbrola exited with status %d", exst);
|
||||
msg = msgbuf;
|
||||
} else {
|
||||
msg = "mbrola died and wait status is weird";
|
||||
if (result == 0) {
|
||||
/* EOF on stderr, assume mbrola died. */
|
||||
return mbrola_died();
|
||||
}
|
||||
|
||||
buf_ptr[result] = 0;
|
||||
|
||||
for (; (lf = strchr(buf_ptr, '\n')); buf_ptr = lf + 1) {
|
||||
/* inhibit the reset signal messages */
|
||||
if (strncmp(buf_ptr, "Got a reset signal", 18) == 0 ||
|
||||
strncmp(buf_ptr, "Input Flush Signal", 18) == 0)
|
||||
continue;
|
||||
*lf = 0;
|
||||
log("mbrola: %s", buf_ptr);
|
||||
/* is this the last line? */
|
||||
if (lf == &buf_ptr[result - 1]) {
|
||||
snprintf(mbr_errorbuf, sizeof(mbr_errorbuf),
|
||||
"%s", buf_ptr);
|
||||
/* don't consider this fatal at this point */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
len = strlen(mbr_errorbuf);
|
||||
if (!len)
|
||||
snprintf(mbr_errorbuf, sizeof(mbr_errorbuf), "%s", msg);
|
||||
else
|
||||
snprintf(mbr_errorbuf+len, sizeof(mbr_errorbuf)-len,
|
||||
", (%s)", msg);
|
||||
error = -1;
|
||||
}
|
||||
|
||||
log("mbrola error: \"%s\"", mbr_errorbuf);
|
||||
return error;
|
||||
memmove(buffer, buf_ptr, result);
|
||||
buf_ptr = buffer + result;
|
||||
}
|
||||
}
|
||||
|
||||
static int send_to_mbrola(const char *cmd)
|
||||
@@ -468,7 +491,8 @@ int init_MBR(const char *voice_path)
|
||||
/* we should actually be getting only 44 bytes */
|
||||
result = receive_from_mbrola(wavhdr, 45);
|
||||
if (result != 44) {
|
||||
err("unable to get .wav header from mbrola");
|
||||
if (result >= 0)
|
||||
err("unable to get .wav header from mbrola");
|
||||
stop_mbrola();
|
||||
return -1;
|
||||
}
|
||||
@@ -482,7 +506,7 @@ int init_MBR(const char *voice_path)
|
||||
}
|
||||
mbr_samplerate = wavhdr[24] + (wavhdr[25]<<8) +
|
||||
(wavhdr[26]<<16) + (wavhdr[27]<<24);
|
||||
//log("mbrola: voice samplerate = %d", mbr_samplerate);
|
||||
//log("mbrowrap: voice samplerate = %d", mbr_samplerate);
|
||||
|
||||
/* remember the voice path for setVolumeRatio_MBR() */
|
||||
if (mbr_voice_path != voice_path) {
|
||||
@@ -568,7 +592,10 @@ void setVolumeRatio_MBR(float value)
|
||||
|
||||
int lastErrorStr_MBR(char *buffer, int bufsize)
|
||||
{
|
||||
int result = snprintf(buffer, bufsize, "%s", mbr_errorbuf);
|
||||
int result;
|
||||
if (mbr_pid)
|
||||
mbrola_has_errors();
|
||||
result = snprintf(buffer, bufsize, "%s", mbr_errorbuf);
|
||||
return result >= bufsize ? (bufsize - 1) : result;
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -71,6 +71,7 @@ wxMenuBar *MakeMenu(int type)
|
||||
speak_menu = new wxMenu;
|
||||
speak_menu->Append(MENU_SPEAK_TRANSLATE, _("&Translate"));
|
||||
speak_menu->Append(MENU_SPEAK_RULES, _("Show &Rules"));
|
||||
speak_menu->Append(MENU_SPEAK_IPA, _("Show &IPA"));
|
||||
speak_menu->Append(MENU_SPEAK_TEXT, _("&Speak"));
|
||||
speak_menu->AppendSeparator();
|
||||
speak_menu->Append(MENU_SPEAK_FILE, _("Speak &file..."));
|
||||
@@ -105,7 +106,9 @@ wxMenuBar *MakeMenu(int type)
|
||||
|
||||
option_menu = new wxMenu;
|
||||
option_menu->Append(MENU_PATHS, _("Set &paths"), paths_menu);
|
||||
option_menu->Append(MENU_PARAMS, _("Speed..."));
|
||||
option_menu->Append(MENU_OPT_SPEED, _("Speed..."));
|
||||
option_menu->Append(MENU_OPT_PUNCT, _("Speak punctiation"));
|
||||
option_menu->Append(MENU_OPT_SPELL, _("Speak character names"));
|
||||
|
||||
// TOOLS
|
||||
vowelchart_menu = new wxMenu;
|
||||
|
||||
+23
-29
@@ -498,12 +498,12 @@ void LookupAccentedLetter(Translator *tr, unsigned int letter, char *ph_buf)
|
||||
|
||||
|
||||
|
||||
void LookupLetter(Translator *tr, unsigned int letter, int next_byte, char *ph_buf1)
|
||||
{//=================================================================================
|
||||
void LookupLetter(Translator *tr, unsigned int letter, int next_byte, char *ph_buf1, int control)
|
||||
{//==============================================================================================
|
||||
// control, bit 0: not the first letter of a word
|
||||
|
||||
int len;
|
||||
unsigned char *p;
|
||||
static char single_letter[10] = {0,0};
|
||||
char ph_stress[2];
|
||||
unsigned int dict_flags[2];
|
||||
char ph_buf3[40];
|
||||
char *ptr;
|
||||
@@ -568,27 +568,17 @@ void LookupLetter(Translator *tr, unsigned int letter, int next_byte, char *ph_b
|
||||
LookupAccentedLetter(tr, letter, ph_buf3);
|
||||
}
|
||||
|
||||
if(ph_buf3[0] == 0)
|
||||
strcpy(ph_buf1, ph_buf3);
|
||||
if((ph_buf1[0] == 0) || (ph_buf1[0] == phonSWITCH))
|
||||
{
|
||||
ph_buf1[0] = 0;
|
||||
return;
|
||||
}
|
||||
if(ph_buf3[0] == phonSWITCH)
|
||||
{
|
||||
strcpy(ph_buf1,ph_buf3);
|
||||
return;
|
||||
}
|
||||
// at a stress marker at the start of the letter name, unless one is already marked
|
||||
ph_stress[0] = phonSTRESS_P;
|
||||
ph_stress[1] = 0;
|
||||
|
||||
for(p=(unsigned char *)ph_buf3; (*p != 0) && (phoneme_tab[*p] != NULL); p++)
|
||||
{
|
||||
if(phoneme_tab[*p]->type == phSTRESS)
|
||||
ph_stress[0] = 0; // stress is already marked
|
||||
}
|
||||
sprintf(ph_buf1,"%s%s",ph_stress,ph_buf3);
|
||||
}
|
||||
dict_flags[0] = 0;
|
||||
dict_flags[1] = 0;
|
||||
SetWordStress(tr, ph_buf1, dict_flags, -1, control & 1);
|
||||
|
||||
} // end of LookupLetter
|
||||
|
||||
|
||||
|
||||
@@ -596,7 +586,9 @@ int TranslateLetter(Translator *tr, char *word, char *phonemes, int control)
|
||||
{//=========================================================================
|
||||
// get pronunciation for an isolated letter
|
||||
// return number of bytes used by the letter
|
||||
// control 2=say-as glyphs, 3-say-as chars
|
||||
// control bit 0: a non-initial letter in a word
|
||||
// bit 1: say 'capital'
|
||||
|
||||
int n_bytes;
|
||||
int letter;
|
||||
int len;
|
||||
@@ -618,7 +610,7 @@ int TranslateLetter(Translator *tr, char *word, char *phonemes, int control)
|
||||
letter &= 0xff; // uncode private usage area
|
||||
}
|
||||
|
||||
if(control > 2)
|
||||
if(control & 2)
|
||||
{
|
||||
// include CAPITAL information
|
||||
if(iswupper(letter))
|
||||
@@ -628,7 +620,7 @@ int TranslateLetter(Translator *tr, char *word, char *phonemes, int control)
|
||||
}
|
||||
letter = towlower2(letter);
|
||||
|
||||
LookupLetter(tr, letter, word[n_bytes], ph_buf);
|
||||
LookupLetter(tr, letter, word[n_bytes], ph_buf, control & 1);
|
||||
|
||||
if(ph_buf[0] == phonSWITCH)
|
||||
{
|
||||
@@ -642,7 +634,7 @@ int TranslateLetter(Translator *tr, char *word, char *phonemes, int control)
|
||||
SetTranslator2("en");
|
||||
save_option_phonemes = option_phonemes;
|
||||
option_phonemes = 0;
|
||||
LookupLetter(translator2, letter, word[n_bytes], ph_buf);
|
||||
LookupLetter(translator2, letter, word[n_bytes], ph_buf, control & 1);
|
||||
SelectPhonemeTable(voice->phoneme_tab_ix); // revert to original phoneme table
|
||||
option_phonemes = save_option_phonemes;
|
||||
|
||||
@@ -671,7 +663,7 @@ int TranslateLetter(Translator *tr, char *word, char *phonemes, int control)
|
||||
{
|
||||
pbuf += strlen(pbuf);
|
||||
*pbuf++ = phonPAUSE_VSHORT;
|
||||
LookupLetter(tr, *p2, 0, pbuf);
|
||||
LookupLetter(tr, *p2, 0, pbuf, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -740,9 +732,11 @@ void SetSpellingStress(Translator *tr, char *phonemes, int control, int n_chars)
|
||||
if(control == 4)
|
||||
c = phonPAUSE; // pause after each character
|
||||
if(((count % 3) == 0) || (control > 2))
|
||||
c = phonPAUSE_SHORT; // pause following a primary stress
|
||||
c = phonPAUSE_NOLINK; // pause following a primary stress
|
||||
else
|
||||
continue; // remove marker
|
||||
c = phonPAUSE_VSHORT;
|
||||
// else
|
||||
// continue; // remove marker
|
||||
}
|
||||
*phonemes++ = c;
|
||||
}
|
||||
@@ -1593,7 +1587,7 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
|
||||
hyphen = 1;
|
||||
ix++;
|
||||
}
|
||||
while((word[ix] != 0) && (word[ix] != ' ') && (ix < int(sizeof(suffix)-1)))
|
||||
while((word[ix] != 0) && (word[ix] != ' ') && (ix < (int)(sizeof(suffix)-1)))
|
||||
{
|
||||
*p++ = word[ix++];
|
||||
}
|
||||
|
||||
@@ -380,9 +380,12 @@ void ProsodyDisplay::DrawEnv(wxDC& dc, int x1, int y1, int width, PHONEME_LIST *
|
||||
{
|
||||
// the envelope is given by a Tone phoneme acting on this vowel
|
||||
InterpretPhoneme2(ph->tone_ph, &phdata_tone);
|
||||
env = LookupEnvelope(phdata_tone.pitch_env);
|
||||
env = GetEnvelope(phdata_tone.pitch_env);
|
||||
}
|
||||
|
||||
if(env == NULL)
|
||||
return;
|
||||
|
||||
for(ix=0; ix<=width; ix+=4)
|
||||
{
|
||||
x = int((ix * 127.9)/width);
|
||||
|
||||
+6
-6
@@ -121,17 +121,17 @@ static const unsigned int punct_attributes [] = { 0,
|
||||
CLAUSE_COMMA, CLAUSE_PERIOD, CLAUSE_QUESTION, CLAUSE_EXCLAMATION, CLAUSE_COLON, CLAUSE_SEMICOLON,
|
||||
CLAUSE_SEMICOLON, // en-dash
|
||||
CLAUSE_SEMICOLON, // em-dash
|
||||
CLAUSE_SEMICOLON + PUNCT_SAY_NAME | 0x8000, // elipsis
|
||||
CLAUSE_SEMICOLON | PUNCT_SAY_NAME | 0x8000, // elipsis
|
||||
|
||||
CLAUSE_QUESTION, // Greek question mark
|
||||
CLAUSE_SEMICOLON, // Greek semicolon
|
||||
CLAUSE_PERIOD+0x8000, // Devanagari Danda (fullstop)
|
||||
CLAUSE_PERIOD | 0x8000, // Devanagari Danda (fullstop)
|
||||
|
||||
CLAUSE_PERIOD+0x8000, // Armenian period
|
||||
CLAUSE_PERIOD | 0x8000, // Armenian period
|
||||
CLAUSE_COMMA, // Armenian comma
|
||||
CLAUSE_EXCLAMATION + PUNCT_IN_WORD, // Armenian exclamation
|
||||
CLAUSE_QUESTION + PUNCT_IN_WORD, // Armenian question
|
||||
CLAUSE_PERIOD + PUNCT_IN_WORD, // Armenian emphasis mark
|
||||
CLAUSE_EXCLAMATION | PUNCT_IN_WORD, // Armenian exclamation
|
||||
CLAUSE_QUESTION | PUNCT_IN_WORD, // Armenian question
|
||||
CLAUSE_PERIOD | PUNCT_IN_WORD, // Armenian emphasis mark
|
||||
|
||||
CLAUSE_SEMICOLON, // Arabic ;
|
||||
CLAUSE_QUESTION, // Arabic question mark
|
||||
|
||||
+10
-4
@@ -360,14 +360,14 @@ void SetParameter(int parameter, int value, int relative)
|
||||
|
||||
|
||||
|
||||
static void DoEmbedded2(int &embix)
|
||||
static void DoEmbedded2(int *embix)
|
||||
{//================================
|
||||
// There were embedded commands in the text at this point
|
||||
|
||||
unsigned int word;
|
||||
|
||||
do {
|
||||
word = embedded_list[embix++];
|
||||
word = embedded_list[(*embix)++];
|
||||
|
||||
if((word & 0x1f) == EMBED_S)
|
||||
{
|
||||
@@ -420,7 +420,7 @@ void CalcLengths(Translator *tr)
|
||||
|
||||
if(p->synthflags & SFLAG_EMBEDDED)
|
||||
{
|
||||
DoEmbedded2(embedded_ix);
|
||||
DoEmbedded2(&embedded_ix);
|
||||
}
|
||||
|
||||
type = p->type;
|
||||
@@ -734,6 +734,12 @@ if(p->type != phVOWEL)
|
||||
}
|
||||
p->length = length_mod;
|
||||
|
||||
if(p->env >= (N_ENVELOPE_DATA-1))
|
||||
{
|
||||
fprintf(stderr,"espeak: Bad intonation data\n");
|
||||
p->env = 0;
|
||||
}
|
||||
|
||||
// pre-vocalic part
|
||||
// set last-pitch
|
||||
env2 = p->env + 1; // version for use with preceding semi-vowel
|
||||
@@ -741,7 +747,7 @@ if(p->type != phVOWEL)
|
||||
if(p->tone_ph != 0)
|
||||
{
|
||||
InterpretPhoneme2(p->tone_ph, &phdata_tone);
|
||||
pitch_env = LookupEnvelope(phdata_tone.pitch_env);
|
||||
pitch_env = GetEnvelope(phdata_tone.pitch_env);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+17
-12
@@ -75,44 +75,44 @@ static const char *help_text =
|
||||
"\t Amplitude, 0 to 200, default is 100\n"
|
||||
"-g <integer>\n"
|
||||
"\t Word gap. Pause between words, units of 10mS at the default speed\n"
|
||||
"-k <integer>\n"
|
||||
"\t Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n"
|
||||
"\t higher values indicate a pitch increase (try -k20).\n"
|
||||
"-l <integer>\n"
|
||||
"\t Line length. If not zero (which is the default), consider\n"
|
||||
"\t lines less than this length as end-of-clause\n"
|
||||
"-p <integer>\n"
|
||||
"\t Pitch adjustment, 0 to 99, default is 50\n"
|
||||
"-s <integer>\n"
|
||||
"\t Speed in words per minute 80 to 450, default is 175\n"
|
||||
"\t Speed in words per minute, 80 to 450, default is 175\n"
|
||||
"-v <voice name>\n"
|
||||
"\t Use voice file of this name from espeak-data/voices\n"
|
||||
"-w <wave file name>\n"
|
||||
"\t Write output to this WAV file, rather than speaking it directly\n"
|
||||
"\t Write speech to this WAV file, rather than speaking it directly\n"
|
||||
"-b\t Input text encoding, 1=UTF8, 2=8 bit, 4=16 bit \n"
|
||||
"-m\t Interpret SSML markup, and ignore other < > tags\n"
|
||||
"-q\t Quiet, don't produce any speech (may be useful with -x)\n"
|
||||
"-x\t Write phoneme mnemonics to stdout\n"
|
||||
"-X\t Write phonemes mnemonics and translation trace to stdout\n"
|
||||
"-z\t No final sentence pause at the end of the text\n"
|
||||
"--stdout Write speech output to stdout\n"
|
||||
"--compile=<voice name>\n"
|
||||
"\t Compile the pronunciation rules and dictionary in the current\n"
|
||||
"\t Compile pronunciation rules and dictionary from the current\n"
|
||||
"\t directory. <voice name> specifies the language\n"
|
||||
"--ipa Write phonemes to stdout using International Phonetic Alphabet\n"
|
||||
"--path=\"<path>\"\n"
|
||||
"\t Specifies the directory containing the espeak-data directory\n"
|
||||
"--pho\n"
|
||||
"\t Write mbrola phoneme data (.pho) to stdout, or to the file in --phonout\n"
|
||||
"--pho Write mbrola phoneme data (.pho) to stdout or to the file in --phonout\n"
|
||||
"--phonout=\"<filename>\"\n"
|
||||
"\t Write phoneme output from -x -X and --pho to this file\n"
|
||||
"\t Write phoneme output from -x -X --ipa and --pho to this file\n"
|
||||
"--punct=\"<characters>\"\n"
|
||||
"\t Speak the names of punctuation characters during speaking. If\n"
|
||||
"\t =<characters> is omitted, all punctuation is spoken.\n"
|
||||
"--split=\"<minutes>\"\n"
|
||||
"\t Starts a new WAV file every <minutes>. Used with -w\n"
|
||||
"--stdout Write speech output to stdout\n"
|
||||
"--voices=<language>\n"
|
||||
"\t List the available voices for the specified language.\n"
|
||||
"\t If <language> is omitted, then list all voices.\n"
|
||||
"-k <integer>\n"
|
||||
"\t Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n"
|
||||
"\t higher values indicate a pitch increase (try -k20).\n";
|
||||
"\t If <language> is omitted, then list all voices.\n";
|
||||
|
||||
|
||||
void DisplayVoices(FILE *f_out, char *language);
|
||||
@@ -478,6 +478,7 @@ int main (int argc, char **argv)
|
||||
{"path", required_argument, 0, 0x107},
|
||||
{"phonout", required_argument, 0, 0x108},
|
||||
{"pho", no_argument, 0, 0x109},
|
||||
{"ipa", no_argument, 0, 0x10a},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
@@ -708,7 +709,11 @@ int main (int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 0x109: // --pho
|
||||
option_mbrola_phonemes = 8;
|
||||
option_mbrola_phonemes = 16;
|
||||
break;
|
||||
|
||||
case 0x10a: // --ipa
|
||||
option_phonemes = 3;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
+7
-5
@@ -1120,13 +1120,15 @@ ESPEAK_API void espeak_SetPhonemeTrace(int value, FILE *stream)
|
||||
{//============================================================
|
||||
ENTER("espeak_SetPhonemes");
|
||||
/* Controls the output of phoneme symbols for the text
|
||||
value=0 No phoneme output (default)
|
||||
value=1 Output the translated phoneme symbols for the text
|
||||
value=2 as (1), but also output a trace of how the translation was done (matching rules and list entries)
|
||||
bit 3: produce mbrola pho data
|
||||
bits 0-3:
|
||||
value=0 No phoneme output (default)
|
||||
value=1 Output the translated phoneme symbols for the text
|
||||
value=2 as (1), but also output a trace of how the translation was done (matching rules and list entries)
|
||||
value=3 as (1), but produces IPA phoneme names rather than ascii
|
||||
bit 4: produce mbrola pho data
|
||||
*/
|
||||
option_phonemes = value & 3;
|
||||
option_mbrola_phonemes = value & 8;
|
||||
option_mbrola_phonemes = value & 16;
|
||||
f_trans = stream;
|
||||
if(stream == NULL)
|
||||
f_trans = stderr;
|
||||
|
||||
@@ -444,6 +444,7 @@ void espeak_SetPhonemeTrace(int value, FILE *stream);
|
||||
value=0 No phoneme output (default)
|
||||
value=1 Output the translated phoneme symbols for the text
|
||||
value=2 as (1), but also output a trace of how the translation was done (matching rules and list entries)
|
||||
value=3 as (1), but produces IPA rather than ascii phoneme names
|
||||
|
||||
stream output stream for the phoneme symbols (and trace). If stream=NULL then it uses stdout.
|
||||
*/
|
||||
|
||||
+18
-20
@@ -386,7 +386,7 @@ int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, int resume, FILE *f_mbr
|
||||
int done;
|
||||
int len_percent;
|
||||
const char *final_pitch;
|
||||
char buf[80];
|
||||
char *ptr;
|
||||
char mbr_buf[120];
|
||||
|
||||
static int phix;
|
||||
@@ -404,7 +404,7 @@ int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, int resume, FILE *f_mbr
|
||||
if (WcmdqFree() < MIN_WCMDQ)
|
||||
return 1;
|
||||
|
||||
mbr_buf[0] = 0;
|
||||
ptr = mbr_buf;
|
||||
|
||||
p = &plist[phix];
|
||||
next = &plist[phix+1];
|
||||
@@ -415,7 +415,7 @@ int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, int resume, FILE *f_mbr
|
||||
|
||||
if(p->synthflags & SFLAG_EMBEDDED)
|
||||
{
|
||||
DoEmbedded(embedded_ix, p->sourceix);
|
||||
DoEmbedded(&embedded_ix, p->sourceix);
|
||||
}
|
||||
|
||||
if(p->newword & 4)
|
||||
@@ -446,13 +446,12 @@ int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, int resume, FILE *f_mbr
|
||||
|
||||
DoMarker(espeakEVENT_PHONEME, (p->sourceix & 0x7ff) + clause_start_char, 0, ph->mnemonic);
|
||||
|
||||
sprintf(buf,"%s\t",WordToString(name));
|
||||
strcat(mbr_buf,buf);
|
||||
ptr += sprintf(ptr,"%s\t",WordToString(name));
|
||||
|
||||
if(name2 == '_')
|
||||
{
|
||||
// add a pause after this phoneme
|
||||
pause = PauseLength(len_percent,0);
|
||||
pause = len_percent;
|
||||
name2 = 0;
|
||||
}
|
||||
|
||||
@@ -472,17 +471,19 @@ int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, int resume, FILE *f_mbr
|
||||
|
||||
if(name2 == 0)
|
||||
{
|
||||
sprintf(buf,"%d\t%s", len, WritePitch(p->env,p->pitch1,p->pitch2,0,0));
|
||||
strcat(mbr_buf,buf);
|
||||
char *pitch = WritePitch(p->env,p->pitch1,p->pitch2,0,0);
|
||||
ptr += sprintf(ptr,"%d\t%s", len, pitch);
|
||||
}
|
||||
else
|
||||
{
|
||||
len1 = (len * len_percent)/100;
|
||||
sprintf(buf,"%d\t%s", len1, WritePitch(p->env,p->pitch1,p->pitch2,len_percent,0));
|
||||
strcat(mbr_buf,buf);
|
||||
char *pitch;
|
||||
|
||||
sprintf(buf,"%s\t%d\t%s", WordToString(name2), len-len1, WritePitch(p->env,p->pitch1,p->pitch2,-len_percent,0));
|
||||
strcat(mbr_buf,buf);
|
||||
pitch = WritePitch(p->env,p->pitch1,p->pitch2,len_percent,0);
|
||||
len1 = (len * len_percent)/100;
|
||||
ptr += sprintf(ptr,"%d\t%s", len1, pitch);
|
||||
|
||||
pitch = WritePitch(p->env,p->pitch1,p->pitch2,-len_percent,0);
|
||||
ptr += sprintf(ptr,"%s\t%d\t%s", WordToString(name2), len-len1, pitch);
|
||||
}
|
||||
done = 1;
|
||||
break;
|
||||
@@ -545,25 +546,22 @@ int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, int resume, FILE *f_mbr
|
||||
if(name2 != 0)
|
||||
{
|
||||
len1 = (len * len_percent)/100;
|
||||
sprintf(buf,"%d\n%s\t",len1,WordToString(name2));
|
||||
strcat(mbr_buf,buf);
|
||||
ptr += sprintf(ptr,"%d\n%s\t",len1,WordToString(name2));
|
||||
len -= len1;
|
||||
}
|
||||
sprintf(buf,"%d%s\n",len,final_pitch);
|
||||
strcat(mbr_buf,buf);
|
||||
ptr += sprintf(ptr,"%d%s\n",len,final_pitch);
|
||||
}
|
||||
|
||||
if(pause)
|
||||
{
|
||||
len += PauseLength(pause,0);
|
||||
sprintf(buf,"_ \t%d\n",PauseLength(pause,0));
|
||||
strcat(mbr_buf,buf);
|
||||
ptr += sprintf(ptr,"_ \t%d\n",PauseLength(pause,0));
|
||||
pause = 0;
|
||||
}
|
||||
|
||||
if(f_mbrola)
|
||||
{
|
||||
fwrite(mbr_buf,1,strlen(mbr_buf),f_mbrola); // write .pho to a file
|
||||
fwrite(mbr_buf,1,(ptr-mbr_buf),f_mbrola); // write .pho to a file
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+22
-7
@@ -35,8 +35,8 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.43.48 28.Jun.10";
|
||||
const int version_phdata = 0x014342;
|
||||
const char *version_string = "1.43.52 04.Jul.10";
|
||||
const int version_phdata = 0x014351;
|
||||
|
||||
int option_device_number = -1;
|
||||
FILE *f_logespeak = NULL;
|
||||
@@ -364,11 +364,14 @@ frameref_t *LookupSpect(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params,
|
||||
|
||||
|
||||
|
||||
unsigned char *LookupEnvelope(int ix)
|
||||
{//================================
|
||||
if(ix==0)
|
||||
return(NULL);
|
||||
return((unsigned char *)&spects_data[ix]);
|
||||
unsigned char *GetEnvelope(int index)
|
||||
{//==================================
|
||||
if(index==0)
|
||||
{
|
||||
fprintf(stderr,"espeak: No envelope\n");
|
||||
return(envelope_data[0]); // not found, use a default envelope
|
||||
}
|
||||
return((unsigned char *)&spects_data[index]);
|
||||
}
|
||||
|
||||
|
||||
@@ -877,6 +880,18 @@ void InterpretPhoneme(Translator *tr, int control, PHONEME_LIST *plist, PHONEME_
|
||||
phdata->pd_param[i_APPEND_PHONEME] = data;
|
||||
}
|
||||
else
|
||||
if(instn2 == i_IPA_NAME)
|
||||
{
|
||||
// followed by utf-8 characters, 2 per instn word
|
||||
for(ix=0; (ix < data) && (ix < 16); ix += 2)
|
||||
{
|
||||
prog++;
|
||||
phdata->ipa_string[ix] = prog[0] >> 8;
|
||||
phdata->ipa_string[ix+1] = prog[0] & 0xff;
|
||||
}
|
||||
phdata->ipa_string[ix] = 0;
|
||||
}
|
||||
else
|
||||
if(instn2 < N_PHONEME_DATA_PARAM)
|
||||
{
|
||||
if(instn2 == i_CHANGE_PHONEME2)
|
||||
|
||||
+19
-16
@@ -1198,7 +1198,7 @@ void DoVoiceChange(voice_t *v)
|
||||
}
|
||||
|
||||
|
||||
void DoEmbedded(int &embix, int sourceix)
|
||||
void DoEmbedded(int *embix, int sourceix)
|
||||
{//======================================
|
||||
// There were embedded commands in the text at this point
|
||||
unsigned int word; // bit 7=last command for this word, bits 5,6 sign, bits 0-4 command
|
||||
@@ -1206,7 +1206,7 @@ void DoEmbedded(int &embix, int sourceix)
|
||||
int command;
|
||||
|
||||
do {
|
||||
word = embedded_list[embix++];
|
||||
word = embedded_list[(*embix)++];
|
||||
value = word >> 8;
|
||||
command = word & 0x7f;
|
||||
|
||||
@@ -1323,7 +1323,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
|
||||
|
||||
if(p->synthflags & SFLAG_EMBEDDED)
|
||||
{
|
||||
DoEmbedded(embedded_ix, p->sourceix);
|
||||
DoEmbedded(&embedded_ix, p->sourceix);
|
||||
}
|
||||
|
||||
if(p->newword)
|
||||
@@ -1627,8 +1627,8 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume)
|
||||
if(p->tone_ph != 0)
|
||||
{
|
||||
InterpretPhoneme2(p->tone_ph, &phdata_tone);
|
||||
pitch_env = LookupEnvelope(phdata_tone.pitch_env);
|
||||
amp_env = LookupEnvelope(phdata_tone.amp_env);
|
||||
pitch_env = GetEnvelope(phdata_tone.pitch_env);
|
||||
amp_env = GetEnvelope(phdata_tone.amp_env);
|
||||
}
|
||||
|
||||
StartSyllable();
|
||||
@@ -1848,20 +1848,23 @@ int SpeakNextClause(FILE *f_in, const void *text_in, int control)
|
||||
CalcPitches(translator, clause_tone);
|
||||
CalcLengths(translator);
|
||||
|
||||
GetTranslatedPhonemeString(translator->phon_out,sizeof(translator->phon_out));
|
||||
if(option_phonemes > 0)
|
||||
if((option_phonemes > 0) || (phoneme_callback != NULL))
|
||||
{
|
||||
fprintf(f_trans,"%s\n",translator->phon_out);
|
||||
|
||||
if(!iswalpha(0x010d))
|
||||
GetTranslatedPhonemeString(translator->phon_out,sizeof(translator->phon_out));
|
||||
if(option_phonemes > 0)
|
||||
{
|
||||
// check that c-caron is recognized as an alphabetic character
|
||||
fprintf(stderr,"Warning: Accented letters are not recognized, eg: U+010D\nSet LC_CTYPE to a UTF-8 locale\n");
|
||||
fprintf(f_trans,"%s\n",translator->phon_out);
|
||||
|
||||
if(!iswalpha(0x010d))
|
||||
{
|
||||
// check that c-caron is recognized as an alphabetic character
|
||||
fprintf(stderr,"Warning: Accented letters are not recognized, eg: U+010D\nSet LC_CTYPE to a UTF-8 locale\n");
|
||||
}
|
||||
}
|
||||
if(phoneme_callback != NULL)
|
||||
{
|
||||
phoneme_callback(translator->phon_out);
|
||||
}
|
||||
}
|
||||
if(phoneme_callback != NULL)
|
||||
{
|
||||
phoneme_callback(translator->phon_out);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+8
-3
@@ -266,6 +266,7 @@ typedef struct {
|
||||
int vowel_transition[4];
|
||||
int pitch_env;
|
||||
int amp_env;
|
||||
char ipa_string[18];
|
||||
} PHONEME_DATA;
|
||||
|
||||
|
||||
@@ -289,7 +290,7 @@ typedef struct {
|
||||
#define i_RETURN 0x0001
|
||||
#define i_CONTINUE 0x0002
|
||||
|
||||
// Group 0 instrcutions with 8 bit operand. These value go into bits 8-15 if the instruction
|
||||
// Group 0 instrcutions with 8 bit operand. These values go into bits 8-15 of the instruction
|
||||
#define i_CHANGE_PHONEME 0x01
|
||||
#define i_REPLACE_NEXT_PHONEME 0x02
|
||||
#define i_INSERT_PHONEME 0x03
|
||||
@@ -302,6 +303,8 @@ typedef struct {
|
||||
#define i_SET_LENGTH 0x0a
|
||||
#define i_LONG_LENGTH 0x0b
|
||||
#define i_CHANGE_PHONEME2 0x0c // not yet used
|
||||
#define i_IPA_NAME 0x0d
|
||||
|
||||
#define i_CHANGE_IF 0x10 // 0x10 to 0x14
|
||||
|
||||
#define i_ADD_LENGTH 0x0c
|
||||
@@ -532,7 +535,8 @@ int CompileDictionary(const char *dsource, const char *dict_name, FILE *log, cha
|
||||
#define ENV_LEN 128 // length of pitch envelopes
|
||||
#define PITCHfall 0 // standard pitch envelopes
|
||||
#define PITCHrise 2
|
||||
extern unsigned char *envelope_data[20];
|
||||
#define N_ENVELOPE_DATA 20
|
||||
extern unsigned char *envelope_data[N_ENVELOPE_DATA];
|
||||
|
||||
extern int formant_rate[]; // max rate of change of each formant
|
||||
extern SPEED_FACTORS speed;
|
||||
@@ -562,13 +566,14 @@ int MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, int resume, FILE *f_mbr
|
||||
int MbrolaGenerate(PHONEME_LIST *phoneme_list, int *n_ph, int resume);
|
||||
int MbrolaFill(int length, int resume);
|
||||
void MbrolaReset(void);
|
||||
void DoEmbedded(int &embix, int sourceix);
|
||||
void DoEmbedded(int *embix, int sourceix);
|
||||
void DoMarker(int type, int char_posn, int length, int value);
|
||||
//int DoSample(PHONEME_TAB *ph1, PHONEME_TAB *ph2, int which, int length_mod, int amp);
|
||||
int DoSample3(PHONEME_DATA *phdata, int length_mod, int amp);
|
||||
int DoSpect2(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, PHONEME_LIST *plist, int modulation);
|
||||
int PauseLength(int pause, int control);
|
||||
int LookupPhonemeTable(const char *name);
|
||||
unsigned char *GetEnvelope(int index);
|
||||
|
||||
void InitBreath(void);
|
||||
|
||||
|
||||
+15
-4
@@ -418,7 +418,7 @@ Translator *SelectTranslator(const char *name)
|
||||
|
||||
case L('d','a'): // Danish
|
||||
{
|
||||
static const short stress_lengths_da[8] = {160,140, 200,200, 0,0, 220,210};
|
||||
static const short stress_lengths_da[8] = {160,140, 200,200, 0,0, 220,230};
|
||||
SetupTranslator(tr,stress_lengths_da,NULL);
|
||||
|
||||
tr->transpose_min = 'a';
|
||||
@@ -605,16 +605,18 @@ Translator *SelectTranslator(const char *name)
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case L('f','r'): // french
|
||||
{
|
||||
static const short stress_lengths_fr[8] = {190, 170, 190, 200, 0, 0, 235, 240};
|
||||
static const unsigned char stress_amps_fr[8] = {18,16, 20,20, 20,22, 22,21 };
|
||||
static const short stress_lengths_fr[8] = {190, 170, 190, 200, 0, 0, 190, 240};
|
||||
static const unsigned char stress_amps_fr[8] = {18,16, 20,20, 20,22, 18,18 };
|
||||
|
||||
SetupTranslator(tr,stress_lengths_fr,stress_amps_fr);
|
||||
tr->langopts.stress_rule = STRESSPOSN_1R; // stress on final syllable
|
||||
tr->langopts.stress_flags = 0x0024; // don't use secondary stress
|
||||
tr->langopts.param[LOPT_IT_LENGTHEN] = 1; // remove lengthen indicator from unstressed syllables
|
||||
tr->langopts.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable
|
||||
tr->langopts.accents = 2; // Say "Capital" after the letter.
|
||||
tr->langopts.vowel_pause = 0;
|
||||
|
||||
tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_ALLOW_SPACE | NUM_OMIT_1_HUNDRED | NUM_NOPAUSE | NUM_ROMAN | NUM_VIGESIMAL | NUM_DFRACTION_4;
|
||||
SetLetterVowel(tr,'y');
|
||||
@@ -678,6 +680,15 @@ Translator *SelectTranslator(const char *name)
|
||||
break;
|
||||
|
||||
|
||||
case L('h','t'): // Haitian Creole
|
||||
// static const short stress_lengths_fr[8] = {190, 170, 190, 200, 0, 0, 235, 240};
|
||||
// memcpy(tr->stress_lengths,stress_lengths_fr,sizeof(tr->stress_lengths));
|
||||
tr->langopts.stress_rule = STRESSPOSN_1R; // stress on final syllable
|
||||
tr->langopts.stress_flags = 0x0024; // don't use secondary stress
|
||||
tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_OMIT_1_HUNDRED | NUM_NOPAUSE | NUM_ROMAN | NUM_VIGESIMAL | NUM_DFRACTION_4;
|
||||
break;
|
||||
|
||||
|
||||
case L('h','u'): // Hungarian
|
||||
{
|
||||
static const unsigned char stress_amps_hu[8] = {17,17, 19,19, 20,22, 22,21 };
|
||||
|
||||
+24
-12
@@ -577,11 +577,17 @@ char *strchr_w(const char *s, int c)
|
||||
static char *SpeakIndividualLetters(Translator *tr, char *word, char *phonemes, int spell_word)
|
||||
{//============================================================================================
|
||||
int posn = 0;
|
||||
int capitals = 0;
|
||||
int non_initial = 0;
|
||||
|
||||
if (spell_word > 2)
|
||||
capitals = 2;
|
||||
|
||||
while((*word != ' ') && (*word != 0))
|
||||
{
|
||||
word += TranslateLetter(tr, word, phonemes, spell_word);
|
||||
word += TranslateLetter(tr, word, phonemes, capitals | non_initial);
|
||||
posn++;
|
||||
non_initial = 1;
|
||||
if(phonemes[0] == phonSWITCH)
|
||||
{
|
||||
// change to another language in order to translate this word
|
||||
@@ -666,10 +672,8 @@ int TranslateWord(Translator *tr, char *word1, int next_pause, WORD_TAB *wtab)
|
||||
{//===========================================================================
|
||||
// word1 is terminated by space (0x20) character
|
||||
|
||||
int length;
|
||||
int word_length;
|
||||
int ix;
|
||||
int posn;
|
||||
int pfix;
|
||||
int n_chars;
|
||||
unsigned int dictionary_flags[2];
|
||||
@@ -898,10 +902,14 @@ if((wmark > 0) && (wmark < 8))
|
||||
else
|
||||
if(found == 0)
|
||||
{
|
||||
int posn;
|
||||
int non_initial;
|
||||
int length;
|
||||
// word's pronunciation is not given in the dictionary list, although
|
||||
// dictionary_flags may have ben set there
|
||||
|
||||
posn = 0;
|
||||
non_initial = 0;
|
||||
length = 999;
|
||||
wordx = word1;
|
||||
|
||||
@@ -911,7 +919,11 @@ if((wmark > 0) && (wmark < 8))
|
||||
// This word looks "unpronouncable", so speak letters individually until we
|
||||
// find a remainder that we can pronounce.
|
||||
emphasize_allcaps = 0;
|
||||
wordx += TranslateLetter(tr, wordx, unpron_phonemes, 0);
|
||||
|
||||
if(posn > 0)
|
||||
non_initial = 1;
|
||||
|
||||
wordx += TranslateLetter(tr, wordx, unpron_phonemes, non_initial);
|
||||
posn++;
|
||||
if(unpron_phonemes[0] == phonSWITCH)
|
||||
{
|
||||
@@ -1234,13 +1246,13 @@ strcpy(phonemes2,phonemes);
|
||||
snprintf(word_phonemes, sizeof(word_phonemes), "%s%s%s", unpron_phonemes, prefix_phonemes, phonemes);
|
||||
#endif
|
||||
word_phonemes[N_WORD_PHONEMES-1] = 0;
|
||||
SetWordStress(tr, word_phonemes, dictionary_flags, -1, tr->prev_last_stress);
|
||||
SetWordStress(tr, word_phonemes, dictionary_flags, -1, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(prefix_phonemes[0] == 0)
|
||||
SetWordStress(tr, phonemes, dictionary_flags, -1, tr->prev_last_stress);
|
||||
SetWordStress(tr, phonemes, dictionary_flags, -1, 0);
|
||||
else
|
||||
SetWordStress(tr, phonemes, dictionary_flags, -1, 0);
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
@@ -2334,6 +2346,12 @@ void *TranslateClause(Translator *tr, FILE *f_text, const void *vp_input, int *t
|
||||
}
|
||||
next_in_nbytes = utf8_in(&next_in,&source[source_index]);
|
||||
|
||||
if(c == 0)
|
||||
{
|
||||
finished = 1;
|
||||
c = ' ';
|
||||
}
|
||||
|
||||
if((c == CTRL_EMBEDDED) || (c == ctrl_embedded))
|
||||
{
|
||||
// start of embedded command in the text
|
||||
@@ -2486,12 +2504,6 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
|
||||
}
|
||||
}
|
||||
|
||||
if(c == 0)
|
||||
{
|
||||
finished = 1;
|
||||
c = ' ';
|
||||
}
|
||||
else
|
||||
if(IsAlpha(c))
|
||||
{
|
||||
if(!IsAlpha(prev_out) || (tr->langopts.ideographs && ((c > 0x3040) || (prev_out > 0x3040))))
|
||||
|
||||
+4
-4
@@ -469,8 +469,8 @@ typedef struct {
|
||||
#define NUM_SEP_SPACE 0x1000 // allow space as thousands separator (in addition to langopts.thousands_sep)
|
||||
#define NUM_DEC_IT 0x2000 // (LANG=it) speak post-decimal-point digits as a combined number not as single digits
|
||||
|
||||
struct Translator
|
||||
{//=============
|
||||
typedef struct
|
||||
{//===========
|
||||
|
||||
LANGUAGE_OPTIONS langopts;
|
||||
int translator_name;
|
||||
@@ -535,7 +535,7 @@ struct Translator
|
||||
int end_stressed_vowel; // word ends with stressed vowel
|
||||
int prev_dict_flags; // dictionary flags from previous word
|
||||
int clause_terminator;
|
||||
}; // end of class Translator
|
||||
} Translator;
|
||||
|
||||
|
||||
extern int option_tone2;
|
||||
@@ -624,7 +624,7 @@ int TranslateRoman(Translator *tr, char *word, char *ph_out, WORD_TAB *wtab);
|
||||
void ChangeWordStress(Translator *tr, char *word, int new_stress);
|
||||
void SetSpellingStress(Translator *tr, char *phonemes, int control, int n_chars);
|
||||
int TranslateLetter(Translator *tr, char *letter, char *phonemes, int control);
|
||||
void LookupLetter(Translator *tr, unsigned int letter, int next_byte, char *ph_buf);
|
||||
void LookupLetter(Translator *tr, unsigned int letter, int next_byte, char *ph_buf, int control);
|
||||
void LookupAccentedLetter(Translator *tr, unsigned int letter, char *ph_buf);
|
||||
|
||||
int LoadDictionary(Translator *tr, const char *name, int no_error);
|
||||
|
||||
+56
-40
@@ -48,6 +48,7 @@
|
||||
#define T_TRANSLATE 503
|
||||
#define T_PROCESS 504
|
||||
#define T_RULES 505
|
||||
#define T_TRANSLATE_IPA 506
|
||||
|
||||
TranslDlg *transldlg = NULL;
|
||||
extern char *speech_to_phonemes(char *data, char *phout);
|
||||
@@ -58,12 +59,19 @@ BEGIN_EVENT_TABLE(TranslDlg, wxPanel)
|
||||
EVT_BUTTON(T_TRANSLATE,TranslDlg::OnCommand)
|
||||
EVT_BUTTON(T_PROCESS,TranslDlg::OnCommand)
|
||||
EVT_BUTTON(T_RULES,TranslDlg::OnCommand)
|
||||
EVT_BUTTON(T_TRANSLATE_IPA,TranslDlg::OnCommand)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
FILE *f_wave = NULL;
|
||||
wxFont font_phonetic;
|
||||
wxTextAttr style_phonetic;
|
||||
wxFont font_phonetic_large;
|
||||
wxTextAttr style_phonetic_large;
|
||||
|
||||
|
||||
#ifdef deleted
|
||||
|
||||
class IPATextCtrl : public wxTextCtrl
|
||||
{
|
||||
public:
|
||||
@@ -78,27 +86,6 @@ BEGIN_EVENT_TABLE(IPATextCtrl, wxTextCtrl)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
// using Kirschenbaum scheme to enter IPA from the keyboard
|
||||
wchar_t ipa1[256] = {
|
||||
0,0x250,32,32,32,32,32,32,32,32,0xa,0xb,0xc,0x26f,0x272,0x275,
|
||||
32,32,0x25a,32,32,32,32,0x28d,32,32,32,32,32,32,32,32,
|
||||
0x20,0x21,0x22,0x23,0x24,0x25,0x0e6,0x27,0x28,0x27e,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
|
||||
0x252,0x31,0x32,0x25c,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x294,
|
||||
0x259,0x251,0x3b2,0xe7,0xf0,0x25b,0x46,0x262,0x127,0x26a,0x25f,0x4b,0x26c,0x271,0x14b,0x254,
|
||||
0x3a6,0x263,0x280,0x283,0x3b8,0x28a,0x28c,0x153,0x3c7,0xf8,0x292,0x32a,0x5c,0x5d,0x5e,0x5f,
|
||||
0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
|
||||
0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x303,0x7f,
|
||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,
|
||||
0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,
|
||||
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,
|
||||
0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,
|
||||
0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf,
|
||||
0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,
|
||||
0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
|
||||
};
|
||||
|
||||
|
||||
IPATextCtrl::IPATextCtrl(wxWindow *parent,wxWindowID id,const wxPoint& pos,const wxSize& size) :
|
||||
wxTextCtrl(parent,id,_T(""),pos,size,wxTE_MULTILINE)
|
||||
{
|
||||
@@ -132,7 +119,7 @@ void IPATextCtrl::OnKey(wxKeyEvent& event)
|
||||
else
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -280,8 +267,10 @@ TranslDlg::TranslDlg(wxWindow *parent) : wxPanel(parent)
|
||||
int height;
|
||||
int width;
|
||||
int x,y;
|
||||
int font_size;
|
||||
int height_ph = 350;
|
||||
|
||||
|
||||
wxTextAttr attr;
|
||||
wxFont font = wxFont(12,wxFONTFAMILY_ROMAN,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_LIGHT,false,_T(""),wxFONTENCODING_SYSTEM);
|
||||
|
||||
@@ -305,9 +294,18 @@ TranslDlg::TranslDlg(wxWindow *parent) : wxPanel(parent)
|
||||
t_phonetic = new wxTextCtrl(this,T_PHONETIC,_T(""),wxPoint(0,262),
|
||||
wxSize(298,height_ph),wxTE_MULTILINE | wxTE_READONLY,wxDefaultValidator,_T("Phoneme translation window"));
|
||||
|
||||
style_phonetic = t_phonetic->GetDefaultStyle();
|
||||
font_phonetic = style_phonetic.GetFont();
|
||||
font_size = font_phonetic.GetPointSize();
|
||||
font_phonetic_large = font_phonetic;
|
||||
style_phonetic_large = style_phonetic;
|
||||
font_phonetic_large.SetPointSize(font_size+1);
|
||||
style_phonetic_large.SetFont(font_phonetic_large);
|
||||
|
||||
y = height_ph + 270;
|
||||
t_translate = new wxButton(this,T_TRANSLATE,_T("Translate"),wxPoint(4,y));
|
||||
t_translate = new wxButton(this,T_RULES,_T("Show Rules"),wxPoint(4,y+32));
|
||||
t_translate = new wxButton(this,T_TRANSLATE_IPA,_T("Show IPA"),wxPoint(100,y+32));
|
||||
t_process = new wxButton(this,T_PROCESS,_T("Speak"),wxPoint(100,y));
|
||||
|
||||
t_source->SetFocus();
|
||||
@@ -399,6 +397,7 @@ void TranslDlg::OnCommand(wxCommandEvent& event)
|
||||
#define N_PH_LIST N_PHONEME_LIST
|
||||
|
||||
void *vp;
|
||||
int translate_text = 0;
|
||||
char buf[1000];
|
||||
char phon_out[N_PH_LIST*2];
|
||||
int clause_tone;
|
||||
@@ -415,8 +414,6 @@ void TranslDlg::OnCommand(wxCommandEvent& event)
|
||||
{
|
||||
case T_RULES:
|
||||
case MENU_SPEAK_RULES:
|
||||
option_phonemes = 2;
|
||||
|
||||
#ifdef PLATFORM_POSIX
|
||||
strcpy(fname_temp,"/tmp/espeakXXXXXX");
|
||||
if((fd_temp = mkstemp(fname_temp)) >= 0)
|
||||
@@ -435,8 +432,41 @@ void TranslDlg::OnCommand(wxCommandEvent& event)
|
||||
f_trans = f; // write translation rule trace to a temp file
|
||||
}
|
||||
#endif
|
||||
t_phonetic->SetDefaultStyle(style_phonetic);
|
||||
translate_text = 2;
|
||||
break;
|
||||
|
||||
case T_TRANSLATE:
|
||||
case MENU_SPEAK_TRANSLATE:
|
||||
t_phonetic->SetDefaultStyle(style_phonetic);
|
||||
translate_text = 1;
|
||||
break;
|
||||
|
||||
case T_TRANSLATE_IPA:
|
||||
case MENU_SPEAK_IPA:
|
||||
t_phonetic->SetDefaultStyle(style_phonetic_large);
|
||||
|
||||
translate_text = 3;
|
||||
break;
|
||||
|
||||
case T_PROCESS:
|
||||
case MENU_SPEAK_TEXT:
|
||||
if(prosodycanvas == NULL)
|
||||
{
|
||||
myframe->OnProsody(event);
|
||||
}
|
||||
prosodycanvas->LayoutData(ph_list,n_ph_list);
|
||||
option_phoneme_events = 1;
|
||||
option_log_frames = 1;
|
||||
MakeWave2(ph_list,n_ph_list);
|
||||
option_log_frames = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if(translate_text)
|
||||
{
|
||||
option_phonemes = translate_text;
|
||||
|
||||
option_multibyte = espeakCHARS_AUTO;
|
||||
SpeakNextClause(NULL,NULL,2); // stop speaking file
|
||||
|
||||
@@ -457,7 +487,7 @@ void TranslDlg::OnCommand(wxCommandEvent& event)
|
||||
if(clause_count++ > 0)
|
||||
strcat(phon_out," ||");
|
||||
strcat(phon_out,translator->phon_out);
|
||||
t_phonetic->SetValue(wxString(translator->phon_out,wxConvLocal));
|
||||
t_phonetic->SetValue(wxString(translator->phon_out,wxConvUTF8));
|
||||
|
||||
if((n_ph_list + n_phoneme_list) >= N_PH_LIST)
|
||||
{
|
||||
@@ -482,20 +512,6 @@ void TranslDlg::OnCommand(wxCommandEvent& event)
|
||||
fclose(f_trans);
|
||||
remove(fname_temp);
|
||||
}
|
||||
t_phonetic->AppendText(wxString(phon_out,wxConvLocal));
|
||||
break;
|
||||
|
||||
case T_PROCESS:
|
||||
case MENU_SPEAK_TEXT:
|
||||
if(prosodycanvas == NULL)
|
||||
{
|
||||
myframe->OnProsody(event);
|
||||
}
|
||||
prosodycanvas->LayoutData(ph_list,n_ph_list);
|
||||
option_phoneme_events = 1;
|
||||
option_log_frames = 1;
|
||||
MakeWave2(ph_list,n_ph_list);
|
||||
option_log_frames = 0;
|
||||
break;
|
||||
t_phonetic->AppendText(wxString(phon_out,wxConvUTF8));
|
||||
}
|
||||
} // end of TranslDlg::OnCommand
|
||||
|
||||
Reference in New Issue
Block a user