[1.47.03f]

Fix, speak letter names of Hangul (Korean) characters.
Fix, ChangePhoneme(NULL) caused problems for word-gap options.
Recognize Arabic comma U+060C.
Languages changes: pt, nl, bn, te, da.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@336 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2013-03-31 23:05:17 +00:00
parent 665afbf8d2
commit 394869c5c2
36 changed files with 796 additions and 680 deletions
+155 -186
View File
@@ -8,6 +8,116 @@
// AC + @- OR V: Long "pile" [pi:l@-]
// AC[i]: Long "smidig" [smi:Di]
// Change the length of short vowels (?+vowel)
procedure ShortVowelLength
// "endelig" - Short initial vowel sounds too short
IF thisPh(isWordStart) THEN
length 160
RETURN
ENDIF
// "slutte" t/d + @- makes the u too long
IF next2PhW(@-) THEN
IF nextPhW(t) OR nextPhW(d) THEN
//length 100
LengthAdd -50
// Don't shorten it further if it comes after an "r" sound
// Exit the procedure
RETURN
ENDIF
ENDIF
// "bygget" - consonant + [@-D] makes the vowel too long
IF next2PhW(@-) THEN
IF next3PhW(t) OR next3PhW(d) OR next3PhW(D) THEN
LengthAdd -50
// Don't shorten it further if it comes after an "r" sound ("brygget")
// Exit the procedure
RETURN
ENDIF
ENDIF
// "bygger" - consonant + [V] makes the vowel too long
IF nextPhW(isNotVowel) AND next2PhW(V) THEN
LengthAdd -50
// Don't shorten it further if it comes after an "r" sound ("brygger")
// Exit the procedure
RETURN
ENDIF
// "rigtigt", "fred", "frem", "centralen" - R makes the vowel too long
IF prevPhW(R) OR prevPhW(3-) OR prevPhW(r) THEN
// length 100
LengthAdd -50
ENDIF
// "ring", "ringe", "fængsel"
IF nextPhW(N) THEN
// length 100
LengthAdd -10
ENDIF
// "sigte" t/d + @- makes the vowel too long
IF nextPhW(isNotVowel) AND next2PhW(t) OR next2PhW(d) THEN
IF next3PhW(@-) THEN
// length 100
LengthAdd -50
ENDIF
ENDIF
endprocedure
// Change the length of normal vowels (without ? in front of them)
procedure LongVowelLength
// "alene" - Short initial vowel sounds too short at length 140
IF thisPh(isWordStart) THEN
length 160
RETURN
ENDIF
// "forlade" - [D@-] makes the vowel too long
IF nextPhW(D) AND next2PhW(@-) THEN
length 180
RETURN
ENDIF
// PB long vowel followed by [@-] or [V](vowel+vowel) - "pigen" [p'i@-n]
IF nextPhW(@-) OR nextPhW(V) THEN
length 225
ENDIF
// PB "enig", "enige", "evig", "stædig" - vowel+consolant+[i]
IF nextPhW(isNotVowel) AND next2PhW(i) THEN
length 225
ENDIF
// "ræve", "dele", "mene", "røve", "møve"
IF nextPhW(isNotVowel) AND next2PhW(@-) OR next2PhW(3) OR next3PhW(@-) THEN
length 225
ENDIF
// "vilje", "nedladende" [n'eDl&D@-n@-], "delte" - short followed by 2 consonants
IF nextPhW(isNotVowel) AND next2PhW(isNotVowel) THEN
// Don't make "møve" [m'Ww_!@-_!] short
IF NOT next2PhW(_!) THEN
length 140
ENDIF
ENDIF
// "bryde", "bryder", "strålen", "henrivende" R makes the vowel too long
IF prevPhW(R) OR prevPhW(3-) OR prevPhW(r) THEN
IF next2PhW(@-) OR next2PhW(V) THEN
// length 180
LengthAdd -70
ENDIF
ENDIF
// "syste", "sylte" t/d/D + @- makes the vowel too long
// "international", - added [V] TEST
IF nextPhW(isNotVowel) AND next2PhW(t) OR next2PhW(d) OR next2PhW(D) THEN
IF next3PhW(@-) OR next3PhW(V) THEN
length 110
ENDIF
ENDIF
// "glimrende" [l/3] makes the following vowel too long
// LengthAdd doesn't work here. The length could be 225 or 140 - 30
IF prevPhW(l/3) THEN
// LengthAdd -30
length 110
ENDIF
// "længe" - short - 2 consonants => 1 consonant (ng => [N])
IF nextPhW(N) THEN
length 140
ENDIF
endprocedure
// A bit longer than [@-]
phoneme @
vowel starttype #@ endtype #@
unstressed
@@ -59,26 +169,12 @@ phoneme i
length 140
// Long vowel followed by consonant and @- "gide", "pile"
IF nextPhW(isNotVowel) AND next2PhW(@-) THEN
length 225
// length 225
ENDIF
// "gider", vrider"
IF nextPhW(D) AND next2PhW(V) OR next2PhW(?V) THEN
length 140
ENDIF
// PB long vowel followed by [@-] - "pigen" [p'i@-n]
IF nextPhW(@-) OR nextPhW(V) THEN
length 225
ENDIF
// "vilje" - short followed by 2 consonants
IF nextPhW(isNotVowel) AND next2PhW(isNotVowel) THEN
length 140
ENDIF
// PB "tie", "stige", "krige" vowel + vowel: extra length
// What is causing this very short [i] in words with final [@-]?
// NOT "galleriet" [g,?&lVR'i@-D]
IF nextPhW(V) OR nextPhW(@) OR nextPhW(@-) AND NOT next2PhW(D) THEN
// length 240
ENDIF
//"skider" short
IF nextPhW(D) AND next2PhW(V) THEN
length 140
@@ -87,7 +183,7 @@ ENDIF
IF nextPhW(D) AND next2PhW(V) AND next3PhW(V) THEN
length 225
ENDIF
CALL LongVowelLength
FMT(vowel/i_4)
endphoneme
@@ -95,7 +191,8 @@ endphoneme
// sviret vs. svirret
phoneme ?i
vowel starttype #i endtype #i
length 100
length 140
CALL ShortVowelLength
IfNextVowelAppend(;)
FMT(vowel/i_4)
endphoneme
@@ -111,22 +208,8 @@ endphoneme
phoneme e
vowel starttype #e endtype #e
length 140
// "dele", "mene"
IF next2PhW(@-) THEN
length 225
ENDIF
// PB "ring", "ringe"
IF nextPhW(N) THEN
length 140
ENDIF
// PB "enig", "enige", "evig"
IF nextPhW(isNotVowel) AND next2PhW(i) THEN
length 225
ENDIF
// "nedladende" [n'eDl&D@-n@-], "delte" - before 2 consonants: short
IF nextPhW(isNotVowel) AND next2PhW(isNotVowel) THEN
length 140
ENDIF
CALL LongVowelLength
CALL ShortVowelLength
FMT(vowel/e)
endphoneme
@@ -135,14 +218,7 @@ endphoneme
phoneme ?e
vowel starttype #e endtype #e
length 140
// "rigtigt" R makes the e too long
IF prevPhW(R) THEN
length 100
ENDIF
// "sigte" t/d + @- makes the e too long
IF nextPhW(isNotVowel) AND next2PhW(t) OR next2PhW(d) AND next3PhW(@-) THEN
length 100
ENDIF
CALL ShortVowelLength
FMT(vowel/e)
endphoneme
@@ -153,29 +229,18 @@ phoneme E
IF thisPh(isWordEnd) THEN
IfNextVowelAppend(_!)
ENDIF
// "ræve"
IF nextVowel(@-) THEN
length 225
ENDIF
// "ære", "kærester", "ærefrygt" - longer E
// "ære", "kærester", "ærefrygt" - vowel + vowel
IF nextPhW(V) THEN
length 225
ENDIF
// "stædig" [st'EDi] long
IF nextPhW(isNotVowel) AND next2PhW(i) THEN
// "dræber" TEST shortened by -70 in procedure because of the "r" sound
IF prevPhW(R) OR prevPhW(r) OR prevPhW(3-) AND next2PhW(V) THEN
length 225
ENDIF
// "længe" - short - 2 consonants => 1 consonant
IF nextPhW(N) THEN
length 140
ENDIF
CALL LongVowelLength
// "værelse" [v'E3-Vls@_!]
IF nextPhW(3-) AND next2PhW(V) THEN
length 100
ENDIF
// "mælkebøtte" - short followed by 2 consonants
IF nextPhW(isNotVowel) AND next2PhW(isNotVowel) THEN
length 140
ENDIF
FMT(vowel/e_mid2)
endphoneme
@@ -186,14 +251,7 @@ phoneme ?E
vowel starttype #e endtype #e
ipa ε
length 140
// "fred" R makes the E too long
IF prevPhW(R) OR prevPhW(3-) OR prevPhW(r) THEN
length 100
ENDIF
// "fængsel" N makes the E too long
IF nextPhW(N) THEN
length 100
ENDIF
CALL ShortVowelLength
FMT(vowel/e_mid2)
endphoneme
@@ -203,22 +261,17 @@ phoneme &
length 140
// "same", "sale", "bade" - consonant + @-: long
// but NOT "hinanden"
IF next2PhW(@-) OR next2PhW(@) AND NOT next3PhW(n) THEN
length 225
IF nextPhW(isNotVowel) AND next2PhW(@-) OR next2PhW(@) THEN
IF NOT next3PhW(n) THEN
length 225
ENDIF
ENDIF
// ThisPh + V or @-
// "ae", "aer" vowel + vowel: extra length
IF nextPhW(@-) OR nextPhW(V) THEN
length 260
ENDIF
// "stadig" [st&Di], "stadigt" [st&Dit]
IF nextPhW(isNotVowel) AND next2PhW(i) THEN
length 225
ENDIF
// "Alfie", "alfer" - short before 2 consonants
IF nextPhW(isNotVowel) AND next2PhW(isNotVowel) THEN
length 140
ENDIF
CALL LongVowelLength
FMT(vowel/ee_2)
endphoneme
@@ -228,7 +281,7 @@ endphoneme
phoneme ?&
vowel starttype #e endtype #e
length 140
FMT(vowel/ee_2)
FMT(vowel/ee_2)
endphoneme
// Added for the æ in "dræbt"
@@ -236,6 +289,8 @@ phoneme &#
vowel starttype #e endtype #e
length 140
ipa a
CALL LongVowelLength
// CALL ShortVowelLength
FMT(vowel/&)
endphoneme
@@ -243,40 +298,28 @@ endphoneme
// "revl" vs. "tremme"
phoneme ?&#
vowel starttype #e endtype #e
length 120
length 140
CALL ShortVowelLength
FMT(vowel/&)
endphoneme
phoneme A // PB changed to a_8
vowel starttype #a endtype #a
length 140
// PB long vowel followed by consonant and certain vowels - "drabelig"
IF nextPhW(isNotVowel) AND next2PhW(#@) OR next2PhW(V) THEN
length 225
ENDIF
// "bange" [bAN@-] - [N] = 2 consonants (ng) => short
IF nextPhW(N) THEN
length 140
ENDIF
CALL LongVowelLength
// "fare" [f'A:A]
IF nextPhW(A) THEN
length 225
ENDIF
// "gratis"
IF next2PhW(i) THEN
length 225
ENDIF
IF nextPhW(isNotVowel) AND next2PhW(isNotVowel) THEN
length 140
ENDIF
FMT(vowel/a_8)
endphoneme
// PB short A
// "drab" vs. "drabelig"
// "krabbe" vs. "drabelig"
phoneme ?A
vowel starttype #a endtype #a
length 140
CALL ShortVowelLength
FMT(vowel/a_8)
endphoneme
@@ -287,10 +330,7 @@ phoneme u
IF nextPhW(@-) OR nextPhW(V) OR next2PhW(@-) OR next2PhW(V)THEN
length 225
ENDIF
// "umulig" [u:m'uli]
IF nextVowel(i) AND nextVowel(isFinalVowel) AND nextVowel(isWordEnd) THEN
length 225
ENDIF
CALL LongVowelLength
FMT(vowel/u_bck)
endphoneme
@@ -299,10 +339,7 @@ endphoneme
phoneme ?u
vowel starttype #u endtype #u
length 140
// "slutte" t/d + @- makes the u too long
IF nextPhW(t) OR nextPhW(d) AND next2PhW(@-) THEN
length 100
ENDIF
CALL ShortVowelLength
FMT(vowel/u_bck)
endphoneme
@@ -317,10 +354,7 @@ ENDIF
IF next2PhW(V) OR next2PhW(@-) THEN
length 225
ENDIF
// "modig" - long vowel after consonant + [i]
IF nextPhW(D) AND next2PhW(i) THEN
length 225
ENDIF
CALL LongVowelLength
FMT(vowel/o_2)
endphoneme
@@ -344,14 +378,11 @@ ENDIF
IF nextPhW(V) OR nextPhW(@-) THEN
length 225
ENDIF
// "rådig"
IF nextVowel(i) AND nextVowel(isFinalVowel) THEN
length 225
ENDIF
// "såre", "sårede" [s'O:?OD@-]
IF nextPhW(O) OR nextPhW(?O) THEN
length 225
ENDIF
CALL LongVowelLength
FMT(vowel/o_5)
endphoneme
@@ -366,14 +397,7 @@ endphoneme
phoneme V
vowel starttype #@ endtype #@
length 140
// "forlig"
IF nextPhW(isNotVowel) AND next2PhW(i) THEN
length 225
ENDIF
// PB "konge" - ng=>n
IF nextPhW(N) THEN
length 140
ENDIF
CALL LongVowelLength
FMT(vowel/V_4)
endphoneme
@@ -387,10 +411,8 @@ endphoneme
phoneme 0
vowel starttype #o endtype #o
length 140 //225
IF nextPhW(3) OR nextPhW(V) OR nextPhW(@-) THEN
length 225
ENDIF
length 140
ipa ɔ
FMT(vowel/oo_2)
endphoneme
@@ -398,6 +420,7 @@ endphoneme
phoneme ?0
vowel starttype #o endtype #o
length 140
ipa ɔ
FMT(vowel/oo_2)
endphoneme
@@ -407,24 +430,20 @@ phoneme y
// PB long vowel followed by consonant and certain vowels
// "gyde", "gyder"
IF nextPhW(isNotVowel) AND next2PhW(@-) OR next2PhW(V) THEN
length 225
ENDIF
// "dydig" [dyDi]
IF nextPhW(isNotVowel) AND next2PhW(i) THEN
length 225
// not "gebyret" TEST
IF NOT nextPhW(3-) AND NOT nextPhW(R) AND NOT nextPhW(r) THEN
length 225
ENDIF
ENDIF
// "syge" [sy@-] vowel + vowel: extra length, but NOT "fyret" [fyVD]
IF nextPhW(@-) OR nextPhW(3) AND NOT next2PhW(D) THEN
length 225
ENDIF
// "tyve"
IF nextPhW(?u) AND next2PhW(@-) THEN
IF nextPhW(w) AND next2PhW(@-) THEN
length 225
ENDIF
// "bryde" R makes the y too long
IF prevPhW(R) OR prevPhW(3-) OR prevPhW(r) THEN
length 180
ENDIF
CALL LongVowelLength
FMT(vowel/y)
endphoneme
@@ -433,25 +452,14 @@ endphoneme
phoneme ?y
vowel starttype #i endtype #i
length 140
// "udrydde" R makes the y too long
IF prevPhW(R) OR prevPhW(3-) OR prevPhW(r) THEN
length 100
ENDIF
// "hytte" t/d + @- makes the y too long
IF nextPhW(t) OR nextPhW(d) AND next2PhW(@-) THEN
length 100
ENDIF
CALL ShortVowelLength
FMT(vowel/y)
endphoneme
phoneme Y
vowel starttype #i endtype #i
length 225
IF NOT next2Ph(3) AND NOT next2Ph(V) AND NOT next2PhW(@-) AND nextPhW(isNotVowel) THEN
glstop
length 140
ENDIF
IF nextPhW(3) OR nextPhW(V) OR nextPhW(@) THEN
length 140
IF nextPhW(V) OR nextPhW(@-) THEN
length 225
ENDIF
FMT(vowel/yy)
@@ -460,34 +468,15 @@ endphoneme
phoneme W
vowel starttype #@ endtype #@
length 140
// "kløe" vowel + vowel: long
IF nextPhW(@-) THEN
length 225
ENDIF
// "røve" W + 1 consonant + 3 or W or @
IF next2PhW(@-) OR next2PhW(3) THEN
length 225
ENDIF
// "røveri" but NOT "surfer" [sWfV] TEST
IF next2PhW(V) OR next2PhW(?V) AND NOT next2PhW(isFinalVowel) THEN
length 140
ENDIF
// PB "nødig", "nødigt", "kølige" - long
IF nextVowel(i) THEN
length 225
ENDIF
// "møve" [mWw@-] - long
IF nextPhW(w) AND nextVowel(@-) THEN
length 225
ENDIF
// "børnebog" - short
IF nextPhW(r) AND next2PhW(n) AND next3PhW(@-) THEN
length 140
ENDIF
// PB "synge"
IF nextPhW(N) THEN
length 140
ENDIF
CALL LongVowelLength
FMT(vowel/oe)
endphoneme
@@ -496,10 +485,7 @@ endphoneme
phoneme ?W
vowel starttype #@ endtype #@
length 140
// "bryllup", "rødder" R makes the y too long
IF prevPhW(R) OR prevPhW(3-) OR prevPhW(r) THEN
length 100
ENDIF
CALL ShortVowelLength
FMT(vowel/oe)
endphoneme
@@ -519,6 +505,7 @@ endphoneme
phoneme ?W#
vowel starttype #@ endtype #@
length 140
CALL ShortVowelLength
FMT(vowel/V)
endphoneme
@@ -562,24 +549,6 @@ endphoneme
phoneme l/3 // Replacement for [l/]
liquid
lengthmod 7
IF nextPhW(isVowel) THEN
// ChangePhoneme(l)
ENDIF
PrevVowelEndings
VowelEnding(l/l_@)
VowelEnding(l/l_a)
VowelEnding(l/l_e, -50) // hjælpe
VowelEnding(l/l_i, -70) // flygte?
VowelEnding(l/l_o, -60) // stole, skole, hjulpet
VowelEnding(l/l_u, -70)
EndSwitch
// IF nextPh(isLiquid) THEN
// FMT(l/_l)
// ENDIF
FMT(l/l_)
endphoneme