mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Fix: SSML <voice> </voice> lost the current voice. Fix: French Mbrola voices. Command-line, add --ipa=3 separates phoneme names with underscores. Language changes, an, hi, pt. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@338 d46cf337-b52f-0410-862d-fd96e6ae7743
539 lines
8.1 KiB
Plaintext
539 lines
8.1 KiB
Plaintext
|
|
//====================================================
|
|
// Hindi
|
|
//====================================================
|
|
|
|
phoneme : // Lengthen the previous vowel by "length"
|
|
virtual
|
|
length 100
|
|
endphoneme
|
|
|
|
phoneme @
|
|
vowel flag1 starttype #@ endtype #@
|
|
length 130
|
|
|
|
ChangeIfDiminished(@-)
|
|
IF nextPh(H) THEN
|
|
FMT(vowel/@_low)
|
|
ENDIF
|
|
FMT(vowel/@_bck)
|
|
endphoneme
|
|
|
|
|
|
phoneme V
|
|
vowel flag1 starttype #@ endtype #@
|
|
length 130
|
|
|
|
IF thisPh(isWordStart) THEN
|
|
FMT(vowel/V_3)
|
|
RETURN
|
|
ENDIF
|
|
|
|
IF thisPh(isNotStressed) THEN
|
|
IF prevPh(H) THEN
|
|
ChangePhoneme(@)
|
|
ENDIF
|
|
|
|
IF thisPh(isWordEnd) THEN
|
|
ChangePhoneme(NULL)
|
|
ENDIF
|
|
|
|
IF prev2PhW(isVowel) AND NOT nextVowel(isFlag1) THEN
|
|
IF thisPh(isSeqFlag1) THEN
|
|
// delete the last inherent vowel of a sequence
|
|
ChangePhoneme(NULL)
|
|
ELSE
|
|
IF NOT thisPh(isFirstVowel) THEN
|
|
// delete if not the first vowel, and is an isolated 'a'
|
|
ChangePhoneme(NULL)
|
|
ENDIF
|
|
ENDIF
|
|
ENDIF
|
|
ENDIF
|
|
|
|
IF prevPh(isPalatal) THEN
|
|
ChangePhoneme(@3)
|
|
ELSEIF prevPh(r) THEN
|
|
ChangePhoneme(@2)
|
|
ELSE
|
|
IF thisPh(isNotStressed) THEN
|
|
ChangePhoneme(@)
|
|
ENDIF
|
|
|
|
IF nextPh(H) THEN
|
|
FMT(vowel/@_low)
|
|
ENDIF
|
|
ENDIF
|
|
|
|
FMT(vowel/V_3)
|
|
endphoneme
|
|
|
|
|
|
phoneme @2
|
|
vowel flag1 starttype #@ endtype #@
|
|
length 130
|
|
FMT(vowel/@_low)
|
|
endphoneme
|
|
|
|
phoneme @3
|
|
vowel flag1 starttype #@ endtype #@
|
|
length 130
|
|
ChangeIfDiminished(@-)
|
|
FMT(vowel/@_3)
|
|
endphoneme
|
|
|
|
|
|
|
|
|
|
phoneme i:
|
|
vowel long starttype #i endtype #i
|
|
length 230
|
|
IfNextVowelAppend(;)
|
|
FMT(vowel/i_fnt)
|
|
endphoneme
|
|
|
|
phoneme i // as [i:] but not marked as 'long'
|
|
vowel starttype #i endtype #i
|
|
length 230
|
|
IfNextVowelAppend(;)
|
|
FMT(vowel/i_6)
|
|
endphoneme
|
|
|
|
phoneme I
|
|
vowel starttype #i endtype #i
|
|
length 100
|
|
IfNextVowelAppend(;)
|
|
FMT(vowel/ii_3)
|
|
endphoneme
|
|
|
|
phoneme e:
|
|
vowel long starttype #e endtype #e
|
|
length 220
|
|
FMT(vowel/e_2)
|
|
endphoneme
|
|
|
|
phoneme e
|
|
vowel starttype #e endtype #e
|
|
length 130
|
|
FMT(vowel/e_2)
|
|
endphoneme
|
|
|
|
phoneme E:
|
|
vowel long starttype #e endtype #e
|
|
length 220
|
|
FMT(vdiph/ee-e)
|
|
endphoneme
|
|
|
|
phoneme E
|
|
vowel starttype #e endtype #e
|
|
length 130
|
|
FMT(vowel/e_mid)
|
|
endphoneme
|
|
|
|
phoneme &:
|
|
vowel long starttype #a endtype #a
|
|
length 220
|
|
FMT(vowel/&)
|
|
endphoneme
|
|
|
|
|
|
phoneme a:
|
|
vowel long starttype #a endtype #a
|
|
length 190
|
|
FMT(vowel/aa_9)
|
|
endphoneme
|
|
|
|
phoneme a
|
|
vowel long starttype #a endtype #a
|
|
length 130
|
|
FMT(vowel/a#_3)
|
|
endphoneme
|
|
|
|
|
|
phoneme o:
|
|
vowel long starttype #o endtype #o
|
|
length 227
|
|
FMT(vowel/o_2)
|
|
endphoneme
|
|
|
|
phoneme o
|
|
vowel starttype #o endtype #o
|
|
length 130
|
|
FMT(vowel/o)
|
|
endphoneme
|
|
|
|
phoneme O:
|
|
vowel long starttype #o endtype #o
|
|
length 210
|
|
FMT(vowel/oo_4)
|
|
endphoneme
|
|
|
|
|
|
phoneme O
|
|
vowel starttype #o endtype #o
|
|
length 130
|
|
FMT(vowel/0)
|
|
endphoneme
|
|
|
|
|
|
phoneme U
|
|
vowel starttype #u endtype #u
|
|
length 120
|
|
FMT(vowel/uu_bck)
|
|
endphoneme
|
|
|
|
|
|
phoneme u:
|
|
vowel long starttype #u endtype #u
|
|
length 230
|
|
FMT(vowel/u_bck)
|
|
endphoneme
|
|
|
|
|
|
// Nasal vowels
|
|
//=============
|
|
|
|
phoneme i~
|
|
vowel long starttype #i endtype #i
|
|
length 220
|
|
FMT(vnasal/i_n2)
|
|
endphoneme
|
|
|
|
phoneme I~
|
|
vowel long starttype #i endtype #i
|
|
length 170
|
|
FMT(vnasal/ii_n)
|
|
endphoneme
|
|
|
|
phoneme e~
|
|
vowel long starttype #e endtype #e
|
|
length 220
|
|
FMT(vnasal/e_n)
|
|
endphoneme
|
|
|
|
phoneme E~
|
|
vowel long starttype #e endtype #e
|
|
length 230
|
|
FMT(vnasal/ee_n2)
|
|
endphoneme
|
|
|
|
phoneme a~
|
|
vowel long starttype #a endtype #a
|
|
length 250
|
|
FMT(vnasal/aa_n)
|
|
endphoneme
|
|
|
|
phoneme V~
|
|
vowel long starttype #@ endtype #@
|
|
length 250
|
|
FMT(vnasal/V_n)
|
|
endphoneme
|
|
|
|
phoneme O~
|
|
vowel long starttype #o endtype #o
|
|
length 230
|
|
FMT(vnasal/oo_n2)
|
|
endphoneme
|
|
|
|
phoneme o~
|
|
vowel long starttype #o endtype #o
|
|
length 220
|
|
FMT(vnasal/o_n)
|
|
endphoneme
|
|
|
|
phoneme U~
|
|
vowel starttype #u endtype #u
|
|
length 170
|
|
FMT(vnasal/u_n)
|
|
endphoneme
|
|
|
|
phoneme u~
|
|
vowel long starttype #u endtype #u
|
|
length 230
|
|
FMT(vnasal/u_n)
|
|
endphoneme
|
|
|
|
|
|
// Diphthongs
|
|
//===========
|
|
|
|
|
|
phoneme aI
|
|
vowel long starttype #@ endtype #i
|
|
length 240
|
|
long
|
|
FMT(vdiph/&i)
|
|
endphoneme
|
|
|
|
phoneme aU
|
|
vowel long starttype #a endtype #u
|
|
length 240
|
|
long
|
|
FMT(vdiph/aau_3)
|
|
endphoneme
|
|
|
|
|
|
|
|
// CONSONANTS
|
|
//===========
|
|
|
|
phoneme v // approximant, not fricative
|
|
import_phoneme base/v#
|
|
voicingswitch f
|
|
endphoneme
|
|
|
|
|
|
phoneme H // use for full "h"
|
|
import_phoneme base/h
|
|
endphoneme
|
|
|
|
|
|
|
|
// bilabial plosives
|
|
//==================
|
|
|
|
phoneme p
|
|
import_phoneme consonants/p-
|
|
endphoneme
|
|
|
|
|
|
phoneme p#
|
|
import_phoneme consonants/ph
|
|
endphoneme
|
|
|
|
|
|
phoneme b // this is [b]
|
|
import_phoneme base/b
|
|
endphoneme
|
|
|
|
|
|
phoneme b#
|
|
vcd blb stop
|
|
lengthmod 5
|
|
voicingswitch p#
|
|
Vowelin f1=0 f2=1000 -50 -100 f3=-200 80
|
|
Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30
|
|
|
|
IF PreVoicing THEN
|
|
FMT(b/xb)
|
|
ENDIF
|
|
|
|
FMT( b/b@2) addWav(ustop/p_asp, 70)
|
|
endphoneme
|
|
|
|
|
|
|
|
|
|
// dental plosives
|
|
//==================
|
|
|
|
phoneme t // dental variant of /t/
|
|
import_phoneme base/t[
|
|
voicingswitch d
|
|
endphoneme
|
|
|
|
|
|
phoneme t# // dental variant of /t/
|
|
vls dnt stop
|
|
lengthmod 2
|
|
voicingswitch d
|
|
Vowelin f1=0 f2=1500 -300 300 f3=-100 80 amp=16
|
|
Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20
|
|
IF nextPh(isPause2) THEN
|
|
WAV(ustop/t_dnt, 35)
|
|
ENDIF
|
|
WAV(ustop/t_dnt, 50)
|
|
endphoneme
|
|
|
|
|
|
phoneme d // dental variant of /d/
|
|
import_phoneme base/d[
|
|
voicingswitch t
|
|
endphoneme
|
|
|
|
|
|
phoneme d#
|
|
vcd dnt stop
|
|
lengthmod 5
|
|
voicingswitch t#
|
|
Vowelin f1=0 f2=1500 -300 300 f3=-100 80
|
|
Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20
|
|
|
|
IF PreVoicing THEN
|
|
FMT(d/xd)
|
|
ENDIF
|
|
|
|
FMT(d/xd3) addWav(ustop/t_dnt, 40)
|
|
endphoneme
|
|
|
|
|
|
|
|
|
|
// retroflex plosives
|
|
//===================
|
|
|
|
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
|
|
WAV(ustop/t_short)
|
|
endphoneme
|
|
|
|
phoneme t.#
|
|
vls rfx stop
|
|
lengthmod 2
|
|
ipa ʈU+02B0
|
|
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
|
|
// WAV(ustop/th_rfx)
|
|
WAV(ustop/t)
|
|
endphoneme
|
|
|
|
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
|
|
|
|
IF PreVoicing THEN
|
|
FMT(d/xdr)
|
|
ENDIF
|
|
|
|
IF nextPh(isPause2) THEN
|
|
FMT(d/d_) addWav(x/d_)
|
|
ENDIF
|
|
|
|
FMT(d/dr) addWav(x/d)
|
|
endphoneme
|
|
|
|
|
|
phoneme d.#
|
|
vcd rfx stop
|
|
lengthmod 5
|
|
ipa ɖU+02B0
|
|
voicingswitch t.#
|
|
Vowelin f1=1 f2=1800 -300 300 f3=-400 80
|
|
Vowelout f1=1 f2=1800 -300 300 f3=-400 80 colr=2
|
|
|
|
IF PreVoicing THEN
|
|
FMT(d/xdr)
|
|
ENDIF
|
|
|
|
FMT(d/dr) addWav(ustop/t)
|
|
// FMT(d/dr) addWav(ustop/th_rfx)
|
|
endphoneme
|
|
|
|
|
|
|
|
|
|
// palatal plosives
|
|
//=================
|
|
|
|
// also try [tS] and [dZ]
|
|
|
|
phoneme c
|
|
import_phoneme base/c
|
|
endphoneme
|
|
|
|
|
|
phoneme c#
|
|
CALL base/tS;
|
|
ipa cU+02B0
|
|
endphoneme
|
|
|
|
|
|
phoneme J
|
|
import_phoneme base/J
|
|
endphoneme
|
|
|
|
|
|
phoneme J#
|
|
vcd pal afr sibilant
|
|
lengthmod 5
|
|
voicingswitch c#
|
|
Vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70
|
|
Vowelout f1=0 f2=2700 400 600 f3=300 80 colr=1
|
|
|
|
IF PreVoicing THEN
|
|
FMT(dzh/xdz_pzd)
|
|
ENDIF
|
|
|
|
FMT(dzh/xdz_pzd) addWav(ustop/ts_pzd)
|
|
endphoneme
|
|
|
|
|
|
|
|
|
|
|
|
// velar plosives
|
|
//==================
|
|
|
|
|
|
phoneme k
|
|
import_phoneme consonants/k-
|
|
voicingswitch g
|
|
endphoneme
|
|
|
|
phoneme k#
|
|
import_phoneme consonants/k#
|
|
voicingswitch g#
|
|
endphoneme
|
|
|
|
|
|
phoneme g
|
|
import_phoneme base/g
|
|
voicingswitch k
|
|
endphoneme
|
|
|
|
|
|
phoneme g#
|
|
vcd dnt stop
|
|
lengthmod 5
|
|
voicingswitch k#
|
|
Vowelin f1=1 f2=2300 200 300 f3=-150 80 rms=20
|
|
Vowelout f1=0 f2=2300 300 400 f3=-150 80 rms=20
|
|
|
|
IF PreVoicing THEN
|
|
FMT(g2/xg)
|
|
ENDIF
|
|
|
|
IF nextPh(isPause2) THEN
|
|
FMT(g2/xg) addWav(ustop/k_asp, 35)
|
|
ENDIF
|
|
FMT(g2/xg) addWav(ustop/k_asp, 50)
|
|
endphoneme
|
|
|
|
//================
|
|
|
|
phoneme #X2 // click, use for indicating combining long vowels
|
|
vls alv frc sibilant
|
|
lengthmod 3
|
|
WAV(ustop/percus02, 60)
|
|
endphoneme
|
|
|
|
|
|
phoneme r
|
|
liquid rhotic
|
|
lengthmod 3
|
|
|
|
IF thisPh(isWordEnd) THEN
|
|
CALL base/r/
|
|
ELSE
|
|
IF prevPhW(isVowel) THEN
|
|
IF nextPhW(isNotVowel) OR nextPhW(V) THEN
|
|
ChangePhoneme(*)
|
|
ENDIF
|
|
ENDIF
|
|
|
|
CALL base/r
|
|
ENDIF
|
|
ipa ɾ
|
|
endphoneme
|
|
|
|
|