Latvian language improvements

This commit is contained in:
Valdis Vitolins
2017-11-20 00:03:31 +02:00
parent 419d4748c6
commit 523777a0b9
3 changed files with 217 additions and 152 deletions
+193 -139
View File
@@ -1,11 +1,3 @@
// IF thisPh(isStressed) THEN
// FMT(vowel/..., 100)
// ELIF thisPh(isDiminished) AND NOT prevVowel(isStressed) THEN
// FMT(vowel/..., 50)
// ELSE
// FMT(vowel/..., 75)
// ENDIF
phoneme a
vwl starttype #a endtype #a
length 130
@@ -171,12 +163,23 @@ phoneme tS
WAV(ustop/tsh,40)
endphoneme
phoneme n- // more voiced variant of n
vwl starttype #a endtype #a
ipa nU+0329
lengthmod 4
length 120
FMT(n/n-syl)
phoneme D // louder and shorter version of d
vcd alv stp
voicingswitch t
length 10
lengthmod 5
Vowelin f1=1 f2=1700 -300 300 f3=-100 80
Vowelout f1=2 f2=1700 -300 300 f3=-100 80 brk
IF PreVoicing THEN
FMT(d/xd, 110)
ENDIF
IF nextPh(isPause2) THEN
FMT(d/d_, 120) addWav(x/d_,110)
ENDIF
FMT(d/d, 110) addWav(x/d,110)
endphoneme
phoneme h // more quiet version of standard h
@@ -194,49 +197,33 @@ phoneme h // more quiet version of standard h
WAV(h/ho, 20)
ELIF nextPh(#u) THEN
WAV(h/hu, 20)
ELIF nextPh(isPause) THEN
WAV(h/h_, 40) // louder for foreign words
ENDIF
WAV(h/h_, 20) // no vowel following
endphoneme
phoneme R // Latvian hard r
liquid trl
lengthmod 6
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, 60)
endphoneme
phoneme j // **y**es
liquid pal starttype #i
phoneme r // Latvian soft r
liquid trl
lengthmod 6
Vowelin f1=0 f2=1700 -300 300 f3=-300 80
Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
FMT(j/j_) addWav(r3/r_trill.wav, 25)
endphoneme
IF nextPhW(isVowel) THEN
NextVowelStarts
VowelStart(j/j@)
VowelStart(j/ja)
VowelStart(j/je)
VowelStart(j/ji)
VowelStart(j/jo)
VowelStart(j/ju)
EndSwitch
VowelEnding(j/xj, 70) // In difference with English, vowel is lengthened, not shortened
ELSE
Vowelout len=127 // no vowel follows
FMT(j/xj)
ENDIF
phoneme t
vls alv stp //lengthenstop
lengthmod 1
voicingswitch d
IF nextPh(isPause2) THEN
WAV(ustop/t_dnt, 40)
IF prevPh(isPause) THEN
FMT(j/_j)
ENDIF
WAV(ustop/t_dnt, 50)
endphoneme
phoneme p
vls blb stp
lengthmod 2
voicingswitch b
Vowelin f1=0 f2=1000 -50 -100 f3=-200 80
Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30
IF nextPh(isPause2) THEN
WAV(ustop/p_unasp_, 80)
ENDIF
IF nextPh(l) THEN
WAV(ustop/pl)
ENDIF
WAV(ustop/p_unasp, 120)
endphoneme
phoneme k
@@ -263,25 +250,169 @@ phoneme c
WAV(ustop/c, 80)
endphoneme
phoneme D // louder and shorter version of d
vcd alv stp
voicingswitch t
length 10
lengthmod 5
Vowelin f1=1 f2=1700 -300 300 f3=-100 80
Vowelout f1=2 f2=1700 -300 300 f3=-100 80 brk
phoneme l
liquid
IF PreVoicing THEN
FMT(d/xd, 110)
IF nextPh(isNotVowel) THEN
ChangePhoneme(l/)
ENDIF
IF nextPh(isPause2) THEN
FMT(d/d_, 120) addWav(x/d_,110)
IF nextPh(isNotVowel) THEN
PrevVowelEndings
VowelEnding(l/L1_@L)
VowelEnding(l/L1_aL)
VowelEnding(l/L1_eL)
VowelEnding(l/L1_iL)
VowelEnding(l/L1_oL)
VowelEnding(l/L1_uL)
EndSwitch
FMT(l/l_)
RETURN
ENDIF
FMT(d/d, 110) addWav(x/d,110)
CALL vowelstart_l
IF prevPh(a) OR prevPh(a:) THEN
VowelEnding(l/xl, 30) // FIXME
ELSEIF prevPh(isVowel) THEN
VowelEnding(l/xl, 10)
ENDIF
IF prevPh(isPause) THEN
FMT(l/_l)
ENDIF
IF prevPh(t) THEN
FMT(l/tl)
ENDIF
IF prevPh(l/) THEN
FMT(l/l_long) // double l, make it longer
ENDIF
FMT(l/l)
endphoneme
phoneme l^ // Latvian ļ, customized from standard l^
liquid
ipa ʎ
lengthmod 7
Vowelout len=60 lenadd rate
length 100
NextVowelStarts
VowelStart(l^/j2@)
VowelStart(l^/j2a)
VowelStart(l^/j2e)
VowelStart(l^/j2i)
VowelStart(l^/j2o)
VowelStart(l^/j2u)
EndSwitch
IF prevPh(isPause) THEN
FMT(l^/_l^)
ELSEIF nextPh(isPause) THEN
FMT(l^/l^_)
ENDIF
FMT(l^/l^)
endphoneme
phoneme m // copied from standard m phoneme with rule for 'mm'
vcd blb nas
Vowelout f1=2 f2=1000 -500 -350 f3=-200 80 brk
lengthmod 4
IF KlattSynth THEN
Vowelin f1=0 f2=1000 -50 -200 f3=-200 80
IF nextPh(isPause2) THEN
FMT(klatt/m_)
ENDIF
FMT(klatt/m)
ENDIF
NextVowelStarts
VowelStart(m/m@)
VowelStart(m/ma)
VowelStart(m/me)
VowelStart(m/mi)
VowelStart(m/mo)
VowelStart(m/mu)
EndSwitch
IF prevPh(isNotVowel) AND nextPhW(isLiquid) THEN
FMT(m/mj)
ELIF prevPh(isPause) THEN
FMT(m/_m)
ELIF nextPh(isNotVowel) THEN
FMT(m/m_)
ELIF nextPh(m) THEN // m/mj has no volume change, so doubled 'mm' merges better
FMT(m/mj)
ENDIF
endphoneme
phoneme n- // more voiced variant of n
vwl starttype #a endtype #a
ipa nU+0329
lengthmod 4
length 120
FMT(n/n-syl)
endphoneme
phoneme p
vls blb stp
lengthmod 2
voicingswitch b
Vowelin f1=0 f2=1000 -50 -100 f3=-200 80
Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30
IF nextPh(isPause2) THEN
WAV(ustop/p_unasp_, 80)
ENDIF
IF nextPh(l) THEN
WAV(ustop/pl)
ENDIF
WAV(ustop/p_unasp, 120)
endphoneme
phoneme R // Latvian hard r
liquid trl
lengthmod 6
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, 60)
endphoneme
phoneme r // Latvian soft r
liquid trl
lengthmod 6
Vowelin f1=0 f2=1700 -300 300 f3=-300 80
Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
FMT(j/j_) addWav(r3/r_trill.wav, 25)
endphoneme
phoneme s
vls alv frc sib
voicingswitch z
lengthmod 3
Vowelin f1=0 f2=1700 -300 300 f3=-100 80
Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
WAV(ufric/s,60)
endphoneme
phoneme t
vls alv stp //lengthenstop
lengthmod 1
voicingswitch d
IF nextPh(isPause2) THEN
WAV(ustop/t_dnt, 40)
ENDIF
WAV(ustop/t_dnt, 50)
endphoneme
phoneme z` // Shortened version of z for diphthong dz
vcd alv frc sib
@@ -330,87 +461,10 @@ endphoneme
phoneme } // Tiny, 5ms non-linked pause (used between phonemes in word)
pause
// starttype _ endtype _
// lengthmod 1
nolink
length 5
endphoneme
phoneme s
vls alv frc sib
voicingswitch z
lengthmod 3
Vowelin f1=0 f2=1700 -300 300 f3=-100 80
Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
WAV(ufric/s,60)
endphoneme
phoneme j // **y**es
liquid pal starttype #i
IF nextPhW(isVowel) THEN
NextVowelStarts
VowelStart(j/j@)
VowelStart(j/ja)
VowelStart(j/je)
VowelStart(j/ji)
VowelStart(j/jo)
VowelStart(j/ju)
EndSwitch
VowelEnding(j/xj, 70) // In difference with English, vowel is lengthened, not shortened
ELSE
Vowelout len=127 // no vowel follows
FMT(j/xj)
ENDIF
IF prevPh(isPause) THEN
FMT(j/_j)
ENDIF
endphoneme
phoneme l
liquid
IF nextPh(isNotVowel) THEN
ChangePhoneme(l/)
ENDIF
IF nextPh(isNotVowel) THEN
PrevVowelEndings
VowelEnding(l/L1_@L)
VowelEnding(l/L1_aL)
VowelEnding(l/L1_eL)
VowelEnding(l/L1_iL)
VowelEnding(l/L1_oL)
VowelEnding(l/L1_uL)
EndSwitch
FMT(l/l_)
RETURN
ENDIF
CALL vowelstart_l
IF prevPh(a) OR prevPh(a:) THEN
VowelEnding(l/xl, 30) // FIXME
ELSEIF prevPh(isVowel) THEN
VowelEnding(l/xl, 10)
ENDIF
IF prevPh(isPause) THEN
FMT(l/_l)
ENDIF
IF prevPh(t) THEN
FMT(l/tl)
ENDIF
IF prevPh(l/) THEN
FMT(l/l_long) // double l, make it longer
ENDIF
FMT(l/l)
endphoneme