mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Fix: Speak punctuation option also caused text after [[ to be spoken as phoneme codes even if espeakPHONEMES flag is not set. Speak sequences of letters and dots as individual letters, and don't speak 'dot', eg. "u.s.a." Don't announce punctuation in the alternative text inside <audio ... </audio> Vowelcharts, show the positions of multiple FMT() in vowel phonemes definitions. Phoneme definitions: New attributes: flag1, flag2, flag3 New attribute: nopause. Prevents the insertion of a short pause when this phoneme starts a word which follows a vowel. New conditions: isFlag1, isFlag2, isFlag3, isSibilant. New statement: InsertPhoneme() Phonemes: improve syllablic [m-] [n-] [N-] *_rules: add attributes $p_alt .. $p_alt3, $w_alt .. $w_alt3 *_list: add attributes: $sentence, $atstart klatt synthesizer: implement echo. espeakedit, Prosody display: Indicate stressed and secondary-stress syllables. espeakedit: remember window size and position. Intonation: New file, 'phsource/intonation' to define 'tunes' which can be used from voice files. espeakedit: add Compile -> Intonationm data Speed: Increase range to 80 to 450, with default=175. Improve speaking at high speeds. lang=en: Reduce consecutive unstressed syllables to 'diminished' stress, only in unstressed words. lang=de: Change 'r' phoneme. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@244 d46cf337-b52f-0410-862d-fd96e6ae7743
373 lines
5.3 KiB
Plaintext
Executable File
373 lines
5.3 KiB
Plaintext
Executable File
|
|
|
|
//=========================================================
|
|
// German
|
|
//=========================================================
|
|
|
|
|
|
|
|
phoneme @ // Schwa
|
|
vowel starttype #@ endtype #@
|
|
unstressed
|
|
length 120
|
|
IF nextPh(r) THEN
|
|
IF next2Ph(isVowel) THEN
|
|
ELSE
|
|
ChangePhoneme(3)
|
|
ENDIF
|
|
ENDIF
|
|
FMT(vowel/@_4)
|
|
endphoneme
|
|
|
|
|
|
phoneme 3 // Schwa+r
|
|
vowel starttype #a endtype #a
|
|
unstressed flag1
|
|
length 170
|
|
IF thisPh(isWordEnd) THEN
|
|
FMT(vowel/V_3)
|
|
ELSE
|
|
FMT(vowel/a#_3)
|
|
ENDIF
|
|
endphoneme
|
|
|
|
phoneme 3: // Schwa+r
|
|
vowel starttype #a endtype #a
|
|
unstressed flag1
|
|
length 220
|
|
IF thisPh(isWordEnd) THEN
|
|
FMT(vowel/V_3)
|
|
ELSE
|
|
FMT(vowel/a#_3)
|
|
ENDIF
|
|
endphoneme
|
|
|
|
|
|
phoneme a
|
|
vowel starttype #a endtype #a
|
|
length 110
|
|
FMT(vowel/a)
|
|
endphoneme
|
|
|
|
|
|
phoneme E
|
|
vowel starttype #e endtype #e
|
|
length 120
|
|
FMT(vowel/e_mid2)
|
|
endphoneme
|
|
|
|
|
|
phoneme E2 // as[E] but reduces to @ if unstressed
|
|
vowel starttype #e endtype #e
|
|
length 120
|
|
ChangeIfDiminished(@)
|
|
FMT(vowel/e_mid2)
|
|
endphoneme
|
|
|
|
|
|
phoneme I
|
|
vowel starttype #i endtype #i
|
|
length 120
|
|
IfNextVowelAppend(;)
|
|
FMT(vowel/ii)
|
|
endphoneme
|
|
|
|
|
|
phoneme I:
|
|
vowel starttype #i endtype #i
|
|
length 190
|
|
FMT(vowel/ii)
|
|
endphoneme
|
|
|
|
|
|
phoneme O
|
|
vowel starttype #o endtype #o
|
|
length 120
|
|
FMT(vowel/oo)
|
|
endphoneme
|
|
|
|
|
|
phoneme U
|
|
vowel starttype #u endtype #u
|
|
length 120
|
|
IF nextPh(r) THEN
|
|
IF next2Ph(isVowel) THEN
|
|
ELSE
|
|
ChangePhoneme(UR)
|
|
ENDIF
|
|
ENDIF
|
|
FMT(vowel/uu_2)
|
|
endphoneme
|
|
|
|
|
|
phoneme A:
|
|
vowel starttype #a endtype #a
|
|
length 250
|
|
FMT(vowel/aa_6)
|
|
endphoneme
|
|
|
|
|
|
phoneme A // reduces to [a] if not stressed
|
|
vowel starttype #a endtype #a
|
|
length 250
|
|
ChangeIfNotStressed(a)
|
|
FMT(vowel/aa_6)
|
|
endphoneme
|
|
|
|
|
|
phoneme i:
|
|
vowel starttype #i endtype #i
|
|
length 180
|
|
IF prevPh(w) THEN
|
|
VowelStart(w/wi2)
|
|
ENDIF
|
|
FMT(vowel/i_2)
|
|
endphoneme
|
|
|
|
|
|
phoneme i2
|
|
vowel starttype #i endtype #i
|
|
length 180
|
|
ChangeIfNotStressed(I)
|
|
IF prevPh(w) THEN
|
|
VowelStart(w/wi2)
|
|
ENDIF
|
|
FMT(vowel/i_2)
|
|
endphoneme
|
|
|
|
|
|
phoneme u:
|
|
vowel starttype #u endtype #u
|
|
length 190
|
|
FMT(vowel/u)
|
|
endphoneme
|
|
|
|
|
|
phoneme aU
|
|
vowel starttype #a endtype #u
|
|
length 220
|
|
FMT(vdiph/aau_6)
|
|
endphoneme
|
|
|
|
|
|
phoneme aI
|
|
vowel starttype #a endtype #i
|
|
length 210
|
|
FMT(vdiph/ai_5)
|
|
endphoneme
|
|
|
|
|
|
phoneme EI
|
|
vowel starttype #e endtype #i
|
|
length 210
|
|
FMT(vdiph/eei)
|
|
endphoneme
|
|
|
|
|
|
|
|
phoneme OY
|
|
vowel starttype #o endtype #i
|
|
length 220
|
|
FMT(vdiph/oi)
|
|
endphoneme
|
|
|
|
|
|
phoneme E:
|
|
vowel starttype #e endtype #e
|
|
length 200
|
|
FMT(vowel/e_mid2)
|
|
endphoneme
|
|
|
|
|
|
phoneme e:
|
|
vowel starttype #e endtype #e
|
|
length 200
|
|
FMT(vowel/e_2)
|
|
endphoneme
|
|
|
|
|
|
phoneme o:
|
|
vowel starttype #o endtype #o
|
|
length 210
|
|
FMT(vowel/o)
|
|
endphoneme
|
|
|
|
|
|
phoneme y:
|
|
vowel starttype #u endtype #u
|
|
length 200
|
|
FMT(vowel/y)
|
|
endphoneme
|
|
|
|
|
|
phoneme y
|
|
vowel starttype #u endtype #u
|
|
length 110
|
|
FMT(vowel/yy_4)
|
|
endphoneme
|
|
|
|
|
|
phoneme Y:
|
|
vowel starttype #@ endtype #@
|
|
length 220
|
|
FMT(vowel/y#)
|
|
endphoneme
|
|
|
|
|
|
phoneme W
|
|
vowel starttype #@ endtype #@
|
|
length 150
|
|
FMT(vowel/oe)
|
|
endphoneme
|
|
|
|
|
|
|
|
// CONSONANTS
|
|
//===========
|
|
|
|
phoneme ts
|
|
import_phoneme consonants/ts
|
|
endphoneme
|
|
|
|
|
|
phoneme pF
|
|
vls blb afr
|
|
Vowelout f1=0 f2=1000 -500 -350 f3=-200 80
|
|
lengthmod 2
|
|
WAV(ufric/f) // could replace this with a [pf] wav file
|
|
endphoneme
|
|
|
|
|
|
phoneme g# // for "ig" -> [IC] or [Ig]
|
|
vls pal frc palatal
|
|
lengthmod 3
|
|
|
|
IF nextPhW(isVoiced) THEN
|
|
ChangePhoneme(g)
|
|
ELSE
|
|
ChangePhoneme(C)
|
|
ENDIF
|
|
endphoneme
|
|
|
|
|
|
|
|
phoneme l/ // used for [l] when not before a vowel
|
|
liquid
|
|
lengthmod 7
|
|
|
|
IF nextPh(isVowel) THEN
|
|
ChangePhoneme(l)
|
|
ENDIF
|
|
|
|
PrevVowelEndings
|
|
VowelEnding(l/L1_@L, -60)
|
|
VowelEnding(l/L1_aL, -40)
|
|
VowelEnding(l/L1_eL, -30)
|
|
VowelEnding(l/L1_iL, -30)
|
|
VowelEnding(l/L1_oL, -40)
|
|
VowelEnding(l/L1_uL, -40)
|
|
EndSwitch
|
|
|
|
FMT(l/l_3)
|
|
endphoneme
|
|
|
|
|
|
phoneme j
|
|
liquid palatal
|
|
lengthmod 7
|
|
|
|
IF nextPh(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, -30)
|
|
|
|
IF prevPh(isPause) THEN
|
|
FMT(j/_j_short) // difference from base/j
|
|
ENDIF
|
|
ELSE
|
|
// no vowel follows
|
|
Vowelout len=70
|
|
FMT(j/j_)
|
|
ENDIF
|
|
endphoneme
|
|
|
|
|
|
|
|
// TESTING
|
|
|
|
phoneme r // uvular trill
|
|
vcd uvl frc
|
|
lengthmod 6
|
|
length 110
|
|
IF nextPhW(isVowel) THEN
|
|
FMT(r3/r_uvl) addWav(r3/r_uvl.wav, 50)
|
|
ELSE
|
|
IF prevPh(isFlag1) THEN
|
|
ChangePhoneme(NULL) // 'r' is already included in the previous vowel
|
|
ELSE
|
|
ChangePhoneme(V#)
|
|
ENDIF
|
|
ENDIF
|
|
endphoneme
|
|
|
|
|
|
phoneme UR
|
|
vowel starttype #u endtype #@
|
|
flag1
|
|
length 180
|
|
FMT(vwl_de/uu_@)
|
|
endphoneme
|
|
|
|
|
|
|
|
phoneme V2# // used for 'r' after a vowel (to create a diphthong)
|
|
liquid
|
|
lengthmod 7
|
|
IF nextPhW(isVowel) THEN
|
|
ChangePhoneme(r")
|
|
ENDIF
|
|
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
|
|
IF nextPhW(isVowel) THEN
|
|
ChangePhoneme(r")
|
|
ENDIF
|
|
FMT(r/@_)
|
|
endphoneme
|
|
|
|
phoneme V1#
|
|
liquid
|
|
lengthmod 7
|
|
IF nextPhW(isVowel) THEN
|
|
ChangePhoneme(r")
|
|
ENDIF
|
|
FMT(r/V_)
|
|
endphoneme
|