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
363 lines
5.4 KiB
Plaintext
363 lines
5.4 KiB
Plaintext
|
|
|
|
//*******************************************************************
|
|
// VOWELS
|
|
//*******************************************************************
|
|
|
|
|
|
phoneme @ // Schwa
|
|
vowel starttype #@ endtype #@
|
|
unstressed
|
|
length 140
|
|
IfNextVowelAppend(r-)
|
|
FMT(vowel/@_3)
|
|
endphoneme
|
|
|
|
|
|
phoneme 3 // Schwa, used for rhotic schwa in American
|
|
vowel starttype #@ endtype #@
|
|
unstressed
|
|
length 140
|
|
IF nextPh(isVowel) THEN
|
|
ChangePhoneme(@)
|
|
ENDIF
|
|
IfNextVowelAppend(r-)
|
|
IF nextPh(isPause) THEN
|
|
FMT(vowelr/V3_r)
|
|
ENDIF
|
|
FMT(vowel/V)
|
|
endphoneme
|
|
|
|
|
|
phoneme @2 // Schwa, changes to I before a vowel
|
|
vowel starttype #@ endtype #@
|
|
unstressed
|
|
length 120
|
|
IF nextPh(isVowel) THEN
|
|
ChangePhoneme(I2)
|
|
ENDIF
|
|
FMT(vowel/@_3)
|
|
endphoneme
|
|
|
|
|
|
phoneme @5 // Schwa, changes to U before a vowel
|
|
vowel starttype #@ endtype #@
|
|
unstressed
|
|
length 140
|
|
IF nextPh(isVowel) OR nextPh(isPause) THEN
|
|
ChangePhoneme(U)
|
|
ENDIF
|
|
FMT(vowel/@_3)
|
|
endphoneme
|
|
|
|
|
|
phoneme a
|
|
vowel starttype #a endtype #a
|
|
length 200
|
|
ChangeIfDiminished(a#)
|
|
ChangeIfNotStressed(a/)
|
|
FMT(vowel/a_3)
|
|
endphoneme
|
|
|
|
|
|
phoneme a/
|
|
vowel starttype #a endtype #a
|
|
length 160
|
|
ChangeIfDiminished(a#)
|
|
FMT(vowel/a_3)
|
|
endphoneme
|
|
|
|
|
|
phoneme a#
|
|
vowel starttype #@ endtype #@
|
|
unstressed
|
|
length 140
|
|
IfNextVowelAppend(r-)
|
|
FMT(vowel/a#)
|
|
endphoneme
|
|
|
|
|
|
phoneme aa // 'bath' etc.
|
|
vowel starttype #a endtype #a
|
|
length 220
|
|
IfNextVowelAppend(r-)
|
|
FMT(vowel/a_3)
|
|
endphoneme
|
|
|
|
|
|
phoneme E
|
|
vowel starttype #e endtype #e
|
|
length 170
|
|
ChangeIfDiminished(I2)
|
|
FMT(vowel/e_e)
|
|
endphoneme
|
|
|
|
|
|
phoneme I
|
|
vowel starttype #@ endtype #@
|
|
length 110
|
|
IF nextPh(l/2) THEN
|
|
VowelEnding(l/L2_@L, -30)
|
|
FMT(vowel/@_3)
|
|
ENDIF
|
|
FMT(vowel/e#)
|
|
endphoneme
|
|
|
|
|
|
phoneme I2
|
|
vowel starttype #@ endtype #@
|
|
unstressed
|
|
length 110
|
|
CALL I
|
|
endphoneme
|
|
|
|
|
|
phoneme i // optional variant of [I] for end of words
|
|
vowel starttype #i endtype #e
|
|
length 150
|
|
IfNextVowelAppend(;)
|
|
FMT(vowel/e_5)
|
|
endphoneme
|
|
|
|
|
|
phoneme 0
|
|
vowel starttype #o endtype #o
|
|
length 200
|
|
ChangeIfDiminished(@)
|
|
FMT(vowel/oo_2)
|
|
endphoneme
|
|
|
|
|
|
phoneme V
|
|
vowel starttype #a endtype #@
|
|
length 140
|
|
ChangeIfDiminished(@)
|
|
FMT(vowel/V_4)
|
|
endphoneme
|
|
|
|
|
|
phoneme U
|
|
vowel starttype #u endtype #u
|
|
length 140
|
|
FMT(vowel/u#_4)
|
|
endphoneme
|
|
|
|
|
|
phoneme A:
|
|
vowel starttype #a endtype #a
|
|
length 220
|
|
IfNextVowelAppend(r-)
|
|
IF nextPh(r) THEN
|
|
FMT(vowelr/aa_r, 30)
|
|
ENDIF
|
|
FMT(vowel/a_3)
|
|
endphoneme
|
|
|
|
|
|
phoneme A@ // Used for [A:] when followed by 'r', becomes [A:]+[r] in American
|
|
vowel starttype #a endtype #@
|
|
length 250
|
|
AppendPhoneme(r)
|
|
FMT(vowelr/aa_r)
|
|
endphoneme
|
|
|
|
|
|
phoneme 3:
|
|
vowel starttype #e endtype #@
|
|
length 210
|
|
ChangeIfNotStressed(VR) // also need "replace 02 3: VR" in voice file
|
|
AppendPhoneme(r)
|
|
FMT(vdiph2/e@)
|
|
endphoneme
|
|
|
|
|
|
phoneme i:
|
|
vowel starttype #i endtype #i
|
|
length 130
|
|
IfNextVowelAppend(;)
|
|
IF prevPh(w) THEN
|
|
VowelStart(w/wi2)
|
|
ENDIF
|
|
IF nextPh(isVFricative) OR nextPh(isPause) THEN
|
|
Length 180
|
|
ENDIF
|
|
FMT(vowel/i_5)
|
|
endphoneme
|
|
|
|
|
|
phoneme O:
|
|
vowel starttype #o endtype #o
|
|
length 200
|
|
ChangeIfDiminished(@)
|
|
IF nextPh(r) THEN
|
|
FMT(vwl_en_us/or)
|
|
ENDIF
|
|
FMT(vowel/oo)
|
|
endphoneme
|
|
|
|
|
|
phoneme O@
|
|
vowel starttype #o endtype #@
|
|
length 230
|
|
AppendPhoneme(r)
|
|
FMT(vowelr/oo_r)
|
|
endphoneme
|
|
|
|
phoneme o@
|
|
vowel starttype #o endtype #@
|
|
length 230
|
|
AppendPhoneme(r)
|
|
FMT(vowelr/o_r)
|
|
endphoneme
|
|
|
|
|
|
phoneme O
|
|
vowel starttype #o endtype #o
|
|
length 150
|
|
ChangeIfDiminished(@)
|
|
FMT(vowel/0_3)
|
|
endphoneme
|
|
|
|
|
|
phoneme u:
|
|
vowel starttype #u endtype #u
|
|
length 160
|
|
IF nextPh(isVFricative) THEN
|
|
Length 200
|
|
ENDIF
|
|
IF nextPh(isPause) THEN
|
|
FMT(vowel/u#_4, 40)
|
|
ENDIF
|
|
FMT(vowel/u#)
|
|
endphoneme
|
|
|
|
|
|
phoneme aU
|
|
vowel starttype #a endtype #u
|
|
length 200
|
|
FMT(vdiph/au#)
|
|
endphoneme
|
|
|
|
|
|
phoneme oU
|
|
vowel starttype #o endtype #u
|
|
length 190
|
|
FMT(vowel/o_3)
|
|
endphoneme
|
|
|
|
|
|
phoneme aI
|
|
vowel starttype #a endtype #i
|
|
length 190
|
|
IF nextPh(isVowel) OR nextPh(isVFricative) THEN
|
|
ChangePhoneme(aI2)
|
|
ENDIF
|
|
IF nextPh(l/2) THEN
|
|
// before l/2 vwl_en/aI@_2+vwl_en/@L_2
|
|
FMT(vwl_en/aI@_2)
|
|
ENDIF
|
|
|
|
// FMT(vdiph/&i_2
|
|
FMT(vdiph/ai_7)
|
|
endphoneme
|
|
|
|
|
|
phoneme aI2
|
|
vowel starttype #a endtype #i
|
|
length 240
|
|
FMT(vdiph/ai_7)
|
|
endphoneme
|
|
|
|
|
|
phoneme eI
|
|
vowel starttype #e endtype #i
|
|
length 190
|
|
FMT(vowel/e_2)
|
|
endphoneme
|
|
|
|
|
|
phoneme OI
|
|
vowel starttype #o endtype #i
|
|
length 210
|
|
FMT(vdiph/0i_2)
|
|
endphoneme
|
|
|
|
|
|
phoneme e@
|
|
vowel starttype #e endtype #@
|
|
length 220
|
|
AppendPhoneme(r)
|
|
FMT(vdiph2/e@)
|
|
endphoneme
|
|
|
|
|
|
phoneme i@3
|
|
vowel starttype #i endtype #@
|
|
length 220
|
|
AppendPhoneme(r)
|
|
FMT(vowelr/i_r)
|
|
endphoneme
|
|
|
|
|
|
phoneme U@
|
|
vowel starttype #u endtype #@
|
|
length 240
|
|
IfNextVowelAppend(r-)
|
|
FMT(vdiph2/u#@)
|
|
endphoneme
|
|
|
|
|
|
phoneme aU@
|
|
vowel starttype #a endtype #@
|
|
length 270
|
|
IfNextVowelAppend(r-)
|
|
FMT(vwl_en/aU@)
|
|
endphoneme
|
|
|
|
|
|
phoneme aI@
|
|
vowel starttype #a endtype #@
|
|
length 270
|
|
IfNextVowelAppend(r-)
|
|
FMT(vwl_en/aI@_2)
|
|
endphoneme
|
|
|
|
|
|
phoneme @L
|
|
vowel starttype #@ endtype l
|
|
unstressed
|
|
length 160
|
|
CALL vowelstart_l
|
|
FMT(vwl_en/@L_2)
|
|
endphoneme
|
|
|
|
|
|
|
|
|
|
//==============
|
|
// Consonants
|
|
//==============
|
|
|
|
phoneme r/ // used for [r] when not preceding a vowel
|
|
liquid
|
|
lengthmod 2 //
|
|
FMT(NULL)
|
|
endphoneme
|
|
|
|
phoneme r
|
|
liquid rhotic
|
|
lengthmod 7
|
|
trill
|
|
|
|
IF nextPh(isNotVowel) THEN
|
|
ChangePhoneme(r/)
|
|
ENDIF
|
|
CALL base/r
|
|
endphoneme
|
|
|
|
|
|
|
|
|
|
|
|
|