diff --git a/dictsource/dict_phonemes b/dictsource/dict_phonemes index 15ba6c5a..df81e304 100644 --- a/dictsource/dict_phonemes +++ b/dictsource/dict_phonemes @@ -15,18 +15,20 @@ n N p r s S t T tS v w x x2 z Z -Dictionary bn_dict +Dictionary ne_dict -& a a: a~ e E e~ i -I i: i:~ i~ l- o O o: -O~ o~ r- U u u: u:~ u~ -V +@ @/ @2 @3 a aI aU a~ +e E eI eU e~ E~ i I +i~ l- o O o: oI oU O~ +o~ r- u uI u~ V VI VU +V~ -* b B bh c C ch d -d. dh dh. g gh h j J -Jh k kh l m n N n. -n^ p ph Q r r. s S -s. t t. th th. tS x z +- : b bh c ch d d. +dh f g gh h H j J +Jh k kh l l. m n N +n. n^ p ph Q q r r. +s S s. t T t. th v +w x z z. Dictionary ca_dict @@ -141,18 +143,6 @@ N n^ p Q R R2 s t T tS v v# w x z -Dictionary eu_dict - -a aI aU e eI eU i o -oI u Y - -* ** : ; b B c d -D f g h j J k l -l^ m n n^ p Q r R -s S t tS ts tz v w -x z - - Dictionary fi_dict & &i &y a a2 ai au e @@ -222,9 +212,9 @@ A a: E e: i i: o o: u u: Y y y: Y: - : b c d dZ f g -h j J k l m n n^ -p r R R2 s S s2 t -tS ts v z Z +h j J k l m n N +n^ p r R R2 s S s2 +t tS ts v z Z Dictionary hy_dict @@ -283,20 +273,6 @@ k l m n N p R s S t tS v w x z Z -Dictionary kn_dict - -a a: aI aU e E e: i -I i: o o: r- u u: V -y - -: b bh c ch d d. dh -dh. dZ f g gh h j J -Jh k kh l l. m n N -n. n^ p ph r R R2 s -S s. S; t t. th th. tS -v w z - - Dictionary ku_dict 8 a e E E# eI eU i @@ -357,31 +333,6 @@ S; t t. th th. tS v w z z. -Dictionary mn_dict - -a e i o O o: U u - -: ; c f g j k L -m n p p# R s S t -t# tS ts ts# w x - - -Dictionary ne_dict - -@ @/ @2 @3 a aI aU a~ -e E eI eU e~ E~ i I -i~ l- o O o: oI oU O~ -o~ r- u uI u~ V VI VU -V~ - -- : b bh c ch d d. -dh f g gh h H j J -Jh k kh l l. m n N -n. n^ p ph Q q r r. -s S s. t T t. th v -w x z z. - - Dictionary nl_dict 8 @ @- A a: E e: EI @@ -421,7 +372,7 @@ Dictionary pa_dict @ a a~ e E e~ E~ i I i~ I~ o O O~ o~ r- -U u u~ U~ V V~ +U u U~ u~ V V~ : ; b bh c ch d d. dh dh. f g gh h H j @@ -437,10 +388,10 @@ a E E# E~ i O O~ u y : ; b c C d d; dZ -dz dz; f g h j k l -m n N n^ p r R s -S s; S; t t; tS ts ts; -tS; v w x z Z Z; +dz f g h j k l m +n N n^ p r R s S +s; S; t t; tS ts tS; v +w x z Z Z; Dictionary prs_dict @@ -483,7 +434,7 @@ z; Z; Dictionary ru_dict -8 @- A a E e E# E2 +8 @- a A e E E# E2 E3 i I I# I2 I3 I^ ja ju o O u u" u# V V# y Y @@ -491,8 +442,8 @@ y Y * ; b d d; dZ; f g j k l l^ m m; n n^ p r R s S s; S; t -t; ts ts; tS; v x z Z -z; Z; +t; ts tS; v x z Z z; +Z; Dictionary rw_dict @@ -585,7 +536,7 @@ u@ uI y y@ yI b c d D f g h j J k kh l m n N n^ -p Q r s s. t t[ ts; +p Q r s s. s; t t[ tS; v w x z Z z. @@ -596,11 +547,10 @@ i i. i[ iA iE io iou N- o o- ong ou u u@ ua uai uei uo y y& y@ yE yi yu -(u) ; C f h j k kh -l L m n N p ph q -r s s. S; t th ts ts. -ts. tS; tS; tsh v w x X -z. +; f h j k kh l l. +l^ m n N p ph r s +s. S; t th ts ts. ts. tS; +tS; tsh v w x z. Dictionary zhy_dict diff --git a/dictsource/hu_list b/dictsource/hu_list index 09d28cb5..7d03770b 100755 --- a/dictsource/hu_list +++ b/dictsource/hu_list @@ -146,6 +146,7 @@ _0-áig a:ig $alt2 (0-ra) nul:a:R2A (0-nál) nul:a:na:l (0-hoz) nul:a:hoz +(0-s) nul:a:S // entries with a single digit such as (2-i) also apply to 22, 32, etc, unless $only @@ -184,6 +185,8 @@ _0-áig a:ig $alt2 (3-ashoz) ha:R2mAShoz (3-at) ha:R2mAt (3-al) ha:R2om:Al +(3-asok) ha:R2mASok +(3-asoknak) ha:R2mASoknAk //4 number suffixes (4-el) ne:J:El //Nneed J: phoneme, not J phoneme contains one suffix) @@ -209,6 +212,10 @@ _0-áig a:ig $alt2 (7-től) he:t:Y:l (7-től) hEtEdike:tY:l $alt2 (7-essel) hEtES:El +(7-esen) hEtESEN +(7-eseknek) hEtESEknEk +(7-et) hEtEt +(7-em) hEtEm (10-es) tizES // use [i] not [i:] (10-est) tizESt (10-essel) tizES:El @@ -310,6 +317,7 @@ GYESEV JESEv $allcaps HÉV he:v $allcaps IPTV $abbrev $allcaps GDP dZi:di:pi: $allcaps +?2 GDP $abbrev $allcaps HSDPA $abbrev $allcaps ORTT $abbrev $allcaps ORFK oEREfka: $abbrev $allcaps diff --git a/dictsource/hu_rules b/dictsource/hu_rules index 953d3042..b9de82a3 100644 --- a/dictsource/hu_rules +++ b/dictsource/hu_rules @@ -16,6 +16,7 @@ 000_-) al (_ Al // ... but not 1000-al _) alattvaló AlAtvAlo: ahhoz Ahoz +?!2 auschwitz AuSvits .group á á a: @@ -149,6 +150,7 @@ hierar) ch (i h nyála) d (z d ren) dsz (erint d|s szaba) d (szájú d +menetren) dsz (erű d|s .group dz fogó) dz (kod ts @@ -265,10 +267,9 @@ _minde) gy (ik J: na) gysz (a Js na) gy (sokára J na) gy (siet J - ú) gy (se J + ú) gys (e J|S seho) gy (se J ho) gy (se J - ú) gy (se J na) gy (ság J he) gy (ség J e) gy (ség J @@ -278,6 +279,8 @@ _minde) gy (ik J: e) gy (sor J né) gy (sor J e) gy (es-egyedül J //need one J phoneme with this word, not J: phoneme + ú) gy (sem J + né) gy (sarok J .group h h h @@ -330,7 +333,6 @@ _minde) gy (ik J: fe) l (jegy l fe) l (jelen l fe) l (jár l - e) l (jö l lj l^j cé) l (já jj @@ -340,7 +342,7 @@ _minde) gy (ik J: A) lj (A l^j e) l (jut l e) l (jus l - + _e) lj (ö lj á) ll (j j beszé) lj jj bére) lj jj @@ -420,6 +422,10 @@ tulajdo) n (jog n elle) n (játék n elle) n (javallt n fé) ny (jel n^ + i) nj (ekció n^ + elle) n (jegy n + fe) nn (tartás n + fe) nn (sík n .group o o o @@ -486,6 +492,8 @@ danubiu) s s //a radio station name juventu) s s //a radio station name va) s (s S óriá) s S + látá) s (zavar S + hallá) s (zavar S @@ -647,7 +655,7 @@ motoro) ssz (emüveg Ss bőgé) ssz (erű Ss kavará) ssz (erű Ss _sa) ssz (eg Ss - + ké) ssz (úrás Ss .group sz sz s @@ -745,7 +753,7 @@ vörösmar) ty ti á) t (cikáz t á) t (caplat t á) t (sza t - á) t (jár t + á) tj (ár t|j á) t (szö t á) t (sző t á) t (szú t @@ -772,7 +780,6 @@ folyama) t (jel t szé) t t szé) tt t: á) t (sor t - á) t (sé t á) t (sze t á) t (sug t á) t (suh t @@ -817,6 +824,7 @@ fejeze) t (jel t ké) t (jegyű t krike) tt (játék t: mene) t (jegy t + mene) t (jeggy t szüne) t (jel t ú) t (jelző t ú) t (jog t @@ -826,6 +834,10 @@ folyama) t (sáv t ada) t (szolgáltat t _ú) t (sáv t négyze) t (centi t + á) tj (öt t|j + á) tj (ön t|j + á) t (süvít t + bará) tj (ára c: .group ts ts (_S2 tS //general rule with word end of ts letters @@ -895,6 +907,8 @@ indula) tsz (ó t|s dró) tsz (őr t|s lá) tsz (erész t|s skó) tsz (okny t|s + söté) tsz (őke t|s + á) ts (é t|S .group u u u @@ -944,7 +958,6 @@ indula) tsz (ó t|s befeje) z (te s bi) z (tons s bi) z (tos s - bron) z (sz z csontvá) z z e) z (t s ho) z (ta s @@ -956,37 +969,31 @@ csontvá) z z lefeje) z (te s lefeje) z (ték s pén) z (tár s - ré) z (sz z ré) z (serpenyő z tartó) z s - gá) z (sz z + gá) z (cső z - gé) z (sz z + ké) z (sz zz há) z (so z - há) z (sz z - lá) z (sz z + + má) zc (sz z mé) zc (sz z nehé) z (sé S nehé) z (súlyú z iga) zs (ág SS - iga) z (szí z + ga) zs (ág SS pén) z z - szá) z (sz z - tí) z (sz z - tű) z (sz z - ví) z (sz z - tor) z (szülött z tor) z (ság z _vité) z z _ví) z (s z ga) zs (ág zS - _gá) zsz (ámla zs: - _gá) zsz (ámlá zs: + _gá) zsz (ámla zs + _gá) zsz (ámlá zs _ré) zs (ó zS ő) zs (uta zS _vá) zs (or zS @@ -1004,15 +1011,14 @@ _szára) zs (ág SS ké) z (zsibbadás z ké) z (sérül z szű) z (sült z - házho) z (szállít z + gő) z (sugár z találko) z (t s eszkö) z (sor z gő) z (síp z matró) z (sapka z nehé) z (súly z - raj) z (szeg z - raj) z (szög z + zsz z|s //general exception. Need difference first z and second sz phoneme. For example, rajzszög, rajzszeg, mézszín words. pén) z (t s rende) z (ked s kocká) z (tat s @@ -1022,11 +1028,8 @@ különbö) z (tet s válto) z (tass s tájéko) z (tat s tájéko) z (tass s - mé) z (szín z bi) z (tat s rá) z (kód s - raj) z (szak z - hiú) z (szem z .group diff --git a/dictsource/ta_list b/dictsource/ta_list index c7e589e2..0e0fdcab 100644 --- a/dictsource/ta_list +++ b/dictsource/ta_list @@ -179,7 +179,6 @@ tamil தமிழ் $text பானம் $alt பாணம் $alt பாறம் $alt -பாரதி $alt பாரதம் $alt பரதம் $alt பாப $alt @@ -206,7 +205,11 @@ tamil தமிழ் $text போனஸ் $alt போகி $alt பாலா $alt +பூத $alt பாபா ba:ba: +பாக்கி $alt +பலி $alt +போதி $alt // initial த as [d] @@ -230,6 +233,12 @@ tamil தமிழ் $text தனம் $alt திக்கற்ற $alt தானு $alt +திட $alt + + + // initial ச as [tS] +சீ tSi: +சே tSe: கக $alt // initial க as [g] @@ -250,6 +259,8 @@ tamil தமிழ் $text கோபி $alt கச்சாமி $alt குரு $alt +கோர $alt பப pVpV +தீப் di:p diff --git a/dictsource/ta_rules b/dictsource/ta_rules index aff7c305..262bfad0 100644 --- a/dictsource/ta_rules +++ b/dictsource/ta_rules @@ -46,11 +46,14 @@ L01) க kV L01) க (B k க (ிரு k + க (ூட k க (ீத g க (ஜ gV _) க (ௌ g + _) க (ௌட்டில்ய k + _) கௌட (ில்ய kaUt. _) க (ம்பீர gV _) க (ந்தர்வ gV _) க (ோவிந்த g @@ -96,6 +99,26 @@ _) க (ுருவாய g _) க (ும்மிடிப்பூண் g _) க (ுஜராத g + _) க (ிரிதர g + _) க (ிரிஜா g + _) க (ோரம g + _) க (ோரப g + _) க (ோரக g + _) க (ோரத g + _) க (ர்ப gV + _) க (ோவா g + _) க (ாண்டீப g + _) க (ர்வ gV + _) க (ுருவா g + + _கல்) க (ி k + _கல்) க (ண்ட kV + _கல்) க (த்தா kV + கொல்) க (த்தா kV +கோயில்) க (ாளை k + _) குல்க (ந்த gulkV + _ராஜ) க (ும k + _ராஜ) க (ுல k .group ங @@ -119,6 +142,7 @@ ச் (_ tS ச்_) ச tSV // previous word ends in ச் ச்_) ச (B tS + _) ச (ெண்ட tS _) ச (ிட் tS _) ச (ின் tS @@ -130,11 +154,21 @@ _) ச (க்கரவர்த்தி tSV _) ச (ென்னை tS _) ச (ீன tS + _) ச (ீனிவா s _) ச (ித்தப்ப tS + _) ச (ிதம்பர tS + _) ச (ித்ரா tS + _) ச (ெல்லம tS + _) ச (துர் tSV + வி) ச (ித்திர tS _) சிரு (ஷ்டி sri ச (ாந்தி s. ச (ண்மு s.V + சங்க (ர s.VNkV + ச (ண்பக s.V + ச (ெண்பக s. + .group ஜ ஜ dZV @@ -158,7 +192,7 @@ _) ட (ோக்கியோ t. ிங்) ட (ன் t.V // -ington _) ட (ாக்க t. // talkies - + _) டிராக்ட (ர t.ira:gt.V .group ண ண n.V @@ -210,7 +244,10 @@ _) த (ூப d _) த (ீப d _) த (ைரிய d - _) த (ிட d + _) த (ிடீர d + _) த (ிடப d + _) த (ிடம d + _) த (ிடும d _) த (ிரவ d _) த (ிடீ d _) த (ிவச d @@ -263,7 +300,6 @@ _) த (ேவாம்ச d _) த (ிவ்ய d _) த (ிண்டிவன d - _) த (ுறை d _) த (ிண்டுக்கல d _) த (மயந்தி dV _) த (ுரோண d @@ -272,7 +308,14 @@ _) த (ிரௌபதி d _) த (கன dV _) த (ானுவ d - + _) த (னுஷ dV + _) த (ிடுக் d + _) த (டவை dV + _) த (ேவேந் d + _) த (ரிசி dV + _) த (ுரை d + _) த (ேவ d + _) த (ூசி d யு) த்த ddV யு) த்த(B dd @@ -299,8 +342,11 @@ _கோம) த (ி t _) திரு (ஷ்டி dri _) திரு (திரா dri - _) துர (ோண tr - _) திர (ௌபதி tr + _) து (ரோண t + _) தி (ரௌபதி t + _) து(ரோக d + _) தி (யாக t + .group ந @@ -328,8 +374,6 @@ _கோம) த (ி t ற்) ப (B p று) ப _pV று) ப(B _p - ன்) ப pV - ன்) ப (B p ம) ப pV ம) ப (ா p @@ -367,7 +411,7 @@ _கோம) த (ி t _) ப (ூதேவி b _) ப (ம்பாய bV _) ப (ாதுஷா b - _) ப (க்த bV + _) பக் (த bVk _) ப (லம bV _) ப (லவான bV _) ப (ிராமண b @@ -377,9 +421,9 @@ _கோம) த (ி t _) ப (ூமி b _) ப (ூலோக b _) ப (ூகோல b - _) ப (ூத b + _) ப (ூதம b + _) ப (ூதங் b _) ப (ுதன b - _) ப (லி bV _) ப (கவான bV _) ப (ௌதிக b _) ப (ரோட bV @@ -396,9 +440,11 @@ _கோம) த (ி t _) ப (ெங்களூர b _) ப (ூபாள b _) புத்த(K buddV + _) புத்த (ம்_புது puttV + _) புத்த (ம்_புதிய puttV + _) புத்த (க puttV _) புத் (தJ_புத+ put _) ப (னியன bV - கோ) ப (ி p _) ப (ாலச b _) ப (ாலக b _) ப (ாலமு b @@ -408,7 +454,7 @@ _கோம) த (ி t _) ப (ிரகதீ b _) ப (ொம்மை b _) ப (ொம்மல b - _) ப (ாக்கி b + _) ப (ாக்கிய b _) ப (ஸ bV _) ப (ாஷை b _) ப (ிரம்மை b @@ -421,28 +467,79 @@ _கோம) த (ி t _) ப (ாலாஜி b _) ப (ேட்டரி b _) ப (ோதை b - _) ப (ோதி b _) ப (ிக்கு b + _) ப (ீரங்கி b + _) ப (ூதத் b + _) ப (ந்தம bV + _) ப (ந்தங்கள bV + _) ப (ந்தத் bV + _) ப (வ்ய bV + _) ப (ுல்லாக்க b + _) ப (ாகம b + _) ப (ாகத b + _) ப (ாகங்க b + _) ப (ாசு b + _) ப (ாஸ்மதி b + _) ப (ாணி b + _) ப (லவீன bV + _) ப (லவந்த bV + _) ப (ாரதி b + _) ப (ாஸ்கர b + _) ப (யங்கர bV + _) ப (ர்மா bV + _) ப (யப் bV + _) ப (யந் bV + _) ப (யத் bV + _) ப (லிய bV + _) ப (ோதித் b + _) ப (ோதன b - _) பிர (ம்மன brV - _) பிர (ாமணன br - _) பிர (கஸ்பதி brV - _) பிர (கதீ brV - _) பிர (கலாதன prV - _) பிர (காஷ prV - _) பிர (காச prV - _) பிர (சாத prV - _) பிர (ே pr + கோ) ப (ி p + முரன்) ப (ாட p + சமன்) ப (ாட p + முன்) ப (கல pV + நன்) ப (கல pV + பின்) ப (கல pV + + _) பி (ரம்மன b + _) பி (ராமணன b + _) பி (ரகஸ்பதி b + _) பி (ரகதீ b + _) பி (ரகலாதன p + _) பி (ரகாஷ p + _) பி (ரகாச p + _) பி (ரசாத p + _) பி (ரே p _) பிரு (கன்நளை bri - _) பிர (சாந்தி prV - _) பிர (ம்மை brV - _) பிர (சன்ன prV - _) பிர (ச்சனை prV - _) பிர (ப prV - _) பிர (தீ prV + _) பி (ரசாந்தி p + _) பி (ரம்மை b + _) பி (ரசன்ன p + _) பி (ரச்சனை p + _) பி (ரப p + _) பி (ரதீ p _) பி (ரிட b _) பிரு (ந்தா bri + _) பி (ரியா_ p + _) பி (ரியாவின p + _) பி (ரியாவு p + _) பி (ரியாவிடம p + _) பி (ரியாவை p + _) பி (ரலய p + _) பி (ராணன p + _) பி (ரியம p + _) பி (ரதம p + _) பி (ரமாத p + _) பி (ரயா p + _) பி (ராய p + _) பி (ரயோஜன p + _) பி (ரகார p + _) பி (ரார்தன p + _) பி (ராதித் p + _) பி (ரதேச p + _) பி (ரசித்தி p + _) பி (ரம்ம b + // musical notes சா) ப (ா p diff --git a/phsource/b/xb b/phsource/b/xb index 636cbbbf..4eac1106 100644 Binary files a/phsource/b/xb and b/phsource/b/xb differ diff --git a/phsource/compile_report b/phsource/compile_report index d92285d0..320ee1d7 100644 --- a/phsource/compile_report +++ b/phsource/compile_report @@ -1,246 +1,168 @@ -62 phoneme tables +58 phoneme tables new total - base 104 104 - base2 26 125 - en 51 150 - en_n 32 150 - en_us 36 151 - en_sc 39 152 - en_rp 34 150 - en_wm 31 150 - en_wi 30 150 - af 39 136 - cy 29 130 - de 33 131 - eo 13 116 - jbo 4 117 - fi 40 135 - fr 55 142 - fr_ca 11 142 - hi 62 152 - ta 20 155 - hu 23 120 - lv 29 127 - nl 28 127 - pl 20 118 - sk 28 136 - cs 6 136 - hr 26 141 - mk 3 142 - sr 14 141 - ru 39 135 - it 17 128 - la 21 122 - es 9 125 - es_la 1 125 - ca 11 127 - pt 30 142 - pt_pt 20 142 - ro 36 147 - el 8 125 - grc 12 129 - sv 25 126 - no 28 130 - is 33 130 - vi 41 141 - zhy 41 138 - zh 66 155 - sw 14 113 - tr 18 128 - ku 18 129 - id 15 127 - sq 35 128 - hy 24 120 - da 20 119 - rw 15 132 - ml 13 154 - kn 15 154 - bn 59 159 - ne 18 160 - mr 12 152 - eu 6 126 - mn 15 115 - pa 14 154 - prs 8 111 + base 99 99 +consonants 9 107 + base2 26 120 + en 47 141 + en_n 32 141 + en_us 37 142 + en_sc 39 143 + en_rp 33 141 + en_wm 30 141 + en_wi 30 141 + af 39 131 + cy 29 125 + de 32 126 + eo 13 111 + jbo 2 111 + fi 40 130 + fr 56 138 + fr_ca 11 138 + hi 58 145 + ta 20 148 + hu 23 115 + lv 29 122 + nl 24 119 + pl 20 113 + sk 28 130 + cs 6 130 + hr 26 135 + mk 3 136 + sr 14 135 + it 18 123 + la 21 117 + es 8 120 + es_la 1 120 + ca 11 122 + pt 29 135 + pt_pt 20 135 + ro 36 143 + el 8 120 + grc 12 124 + sv 23 121 + no 28 125 + is 32 125 + ru 39 130 + vi 41 136 + zhy 41 133 + zh 62 150 + sw 12 108 + tr 18 123 + ku 18 124 + id 15 122 + sq 33 121 + hy 23 114 + da 20 114 + rw 15 127 + ml 13 147 + ne 18 153 + pa 14 147 + prs 8 106 Data file Used by b/b [b] base [b] fr - [b] hi [b;] ro - [b] bn b/b_ [b] base [b] fr - [b] hi - [b] bn b/b@ [b] base - [b] hi - [b] bn b/b@2 [b] base - [b] hi - [b] bn b/ba [b] base - [b] hi - [b] bn b/be [b] base - [b] hi - [b] bn b/bi [b] base - [b] hi [b;] ro - [b] bn b/bo [b] base - [b] hi - [b] bn b/bu [b] base - [b] hi - [b] bn b/xb [b] base [b] fr - [b] hi [bh] hi - [b] bn d/d [d] base [d[] base [d] base2 [d] fi [d] fr - [d] hi - [d.] hi - [d] hu [d] pl [d;] pl [d] hr - [d] ru - [d;] ru - [d;] ro - [d] el - [d] sw - [d] id [d] sq - [d] bn - [d.] bn d/d_ [d] base [d[] base [d] base2 [d] fi [d] fr - [d] hi [d.] hi - [d] hu [d] pl [d;] pl [d] hr - [d] ru - [d;] ru - [d;] ro - [d] el - [d] sw - [d] id [d] sq - [d] bn - [d.] bn d/d_dnt [d] sr d/dr [*] base - [d] base [d[] base [d] base2 [d] fi [d] fr - [d] hi [d.] hi - [d] hu + [dh.] hi [d] pl [d;] pl [d] hr - [d] ru - [d;] ru - [d;] ro - [d] el - [d] sw - [d] id [d] sq - [d] bn - [d.] bn d/tap [*;] ro d/tap1 [*] base d/tap2 [t#] en [*] pt d/tap3 [*] base -d/tap4 [r] es d/tap_i [*;] ro d/xd [d] base [d[] base + [dz] consonants [d] base2 [d] fi [d] fr - [d] hi [d.] hi [dh] hi [dh.] hi - [d] hu [d] pl - [dz] pl [d] hr - [d] ru - [d;] ro - [d] el - [d] sw - [d] id + [d] sr [d] sq - [dz] sq - [dz] hy - [d] bn - [d.] bn d/xd3 [dh] hi d/xd_pzd [d;] pl - [d;] ru -d/xdz [dz] pl - [dz] sq - [dz] hy +d/xdz [dz] consonants d/x_tap [t#] en [*] pt dzh/dzh [dZ] base [dZ;] base - [dz;] base - [J] hi [dZ;] mk [dZ] sr [dZ;] sr - [dZ;] ru [dZ;] sq - [J] bn dzh/dzh_ [dZ] base [dZ;] base - [dz;] base - [J] hi [dZ] hr [dZ;] hr [dZ;] mk [dZ;] ru [dZ;] sq - [J] bn dzh/dzh2 [dZ] hr [dZ;] hr dzh/dz_pzd [J] base [J] tr [J] ku - [J2] bn dzh/dz_pzd_ [J] base - [J2] bn dzh/xdzh [dZ] base [dZ;] base - [dz;] base - [J] hi [dZ] hr [dZ;] hr [dZ;] mk + [dZ] sr + [dZ;] sr [dZ;] ru [dZ;] sq - [J] bn dzh/xdz_pzd [J] base [Jh] hi - [J2] bn + [J] tr + [J] ku envelope/i_risefall [11] zh envelope/i_risefall2 [+2] rw envelope/p_214 [5] vi @@ -270,375 +192,320 @@ envelope/p_rise [3] vi [35] zh envelope/vi_5amp [5] vi envelope/vi_6amp [6] vi -g2/g [g-] base - [g] fr -g2/g_ [g-] base -g2/xg [g-] base - [g] hi - [gh] hi - [g] bn +g2/xg [gh] hi g/g [g] base + [g-] en [g] cy [g] fr - [g] hi [g] es - [g] bn g/g_ [g] base + [g-] en [g] cy [g] fr - [g] hi [g] es - [g] bn g/xg [g] base + [g-] en [g] cy [g] fr [g] es h/h_ [h] base [h] fi - [H] hi - [h] hi [] la - [H] bn - [h] bn h/h@ [h] base [h] fi - [H] hi - [h] hi [h] sr [] la - [H] bn - [h] bn - [th] bn h/ha [h] base [h] fi - [H] hi - [h] hi [] la - [H] bn - [h] bn h/he [h] base [h] fi - [H] hi - [h] hi [] la - [H] bn - [h] bn h/hi [h] base [h] fi - [H] hi - [h] hi [] la - [H] bn - [h] bn h/ho [h] base - [H] hi - [h] hi [] la - [H] bn - [h] bn h/hu [h] base - [H] hi - [h] hi [] la - [H] bn - [h] bn h/hu_fi [h] fi j2/_j2 [;] base -j2/j2@ [(@)] base -j2/j2a [(a)] base -j2/j2e [(e)] base -j2/j2i [(i)] base -j2/j2o [(o)] base -j2/j2u [(u)] base -j2/xj2 [(i)] base +j2/j2@ [;] base +j2/j2a [;] base +j2/j2e [;] base +j2/j2i [;] base +j2/j2o [;] base +j2/j2u [;] base +j2/xj2 [;] base j/_j [j] base - [j] zh -j/j_ [j/] base -j/j@ [(@)] base -j/ja [(a)] base -j/je [(e)] base -j/ji [(i)] base -j/jo [(o)] base +j/j_ [j] base + [j] de +j/j@ [j] base + [j] de +j/ja [j] base + [j] de +j/je [j] base + [j] de +j/ji [j] base + [j] de +j/jo [j] base + [j] de j/_j_short [j] de -j/ju [(u)] base -j/xj [(@)] base - [(a)] base - [(e)] base - [(i)] base - [(o)] base - [(u)] base -l^/j2@ [(@)] base -l^/j2a [(a)] base -l^/j2e [(e)] base -l^/j2i [(i)] base -l^/j2o [(o)] base -l^/j2u [(u)] base +j/ju [j] base + [j] de +j/xj [j] base + [j] de +klatt/b [b] base +klatt/bh [B] base +klatt/dz_pzd [J] base +klatt/dz_pzd_ [J] base +klatt/m [m] base +klatt/m_ [m] base +klatt/n [n] base +klatt/n^ [n^] base +klatt/n^@ [n^] base +klatt/nn [N] base +klatt/nr [n.] base +klatt/qqh [Q] base +klatt/qqh_ [Q] base +klatt/tap2 [t#] en +klatt/v [v] base +klatt/v_ [B] base + [v] base +klatt/x_tap [t#] en +klatt/zh [Z] base + [z.] base +klatt/zh_ [Z] base + [z.] base +l^/j2@ [l^] base + [L] sq +l^/j2a [l^] base + [L] sq +l^/j2e [l^] base + [L] sq +l^/j2i [l^] base + [L] sq +l^/j2o [l^] base + [L] sq +l^/j2u [l^] base + [L] sq l^/_l^ [l^] base + [L] sq l^/l^ [l^] base l/l [l] base - [l] en - [l] en_wi - [l] af [l] fr [l] hu - [l] sk - [l] ru - [l] la - [l] ca - [l] pt - [l;] ro l/_l [l] base - [l/] base - [l/3] base - [l] en - [l] en_wi - [l] af - [l/] de [l] fr [l/] fr [l] hu - [l] sk - [l] ru - [l] la - [l] ca - [l] pt - [l;] ro - [l] zh l/l_ [l/] base [l/3] base [l/] fr -l/l_@ [(@)] base - [@] fr +l/l_@ [l/3] base [W] fr [Y] fr -l/l@ [(@)] base + [l/] fr +l/l@ [] base + [L] base [W] fr [Y] fr -l/L1_aL [(a)] base -l/L1_eL [(e)] base -l/L1_iL [(i)] base -l/L1_@L [(@)] base -l/L1_oL [(o)] base -l/L1_uL [(u)] base -l/L2_aL [(a)] base -l/L2_eL [(e)] base -l/L2_iL [(i)] base + [l] fr +l/L1_aL [l/] base + [l/] de +l/L1_eL [l/] base + [l/] de +l/L1_iL [l/] base + [l/] de +l/L1_@L [l/] base + [l/] de +l/L1_oL [l/] base + [l/] de +l/L1_uL [l/] base + [l/] de +l/L2_aL [l/2] base +l/L2_eL [l/2] base +l/L2_iL [l/2] base [i] sq -l/L2_@L [(@)] base +l/L2_@L [l/2] base [I] en_sc -l/L2_oL [(o)] base - [oU] en_sc -l/L2_uL [(u)] base - [u:] en +l/L2_oL [l/2] base +l/L2_uL [l/2] base l/l_3 [l/] de l/l_4 [ll] sq -l/la [(a)] base - [a] fr -l/l_a [(a)] base +l/la [] base + [L] base [a] fr + [l] fr +l/l_a [l/3] base + [l/] fr [wA] fr - [A~] fr -l/le [(e)] base - [E] fr - [e] fr - [E2] fr - [E:] fr -l/l_e [(e)] base - [E] fr - [E2] fr - [E:] fr +l/le [] base + [L] base + [l] fr +l/l_e [l/3] base + [l/] fr l/L_eL_af [&] af [&:] af l/l_front [L] sq l/l_front_ [l/4] sq -l/li [(i)] base - [i] fr - [i-] fr - [i:] fr - [l] zh -l/l_i [(i)] base - [i] fr - [i:] fr - [w^i] fr +l/li [] base + [L] base + [l] fr +l/l_i [l/3] base + [l/] fr [i] sq l/l_long [l] base [l] fr - [l] la - [l;] ro -l/lo [(o)] base - [O] fr - [o] fr - [O2] fr +l/lo [] base + [L] base + [l] fr +l/l_o [l/3] base + [l/] fr [o2] fr - [wA] fr -l/l_o [(o)] base - [O] fr - [o] fr - [O2] fr - [o2] fr -l^/l_rfx [l.] hi - [l.] bn -l/lu [(u)] base - [u] fr - [y] fr - [u:] fr +l^/l_rfx [l.] base +l/lu [] base + [L] base + [l] fr [w^i] fr -l/l_u [(u)] base - [u] fr - [u:] fr +l/l_u [l/3] base + [l/] fr l/l_vi [l] vi l/l_y [y] fr l/tl [l] base - [l] en - [l] en_wi - [l] af [l] fr [l] hu - [l] sk - [l] ru - [l] la - [l] ca - [l] pt - [l;] ro -l/xl [(@)] base - [(a)] base - [(e)] base - [(i)] base - [(o)] base - [(u)] base +l/xl [L] base + [l] base [e] fr + [l] fr + [l] hu + [ll] sq m/_m [m] base - [m;] ru - [m;] ro - [m] zh m/m_ [m] base - [m;] ru - [m;] ro -m/m@ [(@)] base +m/m@ [m] base m/m#_ [m#] is -m/ma [(a)] base -m/me [(e)] base -m/mi [(i)] base +m/ma [m] base +m/me [m] base +m/mi [m] base m/mj [m] base - [m;] ru - [m;] ro -m/mo [(o)] base -m/mu [(u)] base +m/mo [m] base +m/mu [m] base n^/_n^ [n^] base n^/n^_ [n^] base -n^/n^@ [(@)] base +n^/n^@ [n^] base n^/n^#_ [n^#] is n/_n [n] base - [n;] ro [n] zh n/n_ [n] base - [n2] fr - [n;] ro -n/n@ [(@)] base -n/n#_ [n#] is -n^/n^a [(a)] base -n/na [(a)] base -n^/n^e [(e)] base -n/ne [(e)] base -n^/n^i [(i)] base -n/ni [(i)] base +n/n@ [n] base + [n.] base + [n#] is [n] zh -nn/inn [(i)] base +n/n#_ [n#] is +n^/n^a [n^] base +n/na [n] base + [n.] base + [n#] is + [n] zh +n^/n^e [n^] base +n/ne [n] base + [n.] base + [n#] is + [n] zh +n^/n^i [n^] base +n/ni [n] base + [n.] base + [n#] is + [n] zh +nn/inn [N] base n/nj [n] base [n.] base - [n^] base - [n;] ro n/n_long_ [n] zh nn/_nn [N] base - [N] en_n - [N] en_wm [N] zh nn/nn_ [N] base - [N] en_n - [N] en_wm -nn/nn@ [(@)] base +nn/nn@ [N] base + [N#] is + [N] zh nn/nn#_ [N#] is nn/nn2_ [N] zh [N-] zh -nn/nna [(a)] base -nn/nne [(e)] base -nn/nni [(i)] base +nn/nna [N] base + [N#] is + [N] zh +nn/nne [N] base + [N#] is + [N] zh +nn/nni [N] base + [N#] is + [N] zh nn/nnj [N] base -nn/nno [(o)] base -nn/nnu [(u)] base -n^/n^o [(o)] base -n/no [(o)] base +nn/nno [N] base + [N#] is + [N] zh +nn/nnu [N] base + [N#] is + [N] zh +n^/n^o [n^] base +n/no [n] base + [n.] base + [n#] is + [n] zh n/_nr [n.] base n/nr_ [n.] base -n/nr@ [(@)] base -n/nra [(a)] base -n/nre [(e)] base -n/nri [(i)] base -n/nro [(o)] base -n/nru [(u)] base -n^/n^u [(u)] base -n/nu [(u)] base -r2/_r2 [r-] base -r2/r2@ [(@)] base -r2/r2a [(a)] base -r2/r2e [(e)] base -r2/r2i [(i)] base -r2/r2o [(o)] base -r2/r2u [(u)] base +n^/n^u [n^] base +n/nu [n] base + [n.] base + [n#] is + [n] zh +r2/r2@ [r-] en +r2/r2a [r-] en +r2/r2e [r-] en +r2/r2i [r-] en +r2/r2o [r-] en +r2/r2u [r-] en r3/r_ [r/] base [r/] af [r/] ru -r3/r_@ [(@)] base r3/r#_ [r#] is -r3/r_a [(a)] base -r3/r_e [(e)] base -r3/r_i [(i)] base r3/r_n [r/] base [r/2] fr [r/] ru -r3/r_o [(o)] base r3/r_ru [R4] ru r3/r_ru2 [R4] ru -r3/r_sr [r.] bn r3/r_trill [R2] base [R3] base [r] af [R2] lv - [r] nl [R] pl [r*] sr [x] pt r3/r_trill2 [R] base [r] cy - [R] hr r3/r_trill2.wav [R] base [r] cy - [R] hr r3/r_trill3.wav [R3] base [r] af - [r] nl -r3/r_trill_short [r] fi +r3/r_trill_short [R2] fi r3/r_trill.wav [R2] base - [r] fi + [R2] fi [R2] lv [R] pl [r*] sr [x] pt -r3/r_u [(u)] base r3/r_uvl [r"] base -r3/r_uvl.wav [r"] base - [R] fr [r] fr [r/2] fr +r3/r_uvl.wav [r"] base r3/rx [*] base [r/] base [r/] af [R] fr_ca - [r/] ru [x] pt_pt [*;] ro [r#] is - [Q2] hy + [r/] ru r3/rz_cs [R^] sk [R^/] sk r3/@tap [**] base @@ -647,111 +514,85 @@ r3/@tap_rfx [r.] base r/a_ [r] da r/aa [R] da r/r [r] base - [r-] base - [r] en_sc - [r] de + [r-] en r/_r [r] base - [r] en_sc - [r.] bn -r/r_ [r] base - [r] en_sc - [r] de - [r2] nl - [r] ru +r/r@ [r] base + [R3] base + [r] af [r] ro - [r] sw - [r.] bn -r/r@ [(@)] base -r/ra [(a)] base -r/re [(e)] base -r/ri [(i)] base -r/ro [(o)] base + [r] ru +r/ra [r] base + [R3] base + [r] af + [r] ro + [r] ru +r/re [r] base + [R3] base + [r] af + [r] ro + [r] ru +r/ri [r] base + [R3] base + [r] af + [r] ro + [r] ru +r/ro [r] base + [R3] base + [r] af + [r] ro + [r] ru r/rr [r/] base - [r/] af - [r] de - [r2] nl - [r] ru - [r/] ru [r] ro - [r] sw -r/ru [(u)] base + [r] ru +r/ru [r] base + [R3] base + [r] af + [r] ro + [r] ru r/tr [r] base - [r] en_sc - [r.] bn r/trr [r/] base - [r/] af - [r] de - [r2] nl - [r] ru - [r/] ru [r] ro - [r] sv - [r] sw -r/xr [(@)] base - [(a)] base - [(e)] base - [(i)] base - [(o)] base - [(u)] base + [r] ru +r/xr [r] base + [R3] base + [r-] en + [r] af + [r] ro ufric/ch [C] base [J^] base - [C2] de ufric/ch_ [C] base ufric/ch_sr [h] sr [x] sr ufric/f [f] base [pF] de [f] pl - [f;] ro [f] grc [f] zh ufric/f_ [f] base [f] pl - [f;] ro ufric/ll [L] base [l#] is ufric/s [s] base [s] fr - [z2] fr [s] es - [s#] pt [z] sq - [s] eu - [z] eu ufric/s_ [s] base [z] base - [s2] fi + [s2] consonants [s] fr [z] fr - [z2] fr - [z3] fr - [s2] hu - [s2] lv [s] es - [s#] pt [z;] ro - [s2] is [z] sq - [s] eu - [z] eu ufric/s! [s] base - [s2] fi [s] fr - [s2] hu - [s2] lv [s] es - [s#] pt - [s2] is -ufric/s_continue [s2] fi - [s2] hu +ufric/s_continue [s2] consonants [s2] lv - [s2] is ufric/sh [S] base [S] fr - [s#] pt_pt ufric/sh_ [S] base [S] fr - [s#] pt_pt ufric/sh3 [S] hr [Z] hr ufric/sh_pzd [S;] base @@ -770,16 +611,13 @@ ufric/s_pzd [s;] base [s;] ro ufric/s_pzd_ [s;] base [z;] base -ufric/sx_sv [Sx] nl - [sx] sv +ufric/sx_sv [sx] sv ufric/th [T] base ufric/th_ [T] base ufric/tl# [tl#] is ufric/x [x] base [kh] vi ufric/x2 [x2] af - [x2] nl - [x2] pt [x] ku ufric/x_hr [x] base [x] hr @@ -789,250 +627,123 @@ ufric/xx [X] base [Q"] base ustop/c [c] base ustop/k [k] base - [k] en [k] fr [k] zhy - [k] sw - [kh] bn ustop/k_ [k] base [k] base2 - [k] en - [k] fi [k] fr - [k] hu [k] lv - [k] sk [k] el - [k] sw [k] sq - [kh] bn -ustop/k_asp [gh] hi - [kh] hi +ustop/k_asp [kh] consonants + [gh] hi [kh] zh ustop/ki [k] base [k] base2 - [k] en [c] af - [k] fi [k] fr - [k] hu [k] lv - [k] sk [k^] mk - [c] is [k] zhy - [k] sw [J] tr [c] tr [J] ku [c] ku ustop/kl [k] base + [kh] consonants [k] base2 - [k] en - [k] fi [k] fr - [kh] hi - [k] hu [k] lv - [k] sk [k] el [k] zhy - [k] sw - [kh] bn ustop/kr [k] base [k] base2 - [k] en - [k] fi - [kh] hi - [k] hu - [k] lv - [k] sk [k] el [k] zhy - [k] sw - [kh] bn ustop/k_unasp [k] base + [k-] consonants [k] base2 - [k] fi - [k] hi - [k] hu [k] lv - [k] sk [k] el [k] zhy [k] sq - [k] hy - [k] bn ustop/k_unasp_ [k] zh ustop/null [?] base ustop/p [p] base - [p] fr [p2] fr [p] zhy - [ph] bn ustop/p_ [p] base + [ph] consonants [p] fr - [p2] fr - [ph] hi - [p#] hy - [ph] bn - [p#] mn -ustop/p_asp [bh] hi - [ph] hi +ustop/p_asp [ph] consonants + [bh] hi [ph] zh [p#] hy - [p#] mn -ustop/percus10 [(X1] base +ustop/percus10 [#X1] base ustop/pl [p] base + [p-] consonants + [ph] consonants [p] base2 - [p] fi [p] fr - [p] hi - [ph] hi - [p] hu [p] lv [p] sk - [p] la - [p;] ro [p] sq - [p] hy - [p#] hy - [p] bn - [ph] bn - [p] mn - [p#] mn ustop/pr [p] base + [p-] consonants + [ph] consonants [p] base2 - [p] fi - [p] hi - [ph] hi - [p] hu - [p] la - [p;] ro - [p] hy - [p#] hy - [p] bn - [ph] bn - [p] mn - [p#] mn ustop/p_unasp [p] base + [p-] consonants [p] base2 - [p] fi [p] fr - [p] hi - [p] hu [p] lv [p] sk - [p] la - [p;] ro [p] zh [p] sq - [p] hy - [p] bn - [p] mn -ustop/p_unasp_ [p] base2 - [p] fi +ustop/p_unasp_ [p-] consonants + [p] base2 [p] fr - [p] hi - [p] hu [p] lv - [p] sk - [p] la - [p;] ro [p] sq - [p] hy - [p] bn - [p] mn ustop/q [q] base ustop/q_u [q] base ustop/t [t] base - [t2] en + [t] en_us [dh.] hi [th.] hi [t] zhy - [t.h] bn ustop/t_ [t] base - [t2] en + [t] en_us [t] fr - [t2] fr - [t3] fr - [t.] hi [t] lv [t] sk [t] el [th] zh - [t.] bn - [t.h] bn ustop/t_dnt [t] base [t[] base [t] base2 - [t2] en - [t] fi - [t] hi + [t] en_us [dh] hi [th] hi - [t] ta [t] hu [t] pl [t] hr - [t] ru - [t;] ro - [t] sw - [t] sq - [t] hy - [t] bn - [t] mn ustop/t_dnt2 [t] base2 - [t] ta ustop/t_hi [t[] base - [t] hi - [t] sq - [t] hy - [t] bn - [th] bn - [t] mn ustop/t_pzd [c] base [t;] pl - [t;] ru ustop/tr [t] base - [t2] en - [t] ru - [t.h] bn -ustop/ts [ts] base2 - [ts] de - [ts] eo + [t] en_us +ustop/ts [ts] consonants + [dz] consonants [ts] hu - [ts] pl - [dz] pl - [ts] ru - [ts;] ro [z] zhy [tsh] zh - [ts] sq - [dz] sq - [dz] hy - [ts#] hy - [ts] eu - [tz] eu - [ts#] mn -ustop/ts_ [ts] base2 - [ts] de - [ts] eo +ustop/ts_ [ts] consonants + [dz] consonants [ts] lv - [ts] pl - [dz] pl - [ts] ru - [ts;] ro - [ts] sq - [dz] sq - [dz] hy - [ts#] hy - [ts] eu - [tz] eu - [ts#] mn ustop/ts2 [ts] lv [ts] hy - [ts] mn ustop/tsh [tS] base [c] zhy ustop/tsh_ [tS] base @@ -1041,31 +752,19 @@ ustop/tsh2 [tS] hr [dZ] hr ustop/t_short [t] fr [t2] fr - [t3] fr [t.] hi [t] lv [t] sk [t] el - [t.] bn ustop/tsh_pzd [tS;] zh ustop/tsh_pzd_unasp [tS;] zh ustop/tsh_sr [tS] sr ustop/ts_pzd [tS;] base - [ts;] base [Jh] hi - [ch] hi [tS;] ru - [c] sq [dZ;] sq - [ch] bn -ustop/ts_pzd_ [c] hi - [c] hu - [c] hy - [c] bn -ustop/ts_pzd2 [c] hi - [c] hu - [c] hy - [c] bn +ustop/ts_pzd_ [c2] consonants +ustop/ts_pzd2 [c2] consonants ustop/ts_pzd3 [tS;] hr [dZ;] hr ustop/t_sr [d] sr @@ -1158,10 +857,7 @@ vdiph/aau_2 [aU] en_wi [aau] zhy vdiph/aau_3 [aU] hi [aU] ta - [aU] kn - [aU] bn [aU] ne - [aU] mr vdiph/aau_4 [aU] vi vdiph/ae [E:] fr_ca [aI] la @@ -1176,7 +872,6 @@ vdiph/ai [aI] base2 [a:I] vi [aI] id [aI] hy - [aI] kn vdiph/ai_2 [aI] en [aI] cy [aY] cy @@ -1188,7 +883,6 @@ vdiph/ai_6 [aI] en_rp vdiph/ai_7 [aI] en_sc [aI2] en_sc [aI] is - [aI] mr vdiph/ai_8 [aI] ta vdiph/aoo [aU] en_us vdiph/au [aU] en @@ -1206,7 +900,6 @@ vdiph/au_4 [aU] base2 [aU] is [aU] id vdiph/ee-e [E:] hi - [E:] bn vdiph/eei [EI] base2 [eI] en [EI] de @@ -1239,7 +932,6 @@ vdiph/ei [eI] base2 [eI] vi [ei] zhy vdiph/eu [eU] base2 - [eU] en [eU] cy [eU] eo [eU] nl @@ -1252,7 +944,6 @@ vdiph/@i [@I] vi [@:I] vi vdiph/&i [&i] fi [aI] hi - [aI] bn vdiph/@i_2 [eI] af [@I] cy [@Y] cy @@ -1332,28 +1023,22 @@ vdiph/y#y_2 [Yy] af [eoi] zhy vdiph/y#y_3 [Y:] nl vnasal/aa_n [a~] hi - [a~] bn vnasal/aa_n2 [A~] en vnasal/aa_n3 [A~] af vnasal/aa_n4 [A~] fr vnasal/a#_n [&~] pt vnasal/a#u_n [&U~] pt [&U~] pt_pt -vnasal/ee_n [E~] en - [E~] fr_ca +vnasal/ee_n [E~] fr_ca vnasal/ee_n2 [a] en_us [E~] hi [&~] pt_pt - [E~] bn vnasal/ee_u_n [E~] pl vnasal/e_n [e~] af [e~] hi [e~] pt - [e~] bn vnasal/ii_n [I~] hi vnasal/i_n [i~] pt - [i~] bn - [i:~] bn vnasal/i_n2 [i~] hi vnasal/m- [m-] sw vnasal/n- [n-] sw @@ -1361,26 +1046,21 @@ vnasal/nn- [N-] sw vnasal/oi_n [oI~] pt vnasal/o_n [o~] hi [o~] pt - [o~] bn vnasal/o_n2 [o~] af [O~] fr vnasal/oo_n2 [O~] en [O~] hi [o] zh - [O~] bn vnasal/oo_n3 [O~] pl vnasal/u_n [U~] hi [u~] hi [u~] pt [u] zh - [u~] bn - [u:~] bn vnasal/V_n [V~] hi vnasal/W_n [E~] fr [W~] fr voc/bh [B] base voc/dh [D] base - [D] es voc/dh_ [D] base [D] es voc/j [J^] base @@ -1389,40 +1069,21 @@ voc/Q [Q] base voc/Q_ [Q] base [Q^] base [Q] nl - [x2] pt voc/Q_less [Q] nl - [x2] pt voc/Q_ulv [Q"] base voc/v [v] base [v] fi [v] fr - [v] ta - [v2] nl [v;] ro - [v] is - [v] da - [v] bn - [v] pa voc/v_ [B] base [v] base [v] fi [v] fr - [v] ta - [v2] nl [v#] es [v;] ro - [v] is - [v] da - [v] bn - [v] pa voc/v# [v#] base - [v] hi voc/v#_ [v#] base - [v] hi voc/v2 [v#] es -voc/vj [v] base - [v] fr - [v] pa vocw/dh [D] base [D] es vocw/Q [Q] base @@ -1434,28 +1095,20 @@ vocw/Q2 [Q] nl vocw/v [B] base [v] base [v] fr - [v] ta [v#] es [v;] ro - [v] pa vocw/zh [Z] base [Z;] ro vocw/zh_rfx [z.] base voc/z [z] base [z] fr - [z2] fr - [z3] fr [z;] ro [z] sq voc/z_ [z] base + [dz] consonants [z] fr - [z2] fr - [z3] fr - [dz] pl [z;] ro [z] sq - [dz] sq - [dz] hy voc/zh [Z] base [z.] base [R^] sk @@ -1476,15 +1129,12 @@ vowel/@ [@] base [@] en [@2] en [@5] en - [3] en_rp [@] en_rp [V] cy [W] fr [@4] hi [@] hy [@] ml - [@] kn - [@4] bn vowel/@- [@-] base [r*] hr vowel/& [a] en_rp @@ -1493,8 +1143,6 @@ vowel/& [a] en_rp [&] lv [&:] lv [&] sv - [&] bn - [&:] bn vowel/0 [0] en [O] hi [O] pt @@ -1518,7 +1166,6 @@ vowel/@_3 [@] en_sc [@] de [@3] hi [@] da - [@3] bn [@3] ne vowel/3_2 [3:] en_n [@] zh @@ -1532,7 +1179,6 @@ vowel/@_4 [@] en_us vowel/8 [o-] zh vowel/8_2 [U] en_us [8] sv - [o] mn vowel/8_3 [eo] zhy vowel/8_5 [8] ku vowel/8_6 [V] sq @@ -1556,9 +1202,8 @@ vowel/a [a] en [a] it [a] zh [a] id - [a:] mr - [a] mn -vowel/a# [a/] base2 +vowel/a# [a] base2 + [a/] base2 [a2] en_sc [a2] en_wi [&] sr @@ -1580,7 +1225,6 @@ vowel/a#_2 [a#] pl [a2] sv [&] is [a/] sw - [a] kn vowel/a_3 [a] en_sc [a/] en_sc [A:] en_sc @@ -1600,17 +1244,19 @@ vowel/a#_3 [a2] en [3] de [@] de [a] hi - [a#] ru [a#] ca [&] pt [&/] pt [&] pt_pt [&/] pt_pt + [a] ru + [a#] ru [a] zhy + [A] sq + [a] sq [a/] sq [3] da [a] ml - [a] bn vowel/a_4 [a/] el [a] vi vowel/a_5 [a:] ta @@ -1620,7 +1266,6 @@ vowel/a_5 [a:] ta [a] sw [a] tr [a:] ml - [a:] kn vowel/a_6 [a] fr [a] ca [a:] vi @@ -1643,6 +1288,7 @@ vowel/aa_3 [A:] af vowel/aa_4 [A:] sv [O] vi vowel/aa_5 [A:] en_n + [A@] en_n [A:] en_wm [A@] en_wm vowel/aa_6 [A] de @@ -1652,14 +1298,11 @@ vowel/aa_8 [0] en_us [A:] en_us vowel/aa_9 [a] fi [a:] hi - [a:] bn [a] ne [a] pa -vowel/a_en [A] fr vowel/@_bck [@] hi [@/] hi [@] zh - [@] bn [V] ne [@/] ne [@] pa @@ -1689,11 +1332,8 @@ vowel/e [e] base2 [e#] rw [e] ml [e:] ml - [e:] kn [e] ne - [e] mn vowel/e# [I] en_sc - [I2] en_sc vowel/e_2 [eI] en_sc [e:] de [e] hi @@ -1701,14 +1341,11 @@ vowel/e_2 [eI] en_sc [e] it [e:] sv [e:] no - [e] bn - [e:] bn [e] pa vowel/e_3 [i] en_n [e:] hu [e] ku vowel/e_5 [i] en_sc -vowel/e_6 [e] mr vowel/e_8 [e] fr vowel/e_9 [E2] fr vowel/ee [E] en_n @@ -1743,7 +1380,6 @@ vowel/ee_6 [&] sk [E] ku vowel/e_mid [E] en_rp [E] fr - [E:] fr [E~] fr [E] fr_ca [E] hi @@ -1765,7 +1401,6 @@ vowel/e_mid [E] en_rp [E] id [E2] id [e] hy - [E] bn [E] prs vowel/e_mid2 [E] af [E] de @@ -1780,9 +1415,8 @@ vowel/e_mid2 [E] af [e] el [e] sw [e] tr - [e#] sq + [e] sq [E] da - [e] kn vowel/@_fnt [@] en_wi [@2] en_wi [@2] hr @@ -1797,7 +1431,6 @@ vowel/i [i] base2 [i] en_wi [i:] cy [i] eo - [I] fr [i:] ta [i:] hu [i] it @@ -1812,9 +1445,7 @@ vowel/i [i] base2 [i] rw [i#] rw [i:] ml - [i:] kn [i] ne - [i] mn [i] prs vowel/i# [y:] cy vowel/i_2 [i2] de @@ -1846,8 +1477,6 @@ vowel/i_6 [i] hi [i] ku [i] id [i] ml - [i] kn - [I] mr vowel/i#_6 [i.] zh vowel/i_7 [i] pl [i] sq @@ -1856,16 +1485,12 @@ vowel/i_en [i:] en [i:] en_us vowel/i_fnt [i:] en_wi [i:] hi - [i] bn - [i:] bn - [i:] mr [i] pa vowel/ii [I] en_n [I2] en_n [I] en_rp [I2] en_rp [I] en_wm - [I2] en_wm [I] de [I:] de [I] fr_ca @@ -1879,7 +1504,6 @@ vowel/ii# [Y] cy [I] ku [i] sq [y] ml - [y] kn vowel/ii_2 [I] en [i] zh vowel/ii#_2 [y] pl @@ -1891,7 +1515,6 @@ vowel/ii_3 [I] cy [I] sv [I] no [I] tr - [I] bn [I] pa vowel/ii#_3 [I2] en_us vowel/ii_4 [I2] en @@ -1899,7 +1522,6 @@ vowel/ii_4 [I2] en vowel/ii_5 [I] la [i] zh vowel/ii_6 [I] en_wm - [I2] en_wm [I] en_wi [I2] en_wi [I] sr @@ -1911,8 +1533,7 @@ vowel/ii_en [i] en [i] sq vowel/ii_final [i] en_us [i] en_rp -vowel/@_low [3] en_rp - [@] en_rp +vowel/@_low [@] en_rp [@2] en_rp [a2] en_rp [@5] en_rp @@ -1922,13 +1543,8 @@ vowel/@_low [3] en_rp [@] ro [@2] no [@] id - [@] bn - [V] bn - [@2] bn [V] ne [@/] ne - [@] mr - [V] mr [@] pa [V] pa vowel/@_low2 [@/] en_us @@ -1941,6 +1557,7 @@ vowel/o [o] base2 [o2] fr [o] hi [o] ta + [o:] ta [o] it [o/] it [O] la @@ -1954,11 +1571,6 @@ vowel/o [o] base2 [o#] rw [o] ml [o:] ml - [o] kn - [o:] kn - [o] bn - [o] mr - [o:] mn [o:] pa vowel/o_2 [o:] cy [o:] hi @@ -1967,11 +1579,9 @@ vowel/o_2 [o:] cy [o:] no [o] vi [o] da - [o:] bn vowel/o-_2 [V] en_n [V] en_wm vowel/o_3 [oU] en_sc - [o:] ta vowel/o-_3 [U] en_rp vowel/o-_4 [o] ro vowel/o_5 [O] nl @@ -1979,8 +1589,7 @@ vowel/o_5 [O] nl vowel/o_6 [O:] nl vowel/o_7 [o] ku vowel/o_8 [o] fr -vowel/oe [W] en - [W] af +vowel/oe [W] af [W] de [W] hy [W] da @@ -2023,12 +1632,11 @@ vowel/oo_1 [O:] en_n [o] sk [o:] sk [o] hr - [O/] sq + [O] sq vowel/oo_2 [0] en_sc [O] cy [o] cs [0] da - [O] mn vowel/oo_3 [O] af vowel/oo_4 [O] base2 [0] en_wm @@ -2036,7 +1644,6 @@ vowel/oo_4 [O] base2 [3:] en_wi [O:] hi [O] it - [O] bn [O] pa vowel/oo_5 [O] pl [O] is @@ -2052,12 +1659,10 @@ vowelr/aa_r [A:] en_sc vowelr/i_r [i@3] en_sc vowelr/oo_r [O@] en_sc vowelr/o_r [o@] en_sc -vowelr/r-voc [r-] jbo - [r-] hi +vowelr/r-voc [r-] base [r-] sk [r:] sk [r-] hr - [r-] bn vowelr/V3_r [VR] en [3] en_sc [@r] zh @@ -2066,19 +1671,13 @@ vowel/u [u:] en_wi [u:] cy [u:] de [u] eo - [U] fr - [u] ta [u] lv [u:] lv [u:] cs [U] la - [u2] pt [u] id [u] ml [u:] ml - [u] kn - [u:] kn - [u] bn [u] prs vowel/u# [u:] en_sc [Y] tr @@ -2095,7 +1694,8 @@ vowel/u#_4 [U] en_sc [u:] en_sc vowel/u_5 [u] sw vowel/u#_5 [y] vi -vowel/u_6 [u:] ta +vowel/u_6 [u] ta + [u:] ta [U] pt_pt [u] pt_pt [u] ku @@ -2125,11 +1725,7 @@ vowel/u_bck [u] base2 [u] da [u] rw [u#] rw - [u:] bn [u] ne - [U] mr - [u:] mr - [u] mn [u] pa vowel/u_bck2 [u] fr [u:] fr @@ -2154,8 +1750,6 @@ vowel/uu_bck [U] en_wi [U] pt [U] no [u] zhy - [U] bn - [U] mn [U] pa vowel/V [3] en_sc vowel/V_2 [V] en @@ -2166,16 +1760,12 @@ vowel/V_2 [V] en vowel/V_3 [V] en_rp [V] hi [V] ta - [V] bn [V] pa vowel/V_4 [V] en_sc [V] da vowel/V_6 [V] en_us [a#] lv -vowel/V_7 [@] mr - [V] mr vowel/y [y] base2 - [y:] en [y:] de [y] fi [y:] hu @@ -2185,7 +1775,6 @@ vowel/y [y] base2 [y] sq [y] da vowel/y# [Y] base2 - [Y:] en [3:] en_wm [Y:] de [Y] fi @@ -2194,10 +1783,8 @@ vowel/y# [Y] base2 [8] nl [Y] ro [oe] zhy - [Y] eu vowel/y## [y#] is vowel/y_2 [y] fr - [y"] fr [y:] la [y] zh vowel/y#_2 [Y] hu @@ -2223,7 +1810,6 @@ vwl_af/r@ [@] af [I] af vwl_en/aI@ [aI@] en [aI@] en_n - [aI@] en_sc [aI@] en_rp vwl_en/aI@_2 [aI] en_sc [aI@] en_sc @@ -2233,13 +1819,8 @@ vwl_en/aU@ [aU@] en [aU@] en_wm vwl_en/@L [@L] en [@L] en_us - [@L] en_sc - [@L] en_rp - [@L] en_wm [@L] af -vwl_en/@L_2 [aI] en_sc - [@L] en_sc -vwl_en_n/aa_5 [A@] en_n +vwl_en/@L_2 [@L] en_sc vwl_en_n/O@ [O@] en_n [o@] en_n vwl_en/ooi@ [aI@] en_wm @@ -2252,7 +1833,6 @@ vwl_en/u_L [u:] en vwl_en_us/3_us [3] en_us vwl_en_us/3_us2 [3:] en_us vwl_en_us/a [a] en_us - [aa] en_us vwl_en_us/ai@ [aI@] en_us vwl_en_us/ar [A:] en_us [A@] en_us @@ -2268,87 +1848,38 @@ vwl_en_us/or [o@] en_us vwl_en_us/ur [U@] en_us vwl_fr/r [r] fr [r2] fr -vwl_fr/_r [R] fr - [r] fr +vwl_fr/_r [r] fr vwl_fr/r_ [r/2] fr -vwl_fr/r_@ [W] fr - [Y] fr -vwl_fr/r@ [@] fr - [W] fr - [Y] fr - [@2] fr - [E~] fr - [W~] fr +vwl_fr/r_@ [r/2] fr +vwl_fr/r@ [r] fr vwl_fr/@R [x] pt_pt -vwl_fr/_r2 [R] fr +vwl_fr/_r2 [r] fr vwl_fr/@R2 [R] fr_ca -vwl_fr/@R3 [Q2] hy -vwl_fr/@R4 [Q2] hy -vwl_fr/@R5 [Q2] hy -vwl_fr/ra [a] fr -vwl_fr/r_a [a] fr - [wA] fr +vwl_fr/ra [r] fr +vwl_fr/r_a [r/2] fr vwl_fr/r_a~ [A~] fr vwl_fr/rA~ [A~] fr -vwl_fr/re [E] fr - [e] fr - [E2] fr - [E:] fr -vwl_fr/r_e [E] fr - [E2] fr - [E:] fr +vwl_fr/re [r] fr +vwl_fr/r_e [r/2] fr vwl_fr/ri [i] fr - [i-] fr - [i:] fr -vwl_fr/r_i [i] fr - [i:] fr - [w^i] fr -vwl_fr/ro [O] fr - [o] fr - [O2] fr + [r] fr +vwl_fr/r_i [r/2] fr +vwl_fr/ro [r] fr +vwl_fr/r_o [o] fr [o2] fr - [wA] fr - [O~] fr -vwl_fr/r_o [O] fr - [o] fr - [O2] fr - [o2] fr -vwl_fr/ru [u] fr - [u:] fr -vwl_fr/r_u [u] fr + [r/2] fr +vwl_fr/ru [r] fr + [u] fr +vwl_fr/r_u [r/2] fr vwl_fr/ry [y] fr [w^i] fr vwl_fr/r_y [y] fr vwl_fr/tr [r] fr vwl_fr/w_a [wA] fr -vwl_fr/xr [@] fr - [E] fr - [O] fr - [W] fr - [Y] fr - [a] fr - [e] fr - [i] fr - [o] fr - [u] fr - [y] fr - [@2] fr - [E2] fr - [O2] fr - [o2] fr - [E:] fr - [i:] fr - [wA] fr - [A~] fr - [E~] fr - [O~] fr - [W~] fr - [w^i] fr -vwl_hi/l-voc [l-] jbo - [l-] hi +vwl_fr/xr [r] fr +vwl_hi/l-voc [l-] base [l-] sk [l:] sk - [l-] bn vwl_no/& [a] no [a:] no vwl_no/au- [aU] no @@ -2358,8 +1889,8 @@ vwl_no/y# [Y:] no vwl_no/y#y [Yy] no vwl_ro/ii- [I^] ro vwl_ro/li [I^] ro -vwl_ro/mi [I^] ru - [I^] ro +vwl_ro/mi [I^] ro + [I^] ru vwl_ro/ni [I^] ro vwl_ru/8 [8] ru vwl_ru/a [A] ru @@ -2379,11 +1910,9 @@ vwl_ru/ii# [I#] ru vwl_ru/ja [ja] ru vwl_ru/ju [ju] ru vwl_ru/o [o] ru -vwl_ru/oo [O] ru vwl_ru/u [u] ru vwl_ru/u# [u#] ru vwl_ru/u#u [u"] ru -vwl_sv/r_sv3 [r] sv vwl_zh/aang [aan] zhy vwl_zh/aau [Au] zh vwl_zh/a_n [a] zh @@ -2405,22 +1934,17 @@ vwl_zh/ung [ung] zhy vwl_zh/uo [uo] zh vwl_zh/y& [y&] zh vwl_zh/yee [yE] zh -w/iw_ [w/] base -w/w [w] base +w/iw_ [w] base w/_w [w] base - [w] zh -w/w_ [w/] base -w/w@ [(@)] base +w/w_ [w] base +w/w@ [w] base w/w2 [w2] base2 [w] pl - [w] sk - [w] pt_pt [w] sq -w/wa [(a)] base -w/we [(e)] base -w/wi [(i)] base +w/wa [w] base +w/we [w] base +w/wi [w] base [i] vi - [i] zhy w/wi2 [i:] en [i:] en_n [i:] en_sc @@ -2428,85 +1952,48 @@ w/wi2 [i:] en [i2] de [i:] de [i] nl - [i:] la [i:] sv [i:] no -w/wo [(o)] base -w/wu [(u)] base -w/xw [(@)] base - [(a)] base - [(e)] base - [(i)] base - [(o)] base - [(u)] base +w/wo [w] base +w/wu [w] base +w/xw [w] base x/b [b] base [b] fr - [b] hi [b;] ro [b] is - [b] bn x/b_ [b] base [b] fr x/d [d] base [t#] en [d] fr [d.] hi - [dh.] hi [d] hr [*] pt - [d] el [d] is - [d] id [d] sq - [d.] bn x/d_ [d] base [d[] base [d] base2 [d] fi [d] fr - [d] hi [d.] hi [d] pl [d] hr - [d] ru - [r] es - [d;] ro - [d] el [d] is - [d] sw - [d] id [d] sq - [d] bn - [d.] bn x/d_dnt [d[] base [d] base2 [d] fi - [d] hi - [d] hu [d] pl - [d] ru - [d;] ro - [d] sw - [d] bn x/d_pzd [d;] pl - [d;] ru x/dzh [J] base [dZ] base - [J2] bn x/dzh_ [dZ] base [dZ;] base - [dz;] base - [J] hi [dZ;] mk [dZ;] ru - [J] bn x/dz_pzd [dZ;] base - [dz;] base - [J] hi [dZ;] mk - [dZ;] ru - [J] bn -x/dz_pzd_ [J2] bn x/g [g] fr x/g_ [g] base [g] cy @@ -2515,11 +2002,6 @@ x/g_ [g] base [g] is x/g2 [g] base [g] cy - [g] hi [g] es [g] is - [g] bn -x/g2_ [g-] base - [g] fr - [g] hi - [g] bn +x/g2_ [g-] en diff --git a/phsource/d/d b/phsource/d/d index 37df0250..152576a2 100644 Binary files a/phsource/d/d and b/phsource/d/d differ diff --git a/phsource/d/d_ b/phsource/d/d_ index 72849774..92ed51b8 100644 Binary files a/phsource/d/d_ and b/phsource/d/d_ differ diff --git a/phsource/d/dr b/phsource/d/dr index 92fa8ac0..292b10f1 100644 Binary files a/phsource/d/dr and b/phsource/d/dr differ diff --git a/phsource/d/tap1 b/phsource/d/tap1 index c5fbe2b1..5c3c4709 100644 Binary files a/phsource/d/tap1 and b/phsource/d/tap1 differ diff --git a/phsource/d/tap3 b/phsource/d/tap3 index b439f036..37717f79 100644 Binary files a/phsource/d/tap3 and b/phsource/d/tap3 differ diff --git a/phsource/d/xd b/phsource/d/xd index f0df7bcd..7ad0392a 100644 Binary files a/phsource/d/xd and b/phsource/d/xd differ diff --git a/phsource/dzh/dzh b/phsource/dzh/dzh index 9ca3eb3b..42581cbe 100644 Binary files a/phsource/dzh/dzh and b/phsource/dzh/dzh differ diff --git a/phsource/dzh/dzh_ b/phsource/dzh/dzh_ index 407d575e..569081a6 100644 Binary files a/phsource/dzh/dzh_ and b/phsource/dzh/dzh_ differ diff --git a/phsource/dzh/xdz_pzd b/phsource/dzh/xdz_pzd index fd8ee187..8db0b23b 100644 Binary files a/phsource/dzh/xdz_pzd and b/phsource/dzh/xdz_pzd differ diff --git a/phsource/dzh/xdzh b/phsource/dzh/xdzh index c85efd1f..0051aca9 100644 Binary files a/phsource/dzh/xdzh and b/phsource/dzh/xdzh differ diff --git a/phsource/g/g b/phsource/g/g index 108957db..be07cc75 100644 Binary files a/phsource/g/g and b/phsource/g/g differ diff --git a/phsource/g/g_ b/phsource/g/g_ index f31219e5..37ba3f63 100644 Binary files a/phsource/g/g_ and b/phsource/g/g_ differ diff --git a/phsource/g/xg b/phsource/g/xg index c26e508d..4cbb58ea 100644 Binary files a/phsource/g/xg and b/phsource/g/xg differ diff --git a/phsource/j/_j b/phsource/j/_j index 9597eb09..b2ef26d3 100644 Binary files a/phsource/j/_j and b/phsource/j/_j differ diff --git a/phsource/j/j@ b/phsource/j/j@ index c28d7dac..62819aa8 100644 Binary files a/phsource/j/j@ and b/phsource/j/j@ differ diff --git a/phsource/j/j_ b/phsource/j/j_ index 75804cd7..48eef60c 100644 Binary files a/phsource/j/j_ and b/phsource/j/j_ differ diff --git a/phsource/j/ja b/phsource/j/ja index d20f8090..8c6c99bf 100644 Binary files a/phsource/j/ja and b/phsource/j/ja differ diff --git a/phsource/j/je b/phsource/j/je index 3a8e0e67..f746cb1e 100644 Binary files a/phsource/j/je and b/phsource/j/je differ diff --git a/phsource/j/ji b/phsource/j/ji index d81947d1..939ff801 100644 Binary files a/phsource/j/ji and b/phsource/j/ji differ diff --git a/phsource/j/jo b/phsource/j/jo index dd5e52d0..20a6a266 100644 Binary files a/phsource/j/jo and b/phsource/j/jo differ diff --git a/phsource/j/ju b/phsource/j/ju index 32768cca..a8951a92 100644 Binary files a/phsource/j/ju and b/phsource/j/ju differ diff --git a/phsource/j/xj b/phsource/j/xj index 7d107118..54488889 100644 Binary files a/phsource/j/xj and b/phsource/j/xj differ diff --git a/phsource/j2/_j2 b/phsource/j2/_j2 index df0b6a68..f24f0fbb 100644 Binary files a/phsource/j2/_j2 and b/phsource/j2/_j2 differ diff --git a/phsource/j2/j2@ b/phsource/j2/j2@ index 19067470..ff114fa6 100644 Binary files a/phsource/j2/j2@ and b/phsource/j2/j2@ differ diff --git a/phsource/j2/j2a b/phsource/j2/j2a index 1a9ac505..4c806852 100644 Binary files a/phsource/j2/j2a and b/phsource/j2/j2a differ diff --git a/phsource/j2/j2e b/phsource/j2/j2e index b079fa60..ef5de606 100644 Binary files a/phsource/j2/j2e and b/phsource/j2/j2e differ diff --git a/phsource/j2/j2i b/phsource/j2/j2i index 49b13317..fe60d416 100644 Binary files a/phsource/j2/j2i and b/phsource/j2/j2i differ diff --git a/phsource/j2/j2o b/phsource/j2/j2o index c53166b0..a1778fea 100644 Binary files a/phsource/j2/j2o and b/phsource/j2/j2o differ diff --git a/phsource/j2/j2u b/phsource/j2/j2u index 6d03ad5c..a4314c7a 100644 Binary files a/phsource/j2/j2u and b/phsource/j2/j2u differ diff --git a/phsource/j2/xj2 b/phsource/j2/xj2 index 0191fa6e..097077b2 100644 Binary files a/phsource/j2/xj2 and b/phsource/j2/xj2 differ diff --git a/phsource/l/L1_@L b/phsource/l/L1_@L index a3061008..c135ee01 100644 Binary files a/phsource/l/L1_@L and b/phsource/l/L1_@L differ diff --git a/phsource/l/L1_aL b/phsource/l/L1_aL index 4bd24b63..4f004f8e 100644 Binary files a/phsource/l/L1_aL and b/phsource/l/L1_aL differ diff --git a/phsource/l/L1_eL b/phsource/l/L1_eL index c1594169..7d3591b3 100644 Binary files a/phsource/l/L1_eL and b/phsource/l/L1_eL differ diff --git a/phsource/l/L1_iL b/phsource/l/L1_iL index ef1dfb99..8a9375da 100644 Binary files a/phsource/l/L1_iL and b/phsource/l/L1_iL differ diff --git a/phsource/l/L1_oL b/phsource/l/L1_oL index b7621bc0..f3ae3dcb 100644 Binary files a/phsource/l/L1_oL and b/phsource/l/L1_oL differ diff --git a/phsource/l/L1_uL b/phsource/l/L1_uL index 01a8e3b0..6762f27b 100644 Binary files a/phsource/l/L1_uL and b/phsource/l/L1_uL differ diff --git a/phsource/l/L2_@L b/phsource/l/L2_@L index 962d9357..7c4d9304 100644 Binary files a/phsource/l/L2_@L and b/phsource/l/L2_@L differ diff --git a/phsource/l/L2_aL b/phsource/l/L2_aL index 5415658c..56daf002 100644 Binary files a/phsource/l/L2_aL and b/phsource/l/L2_aL differ diff --git a/phsource/l/L2_eL b/phsource/l/L2_eL index 568504ed..19445070 100644 Binary files a/phsource/l/L2_eL and b/phsource/l/L2_eL differ diff --git a/phsource/l/L2_iL b/phsource/l/L2_iL index 18628048..66d501ed 100644 Binary files a/phsource/l/L2_iL and b/phsource/l/L2_iL differ diff --git a/phsource/l/L2_oL b/phsource/l/L2_oL index f339d3f1..e8398d47 100644 Binary files a/phsource/l/L2_oL and b/phsource/l/L2_oL differ diff --git a/phsource/l/L2_uL b/phsource/l/L2_uL index a535f6f2..4369dbee 100644 Binary files a/phsource/l/L2_uL and b/phsource/l/L2_uL differ diff --git a/phsource/l/_l b/phsource/l/_l index 10504c17..ae6de6df 100644 Binary files a/phsource/l/_l and b/phsource/l/_l differ diff --git a/phsource/l/l b/phsource/l/l index e55a53dd..6e868a53 100644 Binary files a/phsource/l/l and b/phsource/l/l differ diff --git a/phsource/l/l@ b/phsource/l/l@ index b0f500e7..dccde630 100644 Binary files a/phsource/l/l@ and b/phsource/l/l@ differ diff --git a/phsource/l/l_ b/phsource/l/l_ index 1922dbdd..37fb0bb1 100644 Binary files a/phsource/l/l_ and b/phsource/l/l_ differ diff --git a/phsource/l/la b/phsource/l/la index 7f426a50..a338919d 100644 Binary files a/phsource/l/la and b/phsource/l/la differ diff --git a/phsource/l/le b/phsource/l/le index c61ddffe..1a9f8fcd 100644 Binary files a/phsource/l/le and b/phsource/l/le differ diff --git a/phsource/l/li b/phsource/l/li index 2457c844..92d7b36a 100644 Binary files a/phsource/l/li and b/phsource/l/li differ diff --git a/phsource/l/lo b/phsource/l/lo index 943b4839..1483c3c8 100644 Binary files a/phsource/l/lo and b/phsource/l/lo differ diff --git a/phsource/l/lu b/phsource/l/lu index efc4a1b5..378ba160 100644 Binary files a/phsource/l/lu and b/phsource/l/lu differ diff --git a/phsource/l/xl b/phsource/l/xl index 610dff35..c285b2fa 100644 Binary files a/phsource/l/xl and b/phsource/l/xl differ diff --git a/phsource/l^/_l^ b/phsource/l^/_l^ index 78096e2b..8d7752c5 100644 Binary files a/phsource/l^/_l^ and b/phsource/l^/_l^ differ diff --git a/phsource/l^/j2@ b/phsource/l^/j2@ index 19067470..3eae6f6e 100644 Binary files a/phsource/l^/j2@ and b/phsource/l^/j2@ differ diff --git a/phsource/l^/j2a b/phsource/l^/j2a index 1a9ac505..1c0c5872 100644 Binary files a/phsource/l^/j2a and b/phsource/l^/j2a differ diff --git a/phsource/l^/j2e b/phsource/l^/j2e index b079fa60..723d102d 100644 Binary files a/phsource/l^/j2e and b/phsource/l^/j2e differ diff --git a/phsource/l^/j2i b/phsource/l^/j2i index 0ba10875..4613dc5f 100644 Binary files a/phsource/l^/j2i and b/phsource/l^/j2i differ diff --git a/phsource/l^/j2o b/phsource/l^/j2o index c53166b0..5fd6b1bd 100644 Binary files a/phsource/l^/j2o and b/phsource/l^/j2o differ diff --git a/phsource/l^/j2u b/phsource/l^/j2u index 4efec05b..21d246f1 100644 Binary files a/phsource/l^/j2u and b/phsource/l^/j2u differ diff --git a/phsource/l^/l^ b/phsource/l^/l^ index 6328d4ca..e26ad126 100644 Binary files a/phsource/l^/l^ and b/phsource/l^/l^ differ diff --git a/phsource/l^/l_rfx b/phsource/l^/l_rfx index 5e9fb68b..82bad26c 100644 Binary files a/phsource/l^/l_rfx and b/phsource/l^/l_rfx differ diff --git a/phsource/ph_afrikaans b/phsource/ph_afrikaans index 84eff048..d8ce4a0c 100755 --- a/phsource/ph_afrikaans +++ b/phsource/ph_afrikaans @@ -2,7 +2,7 @@ //**************************************************************** //redefinition of the : phoneme -phoneme : // Lengthen previous vowel by "length" +phoneme : // lengthen previous vowel by "length" virtual length 140 endphoneme @@ -12,245 +12,252 @@ endphoneme phoneme @ // Schwa, but always unstressed - vowel starttype (@) endtype (@) - length 140 - formants vwl_af/@ + vowel starttype #@ endtype #@ unstressed - before r/ vwl_af/r@+50 + length 140 + IF nextPh(r/) THEN + FMT(vwl_af/r@, 50) + ENDIF + FMT(vwl_af/@) endphoneme phoneme a // short A - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 140 - formants vowel/V_2 + FMT(vowel/V_2) endphoneme phoneme E // short E - vowel starttype (i) endtype (e) + vowel starttype #e endtype #e length 140 - formants vowel/e_mid2 + FMT(vowel/e_mid2) endphoneme phoneme I // short I, Schwa - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 140 - formants vwl_af/I - before r/ vwl_af/r@+50 + IF nextPh(r/) THEN + FMT(vwl_af/r@, 50) + ENDIF + FMT(vwl_af/I) endphoneme phoneme O // short O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 140 - formants vowel/oo_3 + FMT(vowel/oo_3) endphoneme phoneme W // short U - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 140 - formants vowel/oe + FMT(vowel/oe) endphoneme phoneme u // short OE - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 110 - formants vowel/uu_3 + FMT(vowel/uu_3) endphoneme phoneme & // more open [E] - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 150 - formants vowel/ee_3 - before l/2 DFT-30+l/L_eL_af + IF nextPh(l/2) THEN + VowelEnding(l/L_eL_af, -30) + ENDIF + FMT(vowel/ee_3) endphoneme phoneme &: // more open [E] longer - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 280 - formants vowel/ee_3 - before l/2 DFT-30+l/L_eL_af + IF nextPh(l/2) THEN + VowelEnding(l/L_eL_af, -30) + ENDIF + FMT(vowel/ee_3) endphoneme phoneme @L // syllabic L - vowel starttype (@) endtype l - length 160 - formants vwl_en/@L + vowel starttype #@ endtype l unstressed - before _ vwl_en/@L + length 160 + FMT(vwl_en/@L) endphoneme phoneme A: // long A - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 280 - formants vowel/aa_3 + FMT(vowel/aa_3) endphoneme phoneme e@ // long E - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 230 - formants vdiph/i@_2 + FMT(vdiph/i@_2) endphoneme phoneme i // long I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 100 - formants vowel/i_3 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_3) endphoneme phoneme o@ // long O - vowel starttype (u) endtype (@) + vowel starttype #u endtype #@ length 250 - formants vdiph2/o@ + FMT(vdiph2/o@) endphoneme phoneme y // long U - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 180 - formants vowel/y_3 + FMT(vowel/y_3) endphoneme phoneme iu - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 220 - formants vdiph2/iu_3 + FMT(vdiph2/iu_3) endphoneme phoneme @U - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 170 - formants vdiph/Vu + FMT(vdiph/Vu) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 220 - formants vdiph/ai_4 - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/ai_4) endphoneme phoneme AI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 310 - formants vdiph/aai_2 - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/aai_2) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 170 - formants vdiph/@i_2 - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/@i_2) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 230 - formants vdiph/ooi_2 - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/ooi_2) endphoneme phoneme oI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 290 - formants vdiph/oi_2 - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/oi_2) endphoneme phoneme uI - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 240 - formants vdiph/ui_2 - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/ui_2) endphoneme phoneme Yy - vowel starttype (@) endtype (i) + vowel starttype #@ endtype #i length 220 - formants vdiph/y#y_2 - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/y#y_2) endphoneme phoneme Y@ - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 210 - formants vdiph2/y#@ + FMT(vdiph2/y#@) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 230 - formants vdiph/au + FMT(vdiph/au) endphoneme // circumflex accent vowels phoneme e: - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 210 - formants vowel/e + FMT(vowel/e) endphoneme phoneme O: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 280 - formants vowel/oo_1 + FMT(vowel/oo_1) endphoneme phoneme 3: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 230 - formants vowel/3_en + FMT(vowel/3_en) endphoneme // Nasal vowels phoneme A~ - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 240 - formants vnasal/aa_n3 + FMT(vnasal/aa_n3) endphoneme phoneme e~ - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 240 - formants vnasal/e_n + FMT(vnasal/e_n) endphoneme phoneme o~ - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 240 - formants vnasal/o_n2 + FMT(vnasal/o_n2) endphoneme @@ -260,53 +267,60 @@ endphoneme phoneme x2 vls vel frc - vowelin f1=0 f2=2300 200 400 f3=-100 100 - vowelout f1=0 f2=2300 300 400 f3=-100 100 rms=20 - length 100 + Vowelin f1=0 f2=2300 200 400 f3=-100 100 + Vowelout f1=0 f2=2300 300 400 f3=-100 100 rms=20 lengthmod 3 - wave ufric/x2%60 // stronger version of [x] + WAV(ufric/x2, 60) // stronger version of [x] endphoneme phoneme r - liquid starttype #r endtype #r - length 60 - vowelin f1=2 f2=2700 -300 -200 f3=-1300 80 - vowelout f1=2 f2=1700 -300 -200 f3=-1300 80 - formants r3/r_trill+r3/r_trill3.wav%100 - before _ r3/r_trill+r3/r_trill3.wav%100 - trill + liquid rhotic + trill lengthmod 6 + Vowelin f1=2 f2=2700 -300 -200 f3=-1300 80 + Vowelout f1=2 f2=1700 -300 -200 f3=-1300 80 + + NextVowelStarts + VowelStart(r/r@, -15) + VowelStart(r/ra, -15) + VowelStart(r/re, -15) + VowelStart(r/ri, -15) + VowelStart(r/ro, -15) + VowelStart(r/ru, -15) + EndSwitch + + IF prevPh(isVowel) THEN + VowelEnding(r/xr, -50) + ENDIF + + FMT(r3/r_trill) addWav(r3/r_trill3.wav, 100) endphoneme phoneme r/ // used for [r] when not preceding a vowel liquid - length 100 - lengthmod 7 // - formants r3/r_+r3/rx - after @ NULL - after _ r/rr - after t r/trr p r/trr k r/trr + lengthmod 7 + + IF prevPh(@) OR prevPh(I) THEN + ELSE + FMT(r3/r_) addWav(r3/rx) + ENDIF endphoneme phoneme l - liquid - length 100 - lengthmod 7 - beforenotvowel l/2 // 'dark' [l] - formants l/l - after _ l/_l t l/tl + import_phoneme en/l endphoneme -phoneme c + +phoneme c // used in -tjie vls pal stop palatal - vowelin f1=0 f2=2700 400 600 f3= 200 80 - vowelout f1=0 f2=2700 400 600 f3= 200 80 rms=20 + voicingswitch g lengthmod 2 - wave ustop/ki - switchvoicing g + Vowelin f1=0 f2=2700 400 600 f3= 200 80 + Vowelout f1=0 f2=2700 400 600 f3= 200 80 rms=20 + WAV(ustop/ki) endphoneme diff --git a/phsource/ph_albanian b/phsource/ph_albanian index e8545672..0019c5ad 100644 --- a/phsource/ph_albanian +++ b/phsource/ph_albanian @@ -1,296 +1,317 @@ phoneme @ // Schwa + vowel starttype #@ endtype #@ length 150 - vowel starttype (@) endtype (@) - formants vowel/@_2 -// formants vowel/8_6 + FMT(vowel/@_2) endphoneme phoneme @/ // Schwa at end of word (silent) + vowel starttype #@ endtype #@ length 100 - vowel starttype (@) endtype (@) - formants vowel/@_2 + FMT(vowel/@_2) endphoneme phoneme V - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 170 - formants vowel/@_2 - before h vowel/8_6 - reduceto @ 3 + ChangeIfUnstressed(@) + IF nextPh(h) THEN + FMT(vowel/8_6) + ENDIF + FMT(vowel/@_2) endphoneme phoneme I# // use for [V] after [n^] - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 170 - formants vowel/ii - reduceto @ 3 + ChangeIfUnstressed(@) + FMT(vowel/ii) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 170 - formants vowel/a_3 - reduceto a/ 0 + IF thisPh(isDiminished) THEN + FMT(vowel/a#_3) + ENDIF + FMT(vowel/a_3) endphoneme -phoneme a/ - vowel starttype (a) endtype (a) + +phoneme a/ // no longer needed + vowel starttype #a endtype #a length 170 - formants vowel/a#_3 + FMT(vowel/a#_3) endphoneme + phoneme A - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 170 - formants vowel/aa_3 - reduceto a/ 0 // but nor "ar_" ?? + IF thisPh(isDiminished) THEN + FMT(vowel/a#_3) // but nor "ar_" ?? + ENDIF + FMT(vowel/aa_3) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/ee_4 + FMT(vowel/ee_4) endphoneme phoneme E# - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 170 - formants vowel/ee#_2 + FMT(vowel/ee#_2) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e - reduceto e# 3 -endphoneme - -phoneme e# - vowel starttype (@) endtype (@) - length 170 - formants vowel/e_mid2 + IF thisPh(isNotStressed) THEN + FMT(vowel/e_mid2) // e# + ENDIF + FMT(vowel/e) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 140 - formants vowel/i_7 - before l/2 vowel/ii#-50+l/L2_iL - before l/3 vowel/ii_en-30+l/l_i + IF nextPh(l/2) THEN + VowelEnding(l/L2_iL, -50) + FMT(vowel/ii#) + ENDIF + IF nextPh(l/3) THEN + VowelEnding(l/l_i, -30) + FMT(vowel/ii_en) + ENDIF + FMT(vowel/i_7) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 140 - formants vowel/ii_6 + FMT(vowel/ii_6) endphoneme phoneme y - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/y + FMT(vowel/y) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/oo_5 -// formants vowel/oo_4 - reduceto O/ 3 -endphoneme - -phoneme O/ - vowel starttype (o) endtype (o) - length 170 - formants vowel/oo_1 + IF thisPh(isNotStressed) THEN + FMT(vowel/oo_1) + ENDIF + FMT(vowel/oo_5) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 220 - formants vdiph/aai + FMT(vdiph/aai) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 220 - formants vdiph2/ei_4 + FMT(vdiph2/ei_4) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 220 - formants vdiph/ooi_4 + FMT(vdiph/ooi_4) endphoneme phoneme yE - vowel starttype (u) endtype (e) + vowel starttype #u endtype #e length 240 - formants vdiph2/ye + FMT(vdiph2/ye) endphoneme phoneme l/4 // used for [l] when not before a vowel liquid - length 100 lengthmod 7 - formants l/l_front_ -// before (r) l/_l - beforevowel l + IF nextPh(isVowel) THEN + ChangePhoneme(l) + ENDIF + FMT(l/l_front_) endphoneme phoneme L - liquid endtype l^ starttype l^ - length 100 + liquid // endtype l^ starttype l^ lengthmod 7 - beforenotvowel l/4 - formants l/l_front // this is not being used?? -// after _ l/_l -// after t l/tl -// after l/ l/l_long // double l, make it longer + IF nextPh(isNotVowel) THEN + ChangePhoneme(l/4) + ENDIF + + 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^) + ENDIF + FMT(l/l_front) // this is not being used?? endphoneme phoneme ll - liquid starttype 1 endtype l - length 100 + liquid lengthmod 7 - beforenotvowel l/2 // use 'dark' [l] after a vowel - formants l/l_4 -// after _ l/_l + + IF nextPh(isNotVowel) THEN + ChangePhoneme(l/2) // use 'dark' [l] after a vowel + ENDIF + + CALL vowelstart_l + + IF prevPh(#@) THEN + VowelEnding(l/xl, -50) + ELIF prevPh(isVowel) THEN + VowelEnding(l/xl, -40) + ENDIF + + FMT(l/l_4) endphoneme phoneme w - starttype w endtype w liquid - length 100 - beforenotvowel w/ lengthmod 7 - formants w/w2 - after _ w/w2 + CALL base/w + FMT(w/w2) endphoneme - phoneme p vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 + voicingswitch b lengthmod 2 - wave ustop/p_unasp%120 - before _ ustop/p_unasp_%80 - before l ustop/pl - switchvoicing 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) + ELIF nextPh(l) THEN + WAV(ustop/pl) + ENDIF + WAV(ustop/p_unasp, 120) endphoneme phoneme d vcd alv stop - vowelin f1=2 f2=1700 -300 300 f3=-200 80 amp=16 - vowelout f1=2 f2=1700 -300 300 f3=-100 80 - formants d/d+x/d%50 - before _ d/d_+x/d_ - before r d/dr+x/d%50 - after _ NULL - after @ d/xd + voicingswitch t lengthmod 5 - switchvoicing t + Vowelin f1=2 f2=1700 -300 300 f3=-200 80 amp=16 + Vowelout f1=2 f2=1700 -300 300 f3=-100 80 + + IF PreVoicing THEN + FMT(d/xd) + ENDIF + + IF nextPh(isPause2) THEN + FMT(d/d_) addWav(x/d_) + ELIF nextPh(r) THEN + FMT(d/dr) addWav(x/d, 50) + ENDIF + + FMT(d/d) addWav(x/d, 50) endphoneme phoneme t - vls dnt stop - vowelin f1=1 f2=1500 -250 250 f3=-100 80 amp=16 - vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/t_hi%70 - before _ ustop/t_dnt%35 - switchvoicing d + import_phoneme base/t[ + voicingswitch d endphoneme - - phoneme ts - vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/ts - before _ ustop/ts_ + import_phoneme consonants/ts + voicingswitch dz endphoneme phoneme dz - vcd alv afr sibilant - vowelin f1=1 f2=1700 -300 300 f3=-100 80 len=50 - vowelout f1=2 f2=1700 -300 300 f3=-100 80 - formants d/xdz+ustop/ts%140 - before _ voc/z_+ustop/ts_%70 - after _ NULL - after @ d/xd - lengthmod 5 - switchvoicing ts + import_phoneme consonants/dz + voicingswitch ts endphoneme - phoneme z vcd alv frc sibilant - vowelout f1=0 f2=1700 -300 300 f3=0 60 len=50 - formants voc/z+ufric/s - before _ voc/z_+ufric/s_ + voicingswitch s lengthmod 6 - switchvoicing s + Vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 + + IF nextPh(isPause2) THEN + FMT(voc/z_) addWav(ufric/s_) + ENDIF + FMT(voc/z) addWav(ufric/s) // louder frictive endphoneme phoneme dZ; vcd pla afr sibilant palatal - vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 - formants dzh/dzh+ustop/ts_pzd%150 - before _ dzh/dzh_+ustop/ts_pzd - after _ NULL - after @ dzh/xdzh + voicingswitch tS; lengthmod 5 - switchvoicing tS; + Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 + + IF PreVoicing THEN + FMT(dzh/xdzh) + ENDIF + + IF nextPh(isPause2) THEN + FMT(dzh/dzh_) addWav(ustop/ts_pzd) + ENDIF + FMT(dzh/dzh) addWav(ustop/ts_pzd, 150) endphoneme + phoneme c // This is [tS;] - vls pal afr sibilant palatal - vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 - lengthmod 2 - wave ustop/ts_pzd - before _ ustop/ts_pzd - switchvoicing dZ; + import_phoneme base/tS; + voicingswitch dZ; endphoneme phoneme k vls vel stop - vowelin f1=0 f2=2300 200 400 f3=-100 80 - vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 + voicingswitch g lengthmod 2 - wave ustop/k_unasp - before _ ustop/k_ - switchvoicing g + Vowelin f1=0 f2=2300 200 400 f3=-100 80 + Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 + + IF nextPh(isPause2) THEN + WAV(ustop/k_) + ENDIF + WAV(ustop/k_unasp) endphoneme diff --git a/phsource/ph_armenian b/phsource/ph_armenian index a325ea73..27e836cf 100644 --- a/phsource/ph_armenian +++ b/phsource/ph_armenian @@ -1,185 +1,145 @@ phoneme @ - vowel starttype (@) endtype (@) - length 160 - formants vowel/@ + vowel starttype #@ endtype #@ unstressed + length 160 + FMT(vowel/@) endphoneme + phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 160 - formants vowel/i + FMT(vowel/i) endphoneme + phoneme y - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 160 - formants vowel/yy_4 + FMT(vowel/yy_4) endphoneme + phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme + phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 200 - formants vowel/aa + FMT(vowel/aa) endphoneme + phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 180 - formants vowel/o + FMT(vowel/o) endphoneme + phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 180 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme + phoneme W - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vowel/oe + FMT(vowel/oe) endphoneme + phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 240 - formants vdiph/ai + FMT(vdiph/ai) endphoneme + phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 240 - formants vdiph/eei + FMT(vdiph/eei) endphoneme + phoneme i@ - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 240 - formants vdiph2/i@ + FMT(vdiph2/i@) endphoneme - phoneme p# // more aspiration vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 lengthmod 2 - wave ustop/p_asp - before _ ustop/p_ - before r ustop/pr - before l ustop/pl - switchvoicing b + voicingswitch b + CALL base/p + WAV(ustop/p_asp) endphoneme + phoneme t# - import_phoneme t base + import_phoneme base/t endphoneme + phoneme ts# - vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/ts - before _ ustop/ts_ + import_phoneme consonants/ts endphoneme + phoneme k# - import_phoneme k base + import_phoneme base/k + length 80 endphoneme phoneme dz - vcd alv afr sibilant - vowelin f1=1 f2=1700 -300 300 f3=-100 80 len=50 - vowelout f1=2 f2=1700 -300 300 f3=-100 80 - formants d/xdz+ustop/ts%140 - before _ voc/z_+ustop/ts_%70 - after _ NULL - after @ d/xd - lengthmod 5 - switchvoicing ts + import_phoneme consonants/dz + voicingswitch ts endphoneme - phoneme p - vls blb stop - vowelin f1=1 f2=1000 -50 -100 f3=-200 80 - vowelout f1=1 f2=1000 -500 -350 f3=-300 80 rms=30 - lengthmod 2 - wave ustop/p_unasp - before _ ustop/p_unasp_%80 - before r ustop/pr - before l ustop/pl - switchvoicing b + import_phoneme consonants/p- endphoneme + phoneme t - vls dnt stop - vowelin f1=1 f2=1500 -250 250 f3=-100 80 amp=16 - vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/t_hi%60 - before _ ustop/t_dnt%35 - switchvoicing d + import_phoneme base/t[ endphoneme + phoneme ts vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/ts2 + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + WAV(ustop/ts2) endphoneme + phoneme c - vls pal afr sibilant - 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 - lengthmod 2 - wave ustop/ts_pzd2%90 - before _ ustop/ts_pzd_ - switchvoicing J + import_phoneme consonants/c2 endphoneme + phoneme k - vls vel stop - vowelin f1=0 f2=2300 200 300 f3=-150 80 - vowelout f1=0 f2=2300 300 400 f3=-150 80 rms=20 - lengthmod 2 - wave ustop/k_unasp%60 // weaker - before _ ustop/k_unasp%50 - switchvoicing g + import_phoneme consonants/k- endphoneme - phoneme Q - import_phoneme Q" base + import_phoneme base/Q" endphoneme -phoneme Q2 - liquid starttype (r) endtype (r) - vowelin f1=0 f2=1600 -300 300 f3=-200 80 - vowelout f1=2 f2=1600 -300 300 f3=-200 80 brk - length 100 - lengthmod 7 -// beforenotvowel r/2 - formants vwl_fr/@R3+r3/rx%30 - after @ vwl_fr/@R5+r3/rx%40 - after (u) vwl_fr/@R5+r3/rx%30 - after (e) vwl_fr/@R4+r3/rx%20 -endphoneme - diff --git a/phsource/ph_base2 b/phsource/ph_base2 index c70a8b28..a77bacfd 100644 --- a/phsource/ph_base2 +++ b/phsource/ph_base2 @@ -6,138 +6,140 @@ phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 180 - formants vowel/a_2 - reduceto a/ 4 + IF thisPh(isDiminished) THEN + ChangePhoneme(a/) + FMT(vowel/a#) + ENDIF + FMT(vowel/a_2) endphoneme phoneme a/ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vowel/a# + FMT(vowel/a#) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e + FMT(vowel/e) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/ee_1 + FMT(vowel/ee_1) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/i - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/o + FMT(vowel/o) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/oo_4 + FMT(vowel/oo_4) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/uu_2 + FMT(vowel/uu_2) endphoneme phoneme y - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 160 - formants vowel/y + FMT(vowel/y) endphoneme phoneme Y - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 160 - formants vowel/y# + FMT(vowel/y#) endphoneme - phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 270 - formants vdiph/au_4 + FMT(vdiph/au_4) endphoneme phoneme eU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 260 - formants vdiph/eu + FMT(vdiph/eu) endphoneme phoneme iU - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 240 - formants vdiph2/iu + FMT(vdiph2/iu) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 250 - formants vdiph/ai + FMT(vdiph/ai) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 250 - formants vdiph/ei + FMT(vdiph/ei) endphoneme phoneme EI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 230 - formants vdiph/eei + FMT(vdiph/eei) endphoneme phoneme oI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 240 - formants vdiph/oi + FMT(vdiph/oi) endphoneme phoneme uI - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 240 - formants vdiph/ui + FMT(vdiph/ui) endphoneme @@ -146,79 +148,90 @@ endphoneme //=========== - phoneme w2 - starttype w endtype w liquid - length 100 - beforenotvowel w/ lengthmod 7 - formants w/w2 - after _ w/w2 + + CALL base/w + IF nextPh(isVowel) THEN + FMT(w/w2) // longer [w] + ENDIF endphoneme phoneme p vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 lengthmod 2 - wave ustop/p_unasp - before _ ustop/p_unasp_%80 - before r ustop/pr - before l ustop/pl - switchvoicing b + 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) + ELIF nextPh(isRhotic) THEN + WAV(ustop/pr) + ELIF nextPh(l) THEN + WAV(ustop/pl) + ENDIF + WAV(ustop/p_unasp) endphoneme phoneme ts - vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/ts - before _ ustop/ts_ + import_phoneme consonants/ts endphoneme phoneme t // dental variant of /t/ vls dnt stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 lengthmod 2 -// wave ustop/t_dnt%50 -// before _ ustop/t_dnt%35 - wave ustop/t_dnt2%60 - before _ ustop/t_dnt%30 - switchvoicing d + voicingswitch d + Vowelin f1=0 f2=1600 -300 300 f3=-100 80 + Vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 + IF nextPh(isPause2) THEN + WAV(ustop/t_dnt, 30) + ENDIF + WAV(ustop/t_dnt2, 60) endphoneme phoneme d // dental variant of /d/ vcd dnt stop - vowelin f1=2 f2=1500 -300 300 f3=-150 80 - vowelout f1=2 f2=1500 -300 300 f3=-150 80 - formants d/d+x/d_dnt%110 - before _ d/d_+x/d_ - before r d/dr+x/d_dnt%110 - after _ NULL - after @ d/xd lengthmod 5 - switchvoicing t + voicingswitch t + Vowelin f1=2 f2=1500 -300 300 f3=-150 80 + Vowelout f1=2 f2=1500 -300 300 f3=-150 80 + + IF PreVoicing THEN + FMT(d/xd) + ENDIF + + IF nextPh(isPause2) THEN + FMT(d/d_) addWav(x/d_) + ELIF nextPh(isRhotic) THEN + FMT(d/dr) addWav(x/d_dnt, 110) + ENDIF + + FMT(d/d) addWav(x/d_dnt, 110) endphoneme phoneme k vls vel stop - vowelin f1=0 f2=2300 200 400 f3=-100 80 - vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 lengthmod 2 - wave ustop/k_unasp%70 // weaker - before _ ustop/k_ - before r ustop/kr - before l ustop/kl - before (i) ustop/ki - switchvoicing g + voicingswitch g + Vowelin f1=0 f2=2300 200 400 f3=-100 80 + Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 + + IF nextPh(isPause2) THEN + WAV(ustop/k_) + ELIF nextPh(isRhotic) THEN + WAV(ustop/kr) + ELIF nextPh(#i) OR nextPh(;) THEN + WAV(ustop/ki) + ELIF nextPh(l) THEN + WAV(ustop/kl) + ENDIF + WAV(ustop/k_unasp, 70) endphoneme diff --git a/phsource/ph_catalan b/phsource/ph_catalan index 2378de2b..b7855ea1 100644 --- a/phsource/ph_catalan +++ b/phsource/ph_catalan @@ -4,76 +4,71 @@ //==================================================== phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 180 - formants vowel/a_6 - reduceto a# 2 + ChangeIfUnstressed(a#) + FMT(vowel/a_6) endphoneme phoneme a# - vowel starttype (@) endtype (@) - length 170 - formants vowel/a#_3 + vowel starttype #@ endtype #@ unstressed + length 170 + FMT(vowel/a#_3) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e - reduceto @ 2 + ChangeIfUnstressed(@) + FMT(vowel/e) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/e_mid - reduceto @ 2 + ChangeIfUnstressed(@) + FMT(vowel/e_mid) endphoneme phoneme E2 // don't reduce - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/oo - reduceto U 2 + ChangeIfUnstressed(U) + FMT(vowel/oo) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/o - reduceto U 2 + ChangeIfUnstressed(U) + FMT(vowel/o) endphoneme phoneme U - vowel starttype (u) endtype (u) - length 160 - formants vowel/uu_2 + vowel starttype #u endtype #u unstressed + length 160 + FMT(vowel/uu_2) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/u_bck - reduceto U 2 + ChangeIfUnstressed(U) + FMT(vowel/u_bck) endphoneme phoneme l - liquid - length 100 - lengthmod 7 - beforenotvowel l/2 // use 'dark' [l] after a vowel - formants l/l - after _ l/_l t l/tl + import_phoneme en/l // use 'dark' [l] after a vowel endphoneme diff --git a/phsource/ph_consonants b/phsource/ph_consonants new file mode 100644 index 00000000..8b1d1625 --- /dev/null +++ b/phsource/ph_consonants @@ -0,0 +1,125 @@ + +// Extra consonants. Use (for example): +// import_phoneme consonants/ts + +phoneme ts + vls alv afr sibilant + voicingswitch dz + lengthmod 2 + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + IF nextPh(isPause2) THEN + WAV(ustop/ts_) + ENDIF + WAV(ustop/ts) +endphoneme + + +phoneme dz + vcd alv afr sibilant + voicingswitch ts + lengthmod 5 + Vowelin f1=1 f2=1700 -300 300 f3=-100 80 len=50 + Vowelout f1=2 f2=1700 -300 300 f3=-100 80 + + IF PreVoicing THEN + FMT(d/xd) + ENDIF + + IF nextPh(isPause2) THEN + FMT(voc/z_) addWav(ustop/ts_, 60) + ENDIF + FMT(d/xdz) addWav(ustop/ts, 140) +endphoneme + + +phoneme p- // unaspirated + vls blb stop + 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(l) THEN + WAV(ustop/pl) + ELIF nextPh(r) THEN + WAV(ustop/pr) + ELIF nextPh(isPause2) THEN + WAV(ustop/p_unasp_, 80) + ENDIF + WAV(ustop/p_unasp) +endphoneme + + +phoneme ph // aspirated + vls blb stop + 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_) + ENDIF + IF nextPh(r) THEN + WAV(ustop/pr) + ENDIF + IF nextPh(l) THEN + WAV(ustop/pl) + ENDIF + WAV(ustop/p_asp) +endphoneme + + +phoneme c2 + vls pal afr sibilant + lengthmod 2 + 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 nextPh(isPause2) THEN + WAV(ustop/ts_pzd_) + ENDIF + WAV(ustop/ts_pzd2, 90) +endphoneme + + + +phoneme k- // unaspirated + vls vel stop + lengthmod 2 + voicingswitch g + Vowelin f1=0 f2=2300 200 300 f3=-150 80 + Vowelout f1=0 f2=2300 300 400 f3=-150 80 rms=20 + IF nextPh(isPause2) THEN + WAV(ustop/k_unasp, 50) + ENDIF + WAV(ustop/k_unasp, 60) // weaker +endphoneme + + +phoneme kh + vls vel stop + lengthmod 2 + voicingswitch g + Vowelin f1=0 f2=2300 200 300 f3=-150 80 + Vowelout f1=0 f2=2300 300 400 f3=-150 80 rms=20 + IF nextPh(isPause2) THEN + WAV(ustop/k_asp, 50) + ENDIF + IF nextPh(l) THEN + WAV(ustop/kl) + ENDIF + WAV(ustop/k_asp, 90) +endphoneme + + +phoneme s2 // second part of a long [s:] + vls alv frc sibilant + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + lengthmod 3 + IF nextPh(isPause2) THEN + WAV(ufric/s_) + ENDIF + WAV(ufric/s_continue) +endphoneme + + + diff --git a/phsource/ph_croatian b/phsource/ph_croatian index 30939086..5c292ca2 100644 --- a/phsource/ph_croatian +++ b/phsource/ph_croatian @@ -2,66 +2,84 @@ phoneme S // this is letter š vls pla frc sibilant - vowelin f1=0 f2=2100 100 300 f3=-100 80 - vowelout f1=0 f2=2100 100 300 f3=-100 80 - length 30 lengthmod 3 - wave ufric/sh3%110 - before _ ufric/sh3%90 - switchvoicing Z + voicingswitch Z + Vowelin f1=0 f2=2100 100 300 f3=-100 80 + Vowelout f1=0 f2=2100 100 300 f3=-100 80 + IF nextPh(isPause2) THEN + WAV(ufric/sh3, 90) + ENDIF + WAV(ufric/sh3, 110) endphoneme phoneme tS // this is letter č vls pla afr sibilant - vowelin f1=0 f2=1900 100 200 f3=-100 80 - length 90 lengthmod 2 - wave ustop/tsh2%50 - before _ ustop/tsh2%40 - switchvoicing dZ + voicingswitch dZ + Vowelin f1=0 f2=1900 100 200 f3=-100 80 + IF nextPh(isPause2) THEN + WAV(ustop/tsh2, 40) + ENDIF + WAV(ustop/tsh2, 50) endphoneme phoneme tS; // this is letter ć vls pal afr sibilant palatal - vowelin f1=0 f2=2500 300 500 f3=300 80 rate len=70 lengthmod 2 - wave ustop/ts_pzd3%50 - before _ ustop/ts_pzd3%50 - switchvoicing dZ; + voicingswitch dZ; + Vowelin f1=0 f2=2500 300 500 f3=300 80 rate len=70 + IF nextPh(isPause2) THEN + WAV(ustop/ts_pzd3, 50) + ENDIF + WAV(ustop/ts_pzd3, 50) endphoneme phoneme Z // letter ž vcd pla frc sibilant - vowelin f1=0 f2=2000 0 300 f3=-200 80 - vowelout f1=2 f2=2000 0 300 f3=-200 80 brk - formants voc/zh+ufric/sh3%150 - before _ voc/zh_+ufric/sh3%80 lengthmod 6 - switchvoicing S + voicingswitch S + Vowelin f1=0 f2=2000 0 300 f3=-200 80 + Vowelout f1=2 f2=2000 0 300 f3=-200 80 brk + IF nextPh(isPause2) THEN + FMT(voc/zh_) addWav(ufric/sh3, 80) + ENDIF + FMT(voc/zh) addWav(ufric/sh3, 150) endphoneme + phoneme dZ //letter dž vcd pla afr sibilant - vowelin f1=2 f2=1900 100 300 f3=100 80 - vowelout f1=2 f2=1900 100 300 f3=100 80 brk - formants dzh/dzh2+ustop/tsh2%80 - before _ dzh/dzh_+ustop/tsh2%50 - after _ NULL - after @ dzh/xdzh lengthmod 5 - switchvoicing tS + voicingswitch tS + Vowelin f1=2 f2=1900 100 300 f3=100 80 + Vowelout f1=2 f2=1900 100 300 f3=100 80 brk + + IF PreVoicing THEN + FMT(dzh/xdzh) + ENDIF + + IF nextPh(isPause2) THEN + FMT(dzh/dzh_) addWav(ustop/tsh2, 50) + ENDIF + FMT(dzh/dzh2) addWav(ustop/tsh2, 80) endphoneme + phoneme dZ; // letter đ vcd pla afr sibilant palatal - vowelin f1=2 f2=2500 300 500 f3=300 80 rate len=70 - formants dzh/dzh2+ustop/ts_pzd3%80 - before _ dzh/dzh_+ustop/ts_pzd3%50 - after _ NULL - after @ dzh/xdzh lengthmod 5 - switchvoicing tS; + voicingswitch tS; + Vowelin f1=2 f2=2500 300 500 f3=300 80 rate len=70 + + IF PreVoicing THEN + FMT(dzh/xdzh) + ENDIF + + IF nextPh(isPause2) THEN + FMT(dzh/dzh_) addWav(ustop/ts_pzd3, 50) + ENDIF + FMT(dzh/dzh2) addWav(ustop/ts_pzd3, 80) endphoneme @@ -70,97 +88,97 @@ endphoneme phoneme @ // Schwa - vowel starttype (@) endtype (@) - formants vowel/@_hgh + vowel starttype #@ endtype #@ length 140 + FMT(vowel/@_hgh) endphoneme phoneme @2 // Schwa (raised) - vowel starttype (@) endtype (@) - formants vowel/@_fnt + vowel starttype #@ endtype #@ length 140 + FMT(vowel/@_fnt) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 160 - formants vowel/a - reduceto & 4 + ChangeIfNotStressed(&) + FMT(vowel/a) endphoneme phoneme A // 'a' before 'r', doesn't reduce to [&] - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 160 - formants vowel/a + FMT(vowel/a) endphoneme phoneme & - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 140 - formants vowel/a#_2 + FMT(vowel/a#_2) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 140 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 140 - formants vowel/e + FMT(vowel/e) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 120 - formants vowel/i_6 - linkout ; - reduceto I 4 + ChangeIfNotStressed(I) + IfNextVowelAppend(;) + FMT(vowel/i_6) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 120 - formants vowel/ii_3 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_3) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 140 - formants vowel/oo_1 + FMT(vowel/oo_1) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/u_bck - reduceto U 4 + ChangeIfNotStressed(U) + FMT(vowel/u_bck) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/u_2 + FMT(vowel/u_2) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 250 - formants vdiph/ai + FMT(vdiph/ai) endphoneme @@ -168,62 +186,67 @@ endphoneme phoneme t // dental variant of /t/ vls dnt stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/t_dnt%50 - before _ ustop/t_dnt%35 - switchvoicing d + voicingswitch d + Vowelin f1=0 f2=1600 -300 300 f3=-100 80 + Vowelout f1=0 f2=1600 -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 vcd alv stop - vowelin f1=2 f2=1700 -300 300 f3=-100 80 amp=16 - vowelout f1=2 f2=1700 -300 300 f3=-100 80 - formants d/d+x/d%50 - before _ d/d_+x/d_ - before r d/dr+x/d%50 - after _ NULL - after @ d/xd lengthmod 5 - switchvoicing t -endphoneme + voicingswitch t + Vowelin f1=2 f2=1700 -300 300 f3=-100 80 amp=16 + Vowelout f1=2 f2=1700 -300 300 f3=-100 80 + IF PreVoicing THEN + FMT(d/xd) + ENDIF + + IF nextPh(isPause2) THEN + FMT(d/d_) addWav(x/d_) + ELIF nextPh(r) THEN + FMT(d/dr) addWav(x/d) + ENDIF + + FMT(d/d) addWav(x/d, 50) +endphoneme phoneme x vls vel frc - vowelin f1=0 f2=2300 200 400 f3=-100 80 - vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 - length 100 lengthmod 3 - wave ufric/x_hr%45 - switchvoicing Q + voicingswitch Q + Vowelin f1=0 f2=2300 200 400 f3=-100 80 + Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 + WAV(ufric/x_hr, 45) endphoneme -phoneme r- - vowel starttype (@) endtype (@) + +phoneme r- // syllabic r + vowel starttype #@ endtype #@ length 240 - formants vowelr/r-voc + FMT(vowelr/r-voc) endphoneme + phoneme R - liquid - vowelin f1=0 f2=1600 -300 300 f3=-200 80 - vowelout f1=2 f2=1600 -300 300 f3=-200 80 brk - formants r3/r_trill2+r3/r_trill2.wav%65 - trill - lengthmod 6 + import_phoneme base/R endphoneme + phoneme r* vowel nonsyllabic - starttype (@) endtype (@) - formants vowel/@- unstressed - appendph * length 50 + starttype #@ endtype #@ + AppendPhoneme(*) + FMT(vowel/@-) endphoneme diff --git a/phsource/ph_czech b/phsource/ph_czech index 620a9a28..28dc5eb1 100644 --- a/phsource/ph_czech +++ b/phsource/ph_czech @@ -1,33 +1,33 @@ // Czech phonemes inherit from Slovak phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 120 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme a: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 290 - formants vowel/a_3 + FMT(vowel/a_3) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 120 - formants vowel/oo_2 + FMT(vowel/oo_2) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 280 - formants vowel/u + FMT(vowel/u) endphoneme phoneme oU - vowel starttype (o) endtype (u) + vowel starttype #o endtype #u length 260 - formants vdiph/oou + FMT(vdiph/oou) endphoneme diff --git a/phsource/ph_danish b/phsource/ph_danish index a294aa2e..c2db5225 100644 --- a/phsource/ph_danish +++ b/phsource/ph_danish @@ -1,142 +1,126 @@ phoneme @ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ unstressed length 130 - formants vowel/@_3 + FMT(vowel/@_3) endphoneme // ToDo: change [@] to [a#] if adjacent to [r] or [R] phoneme 3 - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a unstressed length 130 - formants vowel/a#_3 + FMT(vowel/a#_3) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/i_4 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_4) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 150 - formants vowel/e + FMT(vowel/e) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 150 - formants vowel/e_mid2 + FMT(vowel/e_mid2) endphoneme phoneme & - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 150 - formants vowel/ee_2 + FMT(vowel/ee_2) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 150 - formants vowel/a_2 + FMT(vowel/a_2) endphoneme phoneme A - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 150 - formants vowel/a_3 + FMT(vowel/a_3) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 150 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/o_2 + FMT(vowel/o_2) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/o_5 + FMT(vowel/o_5) endphoneme phoneme V - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 150 - formants vowel/V_4 + FMT(vowel/V_4) endphoneme phoneme 0 - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/oo_2 + FMT(vowel/oo_2) endphoneme phoneme y - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/y + FMT(vowel/y) endphoneme phoneme Y - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/yy + FMT(vowel/yy) endphoneme phoneme W - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 150 - formants vowel/oe + FMT(vowel/oe) endphoneme - -//phoneme n -// vcd alv nasal -// vowelout f1=2 f2=1700 -300 250 f3=-100 80 rms=20 brk -// length 100 -// lengthmod 4 -// formants NULL -// after _ n/_n -// after n n/_n // lengthen [nn] -// before _ n/n#_ // shorter -// before (r) n/nj -//endphoneme +// CONSONANTS phoneme v // approximant, not fricative - vcd lbd frc - vowelin f1=0 f2=1000 -300 -200 f3=-300 100 - vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50 - lengthmod 6 - formants voc/v - before _ voc/v_ - switchvoicing f + import_phoneme base/v# + voicingswitch f endphoneme phoneme r // used for 'r' after a vowel (to create a diphthong) liquid - formants r/a_ lengthmod 7 + FMT(r/a_) endphoneme -phoneme R // +phoneme R + lengthmod 7 liquid - formants r/aa - lengthmod 7 + FMT(r/aa) endphoneme diff --git a/phsource/ph_dutch b/phsource/ph_dutch index dec2d79c..4b316192 100644 --- a/phsource/ph_dutch +++ b/phsource/ph_dutch @@ -10,78 +10,80 @@ phoneme @ // Schwa - vowel starttype (@) endtype (@) - formants vowel/@_4 + vowel starttype #@ endtype #@ unstressed length 125 + FMT(vowel/@_4) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 160 - formants vowel/i_2 - after w w/wi2 + IF prevPh(w) THEN + VowelStart(w/wi2) + ENDIF + FMT(vowel/i_2) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 130 - formants vowel/ii + FMT(vowel/ii) endphoneme phoneme y - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 180 - formants vowel/y + FMT(vowel/y) endphoneme phoneme 8 - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/y# + FMT(vowel/y#) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 150 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 140 - formants vowel/e_mid2 + FMT(vowel/e_mid2) endphoneme phoneme E2 // as[E] but reduces to @ if unstressed - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 140 - formants vowel/ee_2 - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/ee_2) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/o_5 + FMT(vowel/o_5) endphoneme phoneme O: // for "oor" - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 210 - formants vowel/o_6 + FMT(vowel/o_6) endphoneme phoneme a: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 210 - formants vowel/a + FMT(vowel/a) endphoneme phoneme A - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 160 - formants vowel/aa_7 + FMT(vowel/aa_7) endphoneme @@ -89,52 +91,52 @@ endphoneme //=========== phoneme e: - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 190 - formants vdiph/ei + FMT(vdiph/ei) endphoneme phoneme Y: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 220 - formants vdiph/y#y_3 + FMT(vdiph/y#y_3) endphoneme phoneme o: - vowel starttype (o) endtype (u) + vowel starttype #o endtype #u length 200 - formants vdiph/Vu_3 + FMT(vdiph/Vu_3) endphoneme phoneme EI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 210 - formants vdiph/eei + FMT(vdiph/eei) endphoneme phoneme Wy - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 220 - formants vdiph/&y + FMT(vdiph/&y) endphoneme phoneme VU - vowel starttype (a) endtype (o) + vowel starttype #a endtype #o length 220 - formants vdiph/aau_2 + FMT(vdiph/aau_2) endphoneme phoneme eU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 220 - formants vdiph/eu + FMT(vdiph/eu) endphoneme phoneme yU - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 220 - formants vdiph2/yu + FMT(vdiph2/yu) endphoneme @@ -145,76 +147,27 @@ endphoneme phoneme r // from Afrikaans - liquid starttype #r endtype #r - length 60 - vowelin f1=2 f2=2700 -300 -200 f3=-1300 80 - vowelout f1=2 f2=1700 -300 -200 f3=-1300 80 - formants r3/r_trill+r3/r_trill3.wav%99 - before _ r3/r_trill+r3/r_trill3.wav%99 - trill - lengthmod 6 -endphoneme - - -phoneme r2 - liquid - lengthmod 7 - beforenotvowel r/ - trill - formants r/rr - after _ r/rr - after t r/trr p r/trr k r/trr - before _ r/r_ -endphoneme - - -phoneme r/ // variant of [r] when not preceding a vowel - liquid vowel2 - length 100 - lengthmod 7 // - formants NULL + import_phoneme af/r endphoneme phoneme v2 // approximant, not fricative - vcd lbd frc - vowelin f1=0 f2=1000 -300 -200 f3=-300 100 - vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50 - lengthmod 6 - formants voc/v - before _ voc/v_ - switchvoicing f + import_phoneme base/v# endphoneme + phoneme Q vcd vel frc - vowelin f1=2 f2=2300 200 300 f3=-300 80 - vowelout f1=2 f2=2300 250 300 f3=-300 80 brk lengthmod 6 - formants voc/Q_less+vocw/Q2%140 - before _ voc/Q_+vocw/Q_ - switchvoicing x + voicingswitch x + Vowelin f1=2 f2=2300 200 300 f3=-300 80 + Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk + + IF nextPh(isPause2) THEN + FMT(voc/Q_) addWav(vocw/Q_) + ENDIF + FMT(voc/Q_less) addWav(vocw/Q2, 140) endphoneme -phoneme x2 // a stronger version of [x] (for Afrikaans) - vls vel frc - vowelin f1=0 f2=2300 200 400 f3=-100 100 - vowelout f1=0 f2=2300 300 400 f3=-100 100 rms=20 - length 100 - lengthmod 3 - wave ufric/x2 // stronger version -endphoneme - - -phoneme Sx // Swedish "sj" sound for TESTING - vls vel frc - vowelin f1=0 f2=2300 300 400 f3=200 100 - vowelout f1=0 f2=2300 300 400 f3=200 100 rms=20 - length 100 - lengthmod 3 - wave ufric/sx_sv%60 -endphoneme - - diff --git a/phsource/ph_english b/phsource/ph_english index bbe4eb24..60c8825f 100644 --- a/phsource/ph_english +++ b/phsource/ph_english @@ -1,49 +1,76 @@ - -phoneme k - vls vel stop - vowelin f1=0 f2=2300 200 400 f3=-100 80 - vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/k - before _ ustop/k_ - before r ustop/kr - before l ustop/kl - before i: ustop/ki - before i@ ustop/ki -endphoneme - phoneme t2 // [t] which doesn't reduce - vls alv stop - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/t%90 - before _ ustop/t_ - before @- ustop/t_dnt%50 - before r ustop/tr - before R ustop/tr - switchvoicing d + import_phoneme base/t endphoneme phoneme t# // reduced [t] as in "city" vcd alv stop - vowelin f1=1 f2=1700 -300 300 f3=-100 80 - vowelout f1=2 f2=1700 -300 300 f3=-100 80 - formants d/tap2+x/d%70 - after @ d/x_tap lengthmod 5 + Vowelin f1=1 f2=1700 -300 300 f3=-100 80 + Vowelout f1=2 f2=1700 -300 300 f3=-100 80 + + IF KlattSynth THEN + IF PreVoicing THEN + FMT(klatt/x_tap) + ENDIF + FMT(klatt/tap2) addWav(x/d, 70) + ENDIF + + IF PreVoicing THEN + FMT(d/x_tap) + ENDIF + FMT(d/tap2) addWav(x/d, 70) endphoneme -phoneme l +phoneme l // use dark [l/2] before not-vowel liquid - length 100 lengthmod 7 - beforenotvowel l/2 // use 'dark' [l] after a vowel - formants l/l - after _ l/_l t l/tl + + IF nextPh(isNotVowel) THEN + ChangePhoneme(l/2) + ENDIF + + CALL base/l +endphoneme + + +phoneme g- + vcd vel stop + lengthmod 5 + Vowelin f1=2 f2=2300 200 300 f3=-300 80 + Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk + + IF PreVoicing THEN + FMT(g/xg) + ENDIF + + IF nextPh(isPause2) THEN + FMT(g/g_) addWav(x/g2_) + ENDIF + FMT(g/g) addWav(x/g2_) +endphoneme + + +phoneme r- // linking r, used in English between certain vowels and a following vowel + liquid rhotic + lengthmod 0 + + NextVowelStarts + VowelStart(r2/r2@) + VowelStart(r2/r2a) + VowelStart(r2/r2e) + VowelStart(r2/r2i) + VowelStart(r2/r2o) + VowelStart(r2/r2u) + EndSwitch + + IF prevPh(isVowel) THEN + VowelEnding(r/xr, -60) + ENDIF + + FMT(r/r) endphoneme @@ -52,372 +79,340 @@ endphoneme // VOWELS //******************************************************************* - phoneme @ // Schwa - vowel starttype (@) endtype (@) - formants vowel/@ + vowel starttype #@ endtype #@ unstressed - linkout r- length 140 + IfNextVowelAppend(r-) + FMT(vowel/@) endphoneme phoneme 3 // Schwa, used for rhotic schwa in American - vowel starttype (@) endtype (@) - formants vowel/@ + vowel starttype #@ endtype #@ unstressed - linkout r- - beforevowel @ length 140 + IfNextVowelAppend(r-) + FMT(vowel/@) endphoneme phoneme @2 // Schwa, changes to I before a vowel - vowel starttype (@) endtype (@) - formants vowel/@ + vowel starttype #@ endtype #@ unstressed - beforevowel I2 length 120 + IF nextPh(isVowel) THEN + ChangePhoneme(I2) + ENDIF + FMT(vowel/@) endphoneme + phoneme @5 // Schwa, changes to U before a vowel - vowel starttype (@) endtype (@) - formants vowel/@ + vowel starttype #@ endtype #@ unstressed - beforevowelpause U length 140 + IF nextPh(isVowel) OR nextPh(isPause) THEN + ChangePhoneme(U) + ENDIF + FMT(vowel/@) endphoneme phoneme @L - vowel starttype (@) endtype l - length 160 - formants vwl_en/@L + vowel starttype #@ endtype l unstressed - before _ vwl_en/@L + length 160 + CALL vowelstart_l + FMT(vwl_en/@L) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 150 -// formants vowel/a_en - formants vowel/a - reduceto a2 0 + ChangeIfDiminished(a2) + FMT(vowel/a) endphoneme phoneme a2 - vowel starttype (@) endtype (a) + vowel starttype #@ endtype #@ unstressed length 150 - formants vowel/a#_3 - linkout r- + FMT(vowel/a#_3) endphoneme phoneme aa // 'bath' etc. - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 150 -// formants vowel/a_en - formants vowel/a - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/a) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 140 - formants vowel/ee_5 - reduceto I 0 + ChangeIfDiminished(I2) + FMT(vowel/ee_5) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 130 - formants vowel/ii_2 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_2) endphoneme + phoneme I2 - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i unstressed length 130 - formants vowel/ii_4 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_4) endphoneme - phoneme i // optional variant of [I] for end of words - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 140 - formants vowel/ii_en - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_en) endphoneme phoneme 0 - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 140 - formants vowel/0 - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/0) endphoneme phoneme V - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 140 - formants vowel/V_2 - reduceto @ 0 + + ChangeIfDiminished(@) + FMT(vowel/V_2) endphoneme phoneme U - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/uu + FMT(vowel/uu) endphoneme + phoneme A: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 230 - formants vowel/aa_2 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/aa_2) endphoneme -phoneme A@ // Used for [A:] when followed by 'r', becomes [A:]+[r] in American - vowel starttype (a) endtype (a) +phoneme A@ // Used for [A:] when followed by 'r' + vowel starttype #a endtype #a length 230 - formants vowel/aa_2 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/aa_2) endphoneme phoneme 3: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 210 - formants vowel/3_en - reduceto @ 0 - linkout r- + IfNextVowelAppend(r-) + ChangeIfDiminished(@) + FMT(vowel/3_en) endphoneme phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 175 - formants vowel/i_en - after w w/wi2 - linkout ; + IfNextVowelAppend(;) + IF prevPh(w) THEN + VowelStart(w/wi2) + ENDIF + FMT(vowel/i_en) endphoneme phoneme O: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 230 - formants vowel/oo_en - reduceto @ 0 -// linkout r- -endphoneme - - -phoneme O@ - vowel starttype (o) endtype (@) - length 240 - formants vowel/oo_en - linkout r- -endphoneme - - -phoneme o@ - vowel starttype (o) endtype (@) - length 250 - formants vowel/oo_en - linkout r- + ChangeIfDiminished(@) + FMT(vowel/oo_en) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 200 - formants vowel/oo_en - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/oo_en) +endphoneme + + +phoneme O@ + vowel starttype #o endtype #o + length 240 + IfNextVowelAppend(r-) + FMT(vowel/oo_en) +endphoneme + + +phoneme o@ + vowel starttype #o endtype #o + length 250 + IfNextVowelAppend(r-) + FMT(vowel/oo_en) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 210 - formants vdiph2/uw_2 -// before l/2 vowel/u_fnt-40+l/L2_uL - before l/2 vwl_en/u_L-40+l/L2_uL + IF nextPh(l/2) THEN + FMT(vwl_en/u_L) + ENDIF + FMT(vdiph2/uw_2) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 230 - formants vdiph/au + FMT(vdiph/au) endphoneme phoneme oU - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 220 - formants vdiph/@u_en + FMT(vdiph/@u_en) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 230 -// formants vdiph/ai_en2 - formants vdiph/ai_2 + FMT(vdiph/ai_2) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 210 - formants vdiph/eei + FMT(vdiph/eei) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 230 - formants vdiph/ooi + FMT(vdiph/ooi) endphoneme phoneme e@ - vowel starttype (e) endtype (@) + vowel starttype #e endtype #@ length 230 - formants vowel/ee_1 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/ee_1) endphoneme phoneme i@ - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 250 - formants vdiph2/ii@ - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/ii@) endphoneme + phoneme i@3 - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 250 - formants vdiph2/ii@ - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/ii@) endphoneme - phoneme U@ - vowel starttype (u) endtype (@) + vowel starttype #u endtype #@ length 200 - formants vdiph2/uu@ - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/uu@) endphoneme phoneme aI@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 270 - formants vwl_en/aI@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en/aI@) endphoneme phoneme aU@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 270 - formants vwl_en/aU@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en/aU@) endphoneme -// extra vowels -phoneme e: - vowel starttype (e) endtype (e) + +phoneme IR // used for "ir" when [3:] is split (Scottish) + vowel starttype #@ endtype #@ + length 190 + IfNextVowelAppend(r-) + FMT(vowelr/V_r) +endphoneme + + +phoneme VR // used for "or"/"ur" when [3:] is split (Scottish) + vowel starttype #@ endtype #@ length 210 - formants vowel/e + IfNextVowelAppend(r-) + FMT(vowelr/V3_r) endphoneme phoneme o: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 220 - formants vowel/o + FMT(vowel/o) endphoneme -phoneme eU - vowel starttype (e) endtype (u) -length 240 -formants vdiph/eu -endphoneme - - -phoneme IR // used for "ir" when [3:] is split (Scottish) - vowel starttype (@) endtype (@) - length 190 - formants vowelr/V_r - appendph r -endphoneme - -phoneme VR // used for "or"/"ur" when [3:] is split (Scottish) - vowel starttype (@) endtype (@) - length 210 - formants vowelr/V3_r - appendph r -endphoneme - - - phoneme A~ - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 260 - formants vnasal/aa_n2 -endphoneme - - -phoneme E~ - vowel starttype (e) endtype (e) - length 260 - formants vnasal/ee_n + FMT(vnasal/aa_n2) endphoneme phoneme O~ - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 240 - formants vnasal/oo_n2 + FMT(vnasal/oo_n2) endphoneme -phoneme y: - vowel starttype (u) endtype (u) - length 220 - formants vowel/y -endphoneme - - -phoneme Y: - vowel starttype (@) endtype (@) - length 230 - formants vowel/y# -endphoneme - - -phoneme W - vowel starttype (@) endtype (@) - length 170 - formants vowel/oe +phoneme e: + vowel starttype #e endtype #e + length 210 + FMT(vowel/e) endphoneme diff --git a/phsource/ph_english_n b/phsource/ph_english_n index 450d9b22..65aceace 100644 --- a/phsource/ph_english_n +++ b/phsource/ph_english_n @@ -1,13 +1,9 @@ phoneme N vcd vel nasal - vowelout f1=3 f2=2300 300 400 f3=-200 80 len=40 rms=20 brk - length 100 - formants NULL - after _ nn/_nn - before _ nn/nn_ lengthmod 8 // longer than 'n' - linkout g- + IfNextVowelAppend(g-) + CALL base/N endphoneme @@ -17,241 +13,242 @@ endphoneme //******************************************************************* phoneme 3 // Schwa, used for rhotic schwa in American - vowel starttype (@) endtype (@) - formants vowel/@_fr + vowel starttype #@ endtype #@ unstressed - linkout r- - beforevowel @ length 140 + IfNextVowelAppend(r-) + FMT(vowel/@_fr) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 140 - formants vowel/a - reduceto a2 0 + ChangeIfDiminished(a2) + FMT(vowel/a) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #a endtype #a length 150 - formants vowel/ee - reduceto I 0 -// before l/ DFT-30+L/eL_af + ChangeIfDiminished(I2) + FMT(vowel/ee) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 130 - formants vowel/ii - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii) endphoneme + phoneme I2 - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i unstressed length 140 - formants vowel/ii - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii) endphoneme + phoneme i // optional variant of [I] for end of words - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/e_3 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/e_3) endphoneme phoneme 0 - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/0_2 - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/0_2) endphoneme phoneme V - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 140 - formants vowel/o-_2 - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/o-_2) endphoneme phoneme U - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/uu + FMT(vowel/uu) endphoneme phoneme a2 - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ unstressed length 140 - formants vowel/a#_3 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/a#_3) endphoneme phoneme A: - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 240 - formants vowel/aa_5 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/aa_5) endphoneme phoneme A@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 250 - formants vwl_en_n/aa_5 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/aa_5) endphoneme phoneme aa // 'bath' etc. - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 150 - formants vowel/a - linkout r- + FMT(vowel/a) endphoneme phoneme 3: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 230 - formants vowel/3_2 - reduceto @ 0 - linkout r- + IfNextVowelAppend(r-) + ChangeIfDiminished(@) + FMT(vowel/3_2) endphoneme phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 175 - formants vowel/i - after w w/wi2 - linkout ; + IfNextVowelAppend(;) + IF prevPh(w) THEN + VowelStart(w/wi2) + ENDIF + FMT(vowel/i) endphoneme phoneme O: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 240 - formants vowel/oo_1 - reduceto @ 0 - linkout r- + IfNextVowelAppend(r-) + ChangeIfDiminished(@) + FMT(vowel/oo_1) endphoneme phoneme O@ - vowel starttype (o) endtype (@) + vowel starttype #o endtype #@ length 240 - formants vwl_en_n/O@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en_n/O@) endphoneme phoneme o@ - vowel starttype (o) endtype (@) + vowel starttype #o endtype #@ length 240 - formants vwl_en_n/O@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en_n/O@) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/oo_en - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/oo_en) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 200 - formants vdiph2/uw_4 + FMT(vdiph2/uw_4) endphoneme phoneme aU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 230 - formants vdiph/eeu_3 + FMT(vdiph/eeu_3) endphoneme phoneme oU - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 220 - formants vowel/o + FMT(vowel/o) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 230 - formants vdiph/ae_2 + FMT(vdiph/ae_2) endphoneme phoneme eI - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 210 - formants vowel/e + FMT(vowel/e) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 230 - formants vdiph/ooi + FMT(vdiph/ooi) endphoneme phoneme e@ - vowel starttype (e) endtype (@) + vowel starttype #e endtype #@ length 220 - formants vdiph2/ee@ - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/ee@) endphoneme phoneme i@ - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 240 - formants vdiph2/i@ - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/i@) endphoneme phoneme U@ - vowel starttype (u) endtype (@) + vowel starttype #u endtype #@ length 200 - formants vdiph2/uu@ - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/uu@) endphoneme phoneme aI@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 270 - formants vwl_en/aI@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en/aI@) endphoneme phoneme aU@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 270 - formants vwl_en/aU@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en/aU@) endphoneme diff --git a/phsource/ph_english_rp b/phsource/ph_english_rp index c51e4d12..f6e7a008 100644 --- a/phsource/ph_english_rp +++ b/phsource/ph_english_rp @@ -5,270 +5,262 @@ phoneme @ // Schwa - vowel starttype (@) endtype (@) - formants vowel/@ - before _ vowel/@_low + vowel starttype #@ endtype #@ unstressed - linkout r- length 140 + IfNextVowelAppend(r-) + IF thisPh(isWordEnd) THEN + FMT(vowel/@_low) + ENDIF + FMT(vowel/@) endphoneme phoneme 3 // Schwa, used for rhotic schwa in American - vowel starttype (@) endtype (@) - formants vowel/@ - before _ vowel/@_low - unstressed - linkout r- - beforevowel @ - length 140 + import_phoneme @ endphoneme + phoneme @2 // Schwa, changes to I before a vowel - vowel starttype (@) endtype (@) - formants vowel/@_low + vowel starttype #@ endtype #@ unstressed - beforevowel I length 120 + IF nextPh(isVowel) THEN + ChangePhoneme(I2) + ENDIF + FMT(vowel/@_low) endphoneme + phoneme @5 // Schwa, changes to U before a vowel - vowel starttype (@) endtype (@) - formants vowel/@_low + vowel starttype #@ endtype #@ unstressed - beforevowelpause U length 140 -endphoneme - - -phoneme @L - vowel starttype (@) endtype l - length 160 - formants vwl_en/@L - unstressed - before _ vwl_en/@L + IF nextPh(isVowel) OR nextPh(isPause) THEN + ChangePhoneme(U) + ENDIF + FMT(vowel/@_low) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 175 - formants vowel/& - reduceto a2 0 + ChangeIfDiminished(a2) + FMT(vowel/&) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 140 - formants vowel/e_mid - reduceto I 0 + ChangeIfDiminished(I2) + FMT(vowel/e_mid) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 130 - formants vowel/ii - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii) endphoneme phoneme I2 - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i unstressed length 130 - formants vowel/ii - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii) endphoneme phoneme i // optional variant of [I] for end of words - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 140 - formants vowel/ii_final - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_final) endphoneme phoneme 0 - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 140 - formants vowel/0_3 - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/0_3) endphoneme phoneme V - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 140 - formants vowel/V_3 -// formants vwl_af/a - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/V_3) endphoneme phoneme U - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/o-_3 + FMT(vowel/o-_3) endphoneme phoneme a2 - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ unstressed length 150 - formants vowel/@_low - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/@_low) endphoneme phoneme A: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 240 - formants vwl_en_rp/aa - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en_rp/aa) endphoneme phoneme A@ - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 240 - formants vwl_en_rp/aa - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en_rp/aa) endphoneme phoneme aa // 'bath' etc. - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 200 - formants vwl_en_rp/aa - linkout r- + FMT(vwl_en_rp/aa) endphoneme phoneme 3: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 210 - formants vowel/3_3 - reduceto @ 0 - linkout r- + ChangeIfDiminished(@) + IfNextVowelAppend(r-) + FMT(vowel/3_3) endphoneme phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 175 - formants vowel/i - after w w/wi2 - linkout ; + IfNextVowelAppend(;) + IF prevPh(w) THEN + VowelStart(w/wi2) + ENDIF + FMT(vowel/i) endphoneme phoneme O: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 230 - formants vowel/oo_1 - reduceto @ 0 - linkout r- + ChangeIfDiminished(@) + IfNextVowelAppend(r-) + FMT(vowel/oo_1) endphoneme phoneme O@ - vowel starttype (o) endtype (@) + vowel starttype #o endtype #@ length 230 - formants vowel/oo_1 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/oo_1) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/oo_en - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/oo_en) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 190 - formants vowel/u_fnt + FMT(vowel/u_fnt) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 230 - formants vdiph/au_3 + FMT(vdiph/au_3) endphoneme phoneme oU - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 220 - formants vdiph/@u_2 + FMT(vdiph/@u_2) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 230 - formants vdiph/ai_6 + FMT(vdiph/ai_6) endphoneme phoneme eI - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 210 - formants vdiph2/ei_2 -// formants vdiph/eei_3 + FMT(vdiph2/ei_2) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 230 - formants vdiph/ooi_3 + FMT(vdiph/ooi_3) endphoneme phoneme e@ - vowel starttype (e) endtype (@) + vowel starttype #e endtype #@ length 220 - formants vdiph2/ee@_2 - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/ee@_2) endphoneme phoneme i@ - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 240 - formants vwl_en_rp/i@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en_rp/i@) endphoneme phoneme U@ - vowel starttype (u) endtype (@) + vowel starttype #u endtype #@ length 230 - formants vowel/o_mid - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/o_mid) endphoneme phoneme aI@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 270 - formants vwl_en/aI@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en/aI@) endphoneme phoneme aU@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 270 - formants vwl_en_rp/aU@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en_rp/aU@) endphoneme diff --git a/phsource/ph_english_sc b/phsource/ph_english_sc index ac8dd36e..1412a287 100644 --- a/phsource/ph_english_sc +++ b/phsource/ph_english_sc @@ -6,320 +6,329 @@ phoneme @ // Schwa - vowel starttype (@) endtype (@) - formants vowel/@_3 + vowel starttype #@ endtype #@ unstressed - linkout r- length 140 + IfNextVowelAppend(r-) + FMT(vowel/@_3) endphoneme phoneme 3 // Schwa, used for rhotic schwa in American - vowel starttype (@) endtype (@) - formants vowel/V - before _ vowelr/V3_r + vowel starttype #@ endtype #@ unstressed - linkout r- - beforevowel @ 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 (@) - formants vowel/@_3 + vowel starttype #@ endtype #@ unstressed - beforevowel I2 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 (@) - formants vowel/@_3 + vowel starttype #@ endtype #@ unstressed - beforevowelpause U length 140 -endphoneme - - -phoneme @L - vowel starttype (@) endtype l - length 160 - formants vwl_en/@L - unstressed - before _ vwl_en/@L + IF nextPh(isVowel) OR nextPh(isPause) THEN + ChangePhoneme(U) + ENDIF + FMT(vowel/@_3) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 200 - formants vowel/a_3 - reduceto a/ 4 + ChangeIfDiminished(a2) + ChangeIfNotStressed(a/) + FMT(vowel/a_3) endphoneme + phoneme a/ - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 160 - formants vowel/a_3 - reduceto a2 0 + ChangeIfDiminished(a2) + FMT(vowel/a_3) endphoneme phoneme a2 - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ unstressed length 140 - formants vowel/a# - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/a#) endphoneme phoneme aa // 'bath' etc. - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 220 - formants vowel/a_3 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/a_3) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e_e - reduceto I 0 + ChangeIfDiminished(I2) + FMT(vowel/e_e) endphoneme phoneme I - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 110 - formants vowel/e# - before l/2 vowel/@_3-30+l/L2_@L + IF nextPh(l/2) THEN + VowelEnding(l/L2_@L, -30) + FMT(vowel/@_3) + ENDIF + FMT(vowel/e#) endphoneme + phoneme I2 - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ unstressed length 110 - formants vowel/e# + CALL I endphoneme phoneme i // optional variant of [I] for end of words - vowel starttype (i) endtype (e) + vowel starttype #i endtype #e length 150 - formants vowel/e_5 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/e_5) endphoneme phoneme 0 - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 200 - formants vowel/oo_2 - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/oo_2) endphoneme phoneme V - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 140 - formants vowel/V_4 - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/V_4) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/u#_4 + FMT(vowel/u#_4) endphoneme phoneme A: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 220 - formants vowel/a_3 - before r vowelr/aa_r+30 - linkout r- + 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 (@) + vowel starttype #a endtype #@ length 250 - formants vowelr/aa_r - appendph r + AppendPhoneme(r) + FMT(vowelr/aa_r) endphoneme phoneme 3: - vowel starttype (e) endtype (@) + vowel starttype #e endtype #@ length 210 - formants vdiph2/e@ - appendph r - reduceto VR 4 // also need "replace 02 3: VR" in voice file + ChangeIfNotStressed(VR) // also need "replace 02 3: VR" in voice file + AppendPhoneme(r) + FMT(vdiph2/e@) endphoneme phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 130 - formants vowel/i_5 - before v vowel/i_5+50 - before z vowel/i_5+50 - before D vowel/i_5+50 - before _ vowel/i_5+50 - after w w/wi2 - linkout ; + 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) + vowel starttype #o endtype #o length 200 - formants vowel/oo - before r vwl_en_us/or - reduceto @ 0 + ChangeIfDiminished(@) + IF nextPh(r) THEN + FMT(vwl_en_us/or) + ENDIF + FMT(vowel/oo) endphoneme phoneme O@ - vowel starttype (o) endtype (@) + vowel starttype #o endtype #@ length 230 - formants vowelr/oo_r - appendph r + AppendPhoneme(r) + FMT(vowelr/oo_r) endphoneme phoneme o@ - vowel starttype (o) endtype (@) + vowel starttype #o endtype #@ length 230 - formants vowelr/o_r - appendph r + AppendPhoneme(r) + FMT(vowelr/o_r) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/0_3 - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/0_3) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/u# - before v vowel/u#+40 - before z vowel/u#+40 - before D vowel/u#+40 - before _ vowel/u#_4+40 + 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) + vowel starttype #a endtype #u length 200 - formants vdiph/au# + FMT(vdiph/au#) endphoneme phoneme oU - vowel starttype (o) endtype (u) + vowel starttype #o endtype #u length 190 - formants vowel/o_3 - before l/2 vowel/o_3-60+l/L2_oL + FMT(vowel/o_3) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 190 - beforevowel aI2 -// formants vdiph/&i_2 - formants vdiph/ai_7 - before v vdiph/ai_7+50 - before z vdiph/ai_7+50 - before l/2 vwl_en/aI@_2+vwl_en/@L_2 + 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) + vowel starttype #a endtype #i length 240 - formants vdiph/ai_7 + FMT(vdiph/ai_7) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 190 - formants vowel/e_2 + FMT(vowel/e_2) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 210 - formants vdiph/0i_2 + FMT(vdiph/0i_2) endphoneme phoneme e@ - vowel starttype (e) endtype (@) + vowel starttype #e endtype #@ length 220 - formants vdiph2/e@ - appendph r + AppendPhoneme(r) + FMT(vdiph2/e@) endphoneme phoneme i@3 - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 220 - formants vowelr/i_r - appendph r + AppendPhoneme(r) + FMT(vowelr/i_r) endphoneme phoneme U@ - vowel starttype (u) endtype (@) + vowel starttype #u endtype #@ length 240 - formants vdiph2/u#@ - linkout r- -endphoneme - - -phoneme aI@ - vowel starttype (a) endtype (@) - length 270 - formants vwl_en/aI@ - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/u#@) endphoneme phoneme aU@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 270 - formants vwl_en/aU@ - linkout r- -endphoneme - - -phoneme @L - vowel starttype (o) endtype l - length 160 - formants vwl_en/@L_2 - unstressed - before _ vwl_en/@L_2 + IfNextVowelAppend(r-) + FMT(vwl_en/aU@) endphoneme phoneme aI@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 270 - formants vwl_en/aI@_2 - linkout r- + 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 @@ -331,20 +340,19 @@ endphoneme phoneme r/ // used for [r] when not preceding a vowel liquid - length 100 lengthmod 2 // - formants NULL + FMT(NULL) endphoneme phoneme r - liquid starttype #r endtype #r - length 100 + liquid rhotic lengthmod 7 - beforenotvowel r/ trill - formants r/r - after _ r/_r t r/tr p r/tr k r/tr - before _ r/r_ + + IF nextPh(isNotVowel) THEN + ChangePhoneme(r/) + ENDIF + CALL base/r endphoneme diff --git a/phsource/ph_english_us b/phsource/ph_english_us index c1c3c88b..1b0bc559 100644 --- a/phsource/ph_english_us +++ b/phsource/ph_english_us @@ -5,279 +5,284 @@ phoneme 3 // Schwa, used for rhotic schwa in American - vowel starttype (@) endtype (@) - formants vwl_en_us/3_us + vowel starttype #@ endtype #@ unstressed - linkout r- length 210 + IfNextVowelAppend(r-) + FMT(vwl_en_us/3_us) endphoneme phoneme @ // Schwa - vowel starttype (@) endtype (@) - formants vowel/@_4 + vowel starttype #@ endtype #@ unstressed - before_r 3 length 130 + IF nextPh(isRhotic) THEN + ChangePhoneme(3) + ENDIF + FMT(vowel/@_4) endphoneme phoneme @/ // Schwa, end of word - vowel starttype (@) endtype (@) - formants vowel/@_low2 + vowel starttype #@ endtype #@ unstressed length 130 + FMT(vowel/@_low2) endphoneme phoneme @2 // Schwa, changes to I before a vowel - vowel starttype (@) endtype (@) - formants vowel/@_low2 + vowel starttype #@ endtype #@ unstressed - beforevowel I2 length 120 + IF nextPh(isVowel) THEN + ChangePhoneme(I2) + ENDIF + FMT(vowel/@_low2) endphoneme phoneme @L - vowel starttype (@) endtype l - length 160 - formants vwl_en/@L + vowel starttype #@ endtype l unstressed - before _ vwl_en/@L + length 160 + FMT(vwl_en/@L) endphoneme phoneme a - vowel starttype (e) endtype (@) + vowel starttype #e endtype #@ length 210 - formants vwl_en_us/a - before n vnasal/ee_n2 - before N vnasal/ee_n2 - before m vnasal/ee_n2 - reduceto a2 0 + + ChangeIfDiminished(a2) + + IF nextPh(isNasal) THEN + FMT(vnasal/ee_n2) + ENDIF + FMT(vwl_en_us/a) endphoneme phoneme aa // 'bath' etc. - vowel starttype (a) endtype (@) - length 210 - formants vwl_en_us/a - linkout r- + import_phoneme en_us/a endphoneme phoneme a2 - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ unstressed length 150 - formants vowel/a#_3 - linkout r- + FMT(vowel/a#_3) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 195 - formants vwl_en_us/ee - reduceto I2 0 + ChangeIfDiminished(I2) + FMT(vwl_en_us/ee) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 160 - formants vowel/ii_4 - linkout ; - reduceto I2 0 + IfNextVowelAppend(;) + ChangeIfDiminished(I2) + FMT(vowel/ii_4) endphoneme phoneme I2 - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i unstressed length 160 - formants vowel/ii#_3 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii#_3) endphoneme phoneme i // optional variant of [I] for end of words - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i unstressed length 170 - formants vowel/ii_final - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_final) endphoneme phoneme 0 - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 200 - formants vowel/aa_8 - before r vwl_en_us/oor - reduceto @ 0 + ChangeIfDiminished(@) + IF nextPh(r) THEN + FMT(vwl_en_us/oor) + ENDIF + FMT(vowel/aa_8) endphoneme phoneme V - vowel starttype (a) endtype (@) - length 180 - formants vowel/V_6 - reduceto @ 0 + vowel starttype #a endtype #@ + length 170 + ChangeIfDiminished(@) + FMT(vowel/V_6) endphoneme phoneme U - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 145 - formants vowel/8_2 + FMT(vowel/8_2) endphoneme phoneme A: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 210 - formants vowel/aa_8 - before r vwl_en_us/ar - linkout r- + IF nextPh(r) THEN + FMT(vwl_en_us/ar) + ENDIF + FMT(vowel/aa_8) endphoneme phoneme A@ // Used for [A:] when followed by 'r', becomes [A:]+[r] in American - vowel starttype (a) endtype (@) + vowel starttype #a endtype #a length 260 - formants vwl_en_us/ar - appendph r + IfNextVowelAppend(r-) + FMT(vwl_en_us/ar) endphoneme phoneme 3: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 240 - formants vwl_en_us/3_us2 - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en_us/3_us2) endphoneme phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 170 - formants vowel/i_en - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_en) endphoneme phoneme O: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 210 - formants vowel/0_3 - before r vwl_en_us/oor - reduceto @ 0 + ChangeIfDiminished(@) + IF nextPh(r) THEN + FMT(vwl_en_us/oor) + ENDIF + FMT(vowel/0_3) endphoneme phoneme O@ - vowel starttype (o) endtype (@) + vowel starttype #o endtype #@ length 250 - formants vwl_en_us/oor -// formants vwl_en_us/or - appendph r + IfNextVowelAppend(r) + FMT(vwl_en_us/oor) endphoneme phoneme o@ - vowel starttype (o) endtype (@) + vowel starttype #o endtype #@ length 250 - formants vwl_en_us/or - appendph r + IfNextVowelAppend(r) + FMT(vwl_en_us/or) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 200 - formants vowel/aa# - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/aa#) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 190 - formants vdiph2/uw + FMT(vdiph2/uw) endphoneme phoneme aU - vowel starttype (a) endtype (o) + vowel starttype #a endtype #o length 235 - formants vdiph/aoo + FMT(vdiph/aoo) endphoneme phoneme oU - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 230 - formants vdiph/8u + FMT(vdiph/8u) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 250 - formants vdiph/aae + FMT(vdiph/aae) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 230 - formants vdiph2/ei_4 + FMT(vdiph2/ei_4) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 285 - formants vdiph/ooi_4 + FMT(vdiph/ooi_4) endphoneme phoneme e@ - vowel starttype (e) endtype (@) + vowel starttype #e endtype #@ length 280 - formants vwl_en_us/er - appendph r + IfNextVowelAppend(r) + FMT(vwl_en_us/er) endphoneme phoneme i@3 - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 280 - formants vwl_en_us/ir - appendph r + IfNextVowelAppend(r) + FMT(vwl_en_us/ir) endphoneme phoneme U@ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 250 - formants vwl_en_us/ur - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en_us/ur) endphoneme phoneme aI@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 300 - formants vwl_en_us/ai@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en_us/ai@) endphoneme phoneme aU@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 300 - formants vwl_en_us/aU@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en_us/aU@) endphoneme @@ -287,9 +292,32 @@ endphoneme phoneme r/ // used for [r] when not preceding a vowel liquid - length 100 lengthmod 2 // - formants NULL +// formants NULL endphoneme +phoneme t + vls alv stop + voicingswitch d + lengthmod 2 + + IF prevPh(isVowel) OR prevPh(n) THEN + IF nextPh(isVowel) AND nextPh(isUnstressed) AND thisPh(notWordStart) AND nextPh(notWordStart) THEN + ChangePhoneme(t#) + ENDIF + ENDIF + + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + + IF nextPh(isPause2) THEN + WAV(ustop/t_) + ELIF nextPh(r) OR nextPh(R) OR nextPh(R2) THEN + WAV(ustop/tr) + ELIF nextPh(@-) THEN + WAV(ustop/t_dnt, 50) + ENDIF + WAV(ustop/t, 90) +endphoneme + diff --git a/phsource/ph_english_wi b/phsource/ph_english_wi index 9071e2cb..a93cfc71 100644 --- a/phsource/ph_english_wi +++ b/phsource/ph_english_wi @@ -5,226 +5,222 @@ //******************************************************************* phoneme @ // Schwa - vowel starttype (@) endtype (@) - formants vowel/@_fnt + vowel starttype #@ endtype #@ unstressed - linkout r- length 140 + IfNextVowelAppend(r-) + FMT(vowel/@_fnt) endphoneme + phoneme @2 // Schwa, changes to I before a vowel - vowel starttype (@) endtype (@) - formants vowel/@_fnt + vowel starttype #@ endtype #@ unstressed - beforevowel I2 length 120 + IF nextPh(isVowel) THEN + ChangePhoneme(I2) + ENDIF + FMT(vowel/@_fnt) endphoneme - phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 160 - formants vowel/a_2 + FMT(vowel/a_2) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e - reduceto I 0 + ChangeIfDiminished(I2) + FMT(vowel/e) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 140 - formants vowel/ii_6 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_6) endphoneme + phoneme I2 - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i unstressed length 140 - formants vowel/ii_6 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_6) endphoneme phoneme i // optional variant of [I] for end of words - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/i - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i) endphoneme phoneme 0 - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 140 - formants vowel/aa# + FMT(vowel/aa#) endphoneme phoneme V - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 140 - formants vowel/oo_4 + FMT(vowel/oo_4) endphoneme phoneme U - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/uu_bck + FMT(vowel/uu_bck) endphoneme - phoneme a2 - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ unstressed length 140 - formants vowel/a# - linkout r- + FMT(vowel/a#) endphoneme phoneme A: - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 240 - formants vowel/a_2 + FMT(vowel/a_2) endphoneme phoneme A@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 260 - formants vowel/a_2 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/a_2) endphoneme phoneme aa // 'bath' etc. - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 210 - formants vowel/a_2 + FMT(vowel/a_2) endphoneme phoneme 3: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 240 - formants vowel/oo_4 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/oo_4) endphoneme phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 190 - formants vowel/i_fnt - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_fnt) endphoneme phoneme O: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 240 - formants vowel/oo + FMT(vowel/oo) endphoneme phoneme O@ - vowel starttype (o) endtype (@) + vowel starttype #o endtype #@ length 240 - formants vowel/oo - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/oo) endphoneme phoneme o@ - vowel starttype (o) endtype (@) + vowel starttype #o endtype #@ length 240 - formants vdiph2/o_oo - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/o_oo) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/oo + FMT(vowel/oo) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 190 - formants vowel/u + FMT(vowel/u) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 230 - formants vdiph/aau_2 + FMT(vdiph/aau_2) endphoneme phoneme oU - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 230 - formants vowel/o + FMT(vowel/o) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 230 - formants vdiph/ai + FMT(vdiph/ai) endphoneme phoneme eI - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 210 - formants vowel/e + FMT(vowel/e) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 230 - formants vdiph/0i_2 + FMT(vdiph/0i_2) endphoneme phoneme e@ - vowel starttype (e) endtype (@) + vowel starttype #e endtype #@ length 220 - formants vdiph2/e@ - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/e@) endphoneme phoneme i@ - vowel starttype (i) endtype (a) + vowel starttype #i endtype #a length 240 - formants vdiph2/ie - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/ie) endphoneme phoneme l - liquid - length 100 - lengthmod 7 - beforenotvowel l/ // use 'clear' [l] after a vowel - formants l/l - after _ l/_l t l/tl + import_phoneme base/l // use clear [l] before not-vowel endphoneme diff --git a/phsource/ph_english_wm b/phsource/ph_english_wm index b0977bc4..366a2d50 100644 --- a/phsource/ph_english_wm +++ b/phsource/ph_english_wm @@ -1,255 +1,238 @@ phoneme N vcd vel nasal - vowelout f1=3 f2=2300 300 400 f3=-200 80 len=40 rms=20 brk - length 100 - formants NULL - after _ nn/_nn - before _ nn/nn_ lengthmod 8 // longer than 'n' - linkout g- + IfNextVowelAppend(g-) + CALL base/N endphoneme + //******************************************************************* // VOWELS //******************************************************************* -phoneme @L - vowel starttype (@) endtype l - length 160 - formants vwl_en/@L - unstressed - before _ vwl_en/@L -endphoneme - phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 170 - formants vowel/a - reduceto a2 0 + ChangeIfDiminished(a2) + FMT(vowel/a) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 150 - formants vowel/e -// formants vowel/ee_1 - reduceto I 0 + ChangeIfDiminished(I2) + FMT(vowel/e) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 140 - formants vowel/ii_6 - before l vowel/ii - linkout ; + IfNextVowelAppend(;) + IF nextPh(l) OR nextPh(l/2) THEN + FMT(vowel/ii) + ENDIF + FMT(vowel/ii_6) endphoneme phoneme I2 - vowel starttype (i) endtype (i) + import_phoneme I unstressed - length 140 - formants vowel/ii_6 - before l vowel/ii - linkout ; endphoneme phoneme i // optional variant of [I] for end of words - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 220 - formants vowel/i - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i) endphoneme phoneme 0 - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 140 - formants vowel/oo_4 - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/oo_4) endphoneme phoneme V - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 140 - formants vowel/o-_2 - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/o-_2) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 150 - formants vowel/uu - linkout _| + IfNextVowelAppend(_|) + FMT(vowel/uu) endphoneme phoneme a2 - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ unstressed length 140 - formants vowel/a#_3 -// linkout r- + FMT(vowel/a#_3) endphoneme phoneme A: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 240 - formants vowel/aa_5 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/aa_5) endphoneme phoneme A@ - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 240 - formants vowel/aa_5 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/aa_5) endphoneme phoneme aa // 'bath' etc. - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 150 - formants vowel/a - linkout r- + FMT(vowel/a) endphoneme phoneme 3: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 250 - formants vowel/y# - reduceto @ 0 - linkout r- + ChangeIfDiminished(@) + IfNextVowelAppend(r-) + FMT(vowel/y#) endphoneme phoneme i: - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 220 - formants vdiph2/ei_3 -// after w w/wi2 - linkout ; + IfNextVowelAppend(;) + FMT(vdiph2/ei_3) endphoneme phoneme O: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 240 - formants vowel/oo_1 - reduceto @ 0 - linkout r- + ChangeIfDiminished(@) + IfNextVowelAppend(r-) + FMT(vowel/oo_1) endphoneme phoneme O@ - vowel starttype (o) endtype (@) + vowel starttype #o endtype #@ length 240 - formants vowel/oo_1 - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/oo_1) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/oo_1 - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/oo_1) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 200 - formants vdiph/@u + FMT(vdiph/@u) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 230 - formants vdiph/eeu_3 + FMT(vdiph/eeu_3) endphoneme phoneme oU - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 220 - formants vdiph/Vu_2 + FMT(vdiph/Vu_2) endphoneme phoneme aI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 240 - formants vdiph/ooi_3 + FMT(vdiph/ooi_3) endphoneme phoneme eI - vowel starttype (@) endtype (i) + vowel starttype #@ endtype #i length 240 - formants vdiph/@i_3 + FMT(vdiph/@i_3) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 230 - formants vdiph/oi + FMT(vdiph/oi) endphoneme phoneme e@ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 240 - formants vowel/3_en - linkout r- + IfNextVowelAppend(r-) + FMT(vowel/3_en) endphoneme phoneme i@ - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 240 - formants vdiph2/i@_2 - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/i@_2) endphoneme phoneme U@ - vowel starttype (u) endtype (@) + vowel starttype #u endtype #@ length 200 - formants vdiph2/uu@ - linkout r- + IfNextVowelAppend(r-) + FMT(vdiph2/uu@) endphoneme phoneme aI@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 270 - formants vwl_en/ooi@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en/ooi@) endphoneme phoneme aU@ - vowel starttype (a) endtype (@) + vowel starttype #a endtype #@ length 270 - formants vwl_en/aU@ - linkout r- + IfNextVowelAppend(r-) + FMT(vwl_en/aU@) endphoneme diff --git a/phsource/ph_esperanto b/phsource/ph_esperanto index c7c45be8..b0607a1d 100644 --- a/phsource/ph_esperanto +++ b/phsource/ph_esperanto @@ -5,95 +5,89 @@ phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 180 - formants vowel/a_2 + FMT(vowel/a_2) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e + FMT(vowel/e) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 170 - formants vowel/i - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/oo + FMT(vowel/oo) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 170 - formants vowel/u + FMT(vowel/u) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 250 - formants vdiph/au_4 + FMT(vdiph/au_4) endphoneme phoneme eU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 250 - formants vdiph/eu + FMT(vdiph/eu) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 250 - formants vdiph/ai + FMT(vdiph/ai) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 250 - formants vdiph/eei_2 + FMT(vdiph/eei_2) endphoneme phoneme oI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 250 - formants vdiph/ooi + FMT(vdiph/ooi) endphoneme phoneme uI - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 250 - formants vdiph/ui + FMT(vdiph/ui) endphoneme + // CONSONANTS //=========== - - phoneme ts - vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/ts - before _ ustop/ts_ + import_phoneme consonants/ts endphoneme diff --git a/phsource/ph_finnish b/phsource/ph_finnish index 0b5a03ff..c9aad720 100644 --- a/phsource/ph_finnish +++ b/phsource/ph_finnish @@ -11,87 +11,87 @@ endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 140 - formants vowel/i_4 - linkout ; - reduceto I 1 + IfNextVowelAppend(;) + ChangeIfUnstressed(I) + FMT(vowel/i_4) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 140 - formants vowel/ii_3 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_3) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 150 - formants vowel/e_mid2 + FMT(vowel/e_mid2) endphoneme phoneme & - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 150 - formants vowel/& + FMT(vowel/&) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 170 - formants vowel/aa_9 -// reduceto a2 1 +// ChangeIfUnstressed(a2) + FMT(vowel/aa_9) endphoneme phoneme a2 - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 170 - formants vowel/aa# + FMT(vowel/aa#) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 155 - formants vowel/oo_1 + FMT(vowel/oo_1) endphoneme phoneme Y - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 155 - formants vowel/y# + FMT(vowel/y#) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme u1 // TEST - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/u_2 + FMT(vowel/u_2) endphoneme phoneme U // TEST - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/uu_4 + FMT(vowel/uu_4) endphoneme phoneme y - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 150 - formants vowel/y + FMT(vowel/y) endphoneme @@ -101,132 +101,132 @@ endphoneme //=========== phoneme ai - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 310 long - formants vdiph/aai_3 + FMT(vdiph/aai_3) endphoneme phoneme &i - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 290 long - formants vdiph/&i + FMT(vdiph/&i) endphoneme phoneme oi - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 280 long - formants vdiph/ooi + FMT(vdiph/ooi) endphoneme phoneme ei - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 280 long - formants vdiph/eei_2 + FMT(vdiph/eei_2) endphoneme phoneme Yi - vowel starttype (@) endtype (i) + vowel starttype #@ endtype #i length 270 long - formants vdiph/y#i + FMT(vdiph/y#i) endphoneme phoneme ui - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 270 long - formants vdiph/ui_4 + FMT(vdiph/ui_4) endphoneme phoneme yi - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 270 long - formants vdiph/yi + FMT(vdiph/yi) endphoneme phoneme au - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 300 long - formants vdiph/aau + FMT(vdiph/aau) endphoneme phoneme ou - vowel starttype (o) endtype (u) + vowel starttype #o endtype #u length 280 long - formants vdiph/ou + FMT(vdiph/ou) endphoneme phoneme eu - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 280 long - formants vdiph/eu_2 + FMT(vdiph/eu_2) endphoneme phoneme iu - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 280 long - formants vdiph2/iu_2 + FMT(vdiph2/iu_2) endphoneme phoneme &y - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 280 long - formants vdiph/&y + FMT(vdiph/&y) endphoneme phoneme ey - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 280 long - formants vdiph/eey + FMT(vdiph/eey) endphoneme phoneme Yy - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 270 long - formants vdiph/y#y + FMT(vdiph/y#y) endphoneme phoneme iy - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 260 long - formants vdiph2/iy + FMT(vdiph2/iy) endphoneme phoneme uo - vowel starttype (u) endtype (o) + vowel starttype #u endtype #o length 280 long - formants vdiph2/uo + FMT(vdiph2/uo) endphoneme phoneme ie - vowel starttype (i) endtype (e) + vowel starttype #i endtype #e length 280 long - formants vdiph2/ie + FMT(vdiph2/ie) endphoneme phoneme yY - vowel starttype (u) endtype (@) + vowel starttype #u endtype #@ length 280 long - formants vdiph2/y-y# + FMT(vdiph2/y-y#) endphoneme @@ -236,109 +236,97 @@ endphoneme //=========== -phoneme r // this is [R2] but shorter + +phoneme R2 // this is [R2], but shorter liquid - vowelin f1=0 f2=1700 -300 300 f3=-300 80 - vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk - formants r3/r_trill_short+r3/r_trill.wav%50 trill 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_short) addWav(r3/r_trill.wav, 50) endphoneme + phoneme v // approximant, not fricative vcd lbd frc - vowelin f1=0 f2=1000 -300 -200 f3=-300 100 - vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50 lengthmod 6 - formants voc/v - before _ voc/v_ - switchvoicing f + voicingswitch f + Vowelin f1=0 f2=1000 -300 -200 f3=-300 100 + Vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50 + IF nextPh(isPause2) THEN + FMT(voc/v_) + ENDIF + FMT(voc/v) endphoneme phoneme t // dental variant of /t/ - vls dnt stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/t_dnt%50 - before _ ustop/t_dnt%35 - switchvoicing d + import_phoneme base/t[ + voicingswitch d endphoneme -phoneme d // (weak) dental variant of /d/ +phoneme d vcd dnt stop - vowelin f1=2 f2=1700 -100 200 f3=0 80 - vowelout f1=2 f2=1700 -100 200 f3=0 80 rms=20 -// vowelin f1=2 f2=2095 100 200 f3=100 80 -// vowelout f1=2 f2=3000 100 200 f3=100 80 rms=20 len=1 - formants d/d+x/d_dnt%60 - before _ d/d_+x/d_ - before r d/dr+x/d_dnt%60 - after _ NULL - after @ d/xd + voicingswitch t lengthmod 5 - switchvoicing t + Vowelin f1=2 f2=1700 -100 200 f3=0 80 + Vowelout f1=2 f2=1700 -100 200 f3=0 80 rms=20 + + IF PreVoicing THEN + FMT(d/xd) + ENDIF + + IF nextPh(isPause2) THEN + FMT(d/d_) addWav(x/d_) + ELIF nextPh(r) THEN + FMT(d/dr) addWav(x/d_dnt, 60) + ENDIF + + FMT(d/d) addWav(x/d_dnt, 60) endphoneme phoneme p - vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 - lengthmod 2 - wave ustop/p_unasp - before _ ustop/p_unasp_%80 - before r ustop/pr - before l ustop/pl - switchvoicing b + import_phoneme base2/p + voicingswitch b endphoneme phoneme k - vls vel stop - vowelin f1=0 f2=2300 200 400 f3=-100 80 - vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/k_unasp%60 // weaker - before _ ustop/k_ - before r ustop/kr - before l ustop/kl - before (i) ustop/ki - switchvoicing g + import_phoneme base2/k + voicingswitch g endphoneme -phoneme s2 - vls alv frc sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 3 - wave ufric/s_continue - before _ ufric/s_ - before p ufric/s! - before t ufric/s! - before k ufric/s! - switchvoicing z +phoneme s2 // second part of long [s] + import_phoneme consonants/s2 endphoneme phoneme h vls glt apr - length 100 lengthmod 3 - wave h/h_%70 // no vowel following - before (@) h/h@ - before (a) h/ha - before (e) h/he - before (i) h/hi - before (o) h/hu_fi%70 - before (u) h/hu_fi%80 + + IF nextPh(#@) THEN + WAV(h/h@) + ELIF nextPh(#a) THEN + WAV(h/ha) + ELIF nextPh(#e) THEN + WAV(h/he) + ELIF nextPh(#i) THEN + WAV(h/hi) + ELIF nextPh(#o) THEN + WAV(h/hu_fi, 70) + ELIF nextPh(#u) THEN + WAV(h/hu_fi, 80) + ENDIF + WAV(h/h_, 70) // no vowel following endphoneme + diff --git a/phsource/ph_french b/phsource/ph_french index 655c9dd4..cf20ace6 100644 --- a/phsource/ph_french +++ b/phsource/ph_french @@ -3,299 +3,462 @@ //==================================================== // Updated 2009-10-13 Michel Such -phoneme (l) virtual +phoneme #l virtual // Used for l and l/ endphoneme +phoneme #r virtual +// Used for r and r/2 +endphoneme + phoneme : // Lengthen previous vowel by "length" virtual length 40 // shorter than for fr-ca endphoneme + +phoneme r + liquid rhotic uvl + lengthmod 7 + starttype #r endtype #r + + IF nextPh(isNotVowel) THEN + ChangePhoneme(r/2) + ENDIF + + VowelEnding(vwl_fr/xr) + + NextVowelStarts + VowelStart(vwl_fr/r@) + VowelStart(vwl_fr/ra) + VowelStart(vwl_fr/re) + VowelStart(vwl_fr/ri) + VowelStart(vwl_fr/ro) + VowelStart(vwl_fr/ru) + EndSwitch + + IF prevPh(isPause) OR prevPhW(r/2) THEN + FMT(vwl_fr/_r) + ELIF prevPhW(p) OR prevPhW(k) THEN + FMT(vwl_fr/tr) + ELIF prevPhW(t) THEN + FMT(vwl_fr/tr) addWav(r3/r_uvl,30) + ENDIF + + IF thisPh(isWordStart) THEN + IF prevPh(isVowel) OR prevPh(isPause) OR prevPh(#l) OR prevPh(r/2) THEN + FMT(vwl_fr/_r) + ENDIF + FMT(vwl_fr/_r2) addWav(r3/r_uvl, 25) + ENDIF + + FMT(vwl_fr/r) addWav(r3/r_uvl,25) +endphoneme + + +phoneme R // First letter of a word + import_phoneme fr/r + lengthmod 0 +endphoneme + + +phoneme r2 // silent unless followed by vowel + liquid rhotic uvl + starttype #r endtype #r + lengthmod 7 + Vowelin f1=0 f2=1600 -300 300 f3=-200 80 + Vowelout f1=2 f2=1600 -300 300 f3=-300 80 + + IF nextPh(isNotVowel) THEN + ChangePhoneme(NULL) + ENDIF + FMT(vwl_fr/r) +endphoneme + + + +phoneme r/2 // variant of [r] when not preceding a vowel + liquid uvl + starttype #r endtype #r + Vowelout f1=2 f2=1600 -300 300 f3=-300 100 + lengthmod 2 + + PrevVowelEndings + VowelEnding(vwl_fr/r_@) + VowelEnding(vwl_fr/r_a) + VowelEnding(vwl_fr/r_e) + VowelEnding(vwl_fr/r_i) + VowelEnding(vwl_fr/r_o) + VowelEnding(vwl_fr/r_u) + EndSwitch + + IF prevPh(isVowel) THEN + FMT(vwl_fr/r_) addWav(r3/r_uvl, 30) + ELIF prevPh(m) OR prevPh(n) THEN + FMT(r3/r_n) + ENDIF + + FMT(vwl_fr/r_) +endphoneme + + +phoneme l + liquid + lengthmod 7 + + IF nextPh(isNotVowel) THEN + ChangePhoneme(l/) + ENDIF + + NextVowelStarts + VowelStart(l/l@) + VowelStart(l/la, -10) + VowelStart(l/le, -15) + VowelStart(l/li, -15) + VowelStart(l/lo, -10) + VowelStart(l/lu, -20) + EndSwitch + + IF prevPh(#@) THEN + VowelEnding(l/xl, -50) + ELIF prevPh(isVowel) THEN + VowelEnding(l/xl, -40) + ENDIF + + IF prevPh(isPause) THEN + FMT(l/_l) + ENDIF + IF prevPh(r/2) 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/ // used for [l] when not before a vowel + liquid + lengthmod 7 + + IF nextPh(isVowel) THEN + ChangePhoneme(l) + ENDIF + + PrevVowelEndings + VowelEnding(l/l_@) + VowelEnding(l/l_a) + VowelEnding(l/l_e) + VowelEnding(l/l_i) + VowelEnding(l/l_o) + VowelEnding(l/l_u, -20) + EndSwitch + + IF prevPh(i) THEN + FMT(l/l_) + ENDIF + FMT(l/_l) +endphoneme + + // Vowels //======= phoneme @ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 170 - formants vowel/@_hgh - after (r) vwl_fr/r@ - before l/ DFT+l/l_@ - before (r) DFT+vwl_fr/xr + FMT(vowel/@_hgh) endphoneme phoneme @2 - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 160 - formants vowel/@_fr - after (r) vwl_fr/r@ - before (r) DFT+vwl_fr/xr + FMT(vowel/@_fr) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 170 - formants vowel/a_6 - after l l/la-15 - after (r) vwl_fr/ra - before l/ DFT+l/l_a - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_a + + IF prevPh(l) THEN + VowelStart(l/la, -15) + ENDIF + + FMT(vowel/a_6) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e_8 - after (l) l/le-15 - after (r) vwl_fr/re - before l/ DFT-20+l/xl - before (r) DFT+vwl_fr/xr + + IF nextPh(l/) THEN + VowelEnding(l/xl, -20) + ENDIF + + FMT(vowel/e_8) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e_mid - after (l) l/le-15 - after (r) vwl_fr/re - before l/ DFT+l/l_e - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_e + + FMT(vowel/e_mid) endphoneme phoneme E2 // Between e and E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e_9 - after (l) l/le-15 - after (r) vwl_fr/re - before l/ DFT+l/l_e - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_e + + FMT(vowel/e_9) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 160 - formants vowel/i_2 - linkout ; - after (l) l/li-15 - after (r) vwl_fr/ri-30 - before l/ DFT+l/l_i - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_i + + IfNextVowelAppend(;) + + IF prevPh(#r) THEN + VowelStart(vwl_fr/ri, -30) + ENDIF + + FMT(vowel/i_2) endphoneme phoneme i- // shorter - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 110 - formants vowel/i_2 - after (l) l/li-15 - after (r) vwl_fr/ri + + FMT(vowel/i_2) endphoneme phoneme i: // longer than i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 240 - formants vowel/i_3 - linkout ; - after (l) l/li-15 - after (r) vwl_fr/ri - before l/ DFT+l/l_i - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_i + + IfNextVowelAppend(;) + + FMT(vowel/i_3) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/o_8 - after (l) l/lo-10 - after (r) vwl_fr/ro - before l/ DFT+l/l_o - before (r) DFT+vwl_fr/xr - before r/2 vowel/o_mid2+vwl_fr/r_o - reduceto o2 1 + + ChangeIfUnstressed(o2) + + IF nextPh(r/2) THEN + VowelEnding(vwl_fr/r_o) + FMT(vowel/o_mid2) + ENDIF + + FMT(vowel/o_8) endphoneme phoneme o2 - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/o - after (l) l/lo-10 - after (r) vwl_fr/ro - before l/ vowel/o_mid2+l/l_o - before (r) DFT+vwl_fr/xr - before r/2 vowel/o_mid2+vwl_fr/r_o + + IF nextPh(r/2) THEN + VowelEnding(vwl_fr/r_o) + FMT(vowel/o_mid2) + ENDIF + IF nextPh(l/) THEN + VowelEnding(l/l_o) + FMT(vowel/o_mid2) + ENDIF + + FMT(vowel/o) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/o_mid2 - after (l) l/lo-10 - after (r) vwl_fr/ro - before l/ DFT+l/l_o - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_o - reduceto o2 1 + + ChangeIfUnstressed(o2) + + FMT(vowel/o_mid2) endphoneme phoneme O2 // Like O but no reduceto - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/o_mid2 - after (l) l/lo-10 - after (r) vwl_fr/ro - before l/ DFT+l/l_o - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_o + FMT(vowel/o_mid2) endphoneme phoneme o3 // almost like english oU - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 220 - formants vdiph/@u_3 + FMT(vdiph/@u_3) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 170 - formants vowel/u_bck2 - after l l/lu-20 - after (r) vwl_fr/ru - after R vwl_fr/ru-10 - before l/ DFT-20+l/l_u - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_u - before i DFT-50 + + IF nextPh(i) THEN + Length 50 + ENDIF + + IF prevPh(R) THEN + VowelStart(vwl_fr/ru, -10) + ENDIF + + FMT(vowel/u_bck2) endphoneme phoneme u: // slitely longer than u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 240 - formants vowel/u_bck2 - after l l/lu-20 - after (r) vwl_fr/ru - before l/ DFT-20+l/l_u + FMT(vowel/u_bck2) endphoneme phoneme y - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 170 - formants vowel/y_2 - after l l/lu-20 - after (r) vwl_fr/ry - before l/ DFT-30+l/l_y - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_y - before E~ DFT-50 + + IF prevPh(#r) THEN + VowelStart(vwl_fr/ry) + ENDIF + + IF nextPh(l/) THEN + VowelEnding(l/l_y, -30) + ENDIF + IF nextPh(r/2) THEN + VowelEnding(vwl_fr/r_y) + ENDIF + IF nextPh(E~) THEN + Length 120 + ENDIF + + FMT(vowel/y_2) endphoneme phoneme Y - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 170 - formants vowel/y# - after (l) l/l@-20 - after (r) vwl_fr/r@ - before l/ DFT-20+l/l_@ - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_@ - reduceto W 1 + + ChangeIfUnstressed(W) + + IF prevPh(l) THEN + VowelStart(l/l@, -20) + ENDIF + + IF nextPh(l/) THEN + VowelEnding(l/l_@, -20) + ENDIF + + FMT(vowel/y#) endphoneme phoneme W - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vowel/@ - after (l) l/l@-20 - after (r) vwl_fr/r@ - before l/ DFT-20+l/l_@ - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_@ + + IF prevPh(l) THEN + VowelStart(l/l@, -20) + ENDIF + + IF nextPh(l/) THEN + VowelEnding(l/l_@, -20) + ENDIF + + FMT(vowel/@) endphoneme phoneme wA - vowel starttype (o) endtype (a) + vowel starttype #o endtype #a length 220 - formants vwl_fr/w_a - after (l) l/lo-10 - after (r) vwl_fr/ro - before l/ DFT-10+l/l_a - before j DFT - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_a + + IF nextPh(l/) THEN + VowelEnding(l/l_a) + ENDIF + IF nextPh(j) THEN + VowelEnding(NULL) + ENDIF + + FMT(vwl_fr/w_a) endphoneme phoneme w^i - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 240 - formants vdiph/yi_fr - after l l/lu-20 - after (r) vwl_fr/ry - before l/ DFT+l/l_i - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_i + + IF prevPh(l) THEN + VowelStart(l/lu, -20) + ENDIF + IF prevPh(#r) THEN + VowelStart(vwl_fr/ry) + ENDIF + + FMT(vdiph/yi_fr) endphoneme phoneme A~ - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 190 - formants vnasal/aa_n4 - after (r) vwl_fr/rA~ - before l/ DFT+l/l_a - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_a~ + + IF prevPh(#r) THEN + VowelStart(vwl_fr/rA~) + ENDIF + IF nextPh(r/2) THEN + VowelEnding(vwl_fr/r_a~) + ENDIF + + FMT(vnasal/aa_n4) endphoneme -phoneme E~ // same as W~ for fr-fr - vowel starttype (e) endtype (e) +phoneme E~ // same as W~ for fr-fr + vowel starttype #e endtype #e length 190 - formants vnasal/W_n - after (r) vwl_fr/r@ - before n2 vowel/e_mid - before (r) DFT+vwl_fr/xr + + IF nextPh(n2) THEN + FMT(vowel/e_mid) + ENDIF + FMT(vnasal/W_n) endphoneme phoneme O~ - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 190 - formants vnasal/o_n2 - after (r) vwl_fr/ro - before (r) DFT+vwl_fr/xr + FMT(vnasal/o_n2) endphoneme phoneme W~ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 190 - formants vnasal/W_n - after (r) vwl_fr/r@ - before (r) DFT+vwl_fr/xr + FMT(vnasal/W_n) endphoneme @@ -303,39 +466,23 @@ endphoneme // These vowels map to others in fr-fr, but are distinct in fr-ca phoneme I // same as [i] - vowel starttype (i) endtype (i) - length 158 - formants vowel/i - linkout ; + import_phoneme fr/i endphoneme phoneme U // same as [u] - vowel starttype (u) endtype (u) - length 174 - formants vowel/u + import_phoneme fr/u endphoneme phoneme y" // same as [y] - vowel starttype (u) endtype (u) - length 148 - formants vowel/y_2 + import_phoneme fr/y endphoneme phoneme E: // slightly longer than [E] - vowel starttype (e) endtype (e) - length 212 - formants vowel/e_mid - after (l) l/le-15 - after (r) vwl_fr/re - before l/ DFT+l/l_e - before (r) DFT+vwl_fr/xr - before r/2 DFT+vwl_fr/r_e + import_phoneme E endphoneme phoneme A // same as [a] - vowel starttype (a) endtype (a) - length 166 - formants vowel/a_en + import_phoneme a endphoneme @@ -347,292 +494,261 @@ endphoneme phoneme b vcd blb stop - vowelout f1=2 f2=1000 -500 -300 f3=-300 80 brk - formants b/b+x/b%70 - before _ b/b_+x/b_ - before (l) b/b_+x/b_ - after _ NULL - after @ b/xb%50 + voicingswitch p lengthmod 5 - switchvoicing p + Vowelout f1=2 f2=1000 -500 -300 f3=-300 80 brk + + IF KlattSynth THEN + CALL base/b + RETURN + ENDIF + + IF PreVoicing THEN + FMT(b/xb, 50) + ENDIF + + IF nextPh(isPause2) OR nextPh(#l) THEN + FMT(b/b_) addWav(x/b_) + ENDIF + + FMT(b/b) addWav(x/b, 70) endphoneme + phoneme d vcd alv stop - vowelin f1=0 f2=1700 -300 300 f3=-100 80 amp=20 - vowelout f1=0 f2=1700 -300 300 f3=-100 80 - formants d/d+x/d%40 - before _ d/d_+x/d_%50 - before (r) d/dr+x/d%50 - before r/2 d/dr+x/d%50 - after _ d/d+x/d%50 - after (@) d/xd + voicingswitch t lengthmod 5 - switchvoicing t + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 amp=20 + Vowelout f1=0 f2=1700 -300 300 f3=-100 80 + + IF PreVoicing THEN + FMT(d/xd) + ENDIF + + IF nextPh(isPause2) THEN + FMT(d/d_) addWav(x/d_, 50) + ELIF nextPh(#r) THEN + FMT(d/dr) addWav(x/d, 50) + ELIF prevPh(isPause) THEN + FMT(d/d) addWav(x/d, 50) + ENDIF + + FMT(d/d) addWav(x/d, 40) endphoneme phoneme g vcd vel stop - vowelin f1=2 f2=2300 200 300 f3=-300 80 - vowelout f1=2 f2=2300 250 300 f3=-300 80 brk - formants g/g+x/g%20 - before _ g/g_+x/g_ -// before (r) g/g_+x/g_%25 - after _ NULL - after (@) g/xg%30 - after n g2/g+x/g2_ + voicingswitch k lengthmod 5 - switchvoicing k + Vowelin f1=2 f2=2300 200 300 f3=-300 80 + Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk + + IF PreVoicing THEN + FMT(g/xg) + ENDIF + + IF nextPh(isPause2) THEN + FMT(g/g_) addWav(x/g_) + ENDIF + + FMT(g/g) addWav(x/g, 20) endphoneme phoneme k vls vel stop - vowelin f1=0 f2=2300 200 400 f3=-100 80 - vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 + voicingswitch g lengthmod 2 - wave ustop/k%40 // reduce strength of noise burst - before _ ustop/k_ - before (r) ustop/k%50 - before r/2 ustop/k%60 - before (l) ustop/kl%45 - before (i) ustop/ki%45 - switchvoicing g + Vowelin f1=0 f2=2300 200 400 f3=-100 80 + Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 + + IF nextPh(isPause2) THEN + WAV(ustop/k_) + ELIF nextPh(#r) THEN + WAV(ustop/k, 50) + ELIF nextPh(#i) OR nextPh(;) THEN + WAV(ustop/ki, 45) + ELIF nextPh(#l) THEN + WAV(ustop/kl, 45) + ENDIF + + WAV(ustop/k, 40) endphoneme -phoneme l - liquid starttype (l) endtype (l) - vowelout f1=1 f2=1600 -300 300 f3=100 80 brk - length 100 - lengthmod 7 - beforenotvowel l/ - formants l/l - after _ l/_l - after r/2 l/_l - after t l/tl - after l/ l/l_long // double l, make it longer -endphoneme - - -phoneme l/ // used for [l] when not before a vowel - liquid palatal starttype (l) endtype (l) - length 100 - lengthmod 7 - formants l/_l - after (i) l/l_ - beforevowel l -endphoneme - phoneme n2 - beforenotvowel NULL vcd alv nasal - vowelout f1=2 f2=1700 -300 250 f3=-100 80 rms=20 brk - length 100 - lengthmod 4 - formants n/n_ - before _ n/n_ + IF nextPh(isNotVowel) THEN + ChangePhoneme(NULL) + ENDIF + ChangePhoneme(n) endphoneme phoneme p vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22 + voicingswitch b lengthmod 2 - wave ustop/p_unasp_%90 - after _ ustop/p%70 - before _ ustop/p_%70 -// before (r) ustop/pr%45 - before @- ustop/p_unasp%60 - before (l) ustop/pl%30 - switchvoicing b + Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11 + Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22 + + IF nextPh(isPause2) THEN + WAV(ustop/p_, 70) + ELIF nextPh(@-) THEN + WAV(ustop/p_unasp, 60) + ELIF nextPh(l) THEN + WAV(ustop/pl, 30) + ENDIF + WAV(ustop/p_unasp_, 90) endphoneme phoneme p2 // silent unless followed by vowel - beforenotvowel NULL vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22 lengthmod 2 - wave ustop/p%45 - before _ ustop/p_%45 -endphoneme + Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11 + Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22 + IF nextPh(isNotVowel) THEN + ChangePhoneme(NULL) + ENDIF -phoneme r - liquid uvl starttype (r) endtype (r) - vowelin f1=0 f2=1600 -300 300 f3=-200 80 len=20 - vowelout f1=2 f2=1600 -300 300 f3=-300 80 - length 100 - lengthmod 7 - beforenotvowel r/2 - formants vwl_fr/r+r3/r_uvl.wav%25 - after _ vwl_fr/_r - after k vwl_fr/tr - after p vwl_fr/tr - after t vwl_fr/tr+r3/r_uvl.wav%30 - after r/2 vwl_fr/_r -endphoneme - - -phoneme R // First letter of a word - liquid uvl starttype (r) endtype (r) - vowelin f1=0 f2=1600 -300 300 f3=-200 80 len=20 - vowelout f1=2 f2=1600 -300 300 f3=-300 80 - length 100 - lengthmod 0 - beforenotvowel r/2 - formants vwl_fr/_r2+r3/r_uvl.wav%25 - after _ vwl_fr/_r - after (a) vwl_fr/_r - after (e) vwl_fr/_r - after (@) vwl_fr/_r - after (i) vwl_fr/_r - after (o) vwl_fr/_r - after (u) vwl_fr/_r - after y vwl_fr/_r - after (l) vwl_fr/_r - after r/2 vwl_fr/_r -endphoneme - - -phoneme r2 // silent unless followed by vowel - liquid uvl starttype (r) endtype (r) - vowelin f1=0 f2=1600 -300 300 f3=-200 80 - vowelout f1=2 f2=1600 -300 300 f3=-300 80 - length 100 - lengthmod 7 - beforenotvowel NULL - formants vwl_fr/r -endphoneme - - -phoneme r/2 // variant of [r] when not preceding a vowel - liquid uvl starttype r/2 endtype r/2 - vowelout f1=2 f2=1600 -300 300 f3=-300 100 - length 100 - lengthmod 2 - formants vwl_fr/r_ - after (a) vwl_fr/r_+r3/r_uvl.wav%30 - after (e) vwl_fr/r_+r3/r_uvl.wav%30 - after (@) vwl_fr/r_+r3/r_uvl.wav%30 - after (i) vwl_fr/r_+r3/r_uvl.wav%30 - after (o) vwl_fr/r_+r3/r_uvl.wav%30 - after (u) vwl_fr/r_+r3/r_uvl.wav%30 - before m r3/r_n - before n r3/r_n + WAV(ustop/p, 45) endphoneme phoneme s vls alv frc sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + voicingswitch z lengthmod 3 - wave ufric/s%45 - before _ ufric/s_%45 - before p ufric/s!%45 - before t ufric/s!%45 - before k ufric/s!%45 - switchvoicing z + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + + IF nextPh(isPause) THEN + WAV(ufric/s_, 45) + ELIF nextPh(p) OR nextPh(t) OR nextPh(k) THEN + WAV(ufric/s!, 45) + ENDIF + WAV(ufric/s, 45) endphoneme phoneme S vls pla frc sibilant - vowelin f1=0 f2=1900 100 300 f3=-100 80 - vowelout f1=0 f2=1900 100 300 f3=-100 80 - length 100 + voicingswitch Z lengthmod 3 - wave ufric/sh%45 - before _ ufric/sh_%45 - switchvoicing Z + Vowelin f1=0 f2=1900 100 300 f3=-100 80 + Vowelout f1=0 f2=1900 100 300 f3=-100 80 + + IF nextPh(isPause) THEN + WAV(ufric/sh_, 45) + ENDIF + WAV(ufric/sh, 45) endphoneme + phoneme t vls alv stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 brk + voicingswitch d lengthmod 2 - wave ustop/t_short%40 - before _ ustop/t_%40 - before (r) ustop/t_short%40 - before r/2 ustop/t_short%50 - switchvoicing d + Vowelin f1=0 f2=1600 -300 300 f3=-100 80 + Vowelout f1=0 f2=1600 -300 250 f3=-100 80 brk + + IF nextPh(isPause2) THEN + WAV(ustop/t_, 40) + ELIF nextPh(r/2) THEN + WAV(ustop/t_short, 50) + ENDIF + WAV(ustop/t_short, 40) + endphoneme phoneme t2 // silent unless followed by vowel - beforenotvowel NULL vls alv stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 + Vowelin f1=0 f2=1600 -300 300 f3=-100 80 + Vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/t_short%30 - before _ ustop/t_%40 + + IF nextPh(isNotVowel) THEN + ChangePhoneme(NULL) + ENDIF + + WAV(ustop/t_short, 30) endphoneme phoneme t3 // silent unless followed by vowel or pause - beforepause t - beforenotvowel NULL vls alv stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/t_short%30 - before _ ustop/t_%40 + IF nextPh(isPause) THEN + ChangePhoneme(t) + ELIF nextPh(isNotVowel) THEN + ChangePhoneme(NULL) + ELSE + ChangePhoneme(t2) + ENDIF endphoneme phoneme v vcd lbd frc - vowelin f1=0 f2=1000 -100 -100 f3=-300 100 - vowelout f1=0 f2=1000 -100 -100 f3=-300 100 + voicingswitch f lengthmod 6 - formants voc/v+vocw/v%75 - before (r) voc/vj+vocw/v%75 - before _ voc/v_+vocw/v - switchvoicing f + Vowelin f1=0 f2=1000 -300 -200 f3=-300 100 + Vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50 + + IF KlattSynth THEN + CALL base/v + RETURN + ENDIF + + IF nextPh(isPause2) THEN + FMT(voc/v_) addWav(vocw/v) + ENDIF + IF thisPh(isWordStart) AND nextPhW(isLiquid) THEN + Length 70 + ENDIF + FMT(voc/v) addWav(vocw/v, 75) endphoneme phoneme z vcd alv frc sibilant - vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 - formants voc/z+ufric/s_%35 - before _ voc/z_+ufric/s_%45 + voicingswitch s lengthmod 6 - switchvoicing s + Vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 + + IF nextPh(isPause2) THEN + FMT(voc/z_) addWav(ufric/s_, 45) + ENDIF + FMT(voc/z) addWav(ufric/s_, 45) endphoneme phoneme z2 // silent unless followed by vowel - beforenotvowel NULL vcd alv frc sibilant - vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 - formants voc/z+ufric/s_%45 - before _ voc/z_+ufric/s%45 - lengthmod 6 + IF nextPh(isVowel) THEN + ChangePhoneme(z) + ELSE + ChangePhoneme(NULL) + ENDIF endphoneme + phoneme z3 // "six" and "dix". [s] before pause, [z] before vowel, else [] - beforepause s - beforenotvowel NULL vcd alv frc sibilant - vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 - formants voc/z+ufric/s_%45 - before _ voc/z_+ufric/s_%45 - lengthmod 6 + IF nextPh(isPause) THEN + ChangePhoneme(s) + ELIF nextPh(isVowel) THEN + ChangePhoneme(z) + ELSE + ChangePhoneme(NULL) + ENDIF endphoneme - - - - diff --git a/phsource/ph_french_ca b/phsource/ph_french_ca index cea2fc6a..c08bd18b 100644 --- a/phsource/ph_french_ca +++ b/phsource/ph_french_ca @@ -16,56 +16,56 @@ endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 164 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 174 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme E~ - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 192 - formants vnasal/ee_n + FMT(vnasal/ee_n) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 158 - formants vowel/ii - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 150 - formants vowel/uu_bck + FMT(vowel/uu_bck) endphoneme phoneme y" - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/yy // was sv_y2 + FMT(vowel/yy) // was sv_y2 endphoneme phoneme E: // [ae] diphthong - vowel starttype (@) endtype (e) + vowel starttype #@ endtype #e length 230 - formants vdiph/ae + FMT(vdiph/ae) endphoneme phoneme A - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 166 - formants vowel/aa + FMT(vowel/aa) endphoneme @@ -77,12 +77,11 @@ endphoneme // uses the consonants in file "phonemes", unless overridden here phoneme R - liquid - vowelin f1=0 f2=1500 -400 400 f3=-400 80 - length 100 + liquid trill lengthmod 7 - beforenotvowel r/ - trill - formants vwl_fr/@R2+r3/rx%120 + Vowelin f1=0 f2=1500 -400 400 f3=-400 80 + IF nextPh(isNotVowel) THEN + ChangePhoneme(r/) + ENDIF + FMT(vwl_fr/@R2) addWav(r3/rx, 120) endphoneme - diff --git a/phsource/ph_german b/phsource/ph_german index 6f585468..c3920e2a 100755 --- a/phsource/ph_german +++ b/phsource/ph_german @@ -7,204 +7,238 @@ phoneme @ // Schwa - vowel starttype (@) endtype (@) - formants vowel/@_3 + vowel starttype #@ endtype #@ unstressed - before r/ vowel/a#_3 // replace [@r] by [3] length 125 + IF nextPh(r/) THEN + FMT(vowel/a#_3) // replace [@r] by [3] + ENDIF + FMT(vowel/@_3) endphoneme phoneme 3 // open Schwa - vowel starttype (@) endtype (@) -// formants vwl_de/3 - formants vowel/a#_3 + vowel starttype #@ endtype #@ unstressed - // length 160 length 125 + FMT(vowel/a#_3) endphoneme phoneme a - vowel starttype (a) endtype (a) - // length 140 + vowel starttype #a endtype #a length 110 - formants vowel/a - before * DFT+40 + IF nextPh(*) THEN + length 150 + ENDIF + FMT(vowel/a) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 120 - formants vowel/e_mid2 - before * DFT+40 + IF nextPh(*) THEN + length 160 + ENDIF + FMT(vowel/e_mid2) endphoneme phoneme E2 // as[E] but reduces to @ if unstressed - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 120 - formants vowel/e_mid2 - before * DFT+40 - reduceto @ 0 + ChangeIfDiminished(@) + IF nextPh(*) THEN + length 160 + ENDIF + FMT(vowel/e_mid2) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 120 - formants vowel/ii - before * DFT+40 - linkout ; + IF nextPh(*) THEN + length 160 + ENDIF + IfNextVowelAppend(;) + FMT(vowel/ii) endphoneme phoneme I: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 190 - formants vowel/ii + FMT(vowel/ii) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 120 - formants vowel/oo - before * DFT+40 + IF nextPh(*) THEN + length 160 + ENDIF + FMT(vowel/oo) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/uu_2 - before * DFT+40 + IF nextPh(*) THEN + length 180 + ENDIF + FMT(vowel/uu_2) endphoneme phoneme A: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 250 - formants vowel/aa_6 + FMT(vowel/aa_6) endphoneme -phoneme A - vowel starttype (a) endtype (a) + +phoneme A // reduces to [a] if not stressed + vowel starttype #a endtype #a length 240 - formants vowel/aa_6 - reduceto a 4 // ?? + ChangeIfNotStressed(a) + FMT(vowel/aa_6) endphoneme phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 180 - formants vowel/i_2 - after w w/wi2 - before * DFT+40 + IF nextPh(*) THEN + length 220 + ENDIF + IF prevPh(w) THEN + VowelStart(w/wi2) + ENDIF + FMT(vowel/i_2) endphoneme + phoneme i2 - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 180 - formants vowel/i_2 - after w w/wi2 - before * DFT+40 - reduceto I 4 + IF nextPh(*) THEN + length 220 + ENDIF + ChangeIfNotStressed(I) + IF prevPh(w) THEN + VowelStart(w/wi2) + ENDIF + FMT(vowel/i_2) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 190 -// formants vwl_de/u: - formants vowel/u - before * DFT+40 + IF nextPh(*) THEN + length 230 + ENDIF + FMT(vowel/u) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 220 - formants vdiph/aau_2 + FMT(vdiph/aau_2) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 210 - formants vdiph/ai_5 + FMT(vdiph/ai_5) endphoneme phoneme EI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 210 - formants vdiph/eei + FMT(vdiph/eei) endphoneme phoneme OY - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 220 - formants vdiph/oi + FMT(vdiph/oi) endphoneme phoneme E: - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 190 - formants vowel/e_mid2 + FMT(vowel/e_mid2) endphoneme phoneme e: - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 190 - formants vowel/e_2 - before * DFT+40 + IF nextPh(*) THEN + length 230 + ENDIF + FMT(vowel/e_2) endphoneme phoneme o: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 200 - formants vowel/o - before * DFT+40 + IF nextPh(*) THEN + length 240 + ENDIF + FMT(vowel/o) endphoneme phoneme y: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 200 - formants vowel/y - before * DFT+40 + IF nextPh(*) THEN + length 240 + ENDIF + FMT(vowel/y) endphoneme phoneme y - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 130 - formants vowel/yy_4 - before * DFT+40 + IF nextPh(*) THEN + length 170 + ENDIF + FMT(vowel/yy_4) endphoneme phoneme Y: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 220 - formants vowel/y# - before * DFT+40 + IF nextPh(*) THEN + length 260 + ENDIF + FMT(vowel/y#) endphoneme phoneme W - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 160 - formants vowel/oe - before * DFT+40 + IF nextPh(*) THEN + length 200 + ENDIF + FMT(vowel/oe) endphoneme @@ -213,73 +247,85 @@ endphoneme //=========== phoneme ts - vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/ts - before _ ustop/ts_ + import_phoneme consonants/ts endphoneme phoneme pF vls blb afr - vowelout f1=0 f2=1000 -500 -350 f3=-200 80 + Vowelout f1=0 f2=1000 -500 -350 f3=-200 80 lengthmod 2 - wave ufric/f // could replace this with a [pf] wav file + WAV(ufric/f) // could replace this with a [pf] wav file endphoneme + phoneme C2 // for "ig" -> [IC] or [Ig] vls pal frc palatal - beforevowel g - vowelin f1=0 f2=2700 400 600 f3=200 70 - vowelout f1=0 f2=2700 400 600 f3=200 70 rms=20 - length 100 lengthmod 3 - wave ufric/ch + IF nextPh(isVowel) THEN + ChangePhoneme(g) + ENDIF + CALL C endphoneme phoneme l/ // used for [l] when not before a vowel liquid - length 100 lengthmod 7 - formants l/l_3 - before (r) l/_l - beforevowel l + + 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 - length 100 - beforenotvowel j/ - formants NULL - after _ j/_j_short + 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 + // This is actually the ENGLISH "rolling r". For german, we now use * in the dictionary, // so this phoneme will only be used in english words in german texts. phoneme r - liquid starttype #r endtype #r - lengthmod 7 - beforenotvowel r/ + liquid rhotic trill - formants r/r - after _ r/rr - after t r/trr p r/trr k r/trr - before _ r/r_ -endphoneme - - -phoneme r/ // variant of [r] when not preceding a vowel, in english words only - liquid vowel2 - length 100 - lengthmod 7 // - formants NULL + lengthmod 7 + CALL base/r endphoneme diff --git a/phsource/ph_greek b/phsource/ph_greek index e5a6170a..2730915c 100644 --- a/phsource/ph_greek +++ b/phsource/ph_greek @@ -5,28 +5,28 @@ phoneme a/ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vowel/a_4 + FMT(vowel/a_4) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/e_mid2 + FMT(vowel/e_mid2) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 140 - formants vowel/i - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 180 - formants vowel/oo + FMT(vowel/oo) endphoneme @@ -35,39 +35,37 @@ endphoneme phoneme t // revert to alveolar /t/ vls alv stop - vowelin f1=1 f2=1600 -300 300 f3=-100 80 amp=11 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/t_short%80 - before _ ustop/t_ - switchvoicing d + voicingswitch d + Vowelin f1=1 f2=1600 -300 300 f3=-100 80 amp=11 + Vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 + IF nextPh(isPause2) THEN + WAV(ustop/t_) + ENDIF + WAV(ustop/t_short, 80) endphoneme + phoneme d // revert to alveolar /d/ - vcd alv stop - vowelin f1=2 f2=1700 -300 300 f3=-100 80 - vowelout f1=2 f2=1700 -300 300 f3=-100 80 - formants d/d+x/d - before _ d/d_+x/d_ - before r d/dr+x/d - after _ NULL - after @ d/xd - lengthmod 5 - switchvoicing t + import_phoneme base/d + voicingswitch t endphoneme phoneme k vls vel stop - vowelin f1=0 f2=2300 200 400 f3=-100 80 - vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 lengthmod 2 - wave ustop/k_unasp%70 - before _ ustop/k_ - before r ustop/kr - before l ustop/kl -// before (i) ustop/ki - - switchvoicing g + voicingswitch g + Vowelin f1=0 f2=2300 200 400 f3=-100 80 + Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 + + IF nextPh(isPause2) THEN + WAV(ustop/k_) + ELIF nextPh(isRhotic) THEN + WAV(ustop/kr) + ELIF nextPh(l) THEN + WAV(ustop/kl) + ENDIF + WAV(ustop/k_unasp, 70) endphoneme diff --git a/phsource/ph_greek_ancient b/phsource/ph_greek_ancient index 2c08836c..3c537781 100644 --- a/phsource/ph_greek_ancient +++ b/phsource/ph_greek_ancient @@ -10,66 +10,66 @@ endphoneme phoneme y - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 160 - formants vowel/yy_4 + FMT(vowel/yy_4) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 140 - formants vowel/e + FMT(vowel/e) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 150 - formants vowel/ee_1 + FMT(vowel/ee_1) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 140 - formants vowel/o + FMT(vowel/o) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/0 + FMT(vowel/0) endphoneme phoneme EU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 230 - formants vdiph/eeu + FMT(vdiph/eeu) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 230 - formants vdiph/0i + FMT(vdiph/0i) endphoneme phoneme OU - vowel starttype (o) endtype (u) + vowel starttype #o endtype #u length 230 - formants vdiph/oou + FMT(vdiph/oou) endphoneme phoneme yI - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 230 - formants vdiph/yi + FMT(vdiph/yi) endphoneme phoneme f // consider this an affrictive vls blb afr - vowelout f1=0 f2=1000 -500 -350 f3=-200 80 lengthmod 2 - wave ufric/f // could replace this with a [pf] wav file + Vowelout f1=0 f2=1000 -500 -350 f3=-200 80 + WAV(ufric/f) // could replace this with a [pf] wav file endphoneme diff --git a/phsource/ph_hindi b/phsource/ph_hindi index 5255d560..d94a1d4d 100644 --- a/phsource/ph_hindi +++ b/phsource/ph_hindi @@ -9,151 +9,155 @@ phoneme : // Lengthen the previous vowel by "length" endphoneme phoneme @ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 130 - formants vowel/@_bck - before H vowel/@_low - reduceto @- 0 + ChangeIfDiminished(@-) + IF nextPh(H) THEN + FMT(vowel/@_low) + ENDIF + FMT(vowel/@_bck) endphoneme phoneme @/ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 130 - formants vowel/@_bck + FMT(vowel/@_bck) endphoneme phoneme V - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 130 - formants vowel/V_3 - before H vowel/@_low - reduceto @ 4 + ChangeIfNotStressed(@) + IF nextPh(H) THEN + FMT(vowel/@_low) + ENDIF + FMT(vowel/V_3) endphoneme phoneme @2 - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 130 - formants vowel/@_low + FMT(vowel/@_low) endphoneme phoneme @3 - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 130 - formants vowel/@_3 - reduceto @- 0 + ChangeIfDiminished(@-) + FMT(vowel/@_3) endphoneme phoneme @4 - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 130 - formants vowel/@ + FMT(vowel/@) endphoneme phoneme i: - vowel long starttype (i) endtype (i) + vowel long starttype #i endtype #i length 230 - formants vowel/i_fnt - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_fnt) endphoneme phoneme i // as [i:] but not marked as 'long' - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 230 - formants vowel/i_6 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_6) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 100 - formants vowel/ii_3 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_3) endphoneme phoneme e: - vowel long starttype (e) endtype (e) + vowel long starttype #e endtype #e length 220 - formants vowel/e_2 + FMT(vowel/e_2) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 130 - formants vowel/e_2 + FMT(vowel/e_2) endphoneme phoneme E: - vowel long starttype (e) endtype (e) + vowel long starttype #e endtype #e length 220 - formants vdiph/ee-e + FMT(vdiph/ee-e) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 130 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme &: - vowel long starttype (a) endtype (a) + vowel long starttype #a endtype #a length 220 - formants vowel/& + FMT(vowel/&) endphoneme phoneme a: - vowel long starttype (a) endtype (a) + vowel long starttype #a endtype #a length 230 - formants vowel/aa_9 + FMT(vowel/aa_9) endphoneme phoneme a - vowel long starttype (a) endtype (a) + vowel long starttype #a endtype #a length 130 - formants vowel/a#_3 + FMT(vowel/a#_3) endphoneme phoneme o: - vowel long starttype (o) endtype (o) + vowel long starttype #o endtype #o length 220 - formants vowel/o_2 + FMT(vowel/o_2) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 130 - formants vowel/o + FMT(vowel/o) endphoneme phoneme O: - vowel long starttype (o) endtype (o) + vowel long starttype #o endtype #o length 210 - formants vowel/oo_4 + FMT(vowel/oo_4) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 130 - formants vowel/0 + FMT(vowel/0) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 120 - formants vowel/uu_bck + FMT(vowel/uu_bck) endphoneme phoneme u: - vowel long starttype (u) endtype (u) + vowel long starttype #u endtype #u length 230 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme @@ -161,98 +165,82 @@ endphoneme //============= phoneme i~ - vowel long starttype (i) endtype (i) + vowel long starttype #i endtype #i length 220 - formants vnasal/i_n2 + FMT(vnasal/i_n2) endphoneme phoneme I~ - vowel starttype (i) endtype (i) + vowel long starttype #i endtype #i length 170 - formants vnasal/ii_n + FMT(vnasal/ii_n) endphoneme phoneme e~ - vowel long starttype (e) endtype (e) + vowel long starttype #e endtype #e length 220 - formants vnasal/e_n + FMT(vnasal/e_n) endphoneme -phoneme E~ - vowel long starttype (e) endtype (e) +phoneme E~ + vowel long starttype #e endtype #e length 230 - formants vnasal/ee_n2 + FMT(vnasal/ee_n2) endphoneme phoneme a~ - vowel long starttype (a) endtype (a) + vowel long starttype #a endtype #a length 250 - formants vnasal/aa_n + FMT(vnasal/aa_n) endphoneme phoneme V~ - vowel long starttype (@) endtype (@) + vowel long starttype #@ endtype #@ length 250 - formants vnasal/V_n + FMT(vnasal/V_n) endphoneme phoneme O~ - vowel long starttype (o) endtype (o) + vowel long starttype #o endtype #o length 230 - formants vnasal/oo_n2 + FMT(vnasal/oo_n2) endphoneme phoneme o~ - vowel long starttype (o) endtype (o) + vowel long starttype #o endtype #o length 220 - formants vnasal/o_n -endphoneme - -phoneme u~ - vowel long starttype (u) endtype (u) - length 230 - formants vnasal/u_n + FMT(vnasal/o_n) endphoneme phoneme U~ - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 170 - formants vnasal/u_n + FMT(vnasal/u_n) endphoneme - -phoneme r- - vowel starttype (@) endtype (@) - unstressed - length 220 - formants vowelr/r-voc +phoneme u~ + vowel long starttype #u endtype #u + length 230 + FMT(vnasal/u_n) endphoneme -phoneme l- - vowel starttype (@) endtype (@) - unstressed - length 200 - formants vwl_hi/l-voc -endphoneme - - // Diphthongs //=========== phoneme aI - vowel long starttype (@) endtype (i) + vowel long starttype #@ endtype #i length 240 long - formants vdiph/&i + FMT(vdiph/&i) endphoneme phoneme aU - vowel long starttype (a) endtype (u) + vowel long starttype #a endtype #u length 240 long - formants vdiph/aau_3 + FMT(vdiph/aau_3) endphoneme @@ -260,51 +248,14 @@ endphoneme // CONSONANTS //=========== -phoneme l. - liquid rfx - lengthmod 7 - formants l^/l_rfx +phoneme v // approximant, not fricative + import_phoneme base/v# + voicingswitch f endphoneme - - -phoneme v // approximant - vcd lbd frc - vowelin f1=1 f2=900 -300 -300 f3=-100 100 - vowelout f1=1 f2=900 -500 -300 f3=-100 60 len=50 - lengthmod 6 - formants voc/v# - before _ voc/v#_ - switchvoicing f -endphoneme - - - -phoneme h // use with voiced aspirated conants [bh] [dh] etc - vls glt apr - length 100 - lengthmod 3 - wave h/h_%70 // no vowel following - before (@) h/h@+35 - before (a) h/ha+35 - before (e) h/he+35 - before (i) h/hi+35 - before (o) h/ho+35 - before (u) h/hu+35 -endphoneme - phoneme H // use for full "h" - vls glt apr - length 100 - lengthmod 3 - wave h/h_%70 // no vowel following - before (@) h/h@ - before (a) h/ha - before (e) h/he - before (i) h/hi - before (o) h/ho - before (u) h/hu + import_phoneme base/h endphoneme @@ -313,58 +264,32 @@ endphoneme //================== phoneme p - vls blb stop - vowelin f1=1 f2=1000 -50 -100 f3=-200 80 - vowelout f1=1 f2=1000 -500 -350 f3=-300 80 rms=30 - lengthmod 2 - wave ustop/p_unasp - before _ ustop/p_unasp_%80 - before r ustop/pr - before l ustop/pl - switchvoicing b + import_phoneme consonants/p- endphoneme phoneme ph - vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 - lengthmod 2 - wave ustop/p_asp - before _ ustop/p_ - before r ustop/pr - before l ustop/pl - switchvoicing b + import_phoneme consonants/ph endphoneme phoneme b // this is [b] - vcd blb stop - vowelout f1=1 f2=1000 -500 -300 f3=-300 80 brk - formants b/b+x/b - before _ b/b_+x/b - before (a) b/ba+x/b - before (@) b/b@+x/b - before (e) b/be+x/b - before (i) b/bi+x/b - before (o) b/bo+x/b - before (u) b/bu+x/b - before @- b/b@2+x/b - after _ NULL - after @ b/xb - lengthmod 5 - switchvoicing p + import_phoneme base/b endphoneme phoneme bh vcd blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 lengthmod 5 - formants b/xb+ustop/p_asp%70 - after @ b/xb - switchvoicing ph + voicingswitch ph + 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/xb) addWav(ustop/p_asp, 70) endphoneme @@ -374,51 +299,42 @@ endphoneme //================== phoneme t // dental variant of /t/ - vls dnt stop - vowelin f1=1 f2=1500 -250 250 f3=-100 80 amp=16 - vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/t_hi%60 - before _ ustop/t_dnt%35 - switchvoicing d + import_phoneme base/t[ + voicingswitch d endphoneme - phoneme th // dental variant of /t/ vls dnt stop - vowelin f1=0 f2=1500 -300 300 f3=-100 80 amp=16 - vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/t_dnt%50 - before _ ustop/t_dnt%35 - switchvoicing d + 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/ - vcd dnt stop - vowelin f1=2 f2=1500 -300 300 f3=-150 80 - vowelout f1=2 f2=1500 -300 300 f3=-150 80 - formants d/d+x/d_dnt%110 - before _ d/d_+x/d_ - before r d/dr+x/d_dnt%110 - after _ NULL - after @ d/xd - lengthmod 5 - switchvoicing t + import_phoneme base/d[ + voicingswitch t endphoneme phoneme dh vcd dnt stop - vowelin f1=0 f2=1500 -300 300 f3=-100 80 - vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20 lengthmod 5 - formants d/xd3+ustop/t_dnt%40 - after @ d/xd - switchvoicing th + voicingswitch th + 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 @@ -429,46 +345,55 @@ endphoneme phoneme t. vls rfx stop - vowelin f1=0 f2=1800 -300 300 f3=-400 80 - vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2 lengthmod 2 - wave ustop/t_short - before _ ustop/t_ - switchvoicing d. + 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 th. vls rfx stop - vowelin f1=0 f2=1800 -300 300 f3=-400 80 - vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2 lengthmod 2 - wave ustop/t -// wave ustop/th_rfx - switchvoicing dh. + voicingswitch dh. + 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 - vowelin f1=1 f2=1800 -300 300 f3=-400 80 - vowelout f1=1 f2=1800 -300 300 f3=-400 80 colr=2 - formants d/d+x/d - before _ d/d_+x/d_ - before r d/dr+x/d - after _ NULL - after @ d/xd lengthmod 5 - switchvoicing t. + 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/xd) + ENDIF + + IF nextPh(isPause2) THEN + FMT(d/d_) addWav(x/d_) + ENDIF + + FMT(d/dr) addWav(x/d) endphoneme + phoneme dh. vcd rfx stop - vowelin f1=1 f2=1800 -300 300 f3=-400 80 - vowelout f1=1 f2=1800 -300 300 f3=-400 80 colr=2 - formants d/xd+x/d+ustop/t -// formants d/xd+x/d+ustop/th_rfx - after @ d/xd lengthmod 5 - switchvoicing th. + voicingswitch th. + 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/xd) + ENDIF + + FMT(d/dr) addWav(ustop/t) +// FMT(d/dr) addWav(ustop/th_rfx) endphoneme @@ -479,48 +404,33 @@ endphoneme // also try [tS] and [dZ] -phoneme c // this is [ts;] - vls pal afr sibilant - 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 - lengthmod 2 - wave ustop/ts_pzd2%90 - before _ ustop/ts_pzd_ - switchvoicing J +phoneme c + import_phoneme base/c endphoneme -phoneme ch // this is [ts;] - vls pal afr sibilant - 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 - lengthmod 2 - wave ustop/ts_pzd - before _ ustop/ts_pzd - switchvoicing J +phoneme ch + import_phoneme base/tS; endphoneme -phoneme J // this is [dz;] - vcd pla afr sibilant - vowelin f1=1 f2=2700 400 600 f3=300 80 rate len=70 - vowelout f1=2 f2=2700 400 600 f3=300 80 colr=1 - formants dzh/dzh+x/dz_pzd - before _ dzh/dzh_+x/dzh_ - after _ NULL @ dzh/xdzh - lengthmod 5 - switchvoicing c +phoneme J + import_phoneme base/J endphoneme phoneme Jh vcd pal afr sibilant - 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 lengthmod 5 - formants dzh/xdz_pzd+ustop/ts_pzd - after @ dzh/xdz_pzd - switchvoicing ch + voicingswitch ch + 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 @@ -532,48 +442,34 @@ endphoneme phoneme k - vls vel stop - vowelin f1=0 f2=2300 200 300 f3=-150 80 - vowelout f1=0 f2=2300 300 400 f3=-150 80 rms=20 - lengthmod 2 - wave ustop/k_unasp%60 // weaker - before _ ustop/k_unasp%50 - switchvoicing g + import_phoneme consonants/k- + voicingswitch g endphoneme phoneme kh - vls vel stop - vowelin f1=0 f2=2300 200 300 f3=-150 80 - vowelout f1=0 f2=2300 300 400 f3=-150 80 rms=20 - lengthmod 2 - wave ustop/k_asp%90 - before _ ustop/k_asp%50 - before r ustop/kr - before l ustop/kl - switchvoicing g + import_phoneme consonants/kh + voicingswitch gh endphoneme phoneme g - vcd vel stop - vowelin f1=1 f2=2300 200 300 f3=-300 80 - vowelout f1=1 f2=2300 250 300 f3=-300 80 brk - formants g/g+x/g2 - before _ g/g_+x/g2_ - after _ NULL - after @ g2/xg - lengthmod 5 + import_phoneme base/g + voicingswitch k endphoneme phoneme gh vcd dnt stop - vowelin f1=1 f2=2300 200 300 f3=-150 80 rms=20 - vowelout f1=0 f2=2300 300 400 f3=-150 80 rms=20 lengthmod 5 - formants g2/xg+ustop/k_asp%70 - after @ g2/xg - switchvoicing kh + voicingswitch kh + 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 + + FMT(g2/xg) addWav(ustop/k_asp, 70) endphoneme diff --git a/phsource/ph_hungarian b/phsource/ph_hungarian index b4ed8d6f..dab87b2b 100644 --- a/phsource/ph_hungarian +++ b/phsource/ph_hungarian @@ -2,99 +2,91 @@ // Short vowels phoneme A - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 140 - formants vowel/0_3 + FMT(vowel/0_3) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 140 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 140 - formants vowel/i_4 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_4) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 130 - formants vowel/o_mid + FMT(vowel/o_mid) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 130 - formants vowel/uu_bck + FMT(vowel/uu_bck) endphoneme phoneme Y - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 130 - formants vowel/y#_2 + FMT(vowel/y#_2) endphoneme phoneme y - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 130 - formants vowel/yy_4 + FMT(vowel/yy_4) endphoneme // Long Vowels phoneme i: - vowel starttype (i) endtype (i) - long + vowel starttype #i endtype #i length 220 - formants vowel/i -// linkout ; + FMT(vowel/i) endphoneme phoneme e: - vowel starttype (e) endtype (e) - long + vowel starttype #e endtype #e length 240 - formants vowel/e_3 + FMT(vowel/e_3) endphoneme phoneme a: - vowel starttype (a) endtype (a) - long + vowel starttype #a endtype #a length 270 - formants vowel/a + FMT(vowel/a) endphoneme phoneme o: - vowel starttype (o) endtype (o) - long + vowel starttype #o endtype #o length 260 - formants vowel/o_2 + FMT(vowel/o_2) endphoneme phoneme u: - vowel starttype (u) endtype (u) - long + vowel starttype #u endtype #u length 240 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme y: - vowel starttype (u) endtype (u) - long + vowel starttype #u endtype #u length 240 - formants vowel/y + FMT(vowel/y) endphoneme phoneme Y: - vowel starttype (@) endtype (@) - long + vowel starttype #@ endtype #@ length 260 - formants vowel/y# + FMT(vowel/y#) endphoneme @@ -105,102 +97,85 @@ endphoneme phoneme ts vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/ts // don't use ustop/ts_ (before non-vowel) + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + WAV(ustop/ts) // don't use ustop/ts_ (before non-vowel) endphoneme phoneme t // dental variant of /t/ vls dnt stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/t_dnt%50 - before _ ustop/t_dnt%45 - switchvoicing d + voicingswitch d + Vowelin f1=0 f2=1600 -300 300 f3=-100 80 + Vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 + IF nextPh(isPause2) THEN + WAV(ustop/t_dnt, 45) + ENDIF + WAV(ustop/t_dnt, 50) endphoneme phoneme d // dental variant of /d/ - vcd dnt stop - vowelin f1=2 f2=1500 -300 300 f3=-150 80 - vowelout f1=2 f2=1500 -300 300 f3=-150 80 - formants d/d+x/d_dnt%110 - before _ d/d_+x/d_dnt%100 - before r d/dr+x/d_dnt%110 - after _ NULL - after @ d/xd - lengthmod 5 - switchvoicing t + import_phoneme base/d[ + voicingswitch t endphoneme phoneme c - vls pal afr sibilant - 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 - lengthmod 2 - wave ustop/ts_pzd2%70 - before _ ustop/ts_pzd_ - switchvoicing J + import_phoneme consonants/c2 + voicingswitch J endphoneme - - phoneme p // unaspirated - vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 - lengthmod 2 - wave ustop/p_unasp - before _ ustop/p_unasp_%80 - before r ustop/pr - before l ustop/pl - switchvoicing b + import_phoneme consonants/p- + voicingswitch b endphoneme - phoneme k // unsapirated - vls vel stop - vowelin f1=0 f2=2300 200 400 f3=-100 80 - vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/k_unasp%70 // weaker - before _ ustop/k_ - before r ustop/kr - before l ustop/kl - before (i) ustop/ki - switchvoicing g + import_phoneme consonants/k- + voicingswitch g endphoneme - phoneme s2 // second part of geminated [s:] - vls alv frc sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 3 - wave ufric/s_continue - before _ ufric/s_ - before p ufric/s! - before t ufric/s! - before k ufric/s! - switchvoicing z + import_phoneme consonants/s2 endphoneme + phoneme l liquid - length 100 lengthmod 7 - beforenotvowel l/ - formants l/l - after _ l/_l - after t l/tl -// after l/ l/l_long // double l, make it longer + + IF nextPh(isNotVowel) THEN + ChangePhoneme(l/) + ENDIF + + CALL vowelstart_l + + IF prevPh(#@) THEN + VowelEnding(l/xl, -50) + ELIF prevPh(isVowel) THEN + VowelEnding(l/xl, -40) + 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 + diff --git a/phsource/ph_icelandic b/phsource/ph_icelandic index 9e7c8d49..31076b5e 100644 --- a/phsource/ph_icelandic +++ b/phsource/ph_icelandic @@ -14,126 +14,126 @@ endphoneme //======= phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 130 - formants vowel/i_4 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_4) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 130 - formants vowel/ii - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 130 - formants vowel/e_e - reduceto E 4 + ChangeIfNotStressed(E) + FMT(vowel/e_e) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 130 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 130 - formants vowel/a_3 - reduceto & 4 + ChangeIfNotStressed(&) + FMT(vowel/a_3) endphoneme phoneme & - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 130 - formants vowel/a#_2 + FMT(vowel/a#_2) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 130 - formants vdiph2/o_oo - reduceto O 4 + ChangeIfNotStressed(O) + FMT(vdiph2/o_oo) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 130 - formants vowel/oo_5 + FMT(vowel/oo_5) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 130 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme y - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 130 - formants vowel/yy_4 + FMT(vowel/yy_4) endphoneme phoneme y# - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 130 - formants vowel/y## + FMT(vowel/y##) endphoneme phoneme W - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 130 - formants vowel/y#_3 + FMT(vowel/y#_3) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 170 - formants vdiph/ai_7 + FMT(vdiph/ai_7) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 170 - formants vdiph/ei + FMT(vdiph/ei) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 170 - formants vdiph/au_4 + FMT(vdiph/au_4) endphoneme phoneme oU - vowel starttype (o) endtype (u) + vowel starttype #o endtype #u length 170 - formants vdiph/ou_3 + FMT(vdiph/ou_3) endphoneme phoneme oU2 // long version for óf - vowel starttype (o) endtype (u) + vowel starttype #o endtype #u length 230 - formants vdiph/ou_3 + FMT(vdiph/ou_3) endphoneme phoneme Yy - vowel starttype (@) endtype (i) + vowel starttype #@ endtype #i length 150 - formants vdiph/y#i_2 + FMT(vdiph/y#i_2) endphoneme @@ -143,135 +143,121 @@ endphoneme phoneme m# vcd blb nasal -// starttype m endtype m - vowelout f1=2 f2=1000 -500 -350 f3=-200 80 brk - length 100 lengthmod 6 - formants NULL - before _ m/m#_ + Vowelout f1=2 f2=1000 -500 -350 f3=-200 80 brk + FMT(m/m#_) endphoneme phoneme n# vcd alv nasal - starttype n endtype n - vowelout f1=2 f2=1700 -300 250 f3=-100 80 rms=20 brk - length 100 lengthmod 6 - formants NULL - before _ n/n#_ + Vowelout f1=2 f2=1700 -300 250 f3=-100 80 rms=20 brk + + NextVowelStarts + VowelStart(n/n@) + VowelStart(n/na) + VowelStart(n/ne) + VowelStart(n/ni) + VowelStart(n/no) + VowelStart(n/nu) + EndSwitch + + FMT(n/n#_) endphoneme phoneme n^# vcd pal nasal palatal - vowelout f1=3 f2=2300 300 400 f3=100 80 brk rate - length 100 lengthmod 6 - formants NULL - before _ n^/n^#_ + Vowelout f1=3 f2=2300 300 400 f3=100 80 brk rate + FMT(n^/n^#_) endphoneme phoneme N# vcd vel nasal - starttype N endtype N - vowelout f1=3 f2=2300 300 400 f3=-200 80 len=40 rms=20 brk - length 100 - formants NULL - before _ nn/nn#_ - lengthmod 6 // longer than 'n' + lengthmod 6 + Vowelout f1=3 f2=2300 300 400 f3=-200 80 len=40 rms=20 brk + + NextVowelStarts + VowelStart(nn/nn@) + VowelStart(nn/nna) + VowelStart(nn/nne) + VowelStart(nn/nni) + VowelStart(nn/nno) + VowelStart(nn/nnu) + EndSwitch + + FMT(nn/nn#_) endphoneme phoneme l# vls alv frc - length 100 lengthmod 3 - wave ufric/ll%25 + WAV(ufric/ll, 25) endphoneme phoneme tl# vls alv stop - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ufric/tl#%50 + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + WAV(ufric/tl#, 50) endphoneme phoneme r# // used for [r] when not preceding a vowel liquid - length 100 lengthmod 2 // - formants r3/r#_+r3/rx + FMT(r3/r#_) addWav(r3/rx) // before n r3/r_n+r3/rx endphoneme -phoneme c - vls vel stop - vowelin f1=0 f2=2700 200 400 f3=300 80 rate len=60 - vowelout f1=0 f2=2700 300 400 f3=300 80 rms=20 - lengthmod 2 - wave ustop/ki - switchvoicing g -endphoneme - - phoneme b vls blb stop - vowelin f1=1 f2=1000 -300 -200 f3=-200 80 amp=11 - vowelout f1=2 f2=1000 -300 -300 f3=-300 80 brk lengthmod 5 - wave x/b -// before _ x/b_ + Vowelin f1=1 f2=1000 -300 -200 f3=-200 80 amp=11 + Vowelout f1=2 f2=1000 -300 -300 f3=-300 80 brk + WAV(x/b) endphoneme phoneme d vls alv stop - vowelin f1=2 f2=1700 -300 300 f3=-100 80 - vowelout f1=2 f2=1700 -300 300 f3=-100 80 lengthmod 5 - wave x/d%80 - before _ x/d_ + Vowelin f1=2 f2=1700 -300 300 f3=-100 80 + Vowelout f1=2 f2=1700 -300 300 f3=-100 80 + IF nextPh(isPause2) THEN + WAV(x/d_) + ENDIF + WAV(x/d, 80) endphoneme + phoneme g vls vel stop - vowelin f1=2 f2=2300 200 300 f3=-300 80 - vowelout f1=2 f2=2300 250 300 f3=-300 80 brk lengthmod 5 - wave x/g2%150 - before _ x/g_ + Vowelin f1=2 f2=2300 200 300 f3=-300 80 + Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk + IF nextPh(isPause2) THEN + WAV(x/g_) + ENDIF + WAV(x/g2, 150) endphoneme - phoneme v // no fricative noise - vcd lbd frc - vowelin f1=1 f2=900 -300 -300 f3=-100 100 - vowelout f1=1 f2=900 -500 -300 f3=-100 60 len=50 - lengthmod 6 - formants voc/v - before _ voc/v_ - switchvoicing f + import_phoneme base/v# + voicingswitch f endphoneme phoneme s2 // 2nd part of geminated s - vls alv frc sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 3 - wave ufric/s_continue - before _ ufric/s_ - before p ufric/s! - before t ufric/s! - before k ufric/s! - switchvoicing z + import_phoneme consonants/s2 endphoneme diff --git a/phsource/ph_indonesian b/phsource/ph_indonesian index 657dfc9e..38dee3a6 100644 --- a/phsource/ph_indonesian +++ b/phsource/ph_indonesian @@ -1,106 +1,99 @@ phoneme @ - vowel starttype (@) endtype (@) - length 140 - formants vowel/@_low + vowel starttype #@ endtype #@ unstressed + length 140 + FMT(vowel/@_low) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 180 - formants vowel/a - reduceto a/ 1 + ChangeIfUnstressed(a/) + FMT(vowel/a) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/e_mid - reduceto @ 1 + ChangeIfUnstressed(@) + FMT(vowel/e_mid) endphoneme phoneme E2 // as [E] but don't reduce to [@] - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/e + FMT(vowel/e) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 180 - formants vowel/i_6 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_6) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 180 - formants vowel/oo + FMT(vowel/oo) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 180 - formants vowel/o + FMT(vowel/o) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 180 - formants vowel/u + FMT(vowel/u) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 240 - formants vdiph/ai + FMT(vdiph/ai) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 240 - formants vdiph/eei_2 + FMT(vdiph/eei_2) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 240 - formants vdiph/au_4 + FMT(vdiph/au_4) endphoneme phoneme @U - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 240 - formants vdiph/@u_en + FMT(vdiph/@u_en) endphoneme phoneme d // English [d] - vcd alv stop - vowelin f1=1 f2=1700 -300 300 f3=-100 80 - vowelout f1=2 f2=1700 -300 300 f3=-100 80 - formants d/d+x/d - before _ d/d_+x/d_ - before r d/dr+x/d - after _ NULL - after @ d/xd - lengthmod 5 - switchvoicing t + import_phoneme base/d + voicingswitch t endphoneme + diff --git a/phsource/ph_italian b/phsource/ph_italian index ecf224bc..6a6b6dcc 100644 --- a/phsource/ph_italian +++ b/phsource/ph_italian @@ -10,115 +10,115 @@ endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 180 - formants vowel/a - reduceto a/ 4 + ChangeIfNotStressed(a/) + FMT(vowel/a) endphoneme phoneme a/ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vowel/a_5 + FMT(vowel/a_5) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e_2 - reduceto e/ 4 + ChangeIfNotStressed(e/) + FMT(vowel/e_2) endphoneme phoneme e/ - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e + FMT(vowel/e) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e_mid - reduceto e/ 3 // [E] only in stressed syllables ? + ChangeIfUnstressed(e/) // [E] only in stressed syllables ? + FMT(vowel/e_mid) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 140 - formants vowel/i - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/i_4 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_4) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/o - reduceto o/ 4 + ChangeIfNotStressed(o/) + FMT(vowel/o) endphoneme phoneme o/ - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/o + FMT(vowel/o) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/oo_4 - reduceto o/ 3 // [O] only in stressed syllables ? + ChangeIfUnstressed(o/) // [O] only in stressed syllables ? + FMT(vowel/oo_4) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/u_bck - reduceto U 4 + ChangeIfNotStressed(U) + FMT(vowel/u_bck) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 270 - formants vdiph/au_4 + FMT(vdiph/au_4) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 250 - formants vdiph/ai + FMT(vdiph/ai) endphoneme phoneme oI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 230 - formants vdiph/oi + FMT(vdiph/oi) endphoneme @@ -126,3 +126,7 @@ endphoneme // CONSONANTS //=========== +phoneme l^ + import_phoneme base/l^ + Length 140 +endphoneme diff --git a/phsource/ph_kinyarwanda b/phsource/ph_kinyarwanda index 642aeda3..dd3248d6 100644 --- a/phsource/ph_kinyarwanda +++ b/phsource/ph_kinyarwanda @@ -2,99 +2,161 @@ //****************************** // Phonemes for Kinyarwanda (rw), inherits "base2" //****************************** - + phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 180 - formants vowel/a_2 - reduceto a/ 4 - beforepause a# - beforevowel NULL + + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + + IF nextPh(isPause) THEN + ChangePhoneme(a#) + ENDIF + + ChangeIfNotStressed(a/) + FMT(vowel/a_2) endphoneme phoneme a/ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vowel/a# - beforepause a# - beforevowel NULL + + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + + IF nextPh(isPause) THEN + ChangePhoneme(a#) + ENDIF + + FMT(vowel/a#) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e - beforepause e# - beforevowel NULL + + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + + IF nextPh(isPause) THEN + ChangePhoneme(e#) + ENDIF + + FMT(vowel/e) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/i - beforepause i# - beforevowel NULL + + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + + IF nextPh(isPause) THEN + ChangePhoneme(i#) + ENDIF + + FMT(vowel/i) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/o - beforepause o# - beforevowel NULL + + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + + IF nextPh(isPause) THEN + ChangePhoneme(o#) + ENDIF + + FMT(vowel/o) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/u_bck - beforepause u# - beforevowel NULL + + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + + IF nextPh(isPause) THEN + ChangePhoneme(u#) + ENDIF + + FMT(vowel/u_bck) endphoneme phoneme a# - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 100 - formants vowel/a# - beforevowel NULL + + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + + FMT(vowel/a#) endphoneme + phoneme e# - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 100 - formants vowel/e - beforevowel NULL + + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + + FMT(vowel/e) endphoneme phoneme i# - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 100 - formants vowel/i - linkout ; - beforevowel NULL + + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + + FMT(vowel/i) endphoneme phoneme o# - vowel starttype (o) endtype (o) - length 170 - formants vowel/o - beforevowel NULL + vowel starttype #o endtype #o + length 100 + + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + + FMT(vowel/o) endphoneme phoneme u# - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 100 - formants vowel/u_bck - beforevowel NULL + + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + + FMT(vowel/u_bck) endphoneme @@ -103,13 +165,14 @@ phoneme : // Lengthen previous vowel by "length" length 120 endphoneme + phoneme + // high tone, use after a vowel stress - tone 0 30 envelope/p_fall NULL + Tone(0, 30, envelope/p_fall, NULL) endphoneme phoneme +2 // high tone, use after a vowel stress - tone 0 30 envelope/i_risefall2 NULL + Tone(0, 30, envelope/i_risefall2, NULL) endphoneme diff --git a/phsource/ph_korean b/phsource/ph_korean deleted file mode 100644 index 26b5b05b..00000000 --- a/phsource/ph_korean +++ /dev/null @@ -1,129 +0,0 @@ - - -phoneme a - vowel starttype (a) endtype (a) - length 190 - formants vowel/a -endphoneme - -phoneme E - vowel starttype (e) endtype (e) - length 180 - formants vowel/e_mid2 -endphoneme - -phoneme e - vowel starttype (e) endtype (e) - length 180 - formants vowel/e -endphoneme - -phoneme i - vowel starttype (i) endtype (i) - length 160 - formants vowel/i -endphoneme - -phoneme o - vowel starttype (o) endtype (o) - length 180 - formants vowel/o_2 -endphoneme - -phoneme V - vowel starttype (a) endtype (a) - length 180 - formants vowel/aa_8 -endphoneme - -phoneme Y - vowel starttype (@) endtype (@) - length 180 - formants vowel/y# -endphoneme - -phoneme u - vowel starttype (u) endtype (u) - length 180 - formants vowel/u_bck -endphoneme - -phoneme y - vowel starttype (i) endtype (u) - length 180 - formants vdiph2/uw_6 -endphoneme - -phoneme u- - vowel starttype (u) endtype (u) - length 180 - formants vowel/u_unr -endphoneme - - -phoneme ji - vowel starttype (i) endtype (i) - length 220 - formants vdiph/yi_fr -endphoneme - - -phoneme p` - vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=31 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 - lengthmod 2 - wave ustop/p_unasp%130 -endphoneme - - -phoneme t` // dental variant of /t/ - vls dnt stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 amp=31 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/t_dnt - switchvoicing d -endphoneme - -phoneme c` - vls pal afr sibilant palatal - vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 amp=31 - lengthmod 2 - wave ustop/ts_pzd2%120 - switchvoicing dZ; -endphoneme - - -phoneme k` - vls vel stop - vowelin f1=0 f2=2300 200 400 f3=-100 80 amp=31 - vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/k_unasp%130 -endphoneme - - -phoneme s` - vls alv frc sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 amp=31 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 3 - wave ufric/s%120 - before j ufric/sh_pzd%120 - before i ufric/sh_pzd%120 -endphoneme - - -phoneme r // flap [**] - liquid alv - beforenotvowel l - vowelout f1=3 f2=1600 -300 300 f3=-300 80 rms=35 len=15 - vowelin f1=2 f2=1600 -300 300 f3=-100 80 len=20 - formants r3/@tap - after (e) r3/@tap2 - after (i) r3/@tap2 - lengthmod 3 -endphoneme - - diff --git a/phsource/ph_kurdish b/phsource/ph_kurdish index 60bef0ea..e619f255 100644 --- a/phsource/ph_kurdish +++ b/phsource/ph_kurdish @@ -1,138 +1,139 @@ phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 190 - formants vowel/i_6 + FMT(vowel/i_6) endphoneme phoneme I - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 110 - formants vowel/ii# - before j vowel/ii + IF nextPh(j) THEN + FMT(vowel/ii) + ENDIF + FMT(vowel/ii#) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 220 - formants vowel/e_3 + FMT(vowel/e_3) endphoneme phoneme E - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 150 - formants vowel/ee_6 + FMT(vowel/ee_6) endphoneme phoneme E# - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 140 - formants vowel/ee_2 + FMT(vowel/ee_2) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 210 - formants vowel/aa# + FMT(vowel/aa#) endphoneme phoneme 8 - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 160 - formants vowel/8_5 + FMT(vowel/8_5) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 220 - formants vowel/o_7 + FMT(vowel/o_7) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 130 - formants vowel/uu# + FMT(vowel/uu#) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 200 - formants vowel/u_6 + FMT(vowel/u_6) endphoneme phoneme y - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/y_5 + FMT(vowel/y_5) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 280 - formants vdiph/eei_3 + FMT(vdiph/eei_3) endphoneme + phoneme eU - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 280 - formants vdiph/eeu_3 + FMT(vdiph/eeu_3) endphoneme + phoneme V - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 160 - formants vowel/V_2 + FMT(vowel/V_2) endphoneme - -//phoneme x2 -// vls vel frc -// vowelin f1=0 f2=2300 200 400 f3=-100 80 -// vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 -// lengthmod 3 -// wave ufric/x_ku%60 -//endphoneme - - phoneme x // This is Afrikaans [x2] vls vel frc - vowelin f1=0 f2=2300 200 400 f3=-100 100 - vowelout f1=0 f2=2300 300 400 f3=-100 100 rms=20 - length 100 lengthmod 3 - wave ufric/x2%60 // stronger version of [x] + Vowelin f1=0 f2=2300 200 400 f3=-100 100 + Vowelout f1=0 f2=2300 300 400 f3=-100 100 rms=20 + WAV(ufric/x2, 60) // stronger version of [x] endphoneme phoneme c vls pal stop - vowelin f1=0 f2=2700 200 500 f3=400 80 len=60 - vowelout f1=0 f2=2700 300 500 f3=300 80 lengthmod 2 - wave ustop/ki - before _ ustop/ki%80 + voicingswitch J + Vowelin f1=0 f2=2700 200 500 f3=400 80 len=60 + Vowelout f1=0 f2=2700 300 500 f3=300 80 + IF nextPh(isPause2) THEN + WAV(ustop/ki, 80) + ENDIF + WAV(ustop/ki) endphoneme phoneme J vcd pla stop - vowelin f1=2 f2=2700 400 600 f3=300 80 - vowelout f1=2 f2=2700 400 600 f3=300 80 colr=1 - formants dzh/dz_pzd+ustop/ki%60 + voicingswitch c lengthmod 5 - switchvoicing c + Vowelin f1=2 f2=2700 400 600 f3=300 80 + Vowelout f1=2 f2=2700 400 600 f3=300 80 colr=1 + + IF PreVoicing THEN + FMT(dzh/xdz_pzd) + ENDIF + + FMT(dzh/dz_pzd) addWav(ustop/ki, 60) endphoneme diff --git a/phsource/ph_latin b/phsource/ph_latin index bdf943c5..665a4d14 100644 --- a/phsource/ph_latin +++ b/phsource/ph_latin @@ -6,123 +6,122 @@ phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 170 - formants vowel/a_5 + FMT(vowel/a_5) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/ee_1 + FMT(vowel/ee_1) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/ii_5 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_5) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 160 - formants vowel/o + FMT(vowel/o) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/u + FMT(vowel/u) endphoneme phoneme a: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 270 - formants vowel/a_3 + FMT(vowel/a_3) endphoneme phoneme e: - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 260 - formants vowel/e + FMT(vowel/e) endphoneme phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 240 - formants vowel/i_2 - after w w/wi2 + FMT(vowel/i_2) endphoneme phoneme o: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 250 - formants vowel/o_2 + FMT(vowel/o_2) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 250 - formants vowel/u_bck2 + FMT(vowel/u_bck2) endphoneme phoneme y - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/y + FMT(vowel/y) endphoneme phoneme y: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 250 - formants vowel/y_2 + FMT(vowel/y_2) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 270 - formants vdiph/aau_2 + FMT(vdiph/aau_2) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 270 - formants vdiph/ae + FMT(vdiph/ae) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 270 - formants vdiph/ei + FMT(vdiph/ei) endphoneme phoneme EU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 270 - formants vdiph/eeu_2 + FMT(vdiph/eeu_2) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 250 - formants vdiph/oi + FMT(vdiph/oi) endphoneme @@ -132,15 +131,8 @@ endphoneme phoneme p // unaspirated - vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 - lengthmod 2 - wave ustop/p_unasp - before _ ustop/p_unasp_%80 - before r ustop/pr - before l ustop/pl - switchvoicing b + import_phoneme consonants/p- + voicingswitch b endphoneme @@ -149,13 +141,21 @@ phoneme vls glt apr length 50 lengthmod 3 - wave h/h_%70 // no vowel following - before (@) h/h@ - before (a) h/ha - before (e) h/he - before (i) h/hi - before (o) h/ho - before (u) h/hu + + IF nextPh(#@) THEN + WAV(h/h@) + ELIF nextPh(#a) THEN + WAV(h/ha) + ELIF nextPh(#e) THEN + WAV(h/he) + ELIF nextPh(#i) THEN + WAV(h/hi) + ELIF nextPh(#o) THEN + WAV(h/ho) + ELIF nextPh(#u) THEN + WAV(h/hu) + ENDIF + WAV(h/h_, 70) // no vowel following endphoneme @@ -163,13 +163,6 @@ endphoneme // Use 'dark' l (l/2) at the end of a word or another consonant phoneme l - liquid - length 100 - lengthmod 7 - beforenotvowel l/2 - formants l/l - after _ l/_l - after t l/tl - after l/ l/l_long // double l, make it longer + import_phoneme en/l endphoneme diff --git a/phsource/ph_latvian b/phsource/ph_latvian index bc00818d..2aa29d2e 100644 --- a/phsource/ph_latvian +++ b/phsource/ph_latvian @@ -1,223 +1,229 @@ phoneme @ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 120 - formants vowel/8_7 + FMT(vowel/8_7) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 110 - formants vowel/i_6 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_6) endphoneme phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 300 - formants vowel/i_6 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_6) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 120 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme e: - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 330 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme & - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 120 - formants vowel/& + FMT(vowel/&) endphoneme phoneme &: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 330 - formants vowel/& + FMT(vowel/&) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 120 - formants vowel/a_3 - reduceto a# 0 + ChangeIfDiminished(a#) + FMT(vowel/a_3) endphoneme phoneme a: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 350 - formants vowel/a_3 + FMT(vowel/a_3) endphoneme phoneme a# - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 120 - formants vowel/V_6 + FMT(vowel/V_6) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 120 - formants vowel/oo_1 + FMT(vowel/oo_1) endphoneme phoneme o: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 330 - formants vowel/oo_1 + FMT(vowel/oo_1) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 110 - formants vowel/u + FMT(vowel/u) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 330 - formants vowel/u + FMT(vowel/u) endphoneme phoneme ai - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 310 long - formants vdiph/aai + FMT(vdiph/aai) endphoneme phoneme ei - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 300 long - formants vdiph/eei_2 + FMT(vdiph/eei_2) endphoneme phoneme au - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 300 long - formants vdiph/aau + FMT(vdiph/aau) endphoneme phoneme uo - vowel starttype (u) endtype (a) + vowel starttype #u endtype #a length 300 long -// formants vdiph2/uo - formants vdiph2/uaa + FMT(vdiph2/uaa) endphoneme phoneme oi - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 290 long - formants vdiph/ooi + FMT(vdiph/ooi) endphoneme phoneme ui - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 290 long - formants vdiph/ui + FMT(vdiph/ui) endphoneme phoneme ie - vowel starttype (i) endtype (e) + vowel starttype #i endtype #e length 290 long - formants vdiph2/ie_2 + FMT(vdiph2/ie_2) endphoneme phoneme iu - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 290 long - formants vdiph2/iu_2 + FMT(vdiph2/iu_2) endphoneme - -phoneme R2 // this is [R] from Slovak/Czech +phoneme R2 liquid - vowelin f1=0 f2=1700 -300 300 f3=-300 80 - vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk - formants r3/r_trill+r3/r_trill.wav%50 trill 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, 50) endphoneme phoneme ts vls alv afr sibilant lengthenstop - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/ts2%90 - before _ ustop/ts_ + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + IF nextPh(isPause2) THEN + WAV(ustop/ts_) + ENDIF + WAV(ustop/ts2, 90) endphoneme phoneme t // try disable this and try using English [t] vls alv stop lengthenstop - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/t_short%115 - before _ ustop/t_ - switchvoicing d + voicingswitch d + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + IF nextPh(isPause2) THEN + WAV(ustop/t_) + ENDIF + WAV(ustop/t_short, 115) endphoneme + phoneme p vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 lengthmod 2 - wave ustop/p_unasp%120 - before _ ustop/p_unasp_%80 - before l ustop/pl - switchvoicing b + 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 vls vel stop - vowelin f1=0 f2=2300 200 400 f3=-100 80 - vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 lengthmod 2 - wave ustop/k_unasp%60 // weaker - before _ ustop/k_ - before r ustop/kr - before l ustop/kl - before (i) ustop/ki - before l^ ustop/ki - switchvoicing g + voicingswitch g + Vowelin f1=0 f2=2300 200 400 f3=-100 80 + Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 + IF nextPh(isPause2) THEN + WAV(ustop/k_) + ENDIF + IF nextPh(#i) OR nextPh(l^) THEN + WAV(ustop/ki) + ENDIF + IF nextPh(l) THEN + WAV(ustop/kl) + ENDIF + WAV(ustop/k_unasp, 60) // weaker endphoneme phoneme s2 // second part of long [s:] vls alv frc sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 3 - wave ufric/s_continue - before _ ufric/s_ - before p ufric/s! - before t ufric/s! - before k ufric/s! - switchvoicing z + 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_continue) endphoneme diff --git a/phsource/ph_lojban b/phsource/ph_lojban index 19a742e7..ec5271fc 100644 --- a/phsource/ph_lojban +++ b/phsource/ph_lojban @@ -1,25 +1,9 @@ // Phonemes for Lojban (an artificial constructed language) // Inherits phonemes from Esperanto - -phoneme r- // syllabic r, for lojban - vowel starttype (@) endtype (@) - unstressed - length 220 - formants vowelr/r-voc -endphoneme - -phoneme l- // syllabic l, for lojban - vowel starttype (@) endtype (@) - unstressed - length 170 - formants vwl_hi/l-voc -endphoneme - phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e_mid2 + FMT(vowel/e_mid2) endphoneme - diff --git a/phsource/ph_macedonian b/phsource/ph_macedonian index fcfedb0c..a488ba60 100644 --- a/phsource/ph_macedonian +++ b/phsource/ph_macedonian @@ -2,19 +2,25 @@ phoneme k^ vls pal stop - vowelin f1=0 f2=2700 400 600 f3=400 80 - vowelout f1=0 f2=2700 400 600 f3=400 80 rms=20 lengthmod 2 - wave ustop/ki + Vowelin f1=0 f2=2700 400 600 f3=400 80 + Vowelout f1=0 f2=2700 400 600 f3=400 80 rms=20 + WAV(ustop/ki) endphoneme + phoneme dZ; vcd pal afr sibilant palatal - vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 - formants dzh/dzh+x/dz_pzd - before _ dzh/dzh_+x/dzh_ - after _ NULL - after @ dzh/xdzh lengthmod 5 - switchvoicing ts; + voicingswitch tS; + Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 + + IF PreVoicing THEN + FMT(dzh/xdzh) + ENDIF + + IF nextPh(isPause2) THEN + FMT(dzh/dzh_) addWav(x/dzh_) + ENDIF + FMT(dzh/dzh) addWav(x/dz_pzd) endphoneme \ No newline at end of file diff --git a/phsource/ph_norwegian b/phsource/ph_norwegian index d18efdea..48483215 100644 --- a/phsource/ph_norwegian +++ b/phsource/ph_norwegian @@ -9,182 +9,184 @@ //======= phoneme @ // close schwa - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ unstressed length 120 - formants vowel/@_4 + FMT(vowel/@_4) endphoneme phoneme @2 // open schwa - vowel starttype (@) endtype (a) + vowel starttype #@ endtype #a unstressed length 120 - formants vowel/@_low + FMT(vowel/@_low) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 100 - formants vowel/ii_3 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_3) endphoneme phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 230 - formants vowel/i - after w w/wi2 - linkout ; + IfNextVowelAppend(;) + IF prevPh(w) THEN + VowelStart(w/wi2) + ENDIF + FMT(vowel/i) endphoneme phoneme y - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 120 - formants vowel/yy + FMT(vowel/yy) endphoneme phoneme y: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 260 - formants vowel/y_4 + FMT(vowel/y_4) endphoneme phoneme W - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 120 - formants vowel/oe_2 + FMT(vowel/oe_2) endphoneme phoneme Y: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 260 - formants vwl_no/y# + FMT(vwl_no/y#) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 120 - formants vowel/e_mid - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/e_mid) endphoneme phoneme E: - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 270 - formants vowel/ee_1 + FMT(vowel/ee_1) endphoneme phoneme e: - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 250 - formants vowel/e_2 + FMT(vowel/e_2) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 120 - formants vwl_no/& + FMT(vwl_no/&) endphoneme phoneme a: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 270 - formants vwl_no/& + FMT(vwl_no/&) endphoneme phoneme A - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 130 - formants vowel/aa + FMT(vowel/aa) endphoneme phoneme A: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 280 - formants vowel/aa + FMT(vowel/aa) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 120 - formants vowel/oo + FMT(vowel/oo) endphoneme phoneme o: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 270 - formants vowel/o_2 + FMT(vowel/o_2) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 120 - formants vowel/uu_bck + FMT(vowel/uu_bck) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 240 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme u- - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 120 - formants vwl_no/u# + FMT(vwl_no/u#) endphoneme phoneme u-: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 260 - formants vwl_no/u#2 + FMT(vwl_no/u#2) endphoneme // Diphthongs //=========== phoneme AI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 270 - formants vdiph/0i_2 - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/0i_2) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 270 - formants vdiph/ai_3 - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/ai_3) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 270 - formants vdiph/ooi - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/ooi) endphoneme phoneme u-I - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 270 - formants vdiph/yi - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/yi) endphoneme phoneme Yy - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 270 - formants vwl_no/y#y + FMT(vwl_no/y#y) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 270 - formants vwl_no/au- + FMT(vwl_no/au-) endphoneme diff --git a/phsource/ph_polish b/phsource/ph_polish index 12a879b6..6114ee0a 100644 --- a/phsource/ph_polish +++ b/phsource/ph_polish @@ -5,75 +5,77 @@ phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 190 - formants vowel/a - reduceto a# 0 + ChangeIfDiminished(a#) + FMT(vowel/a) endphoneme phoneme a# - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 170 - formants vowel/a#_2 + FMT(vowel/a#_2) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/e_mid - before _ vowel/ee_1 + IF nextPh(isPause) THEN + FMT(vowel/ee_1) + ENDIF + FMT(vowel/e_mid) endphoneme phoneme E# - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/ee# + FMT(vowel/ee#) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 170 - formants vowel/i_7 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_7) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 180 - formants vowel/oo_5 + FMT(vowel/oo_5) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 180 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme y // close central unrounded (i-bar) - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 180 - formants vowel/ii#_2 + FMT(vowel/ii#_2) endphoneme phoneme E~ - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 250 - formants vnasal/ee_u_n + FMT(vnasal/ee_u_n) endphoneme phoneme O~ - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 250 - formants vnasal/oo_n3 + FMT(vnasal/oo_n3) endphoneme @@ -82,104 +84,114 @@ endphoneme phoneme R liquid - vowelin f1=0 f2=1700 -300 300 f3=-300 80 - vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk - formants r3/r_trill+r3/r_trill.wav%50 trill 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, 50) endphoneme phoneme t vls dnt stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/t_dnt%60 - before _ ustop/t_dnt%35 - switchvoicing d + voicingswitch d + Vowelin f1=0 f2=1600 -300 300 f3=-100 80 + Vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 + IF nextPh(isPause2) THEN + WAV(ustop/t_dnt, 35) + ENDIF + WAV(ustop/t_dnt, 60) endphoneme + phoneme t; vls pal stop palatal - vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 - vowelout f1=1 f2=2700 400 600 f3=200 70 len=50 colr=1 lengthmod 2 - wave ustop/t_pzd%60 - before _ ustop/t_pzd%30 - switchvoicing d; + voicingswitch d; + Vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 + Vowelout f1=1 f2=2700 400 600 f3=200 70 len=50 colr=1 + IF nextPh(isPause2) THEN + WAV(ustop/t_pzd, 30) + ENDIF + WAV(ustop/t_pzd, 60) endphoneme phoneme d vcd dnt stop - vowelin f1=2 f2=1500 -300 300 f3=-150 80 - vowelout f1=2 f2=1500 -300 300 f3=-150 80 - formants d/d+x/d_dnt%110 - before _ d/d_+x/d_ - before r d/dr+x/d_dnt%110 - after _ NULL - after @ d/xd lengthmod 5 - switchvoicing t + voicingswitch t + Vowelin f1=2 f2=1500 -300 300 f3=-150 80 + Vowelout f1=2 f2=1500 -300 300 f3=-150 80 + + IF PreVoicing THEN + FMT(d/xd) + ENDIF + + IF nextPh(isPause2) THEN + FMT(d/d_) addWav(x/d_) + ELIF nextPh(isRhotic) THEN + FMT(d/dr) addWav(x/d_dnt, 110) + ENDIF + + FMT(d/d) addWav(x/d_dnt, 110) endphoneme + phoneme d; vcd alv stop palatal - vowelin f1=2 f2=2700 400 600 f3=200 80 rate len=80 - vowelout f1=2 f2=2700 400 600 f3=200 80 rate len=100 colr=1 - formants d/d+x/d_pzd%80 - before _ d/d_+x/d_pzd%40 - before r d/dr+x/d_pzd%80 - after _ NULL - after @ d/xd_pzd lengthmod 5 - switchvoicing t; + voicingswitch t; + Vowelin f1=2 f2=2700 400 600 f3=200 80 rate len=80 + Vowelout f1=2 f2=2700 400 600 f3=200 80 rate len=100 colr=1 + + IF PreVoicing THEN + FMT(d/xd_pzd) + ENDIF + + IF nextPh(isPause2) THEN + FMT(d/d_) addWav(x/d_pzd, 40) + ELIF nextPh(isRhotic) THEN + FMT(d/dr) addWav(x/d_pzd, 80) + ENDIF + + FMT(d/d) addWav(x/d_pzd, 80) endphoneme phoneme ts - vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/ts - before _ ustop/ts_ - switchvoicing dz + import_phoneme consonants/ts + voicingswitch dz endphoneme phoneme dz - vcd alv afr sibilant - vowelin f1=1 f2=1700 -300 300 f3=-100 80 len=50 - vowelout f1=2 f2=1700 -300 300 f3=-100 80 - formants d/xdz+ustop/ts%140 - before _ voc/z_+ustop/ts_%60 - after _ NULL - after @ d/xd - lengthmod 5 - switchvoicing ts + import_phoneme consonants/dz + voicingswitch ts endphoneme - phoneme w liquid - length 100 - beforenotvowel w/ lengthmod 7 - formants w/w2 - after _ w/w2 + + CALL base/w + IF nextPh(isVowel) THEN + FMT(w/w2) // longer [w] + ENDIF endphoneme phoneme f vls lbd frc - vowelout f1=0 f2=1000 -500 -350 f3=-200 80 lengthmod 3 - wave ufric/f%140 - before s ufric/f%160 - before _ ufric/f_ - switchvoicing v + voicingswitch v + Vowelout f1=0 f2=1000 -500 -350 f3=-200 80 + IF nextPh(isPause2) THEN + WAV(ufric/f_) + ELIF nextPh(s) THEN + WAV(ufric/f, 160) + ENDIF + WAV(ufric/f, 140) endphoneme - diff --git a/phsource/ph_portugal b/phsource/ph_portugal index 44dbe1bf..db9f7d14 100644 --- a/phsource/ph_portugal +++ b/phsource/ph_portugal @@ -6,154 +6,147 @@ phoneme & - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vowel/a#_3 + FMT(vowel/a#_3) unstressed endphoneme phoneme &/ // Used for final "a" when next word starts with "a" - vowel starttype (@) endtype (@) - beforevowel NULL + vowel starttype #@ endtype #@ length 180 - formants vowel/a#_3 + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + FMT(vowel/a#_3) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 180 - formants vowel/a_2 - reduceto & 4 + ChangeIfNotStressed(&) + FMT(vowel/a_2) endphoneme phoneme &~ - vowel starttype (e) endtype (@) + vowel starttype #e endtype #@ length 240 - formants vnasal/ee_n2 + FMT(vnasal/ee_n2) endphoneme phoneme &U~ - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 240 - formants vnasal/a#u_n + FMT(vnasal/a#u_n) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e_mid - reduceto y 2 + ChangeIfUnstressed(y) + FMT(vowel/e_mid) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 160 - formants vowel/e - reduceto y 2 + ChangeIfUnstressed(y) + FMT(vowel/e) endphoneme phoneme y - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 110 - formants vowel/i#_5 + FMT(vowel/i#_5) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/i - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i) endphoneme phoneme i/ // changes to NULL before a vowel - vowel starttype (i) endtype (i) - beforevowel NULL + vowel starttype #i endtype #i length 100 - formants vowel/i#_5 - linkout ; + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + IfNextVowelAppend(;) + FMT(vowel/i#_5) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/0_2 -// reduceto o 4 +// ChangeIfNotStressed(o) + FMT(vowel/0_2) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/o - reduceto u 2 + ChangeIfNotStressed(u) + FMT(vowel/o) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/u_6 + FMT(vowel/u_6) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 110 - beforevowel w - formants vowel/u_6 + IF nextPh(isVowel) THEN + ChangePhoneme(w) + ENDIF + FMT(vowel/u_6) endphoneme phoneme EU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 220 - formants vdiph/eeu_2 + FMT(vdiph/eeu_2) endphoneme phoneme w - starttype w endtype w - liquid - length 100 - beforenotvowel w/ - lengthmod 7 - formants w/w2 - after _ w/w2 + import_phoneme base2/w2 endphoneme phoneme x // [r] for Portugal liquid -// vcd uvl frc - vowelin f1=0 f2=1500 -400 400 f3=-400 80 - length 100 - lengthmod 7 - beforenotvowel r/ trill - formants vwl_fr/@R+r3/rx%120 + lengthmod 7 + Vowelin f1=0 f2=1500 -400 400 f3=-400 80 + IF nextPh(isNotVowel) THEN + ChangePhoneme(r/) + ENDIF + FMT(vwl_fr/@R) addWav(r3/rx, 120) endphoneme phoneme R // for Portugal this is same the as [r] - import_phoneme r pt + import_phoneme pt/r endphoneme phoneme s# // This is [s] for Brazi;, [S] for Portugal - vls pla frc sibilant - vowelin f1=0 f2=2100 100 300 f3=-100 80 - vowelout f1=0 f2=2100 100 300 f3=-100 80 - length 100 - lengthmod 3 - wave ufric/sh - before _ ufric/sh_ - switchvoicing Z + import_phoneme base/S endphoneme diff --git a/phsource/ph_pt_brazil b/phsource/ph_pt_brazil index 1fbced1f..03dc5916 100644 --- a/phsource/ph_pt_brazil +++ b/phsource/ph_pt_brazil @@ -4,231 +4,211 @@ //==================================================== phoneme I // epenthetic i - vowel starttype (i) endtype (i) - length 90 - formants vowel/ii_6 + vowel starttype #i endtype #i unstressed + length 90 + FMT(vowel/ii_6) endphoneme phoneme e~ - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 240 - formants vnasal/e_n + FMT(vnasal/e_n) endphoneme phoneme i~ - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 240 - formants vnasal/i_n - linkout ; + IfNextVowelAppend(;) + FMT(vnasal/i_n) endphoneme phoneme o~ - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 240 - formants vnasal/o_n + FMT(vnasal/o_n) endphoneme phoneme u~ - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 180 - formants vnasal/u_n + FMT(vnasal/u_n) endphoneme phoneme &~ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vnasal/a#_n -// reduceto & 4 +// ChangeIfNotStressed(&) + FMT(vnasal/a#_n) endphoneme phoneme &U~ - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 240 - formants vnasal/a#u_n + FMT(vnasal/a#u_n) endphoneme phoneme oI~ - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 260 - formants vnasal/oi_n + FMT(vnasal/oi_n) endphoneme phoneme & - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vowel/a#_3 + FMT(vowel/a#_3) endphoneme phoneme &/ // Used for final "a" when next word starts with "a" - vowel starttype (@) endtype (@) - beforevowel NULL + vowel starttype #@ endtype #@ length 180 - formants vowel/a#_3 + IF nextPh(isVowel) THEN + ChangePhoneme(NULL) + ENDIF + FMT(vowel/a#_3) endphoneme phoneme A // for "al" in European Portuguese, don't reduce to [&] - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 200 - formants vowel/a_2 + FMT(vowel/a_2) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/ee_3 + FMT(vowel/ee_3) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 160 - formants vowel/e + FMT(vowel/e) endphoneme phoneme y // this is the same as [i] for Brazil - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 110 - formants vowel/ii_6 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_6) endphoneme phoneme i/ // changes to [j] before a vowel - vowel starttype (i) endtype (i) - beforevowel j + vowel starttype #i endtype #i length 150 - formants vowel/ii_6 - linkout ; + IF nextPh(isVowel) THEN + ChangePhoneme(j) + ENDIF + IfNextVowelAppend(;) + FMT(vowel/ii_6) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/0 + FMT(vowel/0) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/u_bck -endphoneme - -phoneme u2 // TEST - vowel starttype (u) endtype (u) - length 160 - formants vowel/u + FMT(vowel/u_bck) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/uu_bck + FMT(vowel/uu_bck) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 230 - formants vdiph/ai - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/ai) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 210 - formants vdiph/ei - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/ei) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 230 - formants vdiph/0i - linkout ; + IfNextVowelAppend(;) + FMT(vdiph/0i) endphoneme phoneme eU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 230 - formants vdiph/eu + FMT(vdiph/eu) endphoneme phoneme EU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 230 - formants vdiph/eeu + FMT(vdiph/eeu) endphoneme phoneme l - liquid - length 100 - lengthmod 7 - beforenotvowel l/2 // use 'dark' [l] after a vowel, should be [w] - formants l/l - after _ l/_l - after t l/tl + import_phoneme en/l // use 'dark' [l] after a vowel, should be [w] endphoneme phoneme x // this is [R] from Slovak/Czech liquid - vowelin f1=0 f2=1700 -300 300 f3=-300 80 - vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk - formants r3/r_trill+r3/r_trill.wav%50 trill 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, 50) endphoneme -phoneme x2 // for "r" - vcd vel frc - vowelin f1=0 f2=1500 0 400 f3=-500 100 - vowelout f1=0 f2=1500 0 400 f3=-500 100 rms=20 - lengthmod 6 - formants voc/Q_less+ufric/x2%110 - before _ voc/Q_+ufric/x2 - switchvoicing x +phoneme r- + import_phoneme en/r- endphoneme phoneme s# // This is [s] for Brazi;, [S] for Portugal - vls alv frc sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 3 - wave ufric/s - before _ ufric/s_ - before p ufric/s! - before t ufric/s! - before k ufric/s! - switchvoicing z + import_phoneme base/s endphoneme phoneme * vcd alv stop - vowelin f1=1 f2=1700 -300 300 f3=0 80 - vowelout f1=2 f2=1700 -300 300 f3=0 80 - formants d/tap2+x/d%40 - after @ d/x_tap lengthmod 6 + Vowelin f1=1 f2=1700 -300 300 f3=0 80 + Vowelout f1=2 f2=1700 -300 300 f3=0 80 + IF PreVoicing THEN + FMT(d/x_tap) + ENDIF + FMT(d/tap2) addWav(x/d, 40) endphoneme + diff --git a/phsource/ph_romanian b/phsource/ph_romanian index d54563b8..8a9d053a 100644 --- a/phsource/ph_romanian +++ b/phsource/ph_romanian @@ -7,65 +7,72 @@ phoneme I^ // "silent i", palatilizes the preceding consonant - vowel starttype (i) endtype (i) - length 70 + vowel starttype #i endtype #i unstressed - formants vwl_ro/ii- - beforevowel ; - after l; vwl_ro/li-10 - after m; vwl_ro/mi - after n; vwl_ro/ni + length 70 + IF nextPh(isVowel) THEN + ChangePhoneme(;) + ENDIF + IF prevPh(l;) THEN + FMT(vwl_ro/li, -10) + ENDIF + IF prevPh(m;) THEN + FMT(vwl_ro/mi) + ENDIF + IF prevPh(n;) THEN + FMT(vwl_ro/ni) + ENDIF + FMT(vwl_ro/ii-) endphoneme phoneme i/ // used for "i" at end of word - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/i - linkout ; - reduceto I^ 4 + ChangeIfNotStressed(I^) + IfNextVowelAppend(;) + FMT(vowel/i) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/e_mid2 + FMT(vowel/e_mid2) endphoneme phoneme y - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vowel/i#_5 + FMT(vowel/i#_5) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 180 - formants vowel/a_2 + FMT(vowel/a_2) endphoneme phoneme @ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 170 -// unstressed - formants vowel/@_low + FMT(vowel/@_low) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/o-_4 + FMT(vowel/o-_4) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 160 - formants vowel/u_2 + FMT(vowel/u_2) endphoneme phoneme Y - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vowel/y# + FMT(vowel/y#) endphoneme @@ -74,245 +81,247 @@ endphoneme phoneme @I - vowel starttype (@) endtype (i) + vowel starttype #@ endtype #i length 250 - formants vdiph/@i_3 + FMT(vdiph/@i_3) endphoneme phoneme @U - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 260 - formants vdiph/@u_3 + FMT(vdiph/@u_3) endphoneme phoneme oU - vowel starttype (o) endtype (u) + vowel starttype #o endtype #u length 260 - formants vdiph/ou_2 + FMT(vdiph/ou_2) endphoneme phoneme iI - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 250 - formants vdiph/ii + FMT(vdiph/ii) endphoneme phoneme yI - vowel starttype (@) endtype (i) + vowel starttype #@ endtype #i length 210 - formants vdiph/i#i + FMT(vdiph/i#i) endphoneme phoneme yU - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 230 - formants vdiph2/uw_3 + FMT(vdiph2/uw_3) endphoneme phoneme ea - vowel starttype (e) endtype (a) + vowel starttype #e endtype #a length 250 - formants vdiph2/ea + FMT(vdiph2/ea) endphoneme phoneme eo - vowel starttype (e) endtype (o) + vowel starttype #e endtype #o length 270 - formants vdiph2/eo + FMT(vdiph2/eo) endphoneme phoneme e[u - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 250 - formants vdiph2/e[u + FMT(vdiph2/e[u) endphoneme phoneme Oa - vowel starttype (o) endtype (a) + vowel starttype #o endtype #a length 250 - formants vdiph2/oa + FMT(vdiph2/oa) endphoneme // Consonants phoneme r - liquid starttype #r endtype #r - length 100 - lengthmod 7 - beforenotvowel r/ + liquid trill - formants r/rr - after _ r/rr - after t r/trr p r/trr k r/trr - before _ r/r_ + lengthmod 7 + IF nextPh(isNotVowel) THEN + ChangePhoneme(r/) + ENDIF + + NextVowelStarts + VowelStart(r/r@, -15) + VowelStart(r/ra, -15) + VowelStart(r/re, -15) + VowelStart(r/ri, -15) + VowelStart(r/ro, -15) + VowelStart(r/ru, -15) + EndSwitch + + IF prevPh(isVowel) THEN + VowelEnding(r/xr, -50) + ENDIF + + IF prevPh(t) OR prevPh(p) OR prevPh(k) THEN + FMT(r/trr) + ENDIF + FMT(r/rr) endphoneme phoneme l; - liquid starttype l - vowelout colr=1 - length 100 + liquid lengthmod 7 - beforenotvowel l/ - formants l/l - after _ l/_l - after t l/tl - after l/ l/l_long // double l, make it longer -endphoneme + + CALL base/l + Vowelout colr=1 + endphoneme + phoneme m; vcd blb nasal - vowelout f1=2 f2=1000 -500 -350 f3=200 80 brk colr=1 - starttype m endtype m - length 100 lengthmod 4 - formants NULL - after _ m/_m - before _ m/m_ - before (r) m/mj + + CALL base/m + Vowelout f1=2 f2=1000 -500 -350 f3=200 80 brk colr=1 endphoneme phoneme n; vcd alv nasal - vowelout f1=2 f2=1700 -300 250 f3=200 80 rms=20 brk colr=1 - starttype n endtype n - length 100 lengthmod 4 - formants NULL - after _ n/_n - after n n/_n // lengthen [nn] - before _ n/n_ - before (r) n/nj + + CALL base/n + Vowelout f1=2 f2=1700 -300 250 f3=200 80 rms=20 brk colr=1 endphoneme phoneme p; vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 colr=1 lengthmod 2 - wave ustop/p_unasp - before _ ustop/p_unasp_%80 - before r ustop/pr - before l ustop/pl - switchvoicing b + voicingswitch b + CALL base2/p + Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 colr=1 endphoneme phoneme t; // dental variant of /t/ vls dnt stop - vowelin f1=0 f2=1700 100 300 f3=0 80 - vowelout f1=0 f2=1700 100 250 f3=0 80 rms=20 colr=1 lengthmod 2 - wave ustop/t_dnt%50 - before _ ustop/t_dnt%35 - switchvoicing d + voicingswitch d + CALL base2/t + Vowelout f1=0 f2=1700 100 250 f3=0 80 rms=20 colr=1 endphoneme phoneme ts; vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 colr=1 lengthmod 2 - wave ustop/ts - before _ ustop/ts_ + CALL base2/ts + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 colr=1 endphoneme phoneme f; vls lbd frc - vowelout f1=0 f2=1000 -500 -350 f3=-200 80 colr=1 lengthmod 3 - wave ufric/f - before _ ufric/f_ - switchvoicing v + voicingswitch v + CALL base/f + Vowelout f1=0 f2=1000 -500 -350 f3=-200 80 colr=1 endphoneme + phoneme s; vls alv frc sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 colr=1 + voicingswitch z; lengthmod 3 - wave ufric/s_pzd%50 - switchvoicing z; + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 colr=1 + WAV(ufric/s_pzd, 50) endphoneme phoneme S; vls pla frc sibilant - vowelin f1=0 f2=2100 100 300 f3=-100 80 - vowelout f1=0 f2=2100 100 300 f3=-100 80 colr=1 - length 100 + voicingswitch Z; lengthmod 3 - wave ufric/sh_pzd - switchvoicing Z; + Vowelin f1=0 f2=2100 100 300 f3=-100 80 + Vowelout f1=0 f2=2100 100 300 f3=-100 80 colr=1 + WAV(ufric/sh_pzd) endphoneme phoneme b; vcd blb stop - vowelout f1=2 f2=1000 -500 -300 f3=-300 80 brk colr=1 - formants b/b+x/b - before (i) b/bi+x/b + voicingswitch p; lengthmod 5 - switchvoicing p + Vowelout f1=2 f2=1000 -500 -300 f3=-300 80 brk colr=1 + + IF nextPh(#i) THEN + FMT(b/bi) addWav(x/b) + ENDIF + FMT(b/b) addWav(x/b) endphoneme phoneme d; // dental variant of /d/ vcd dnt stop - vowelin f1=2 f2=1700 100 300 f3=0 80 - vowelout f1=2 f2=1700 100 300 f3=0 80 colr=1 - formants d/d+x/d_dnt%110 - before _ d/d_+x/d_ - before r d/dr+x/d_dnt%110 - after _ NULL - after @ d/xd + voicingswitch t; lengthmod 5 - switchvoicing t + CALL base2/d + Vowelin f1=2 f2=1700 100 300 f3=0 80 + Vowelout f1=2 f2=1700 100 300 f3=0 80 colr=1 endphoneme + phoneme *; // flap vcd alv flp - vowelout f1=3 f2=1700 -300 300 f3=-300 80 rms=35 len=15 colr=1 - formants d/tap+r3/rx - vowelin f1=0 f2=1700 -300 300 f3=-400 80 - before (i) d/tap_i+r3/rx lengthmod 2 + Vowelout f1=3 f2=1700 -300 300 f3=-300 80 rms=35 len=15 colr=1 + IF nextPh(#i) THEN + Vowelin f1=0 f2=1700 -300 300 f3=-400 80 + FMT(d/tap_i) addWav(r3/rx) + ENDIF + FMT(d/tap) addWav(r3/rx) endphoneme phoneme v; vcd lbd frc - vowelin f1=0 f2=1000 -300 -200 f3=-300 100 - vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50 colr=1 lengthmod 6 - formants voc/v+vocw/v - before _ voc/v_+vocw/v - switchvoicing f + voicingswitch f; + Vowelin f1=0 f2=1000 -300 -200 f3=-300 100 + Vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50 colr=1 + IF nextPh(isPause2) THEN + FMT(voc/v_) addWav(vocw/v) + ENDIF + FMT(voc/v) addWav(vocw/v) endphoneme + phoneme z; vcd alv frc sibilant - vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 colr=1 - formants voc/z+ufric/s_ - before _ voc/z_+ufric/s_ lengthmod 6 - switchvoicing s + voicingswitch s; + Vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 colr=1 + IF nextPh(isPause2) THEN + FMT(voc/z_) addWav(ufric/s_) + ENDIF + FMT(voc/z) addWav(ufric/s_) endphoneme phoneme Z; vcd pla frc sibilant - vowelin f1=0 f2=2000 0 300 f3=-200 80 colr=1 - vowelout f1=2 f2=2000 0 300 f3=-200 80 brk - formants voc/zh+vocw/zh - before _ voc/zh_+vocw/zh lengthmod 6 - switchvoicing S + voicingswitch S; + Vowelin f1=0 f2=2000 0 300 f3=-200 80 colr=1 + Vowelout f1=2 f2=2000 0 300 f3=-200 80 brk + IF nextPh(isPause2) THEN + FMT(voc/zh_) addWav(vocw/zh) + ENDIF + FMT(voc/zh) addWav(vocw/zh) endphoneme - diff --git a/phsource/ph_russian b/phsource/ph_russian index 94942097..b5ea8768 100755 --- a/phsource/ph_russian +++ b/phsource/ph_russian @@ -1,68 +1,72 @@ phoneme l - liquid - length 100 - lengthmod 7 - beforenotvowel l/2 // use 'dark' [l] after a vowel - formants l/l - after _ l/_l t l/tl + import_phoneme en/l endphoneme phoneme r - liquid starttype #r endtype #r - length 100 - lengthmod 7 - beforenotvowel r/ + liquid trill - formants r/rr - after _ r/rr - after t r/trr p r/trr k r/trr - before _ r/r_ + lengthmod 7 + + NextVowelStarts + VowelStart(r/r@, -15) + VowelStart(r/ra, -15) + VowelStart(r/re, -15) + VowelStart(r/ri, -15) + VowelStart(r/ro, -15) + VowelStart(r/ru, -15) + EndSwitch + + IF nextPh(isNotVowel) THEN + ChangePhoneme(r/) + ENDIF + IF prevPhW(t) OR prevPhW(p) OR prevPhW(k) THEN + FMT(r/trr) + ENDIF + FMT(r/rr) endphoneme phoneme r/ // used for [r] when not preceding a vowel liquid - length 100 - lengthmod 2 // - formants r3/r_+r3/rx - before n r3/r_n+r3/rx - after _ r/rr - after t r/trr p r/trr k r/trr + lengthmod 2 + IF nextPh(n) THEN + FMT(r3/r_n) addWav(r3/rx) + ENDIF + FMT(r3/r_) addWav(r3/rx) endphoneme phoneme ts - vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/ts - before _ ustop/ts_ + import_phoneme consonants/ts endphoneme phoneme dZ; vcd pal afr sibilant palatal - vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 - formants dzh/dzh+x/dz_pzd - before _ dzh/dzh_+x/dzh_ - after _ NULL - after @ dzh/xdzh + voicingswitch tS; lengthmod 5 - switchvoicing ts; + Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 + + IF PreVoicing THEN + FMT(dzh/xdzh) + ENDIF + + IF nextPh(isPause2) THEN + FMT(dzh/dzh_) addWav(x/dzh_) + ENDIF endphoneme phoneme tS; vls pal afr sibilant palatal - vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 + voicingswitch dZ; lengthmod 2 - wave ustop/ts_pzd - before _ ustop/ts_pzd - switchvoicing dz; + Vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 + + WAV(ustop/ts_pzd) endphoneme @@ -70,73 +74,37 @@ endphoneme // Palatalized versions of consonants phoneme t - vls dnt stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/t_dnt%60 - before _ ustop/t_dnt%35 - before r ustop/tr - switchvoicing d + import_phoneme pl/t endphoneme phoneme t; - vls pal stop palatal - vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 - vowelout f1=1 f2=2700 400 600 f3=200 70 len=50 - lengthmod 2 - wave ustop/t_pzd%60 - before _ ustop/t_pzd%30 - switchvoicing d; + import_phoneme pl/t; endphoneme - phoneme d - vcd dnt stop - vowelin f1=2 f2=1500 -300 300 f3=-150 80 - vowelout f1=2 f2=1500 -300 300 f3=-150 80 - formants d/d+x/d_dnt%110 - before _ d/d_+x/d_ - before r d/dr+x/d_dnt%110 - after _ NULL - after @ d/xd - lengthmod 5 - switchvoicing t + import_phoneme pl/d endphoneme phoneme d; - vcd alv stop palatal - vowelin f1=2 f2=2700 400 600 f3=200 80 rate len=80 - vowelout f1=2 f2=2700 400 600 f3=200 80 rate len=100 - formants d/d+x/d_pzd%80 - before _ d/d_+x/d_pzd%40 - before r d/dr+x/d_pzd%80 - after _ NULL - after @ d/xd_pzd - lengthmod 5 - switchvoicing t; + import_phoneme pl/d; +endphoneme + +phoneme m; + import_phoneme ro/m; endphoneme phoneme I^ // "silent i", palatilizes the preceding consonant - vowel starttype (i) endtype (i) - length 70 + vowel starttype #i endtype #i unstressed nonsyllabic - formants vwl_ru/ii- - beforevowel ; - after m; vwl_ro/mi -endphoneme - -phoneme m; - vcd blb nasal - vowelout f1=2 f2=1000 -500 -350 f3=200 80 brk colr=1 - starttype m endtype m - length 100 - lengthmod 4 - formants NULL - after _ m/_m - before _ m/m_ - before (r) m/mj + Length 70 + IF nextPh(isVowel) THEN + ChangePhoneme(;) + ENDIF + IF prevPh(m;) THEN + FMT(vwl_ro/mi) + ENDIF + FMT(vwl_ru/ii-) endphoneme @@ -146,172 +114,300 @@ endphoneme //******************************************************************* phoneme i - vowel starttype (i) endtype (i) - length 100 - formants vwl_ru/i + vowel starttype #i endtype #i + Length 100 + FMT(vwl_ru/i) endphoneme + phoneme I# - vowel starttype (i) endtype (i) - length 80 - formants vwl_ru/ii# + vowel starttype #i endtype #i + Length 80 + IF nextVowel(isMaxStress) THEN + ChangePhoneme(I) + ENDIF + IF thisPh(isMaxStress) THEN + ChangePhoneme(i) + ENDIF + FMT(vwl_ru/ii#) endphoneme + phoneme y - vowel starttype (i) endtype (i) - length 100 - formants vwl_ru/i# + vowel starttype #i endtype #i + Length 100 + FMT(vwl_ru/i#) endphoneme + phoneme I - vowel starttype (i) endtype (i) - length 80 - formants vwl_ru/ii + vowel starttype #i endtype #i + Length 80 + + IF thisPh(isMaxStress) THEN + IF prevPhW(j) THEN + ChangePhoneme(a) + ELSE + ChangePhoneme(i) + ENDIF + ENDIF + FMT(vwl_ru/ii) endphoneme + phoneme I2 - vowel starttype (i) endtype (i) - length 80 - formants vwl_ru/ii + vowel starttype #i endtype #i + Length 80 + IF thisPh(isMaxStress) THEN + ChangePhoneme(e) + ENDIF + IF prevPhW(isPalatal) THEN + ChangePhoneme(I) + ENDIF + FMT(vwl_ru/ii) endphoneme + phoneme I3 - vowel starttype (i) endtype (i) - length 80 - formants vwl_ru/ii + vowel starttype #i endtype #i + Length 80 + IF thisPh(isMaxStress) THEN + IF prevPhW(j) THEN + ChangePhoneme(e) + ELSE + ChangePhoneme(ja) + ENDIF + ENDIF + IF prevPhW(isPalatal) THEN + ChangePhoneme(I) + ENDIF + FMT(vwl_ru/ii) endphoneme + phoneme E - vowel starttype (e) endtype (e) - length 200 - formants vwl_ru/e + vowel starttype #e endtype #e + Length 200 + FMT(vwl_ru/e) endphoneme + phoneme E# - vowel starttype (e) endtype (e) - length 100 - formants vwl_ru/E# + vowel starttype #e endtype #e + Length 100 + IF thisPh(isMaxStress) THEN + IF prevPhW(j) THEN + ChangePhoneme(e) + ELSE + ChangePhoneme(E) + ENDIF + ENDIF + FMT(vwl_ru/E#) endphoneme + phoneme E2 - vowel starttype (e) endtype (e) - length 80 - formants vwl_ru/E@ + vowel starttype #e endtype #e + Length 80 + IF nextVowel(isMaxStress) THEN + IF prevPh(j) THEN + ChangePhoneme(I3) + ELSE + ChangePhoneme(E#) + ENDIF + ENDIF + + IF thisPh(isMaxStress) THEN + IF prevPhW(j) THEN + ChangePhoneme(e) + ELSE + ChangePhoneme(E) + ENDIF + ENDIF + + FMT(vwl_ru/E@) endphoneme + phoneme E3 - vowel starttype (e) endtype (e) - length 80 - formants vwl_ru/E@ + vowel starttype #e endtype #e + Length 80 + IF nextVowel(isMaxStress) THEN + ChangePhoneme(I) + ENDIF + IF thisPh(isMaxStress) THEN + ChangePhoneme(e) + ENDIF + IF prevPhW(isPalatal) THEN + ChangePhoneme(E2) + ENDIF + FMT(vwl_ru/E@) endphoneme -phoneme A - vowel starttype (a) endtype (a) - length 100 - formants vwl_ru/a -endphoneme phoneme o - vowel starttype (o) endtype (o) - length 100 - formants vwl_ru/o + vowel starttype #o endtype #o + Length 100 + FMT(vwl_ru/o) endphoneme + phoneme O - vowel starttype (o) endtype (o) - length 80 - formants vwl_ru/oo + vowel starttype #o endtype #o + Length 80 + IF prevPhW(isPalatal) THEN + ChangePhoneme(8) + ENDIF + IF thisPh(isMaxStress) THEN + ChangePhoneme(o) + ENDIF endphoneme + phoneme u - vowel starttype (u) endtype (u) - length 80 - formants vwl_ru/u + vowel starttype #u endtype #u + Length 80 + FMT(vwl_ru/u) endphoneme phoneme u# - vowel starttype (u) endtype (u) - length 80 - formants vwl_ru/u# + vowel starttype #u endtype #u + Length 80 + FMT(vwl_ru/u#) endphoneme phoneme u" - vowel starttype (u) endtype (u) - length 150 - formants vwl_ru/u#u + vowel starttype #u endtype #u + Length 150 + FMT(vwl_ru/u#u) endphoneme phoneme 8 - vowel starttype (o) endtype (o) - length 150 - formants vwl_ru/8 - reduceto V 4 + vowel starttype #o endtype #o + Length 150 + ChangeIfNotStressed(V) + FMT(vwl_ru/8) endphoneme phoneme e - vowel starttype (e) endtype (e) - length 100 - formants vwl_ru/ee + vowel starttype #e endtype #e + Length 100 + FMT(vwl_ru/ee) endphoneme phoneme ju - vowel starttype (u) endtype (u) - length 190 - formants vwl_ru/ju + vowel starttype #u endtype #u + Length 190 + FMT(vwl_ru/ju) endphoneme phoneme ja - vowel starttype (i) endtype (a) - length 200 - formants vwl_ru/ja -endphoneme - -phoneme V - vowel starttype (a) endtype (@) - length 80 - formants vowel/V_2 - unstressed + vowel starttype #i endtype #a + Length 200 + FMT(vwl_ru/ja) endphoneme phoneme V# - vowel starttype (a) endtype (@) - length 80 - formants vowel/V_2 + vowel starttype #a endtype #@ unstressed + Length 80 +// IF nextVowel(isMaxStress) THEN + // not needed? because V# is only used at end-of-word +// ChangePhoneme(I3) +// ENDIF + + IF thisPh(isMaxStress) THEN + IF prevPhW(j) THEN + ChangePhoneme(A) + ELSE + ChangePhoneme(ja) + ENDIF + ENDIF + + IF prevPhW(isPalatal) THEN + ChangePhoneme(V) + ENDIF + + FMT(vowel/V_2) endphoneme -//phoneme U -// vowel starttype (u) endtype (u) -// length 140 -// formants vowel/uu -// unstressed -//endphoneme phoneme Y // will not be used in future - vowel starttype (u) endtype (u) - length 140 - formants vowel/ii# + vowel starttype #u endtype #u unstressed + Length 140 + FMT(vowel/ii#) endphoneme + +phoneme A + vowel starttype #a endtype #a + Length 100 + FMT(vwl_ru/a) +endphoneme + + phoneme a - vowel starttype (a) endtype (a) - formants vwl_ru/aa - length 100 + vowel starttype #a endtype #a + Length 100 + + IF prevPhW(j) THEN + ELSE + IF thisPh(isMaxStress) THEN + IF prevPhW(isPalatal) THEN + ChangePhoneme(ja) + ELSE + ChangePhoneme(A) + ENDIF + ELSE + IF prevPhW(isPalatal) THEN + ChangePhoneme(I) + ENDIF + ENDIF + ENDIF + + IF thisPh(isWordEnd) THEN + FMT(vowel/a#_3) + ENDIF + FMT(vwl_ru/aa) endphoneme + +phoneme V + vowel starttype #a endtype #@ + Length 80 + unstressed + + IF nextVowel(isMaxStress) THEN + ChangePhoneme(a) + ENDIF + + IF thisPh(isMaxStress) THEN + IF prevPhW(j) THEN + ChangePhoneme(a) + ELIF prevPhW(isPalatal) THEN + ChangePhoneme(ja) + ELSE + ChangePhoneme(A) + ENDIF + ENDIF + + FMT(vowel/V_2) +endphoneme + + phoneme a# - vowel starttype (a) endtype (a) - formants vowel/a#_3 - length 100 + vowel starttype #a endtype #a + Length 100 + FMT(vowel/a#_3) endphoneme phoneme R4 liquid - vowelin f1=0 f2=1500 -300 300 f3=-200 80 rms=60 brk - vowelout f1=2 f2=1500 -300 300 f3=-200 80 - formants r3/r_ru2+r3/r_ru%50 lengthmod 6 + Vowelin f1=0 f2=1500 -300 300 f3=-200 80 rms=60 brk + Vowelout f1=2 f2=1500 -300 300 f3=-200 80 + FMT(r3/r_ru2) addWav(r3/r_ru, 50) endphoneme diff --git a/phsource/ph_serbian b/phsource/ph_serbian index f4eed0fa..df49d7c4 100644 --- a/phsource/ph_serbian +++ b/phsource/ph_serbian @@ -4,53 +4,59 @@ // to be included here. phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 120 - formants vowel/ii_6 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_6) endphoneme phoneme & - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 140 - formants vowel/a# + FMT(vowel/a#) endphoneme phoneme r* // this is [R] from Slovak/Czech liquid - vowelin f1=0 f2=1700 -300 300 f3=-300 80 - vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk - formants r3/r_trill+r3/r_trill.wav%50 trill 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, 50) endphoneme phoneme t // dental variant of /t/ vls dnt stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/t_sr%50 - before _ ustop/t_sr%35 - switchvoicing d + voicingswitch d + Vowelin f1=0 f2=1600 -300 300 f3=-100 80 + Vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 + IF nextPh(isPause2) THEN + WAV(ustop/t_sr, 35) + ENDIF + WAV(ustop/t_sr, 50) endphoneme phoneme d vcd alv stop - vowelin f1=2 f2=1700 -300 300 f3=-100 80 amp=16 - vowelout f1=2 f2=1700 -300 300 f3=-100 80 - formants d/d_dnt+ustop/t_sr%50 - before _ d/d_dnt+ustop/t_sr - before r d/d_dnt+ustop/t_sr%50 - after _ d/d_dnt+ustop/t_sr - after @ d/d_dnt+ustop/t_sr lengthmod 5 - switchvoicing t + voicingswitch t + Vowelin f1=2 f2=1700 -300 300 f3=-100 80 amp=16 + Vowelout f1=2 f2=1700 -300 300 f3=-100 80 + + IF PreVoicing THEN + FMT(d/xd) + ENDIF + + IF nextPh(isPause2) THEN + FMT(d/d_dnt) addWav(ustop/t_sr) + ENDIF + FMT(d/d_dnt) addWav(ustop/t_sr, 50) endphoneme @@ -58,12 +64,12 @@ endphoneme phoneme x vls vel frc lengthmod 3 - wave ufric/x_sr%70 // no vowel following - before (a) ufric/x_sr - before (e) ufric/ch_sr - before (i) ufric/ch_sr - before (o) ufric/x_sr - before (u) ufric/x_sr + IF nextPh(#i) OR nextPh(#e) THEN + WAV(ufric/ch_sr) + ELIF nextPh(isVowel) THEN + WAV(ufric/x_sr) + ENDIF + WAV(ufric/x_sr, 70) // no vowel following endphoneme @@ -71,84 +77,86 @@ endphoneme phoneme h vls vel frc lengthmod 3 - wave ufric/x_sr%70 // no vowel following - before (@) h/h@ - before (a) ufric/x_sr - before (e) ufric/ch_sr - before (i) ufric/ch_sr - before (o) ufric/x_sr - before (u) ufric/x_sr + IF nextPh(#@) THEN + WAV(h/h@) + ELIF nextPh(#i) OR nextPh(#e) THEN + WAV(ufric/ch_sr) + ELIF nextPh(isVowel) THEN + WAV(ufric/x_sr) + ENDIF + WAV(ufric/x_sr, 70) // no vowel following endphoneme - - phoneme dZ vcd pla afr sibilant - vowelin f1=2 f2=2300 200 400 f3=100 80 - vowelout f1=2 f2=2300 250 300 f3=100 80 brk - formants dzh/dzh+ufric/sh_pzd2 - before _ dzh/dzh+ufric/sh_pzd2 - after _ NULL - after @ dzh/dzh+ufric/sh_pzd2 lengthmod 5 - switchvoicing tS + voicingswitch tS + Vowelin f1=2 f2=2300 200 400 f3=100 80 + Vowelout f1=2 f2=2300 250 300 f3=100 80 brk + + IF PreVoicing THEN + FMT(dzh/xdzh) + ENDIF + + FMT(dzh/dzh) addWav(ufric/sh_pzd2) endphoneme phoneme dZ; vcd pla afr sibilant palatal - vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 - formants dzh/dzh+ustop/ts_sr - before _ dzh/dzh+ustop/ts_sr - after _ NULL - after @ dzh/dzh+ustop/ts_sr lengthmod 5 - switchvoicing tS; + voicingswitch tS; + Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 + + IF PreVoicing THEN + FMT(dzh/xdzh) + ENDIF + + FMT(dzh/dzh) addWav(ustop/ts_sr) endphoneme phoneme tS vls pla afr sibilant - vowelin f1=0 f2=2300 200 400 f3=-100 80 lengthmod 2 - wave ustop/tsh_sr%50 - before _ ustop/tsh_sr%50 - switchvoicing dZ + voicingswitch dZ + Vowelin f1=0 f2=2300 200 400 f3=-100 80 + WAV(ustop/tsh_sr, 50) endphoneme phoneme tS; vls pal afr sibilant palatal - vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 lengthmod 2 - wave ustop/ts_sr - before _ ustop/ts_sr - switchvoicing dZ; + voicingswitch dZ; + Vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 + WAV(ustop/ts_sr) endphoneme - - phoneme Z vcd pla frc sibilant - vowelin f1=0 f2=2000 0 300 f3=-200 80 - vowelout f1=2 f2=2000 0 300 f3=-200 80 brk - formants voc/zh+ufric/sh_pzd2%60 - before _ voc/zh+ufric/sh_pzd2%50 lengthmod 6 - switchvoicing S + voicingswitch S + Vowelin f1=0 f2=2000 0 300 f3=-200 80 + Vowelout f1=2 f2=2000 0 300 f3=-200 80 brk + IF nextPh(isPause2) THEN + FMT(voc/zh) addWav(ufric/sh_pzd2, 50) + ENDIF + FMT(voc/zh) addWav(ufric/sh_pzd2, 60) endphoneme phoneme S vls pla frc sibilant - vowelin f1=0 f2=2100 100 300 f3=-100 80 - vowelout f1=0 f2=2100 100 300 f3=-100 80 - length 100 lengthmod 3 - wave ufric/sh_pzd2%70 - before _ ufric/sh_pzd2%60 - switchvoicing Z + voicingswitch Z + Vowelin f1=0 f2=2100 100 300 f3=-100 80 + Vowelout f1=0 f2=2100 100 300 f3=-100 80 + IF nextPh(isPause2) THEN + WAV(ufric/sh_pzd2, 60) + ENDIF + WAV(ufric/sh_pzd2, 70) endphoneme diff --git a/phsource/ph_slovak b/phsource/ph_slovak index 07108eaa..2737e9d6 100644 --- a/phsource/ph_slovak +++ b/phsource/ph_slovak @@ -1,201 +1,191 @@ - + phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 110 - formants vowel/ii_3 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_3) endphoneme phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 260 - formants vowel/i_3 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/i_3) endphoneme phoneme & - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 120 - formants vowel/ee_6 + FMT(vowel/ee_6) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 120 - formants vowel/e_mid2 + FMT(vowel/e_mid2) endphoneme phoneme e: - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 290 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 120 - formants vowel/a + FMT(vowel/a) endphoneme phoneme a: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 290 - formants vowel/a + FMT(vowel/a) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 120 - formants vowel/oo_1 + FMT(vowel/oo_1) endphoneme phoneme o: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 290 - formants vowel/oo_1 + FMT(vowel/oo_1) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 110 - formants vowel/u_2 + FMT(vowel/u_2) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 280 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 270 - formants vdiph/au_4 + FMT(vdiph/au_4) endphoneme phoneme eU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 260 - formants vdiph/eu + FMT(vdiph/eu) endphoneme phoneme oU - vowel starttype (o) endtype (u) + vowel starttype #o endtype #u length 260 - formants vdiph/ou_2 + FMT(vdiph/ou_2) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 270 - formants vdiph/ai + FMT(vdiph/ai) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 260 - formants vdiph/eei_3 + FMT(vdiph/eei_3) endphoneme phoneme r- - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 220 - formants vowelr/r-voc + FMT(vowelr/r-voc) endphoneme phoneme r: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 300 - formants vowelr/r-voc + FMT(vowelr/r-voc) endphoneme phoneme R^ // Czech r-caron vcd pla frc sibilant - vowelin f1=0 f2=1700 -300 300 f3=-300 80 - vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk - formants voc/zh+r3/rz_cs%50 lengthmod 6 + Vowelin f1=0 f2=1700 -300 300 f3=-300 80 + Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk + FMT(voc/zh) addWav(r3/rz_cs, 50) endphoneme phoneme R^/ // Czech r-caron (weaker, for after p,f,t,k) vcd pla frc sibilant - vowelin f1=0 f2=1700 -300 300 f3=-300 80 - vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk - formants voc/zh_2+r3/rz_cs%25 lengthmod 6 + Vowelin f1=0 f2=1700 -300 300 f3=-300 80 + Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk + FMT(voc/zh_2) addWav(r3/rz_cs, 25) endphoneme phoneme l- - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 140 - formants vwl_hi/l-voc + FMT(vwl_hi/l-voc) endphoneme + phoneme l: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 250 - formants vwl_hi/l-voc + FMT(vwl_hi/l-voc) endphoneme + phoneme l - liquid - length 100 - lengthmod 7 - beforenotvowel l/2 // use 'dark' [l] after a vowel - formants l/l - after _ l/_l t l/tl + import_phoneme en/l // use 'dark' [l] after a vowel endphoneme + phoneme w - liquid - length 100 - beforenotvowel w/ - lengthmod 7 - formants w/w2 - after _ w/w2 + import_phoneme base2/w2 endphoneme + phoneme t vls alv stop - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/t_short - before _ ustop/t_ - switchvoicing d + voicingswitch d + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + IF nextPh(isPause2) THEN + WAV(ustop/t_) + ENDIF + WAV(ustop/t_short) endphoneme + phoneme p vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 lengthmod 2 - wave ustop/p_unasp%120 - before _ ustop/p_unasp_%80 - before l ustop/pl - switchvoicing b + 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) + ELIF nextPh(l) THEN + WAV(ustop/pl) + ENDIF + WAV(ustop/p_unasp, 120) endphoneme phoneme k - vls vel stop - vowelin f1=0 f2=2300 200 400 f3=-100 80 - vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/k_unasp%60 // weaker - before _ ustop/k_ - before r ustop/kr - before l ustop/kl - before (i) ustop/ki - switchvoicing g + import_phoneme base2/k endphoneme - diff --git a/phsource/ph_spanish b/phsource/ph_spanish index dc8e451c..0e51d0fd 100644 --- a/phsource/ph_spanish +++ b/phsource/ph_spanish @@ -4,82 +4,82 @@ //==================================================== phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 170 - formants vowel/e_mid2 + FMT(vowel/e_mid2) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/oo + FMT(vowel/oo) endphoneme - phoneme g vcd vel stop - vowelin f1=2 f2=2300 200 300 f3=-300 80 - vowelout f1=2 f2=2300 250 300 f3=-300 80 brk - formants g/g+x/g2 // weaker [g] - before _ g/g_+x/g_ - after _ NULL - after @ g/xg lengthmod 5 - switchvoicing k + voicingswitch k + Vowelin f1=2 f2=2300 200 300 f3=-300 80 + Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk + + IF PreVoicing THEN + FMT(g/xg) + ENDIF + + IF nextPh(isPause2) THEN + FMT(g/g_) addWav(x/g_) + ENDIF + FMT(g/g) addWav(x/g2) // weaker [g] endphoneme phoneme D vcd dnt frc - vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 - formants voc/dh+vocw/dh - before _ voc/dh_+vocw/dh%40 lengthmod 6 - switchvoicing T + voicingswitch T + CALL base/D + IF nextPh(isPause2) THEN + FMT(voc/dh_) addWav(vocw/dh, 40) // weaker + ENDIF endphoneme phoneme s vls alv frc sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 3 - wave ufric/s - before _ ufric/s_%60 // quieter 's' at end of word - before p ufric/s! - before t ufric/s! - before k ufric/s! - switchvoicing z -endphoneme + voicingswitch z + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - -phoneme r // TEST flap ?? - vcd alv flp - brkafter - vowelout f1=3 f2=1500 -400 300 f3=-100 80 rms=35 len=50 - vowelin f1=0 f2=1500 -300 300 f3=-100 80 - formants d/tap4+x/d_%30 - lengthmod 3 + IF nextPh(isPause) THEN + WAV(ufric/s_, 60) // quieter 's' at end of word + ELIF nextPh(p) OR nextPh(t) OR nextPh(k) THEN + WAV(ufric/s!) + ENDIF + WAV(ufric/s) endphoneme phoneme v# // a shorter [v], a little towards [b] vcd lbd frc - vowelin f1=1 f2=1000 -300 -200 f3=-300 100 - vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=10 lengthmod 6 - formants voc/v2+vocw/v%80 - before _ voc/v_+vocw/v%80 - switchvoicing f + voicingswitch f + Vowelin f1=1 f2=1000 -300 -200 f3=-300 100 + Vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=10 + + IF nextPh(isPause2) THEN + FMT(voc/v_) addWav(vocw/v, 80) + ENDIF + FMT(voc/v2) addWav(vocw/v, 80) endphoneme diff --git a/phsource/ph_swahili b/phsource/ph_swahili index d4479d04..a64dee69 100644 --- a/phsource/ph_swahili +++ b/phsource/ph_swahili @@ -6,114 +6,74 @@ // Vowels phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 165 - formants vowel/i -// linkout ; + FMT(vowel/i) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/e_mid2 + FMT(vowel/e_mid2) endphoneme phoneme a/ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vowel/a#_2 + FMT(vowel/a#_2) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 180 - formants vowel/a_5 - reduceto a/ 2 + ChangeIfUnstressed(a/) + FMT(vowel/a_5) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 180 - formants vowel/0_2 + FMT(vowel/0_2) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 170 - formants vowel/u_5 + FMT(vowel/u_5) endphoneme phoneme m- - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 190 - formants vnasal/m- + FMT(vnasal/m-) endphoneme phoneme n- - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 190 - formants vnasal/n- + FMT(vnasal/n-) endphoneme phoneme N- - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 190 - formants vnasal/nn- + FMT(vnasal/nn-) endphoneme // Consonants -phoneme r - liquid starttype #r endtype #r - length 100 - lengthmod 7 - beforenotvowel r/ - trill - formants r/rr - after _ r/rr - after t r/trr p r/trr k r/trr - before _ r/r_ -endphoneme - phoneme t // dental variant of /t/ - vls dnt stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/t_dnt%50 - before _ ustop/t_dnt%35 - switchvoicing d + import_phoneme base2/t endphoneme phoneme d // dental variant of /d/ - vcd dnt stop - vowelin f1=2 f2=1500 -300 300 f3=-150 80 - vowelout f1=2 f2=1500 -300 300 f3=-150 80 - formants d/d+x/d_dnt%110 - before _ d/d_+x/d_ - before r d/dr+x/d_dnt%110 - after _ NULL - after @ d/xd - lengthmod 5 - switchvoicing t -endphoneme - -phoneme k - vls vel stop - vowelin f1=0 f2=2300 100 200 f3=-200 80 - vowelout f1=0 f2=2300 300 400 f3=-200 80 rms=20 - lengthmod 2 - wave ustop/k - before _ ustop/k_ - before r ustop/kr - before l ustop/kl - before (i) ustop/ki - switchvoicing g + import_phoneme base2/d endphoneme + diff --git a/phsource/ph_swedish b/phsource/ph_swedish index b872f16f..06d8b24c 100644 --- a/phsource/ph_swedish +++ b/phsource/ph_swedish @@ -9,139 +9,141 @@ //======= phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 180 - formants vowel/i_2 - after w w/wi2 - linkout ; + IfNextVowelAppend(;) + IF prevPh(w) THEN + VowelStart(w/wi2) + ENDIF + FMT(vowel/i_2) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 130 - formants vowel/ii_3 - linkout ; + IfNextVowelAppend(;) + FMT(vowel/ii_3) endphoneme phoneme e: - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 210 - formants vowel/e_2 + FMT(vowel/e_2) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 140 - formants vowel/ee - reduceto E- 2 + ChangeIfUnstressed(E-) + FMT(vowel/ee) endphoneme phoneme E: - vowel starttype (e) endtype (@) + vowel starttype #e endtype #@ length 220 - formants vowel/ee_1 + FMT(vowel/ee_1) endphoneme phoneme E3 - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 140 - formants vowel/ee_6 - reduceto @ 0 + ChangeIfDiminished(@) + FMT(vowel/ee_6) endphoneme phoneme E- - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ unstressed length 140 - formants vowel/ee#_2 + FMT(vowel/ee#_2) endphoneme phoneme y: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 220 - formants vowel/y_5 + FMT(vowel/y_5) endphoneme phoneme y - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/yy_3 + FMT(vowel/yy_3) endphoneme phoneme u- - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 200 - formants vowel/u#_2 + FMT(vowel/u#_2) endphoneme phoneme Y: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 220 - formants vowel/y#_2 + FMT(vowel/y#_2) endphoneme phoneme W - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 140 - formants vowel/oe_4 + FMT(vowel/oe_4) endphoneme phoneme 8 - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/8_2 + FMT(vowel/8_2) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 140 - formants vowel/a_5 + FMT(vowel/a_5) endphoneme phoneme a2 - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 140 - formants vowel/a#_2 + FMT(vowel/a#_2) endphoneme phoneme & - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 140 - formants vowel/& + FMT(vowel/&) endphoneme phoneme A: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 250 - formants vowel/aa_4 + FMT(vowel/aa_4) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 140 - formants vowel/oo + FMT(vowel/oo) endphoneme phoneme o: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 210 - formants vowel/o + FMT(vowel/o) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 140 - formants vowel/uu_4 + FMT(vowel/uu_4) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 210 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme @@ -151,30 +153,11 @@ endphoneme //=========== -phoneme r - liquid starttype #r endtype #r - lengthmod 7 - beforenotvowel r/ - trill - formants vwl_sv/r_sv3 - after t r/trr p r/trr k r/trr -endphoneme - - -phoneme r/ // variant of [r] when not preceding a vowel - liquid vowel2 - length 100 - lengthmod 7 // - formants NULL -endphoneme - - phoneme sx // Swedish "sj" sound vls vel frc - vowelin f1=0 f2=2300 300 400 f3=200 100 - vowelout f1=0 f2=2300 300 400 f3=200 100 rms=20 - length 100 lengthmod 3 - wave ufric/sx_sv%60 + Vowelin f1=0 f2=2300 300 400 f3=200 100 + Vowelout f1=0 f2=2300 300 400 f3=200 100 rms=20 + WAV(ufric/sx_sv, 60) endphoneme diff --git a/phsource/ph_tamil b/phsource/ph_tamil index 7e77d231..541ef9b3 100644 --- a/phsource/ph_tamil +++ b/phsource/ph_tamil @@ -2,146 +2,130 @@ // Phonemes for Tamil // This inherits from ph_hindi + + +phoneme a + vowel starttype #a endtype #a + length 130 + ChangeIfNotStressed(V) + FMT(vowel/a) +endphoneme + +phoneme V + vowel starttype #@ endtype #@ + length 130 + FMT(vowel/V_3) +endphoneme + + +phoneme a: + vowel starttype #a endtype #a + length 300 + FMT(vowel/a_5) +endphoneme + + +phoneme e + vowel starttype #e endtype #e + length 130 + FMT(vowel/e) +endphoneme + + +phoneme e: + vowel starttype #e endtype #e + length 250 + FMT(vowel/e) +endphoneme + + +phoneme i + vowel starttype #i endtype #i + length 130 + FMT(vowel/i_6) +endphoneme + + +phoneme i: + vowel starttype #i endtype #i + length 270 + FMT(vowel/i) +endphoneme + + + +phoneme o + vowel starttype #o endtype #o + length 160 + FMT(vowel/o) +endphoneme + + +phoneme o: + vowel starttype #o endtype #o + length 280 + FMT(vowel/o) +endphoneme + + +phoneme u + vowel starttype #u endtype #u + length 110 + ChangeIfNotStressed(U) + FMT(vowel/u_6) +endphoneme + +phoneme U + vowel starttype #u endtype #u + length 110 + FMT(vowel/u#_3) +endphoneme + +phoneme u: + vowel starttype #u endtype #u + length 260 + ChangeIfNotStressed(U:) + FMT(vowel/u_6) +endphoneme + +phoneme U: + vowel starttype #u endtype #u + length 240 + FMT(vowel/u#_3) +endphoneme + +phoneme u- + vowel starttype #u endtype #u + length 130 + FMT(vowel/u#_2) +endphoneme + + +phoneme aI + vowel starttype #a endtype #i + length 230 + FMT(vdiph/ai_8) +endphoneme + +phoneme aU + vowel starttype #a endtype #u + length 200 + FMT(vdiph/aau_3) +endphoneme + + + +phoneme t + import_phoneme base2/t // dental +endphoneme + +// ?? This is standard [v]. Should be it [v] without the fricative noise? +phoneme v + import_phoneme base/v +endphoneme + phoneme : // Lengthen previous vowel by "length" virtual length 50 endphoneme - - -phoneme a - vowel starttype (a) endtype (a) - length 130 - formants vowel/a - reduceto V 4 -endphoneme - -phoneme V - vowel starttype (@) endtype (@) - length 130 - formants vowel/V_3 -endphoneme - - -phoneme a: - vowel starttype (a) endtype (a) - length 300 - formants vowel/a_5 -endphoneme - - -phoneme e - vowel starttype (e) endtype (e) - length 130 - formants vowel/e -endphoneme - - -phoneme e: - vowel starttype (e) endtype (e) - length 250 - formants vowel/e -endphoneme - - -phoneme i - vowel starttype (i) endtype (i) - length 130 - formants vowel/i_6 -endphoneme - - -phoneme i: - vowel starttype (i) endtype (i) - length 300 - formants vowel/i -endphoneme - - - -phoneme o - vowel starttype (o) endtype (o) - length 160 - formants vowel/o -endphoneme - - -phoneme o: - vowel starttype (o) endtype (o) - length 280 - formants vowel/o_3 -endphoneme - - -phoneme u - vowel starttype (u) endtype (u) - length 110 - formants vowel/u - reduceto U 4 -endphoneme - -phoneme U - vowel starttype (u) endtype (u) - length 110 - formants vowel/u#_3 -endphoneme - -phoneme u: - vowel starttype (u) endtype (u) - length 260 - formants vowel/u_6 -endphoneme - -phoneme U: - vowel starttype (u) endtype (u) - length 240 - formants vowel/u#_3 -endphoneme - - - -phoneme u- - vowel starttype (u) endtype (u) - length 130 - formants vowel/u#_2 -endphoneme - - - -phoneme aI - vowel starttype (a) endtype (i) - length 230 - formants vdiph/ai_8 -endphoneme - -phoneme aU - vowel long starttype (a) endtype (u) - length 200 - long - formants vdiph/aau_3 -endphoneme - - - -// ?? This is standard [v]. Should be it [v] without the fricative noise? -phoneme v - vcd lbd frc - vowelin f1=0 f2=1000 -300 -200 f3=-300 100 - vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50 - lengthmod 6 - formants voc/v+vocw/v - before _ voc/v_+vocw/v - switchvoicing f -endphoneme - - -phoneme t // dental variant of /t/ - vls dnt stop - vowelin f1=0 f2=1600 -300 300 f3=-100 80 - vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 - lengthmod 2 - wave ustop/t_dnt2%60 - before _ ustop/t_dnt%30 - switchvoicing d -endphoneme - diff --git a/phsource/ph_turkish b/phsource/ph_turkish index 36c698ca..e8e4c6c6 100644 --- a/phsource/ph_turkish +++ b/phsource/ph_turkish @@ -1,94 +1,119 @@ phoneme i - vowel starttype (i) endtype (i) - beforenotvowel2 I + vowel starttype #i endtype #i length 150 - formants vowel/i_6 + IF thisPh(isFinalVowel) THEN + ChangePhoneme(I) + ENDIF + IF nextPh(isNotVowel) AND next2Ph(isNotVowel) THEN + ChangePhoneme(I) + ENDIF + FMT(vowel/i_6) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/ii_3 + FMT(vowel/ii_3) endphoneme phoneme y - vowel starttype (u) endtype (u) - beforenotvowel2 Y + vowel starttype #u endtype #u length 155 - formants vowel/y_5 + IF thisPh(isFinalVowel) THEN + ChangePhoneme(Y) + ENDIF + IF nextPh(isNotVowel) AND next2Ph(isNotVowel) THEN + ChangePhoneme(Y) + ENDIF + FMT(vowel/y_5) endphoneme phoneme Y - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 155 - formants vowel/u# + FMT(vowel/u#) endphoneme phoneme e - vowel starttype (e) endtype (e) - beforenotvowel2 E + vowel starttype #e endtype #e length 180 - formants vowel/e_mid2 + IF thisPh(isFinalVowel) THEN + ChangePhoneme(E) + ENDIF + IF nextPh(isNotVowel) AND next2Ph(isNotVowel) THEN + ChangePhoneme(E) + ENDIF + FMT(vowel/e_mid2) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 180 - formants vowel/e_mid + FMT(vowel/e_mid) endphoneme phoneme W - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 180 - formants vowel/oe_2 + FMT(vowel/oe_2) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 190 - formants vowel/a_5 + FMT(vowel/a_5) endphoneme phoneme u - vowel starttype (u) endtype (u) - beforenotvowel2 U + vowel starttype #u endtype #u length 150 - formants vowel/u_2 + IF thisPh(isFinalVowel) THEN + ChangePhoneme(U) + ENDIF + IF nextPh(isNotVowel) AND next2Ph(isNotVowel) THEN + ChangePhoneme(U) + ENDIF + FMT(vowel/u_2) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 150 - formants vowel/uu_2 + FMT(vowel/uu_2) endphoneme phoneme u# - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 150 - formants vowel/u#_7 + FMT(vowel/u#_7) endphoneme phoneme o - vowel starttype (o) endtype (o) - beforenotvowel2 O + vowel starttype #o endtype #o length 190 - formants vowel/o_mid + IF thisPh(isFinalVowel) THEN + ChangePhoneme(O) + ENDIF + IF nextPh(isNotVowel) AND next2Ph(isNotVowel) THEN + ChangePhoneme(O) + ENDIF + FMT(vowel/o_mid) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 190 - formants vowel/oo + FMT(vowel/oo) endphoneme @@ -101,26 +126,32 @@ endphoneme phoneme c vls pal stop - vowelin f1=0 f2=2700 200 500 f3=400 80 len=60 - vowelout f1=0 f2=2700 300 500 f3=300 80 lengthmod 2 - wave ustop/ki - before _ ustop/ki%80 + Vowelin f1=0 f2=2700 200 500 f3=400 80 len=60 + Vowelout f1=0 f2=2700 300 500 f3=300 80 + IF nextPh(isPause2) THEN + WAV(ustop/ki, 80) + ENDIF + WAV(ustop/ki) endphoneme phoneme J vcd pla stop - vowelin f1=2 f2=2700 400 600 f3=300 80 - vowelout f1=2 f2=2700 400 600 f3=300 80 colr=1 - formants dzh/dz_pzd+ustop/ki%60 lengthmod 5 - switchvoicing c + + IF PreVoicing THEN + FMT(dzh/xdz_pzd) + ENDIF + + Vowelin f1=2 f2=2700 400 600 f3=300 80 + Vowelout f1=2 f2=2700 400 600 f3=300 80 colr=1 + FMT(dzh/dz_pzd) addWav(ustop/ki, 60) endphoneme phoneme l -import_phoneme l en +import_phoneme en/l endphoneme diff --git a/phsource/ph_vi b/phsource/ph_vi index 425ee79d..cf6b6570 100644 --- a/phsource/ph_vi +++ b/phsource/ph_vi @@ -6,44 +6,44 @@ phoneme 1 // ngang tone: level stress - tone 28 32 envelope/p_level NULL + Tone(28, 32, envelope/p_level, NULL) endphoneme phoneme 2 // huyền tone: low falling stress - tone 20 8 envelope/p_fall NULL + Tone(20, 8, envelope/p_fall, NULL) endphoneme -phoneme 3 // sắc tone rising +phoneme 3 // sắc Tone(rising stress - tone 25 50 envelope/p_rise NULL + Tone(25, 50, envelope/p_rise, NULL) endphoneme -phoneme 4 // hỏi tone curve (dipping rising) +phoneme 4 // hỏi Tone(curve (dipping rising) stress - tone 30 5 envelope/p_fallrise NULL + Tone(30, 5, envelope/p_fallrise, NULL) endphoneme phoneme 5 // ngã tone: broken (creaking rising) stress - tone 28 58 envelope/p_214 envelope/vi_5amp + Tone(28, 58, envelope/p_214, envelope/vi_5amp) endphoneme -phoneme 6 // nặng tone drop (constricted) +phoneme 6 // nặng Tone(drop (constricted) stress length 75 // reduce the length of the vowel - tone 40 20 envelope/p_512 envelope/vi_6amp + Tone(40, 20, envelope/p_512, envelope/vi_6amp) endphoneme -phoneme 7 // tone 1 (ngang) at end of clause +phoneme 7 // Tone(1 (ngang) at end of clause stress - tone 40 20 envelope/p_fall NULL + Tone(40, 20, envelope/p_fall, NULL) endphoneme @@ -53,78 +53,80 @@ endphoneme phoneme a - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 130 - formants vowel/a_4 + FMT(vowel/a_4) endphoneme phoneme a: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 280 - formants vowel/a_6 + FMT(vowel/a_6) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 200 - formants vowel/ee_3 + FMT(vowel/ee_3) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 200 - formants vowel/e + FMT(vowel/e) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 190 - formants vowel/i_4 - after w w/wi - linkout ; + IfNextVowelAppend(;) + IF prevPhW(w) THEN + VowelStart(w/wi) + ENDIF + FMT(vowel/i_4) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 200 - formants vowel/aa_4 + FMT(vowel/aa_4) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 200 - formants vowel/o_2 + FMT(vowel/o_2) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 200 - formants vowel/u_7 + FMT(vowel/u_7) endphoneme phoneme y - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 200 - formants vowel/u#_5 + FMT(vowel/u#_5) endphoneme phoneme @ - vowel starttype (@) endtype (a) + vowel starttype #@ endtype #a length 130 - formants vowel/@_2 + FMT(vowel/@_2) endphoneme phoneme @: - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 280 - formants vowel/@_2 + FMT(vowel/@_2) endphoneme @@ -133,158 +135,162 @@ endphoneme //=========== phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 250 - formants vdiph/&i_3 + FMT(vdiph/&i_3) endphoneme phoneme a:I - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 250 - formants vdiph/ai + FMT(vdiph/ai) endphoneme phoneme @I - vowel starttype (@) endtype (i) + vowel starttype #@ endtype #i length 250 - formants vdiph/@i + FMT(vdiph/@i) endphoneme phoneme @:I - vowel starttype (@) endtype (i) + vowel starttype #@ endtype #i length 250 - formants vdiph/@i + FMT(vdiph/@i) endphoneme phoneme eI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 200 - formants vdiph/ei + FMT(vdiph/ei) endphoneme phoneme EI - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 200 - formants vdiph/eei + FMT(vdiph/eei) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 200 - formants vdiph/0i + FMT(vdiph/0i) endphoneme phoneme oI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 200 - formants vdiph/oi + FMT(vdiph/oi) endphoneme phoneme uI - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 200 - formants vdiph/ui + FMT(vdiph/ui) endphoneme phoneme yI - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 200 - formants vdiph/u-i + FMT(vdiph/u-i) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 210 - formants vdiph/aau_4 + FMT(vdiph/aau_4) endphoneme phoneme a:U - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 270 - formants vdiph/au + FMT(vdiph/au) endphoneme phoneme eU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 200 - formants vdiph/eu + FMT(vdiph/eu) endphoneme phoneme EU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 200 - formants vdiph/eeu + FMT(vdiph/eeu) endphoneme phoneme iU - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 200 - formants vdiph2/iu + FMT(vdiph2/iu) endphoneme phoneme @U - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 200 - formants vdiph/@u + FMT(vdiph/@u) endphoneme phoneme @:U - vowel starttype (@) endtype (u) + vowel starttype #@ endtype #u length 270 - formants vdiph/@u + FMT(vdiph/@u) endphoneme phoneme i@ - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 240 - formants vdiph2/ii@_3 + FMT(vdiph2/ii@_3) endphoneme phoneme y@ - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 200 - formants vdiph2/y-y# + FMT(vdiph2/y-y#) endphoneme phoneme u@ - vowel starttype (u) endtype (@) + vowel starttype #u endtype #@ length 200 - formants vdiph2/uu@ + FMT(vdiph2/uu@) endphoneme phoneme kh vls vel frc - vowelin f1=0 f2=2300 200 400 f3=200 80 - vowelout f1=0 f2=2300 300 400 f3=200 80 rms=20 - length 100 lengthmod 3 - wave ufric/x%50 - switchvoicing Q + Vowelin f1=0 f2=2300 200 400 f3=200 80 + Vowelout f1=0 f2=2300 300 400 f3=200 80 rms=20 + WAV(ufric/x, 50) endphoneme + phoneme l liquid - length 100 lengthmod 7 - beforenotvowel l/ - formants l/l_vi + + IF nextPh(isNotVowel) THEN + ChangePhoneme(l/2) + ENDIF + + CALL vowelstart_l + + FMT(l/l_vi) endphoneme diff --git a/phsource/ph_welsh b/phsource/ph_welsh index 400825f9..d323dcf5 100644 --- a/phsource/ph_welsh +++ b/phsource/ph_welsh @@ -8,51 +8,51 @@ //============= phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 150 - formants vowel/a + FMT(vowel/a) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 150 - formants vowel/ee_2 + FMT(vowel/ee_2) endphoneme phoneme I - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/ii_3 + FMT(vowel/ii_3) endphoneme phoneme Y // symbol used in place of I" (I bar) - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 150 - formants vowel/ii# + FMT(vowel/ii#) endphoneme phoneme O - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 150 - formants vowel/oo_2 + FMT(vowel/oo_2) endphoneme phoneme U - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 150 - formants vowel/u_bck + FMT(vowel/u_bck) endphoneme phoneme V - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 150 - formants vowel/@ + FMT(vowel/@) endphoneme @@ -60,50 +60,50 @@ endphoneme //============ phoneme i: - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 180 - formants vowel/i - reduceto I 4 + ChangeIfNotStressed(I) + FMT(vowel/i) endphoneme phoneme y: // symbol used in place of i" (i bar) - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 180 - formants vowel/i# - reduceto Y 4 + ChangeIfNotStressed(Y) + FMT(vowel/i#) endphoneme phoneme u: - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 190 - formants vowel/u - reduceto U 4 + ChangeIfNotStressed(U) + FMT(vowel/u) endphoneme phoneme e: - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 210 - formants vowel/e - reduceto E 4 + ChangeIfNotStressed(E) + FMT(vowel/e) endphoneme phoneme o: - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 210 - formants vowel/o_2 - reduceto O 4 + ChangeIfNotStressed(O) + FMT(vowel/o_2) endphoneme phoneme A: - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 230 - formants vowel/aa_2 - reduceto a 4 + ChangeIfNotStressed(a) + FMT(vowel/aa_2) endphoneme @@ -111,93 +111,93 @@ endphoneme //=========== phoneme AY - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 250 - formants vdiph/aai_2 + FMT(vdiph/aai_2) endphoneme phoneme aI - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 210 - formants vdiph/ai_2 + FMT(vdiph/ai_2) endphoneme phoneme aY - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 210 - formants vdiph/ai_2 + FMT(vdiph/ai_2) endphoneme phoneme aU - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 210 - formants vdiph/au_4 + FMT(vdiph/au_4) endphoneme phoneme @I - vowel starttype (@) endtype (i) + vowel starttype #@ endtype #i length 210 - formants vdiph/@i_2 + FMT(vdiph/@i_2) endphoneme phoneme @Y - vowel starttype (@) endtype (i) + vowel starttype #@ endtype #i length 210 - formants vdiph/@i_2 + FMT(vdiph/@i_2) endphoneme phoneme eU - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 210 - formants vdiph/eu + FMT(vdiph/eu) endphoneme phoneme Iu - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 210 - formants vdiph2/iu_4 + FMT(vdiph2/iu_4) endphoneme phoneme Yu - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 210 - formants vdiph2/iu_4 + FMT(vdiph2/iu_4) endphoneme phoneme OI - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 210 - formants vdiph/ooi + FMT(vdiph/ooi) endphoneme phoneme OY - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 210 - formants vdiph/ooi + FMT(vdiph/ooi) endphoneme phoneme uI - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 210 - formants vdiph/ui_3 + FMT(vdiph/ui_3) endphoneme phoneme uY - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 210 - formants vdiph/ui_3 + FMT(vdiph/ui_3) endphoneme @@ -206,23 +206,27 @@ endphoneme phoneme r liquid - vowelin f1=0 f2=1600 -300 300 f3=-200 80 - vowelout f1=2 f2=1600 -300 300 f3=-200 80 brk - formants r3/r_trill2+r3/r_trill2.wav%65 trill lengthmod 6 + Vowelin f1=0 f2=1600 -300 300 f3=-200 80 + Vowelout f1=2 f2=1600 -300 300 f3=-200 80 brk + FMT(r3/r_trill2) addWav(r3/r_trill2.wav, 65) endphoneme phoneme g vcd vel stop - vowelin f1=2 f2=2300 200 300 f3=-300 80 - vowelout f1=2 f2=2300 250 300 f3=-300 80 brk - formants g/g+x/g2%150 - before _ g/g_+x/g_%140 - after _ NULL - after @ g/xg lengthmod 5 - switchvoicing k -endphoneme + voicingswitch k + Vowelin f1=2 f2=2300 200 300 f3=-300 80 + Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk + IF PreVoicing THEN + FMT(g/xg) + ENDIF + + IF nextPh(isPause2) THEN + FMT(g/g_) addWav(x/g_, 140) + ENDIF + FMT(g/g) addWav(x/g2, 150) +endphoneme diff --git a/phsource/ph_zh b/phsource/ph_zh index f5a91723..6771b94a 100644 --- a/phsource/ph_zh +++ b/phsource/ph_zh @@ -5,443 +5,453 @@ phoneme 11 // tone: low level stress - tone 12 9 envelope/i_risefall NULL + Tone(12, 9, envelope/i_risefall, NULL) endphoneme phoneme 21 // tone: low fall stress - tone 20 10 envelope/p_fall NULL + Tone(20, 10, envelope/p_fall, NULL) endphoneme phoneme 214 // tone: fall rise stress - tone 18 42 envelope/p_214 NULL + Tone(18, 42, envelope/p_214, NULL) endphoneme phoneme 22 // tone: mid-low level stress - tone 22 20 envelope/p_fall NULL + Tone(22, 20, envelope/p_fall, NULL) endphoneme phoneme 33 // tone: mid level stress - tone 32 30 envelope/p_fall NULL + Tone(32, 30, envelope/p_fall, NULL) endphoneme phoneme 35 // tone: mid rise stress - tone 30 50 envelope/p_rise NULL + Tone(30, 50, envelope/p_rise, NULL) endphoneme phoneme 44 // tone: mid-high level stress - tone 38 41 envelope/p_rise NULL + Tone(38, 41, envelope/p_rise, NULL) endphoneme phoneme 51 // tone: high fall stress - tone 50 10 envelope/p_fall NULL + Tone(50, 10, envelope/p_fall, NULL) endphoneme phoneme 53 // tone: high fall stress - tone 50 30 envelope/p_fall NULL + Tone(50, 30, envelope/p_fall, NULL) endphoneme phoneme 55 // tone: high level stress - tone 55 50 envelope/p_level NULL + Tone(55, 50, envelope/p_level, NULL) endphoneme //==================================================== // Consonants //==================================================== + +phoneme n + vcd alv nasal + Vowelout f1=2 f2=1700 -300 250 f3=-100 80 rms=20 brk + lengthmod 2 + + NextVowelStarts + VowelStart(n/n@) + VowelStart(n/na) + VowelStart(n/ne) + VowelStart(n/ni) + VowelStart(n/no) + VowelStart(n/nu) + EndSwitch + + IF nextPh(isNotVowel) THEN + FMT(n/n_long_) + ENDIF + FMT(n/_n) +endphoneme + + +phoneme N + vcd vel nasal + Vowelout f1=2 f2=1900 0 300 f3=400 80 len=50 rms=15 brk + lengthmod 7 + + NextVowelStarts + VowelStart(nn/nn@) + VowelStart(nn/nna) + VowelStart(nn/nne) + VowelStart(nn/nni) + VowelStart(nn/nno) + VowelStart(nn/nnu) + EndSwitch + + IF prevPh(isPause) THEN + FMT(nn/_nn) + ELIF nextPh(isNotVowel) THEN + FMT(nn/nn2_) + ENDIF +endphoneme + + + phoneme p vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22 lengthmod 2 - wave ustop/p_unasp + Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11 + Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22 + WAV(ustop/p_unasp) endphoneme phoneme ph vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22 lengthmod 2 - wave ustop/p_asp -endphoneme - -phoneme m //not clear before some vowel - vcd blb nasal - vowelout f1=2 f2=1000 -500 -350 f3=-200 80 brk - lengthmod 2 - formants m/_m + Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11 + Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22 + WAV(ustop/p_asp) endphoneme phoneme f //not clear before some vowel vls lbd frc - vowelout f1=0 f2=1000 -500 -350 f3=-200 80 lengthmod 2 - wave ufric/f + Vowelout f1=0 f2=1000 -500 -350 f3=-200 80 + WAV(ufric/f) endphoneme phoneme t vls alv stop - vowelin f1=0 f2=1700 -300 300 f3=-100 80 rms=40 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/t_unasp2%40 + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 rms=40 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + WAV(ustop/t_unasp2, 40) endphoneme phoneme th vls alv stop - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/t_ -endphoneme - -phoneme n - vcd alv nasal - vowelout f1=2 f2=1700 -300 250 f3=-100 80 rms=20 brk - lengthmod 2 - formants n/_n - before _ n/n_long_ - before (i) n/ni -endphoneme - -phoneme l - liquid - vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=20 - lengthmod 2 - formants l/_l - before (i) l/li + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + WAV(ustop/t_) endphoneme phoneme k vls uvl stop - vowelin f1=1 f2=1700 0 200 f3=-300 80 f4 - vowelout f1=1 f2=1700 0 200 f3=-300 80 f4 rms=30 lengthmod 2 - wave ustop/k_unasp_%75 + Vowelin f1=1 f2=1700 0 200 f3=-300 80 f4 + Vowelout f1=1 f2=1700 0 200 f3=-300 80 f4 rms=30 + WAV(ustop/k_unasp_, 75) endphoneme phoneme kh vls uvl stop - vowelin f1=1 f2=1700 0 200 f3=-300 80 f4 - vowelout f1=1 f2=1700 0 200 f3=-300 80 f4 rms=30 lengthmod 2 - wave ustop/k_asp%80 + Vowelin f1=1 f2=1700 0 200 f3=-300 80 f4 + Vowelout f1=1 f2=1700 0 200 f3=-300 80 f4 rms=30 + WAV(ustop/k_asp, 80) endphoneme phoneme tS; vls pal afr sibilant palatal - vowelin f1=0 f2=2700 400 600 f3=300 80 lengthmod 2 - wave ustop/tsh_pzd_unasp + Vowelin f1=0 f2=2700 400 600 f3=300 80 + WAV(ustop/tsh_pzd_unasp) endphoneme phoneme tS;h vls pal afr sibilant palatal - vowelin f1=0 f2=2700 400 600 f3=300 80 lengthmod 2 - wave ustop/tsh_pzd%80 + Vowelin f1=0 f2=2700 400 600 f3=300 80 + WAV(ustop/tsh_pzd, 80) endphoneme phoneme S; vls pla frc sibilant - vowelin f1=0 f2=2700 400 600 f3=300 80 lengthmod 2 - wave ufric/sh_pzd2%20 + Vowelin f1=0 f2=2700 400 600 f3=300 80 + WAV(ufric/sh_pzd2, 20) endphoneme phoneme s. vls pla frc sibilant - vowelin f1=0 f2=1800 -100 300 f3=-300 80 - vowelout f1=0 f2=1800 -100 300 f3=-300 80 - length 100 lengthmod 3 - wave ufric/sh_rfx%50 // quieter - before _ ufric/sh_rfx%50 + Vowelin f1=0 f2=1800 -100 300 f3=-300 80 + Vowelout f1=0 f2=1800 -100 300 f3=-300 80 + IF nextPh(isPause2) THEN + WAV(ufric/sh_rfx, 50) + ENDIF + WAV(ufric/sh_rfx, 50) // quieter endphoneme phoneme ts vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/ts_unasp%70 + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + WAV(ustop/ts_unasp, 70) endphoneme phoneme tsh vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/ts%60 + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + WAV(ustop/ts, 60) endphoneme phoneme ts. vls pla frc sibilant - vowelin f1=0 f2=1800 -100 300 f3=-300 80 - vowelout f1=0 f2=1800 -100 300 f3=-300 80 - length 100 lengthmod 3 - wave ustop/ts_rfx_unasp + Vowelin f1=0 f2=1800 -100 300 f3=-300 80 + Vowelout f1=0 f2=1800 -100 300 f3=-300 80 + WAV(ustop/ts_rfx_unasp) endphoneme phoneme ts.h vls pla frc sibilant - vowelin f1=0 f2=1800 -100 300 f3=-300 80 - vowelout f1=0 f2=1800 -100 300 f3=-300 80 - length 100 lengthmod 3 - wave ustop/ts_rfx -endphoneme - -phoneme j - liquid - palatal - length 40 - formants j/_j - lengthmod 1 -endphoneme - -phoneme w - liquid - length 40 - lengthmod 1 - formants w/_w + Vowelin f1=0 f2=1800 -100 300 f3=-300 80 + Vowelout f1=0 f2=1800 -100 300 f3=-300 80 + WAV(ustop/ts_rfx) endphoneme //==================================================== // Vowels and Diphtnongs //==================================================== -phoneme N //should be more different from n - vcd vel nasal - vowelout f1=2 f2=1900 0 300 f3=400 80 len=50 rms=15 brk - formants NULL - before _ nn/nn2_ - after _ nn/_nn - lengthmod 7 -// after (i) nn/inn -endphoneme - phoneme N- // syllabic N vowel starttype N endtype N length 250 - formants nn/nn2_ + FMT(nn/nn2_) endphoneme phoneme a - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 250 - formants vowel/a - before N vwl_zh/a_n + IF nextPh(N) THEN + FMT(vwl_zh/a_n) + ENDIF + FMT(vowel/a) endphoneme phoneme A - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 250 - formants vowel/a_3 - before N vowel/aa_2 + IF nextPh(N) THEN + FMT(vowel/aa_2) + ENDIF + FMT(vowel/a_3) endphoneme phoneme ai - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 250 - formants vdiph/ai_6 + FMT(vdiph/ai_6) endphoneme phoneme Au - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 250 - formants vwl_zh/aau + FMT(vwl_zh/aau) endphoneme phoneme @ - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 200 - formants vowel/3_2%120 - before N vowel/@_bck + IF nextPh(N) THEN + FMT(vowel/@_bck) + ENDIF + FMT(vowel/3_2) endphoneme phoneme @r //tmp use V3_r - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 350 - formants vowelr/V3_r + FMT(vowelr/V3_r) endphoneme phoneme E - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 250 - formants vowel/ee_2 + FMT(vowel/ee_2) endphoneme phoneme ei - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 250 - formants vdiph2/ei_4 + FMT(vdiph2/ei_4) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 250 - formants vowel/i - before N vowel/ii_2 - before n vowel/ii_5 + IF nextPh(N) THEN + FMT(vowel/ii_2) + ENDIF + IF nextPh(n) THEN + FMT(vowel/ii_5) + ENDIF + FMT(vowel/i) endphoneme phoneme i[ //after ts tsh s - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 250 - formants vowel/i#_7 + FMT(vowel/i#_7) endphoneme phoneme i. //after ts. ts.h s. z. - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 250 -// formants vwl_zh/i_rfx - formants vowel/i#_6 + FMT(vowel/i#_6) endphoneme phoneme iA //try more before N - vowel starttype (i) endtype (a) + vowel starttype #i endtype #a length 250 - formants vwl_zh/iaa + FMT(vwl_zh/iaa) endphoneme phoneme iAu - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 250 - formants vwl_zh/iaau + FMT(vwl_zh/iaau) endphoneme phoneme iE - vowel starttype (i) endtype (e) + vowel starttype #i endtype #e length 250 - formants vwl_zh/ie + FMT(vwl_zh/ie) endphoneme phoneme io - vowel starttype (i) endtype (o) + vowel starttype #i endtype #o length 250 - formants vdiph2/iioo + FMT(vdiph2/iioo) endphoneme phoneme iou - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 250 - formants vwl_zh/iou + FMT(vwl_zh/iou) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 250 - formants vdiph2/o_oo - before N vnasal/oo_n2 + IF nextPh(N) THEN + FMT(vnasal/oo_n2) + ENDIF + FMT(vdiph2/o_oo) endphoneme phoneme o- - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 250 - formants vowel/8 + FMT(vowel/8) endphoneme phoneme ou - vowel starttype (o) endtype (u) + vowel starttype #o endtype #u length 250 - formants vdiph/8u + FMT(vdiph/8u) endphoneme phoneme ong - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 500 - formants vwl_zh/ong + FMT(vwl_zh/ong) endphoneme phoneme u //try more before N - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 250 - formants vowel/u_bck - before N vnasal/u_n + IF nextPh(N) THEN + FMT(vnasal/u_n) + ENDIF + FMT(vowel/u_bck) endphoneme phoneme uA - vowel starttype (u) endtype (a) + vowel starttype #u endtype #a length 250 - formants vwl_zh/uaa + FMT(vwl_zh/uaa) endphoneme phoneme ua - vowel starttype (u) endtype (a) + vowel starttype #u endtype #a length 250 - formants vdiph2/oa + FMT(vdiph2/oa) endphoneme phoneme uai - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 250 - formants vwl_zh/uai + FMT(vwl_zh/uai) endphoneme phoneme u@ - vowel starttype (u) endtype (@) + vowel starttype #u endtype #@ length 230 - formants vdiph2/o@ + FMT(vdiph2/o@) endphoneme phoneme uei - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 250 - formants vwl_zh/uei + FMT(vwl_zh/uei) endphoneme phoneme uo - vowel starttype (u) endtype (o) + vowel starttype #u endtype #o length 280 - formants vwl_zh/uo + FMT(vwl_zh/uo) endphoneme phoneme y - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 250 - formants vowel/y_2 - before N vowel/uu_3 + IF nextPh(N) THEN + FMT(vowel/uu_3) + ENDIF + FMT(vowel/y_2) endphoneme phoneme yu //try more before N - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 250 - formants vdiph2/yu + FMT(vdiph2/yu) endphoneme phoneme y& - vowel starttype (i) endtype (e) + vowel starttype #i endtype #e length 250 - formants vwl_zh/y& + FMT(vwl_zh/y&) endphoneme phoneme yE //try more so not similar to iE - vowel starttype (i) endtype (e) + vowel starttype #i endtype #e length 250 - formants vwl_zh/yee + FMT(vwl_zh/yee) endphoneme phoneme y@ - vowel starttype (i) endtype (@) + vowel starttype #i endtype #@ length 250 - formants vdiph2/y@ + FMT(vdiph2/y@) endphoneme phoneme yi - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 250 - formants vdiph/yi -endphoneme \ No newline at end of file + FMT(vdiph/yi) +endphoneme diff --git a/phsource/ph_zh_yue b/phsource/ph_zh_yue index 98e3ec2e..ae3851be 100644 --- a/phsource/ph_zh_yue +++ b/phsource/ph_zh_yue @@ -6,43 +6,43 @@ phoneme 1 // tone: high level stress - tone 50 50 envelope/p_level NULL + Tone(50, 50, envelope/p_level, NULL) endphoneme phoneme 2 // tone: rise stress - tone 30 50 envelope/p_rise NULL + Tone(30, 50, envelope/p_rise, NULL) endphoneme phoneme 3 // tone: mid level stress - tone 30 30 envelope/p_level NULL + Tone(30, 30, envelope/p_level, NULL) endphoneme phoneme 4 // tone: low fall stress - tone 20 10 envelope/p_fall NULL + Tone(20, 10, envelope/p_fall, NULL) endphoneme phoneme 5 // tone: low rise stress - tone 10 30 envelope/p_rise NULL + Tone(10, 30, envelope/p_rise, NULL) endphoneme phoneme 6 // tone: low level stress - tone 20 20 envelope/p_level NULL + Tone(20, 20, envelope/p_level, NULL) endphoneme phoneme 7 // tone: high fall stress - tone 50 30 envelope/p_fall NULL + Tone(50, 30, envelope/p_fall, NULL) endphoneme @@ -53,248 +53,259 @@ endphoneme phoneme z // [ts] vls alv afr sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 lengthmod 2 - wave ustop/ts + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + WAV(ustop/ts) endphoneme phoneme c // [tS] vls pla afr sibilant - vowelin f1=0 f2=2300 200 400 f3=-100 80 lengthmod 2 - wave ustop/tsh - before _ ustop/tsh_ - switchvoicing dZ + Vowelin f1=0 f2=2300 200 400 f3=-100 80 + IF nextPh(isPause2) THEN + WAV(ustop/tsh_) + ENDIF + WAV(ustop/tsh) endphoneme + phoneme k vls vel stop - vowelin f1=0 f2=2300 200 300 f3=-200 80 - vowelout f1=0 f2=2300 300 400 f3=-200 80 rms=20 lengthmod 2 - wave ustop/k - before _ NULL - before r ustop/kr - before R ustop/kr - before @- ustop/k_unasp%70 - before l ustop/kl - before (i) ustop/ki - switchvoicing g + Vowelin f1=0 f2=2300 200 300 f3=-200 80 + Vowelout f1=0 f2=2300 300 400 f3=-200 80 rms=20 + + IF nextPh(isPause2) THEN + WAV(NULL) + ENDIF + IF nextPh(#i) THEN + WAV(ustop/ki) + ENDIF + IF nextPh(r) OR nextPh(R) THEN + WAV(ustop/kr) + ENDIF + IF nextPh(l) THEN + WAV(ustop/kl) + ENDIF + IF nextPh(@-) THEN + WAV(ustop/k_unasp,70) + ENDIF + + WAV(ustop/k) endphoneme + phoneme p vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 rms=30 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22 lengthmod 2 - wave ustop/p - before _ NULL + Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 rms=30 + Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22 + IF nextPh(isPause2) THEN + WAV(NULL) + ENDIF + WAV(ustop/p) endphoneme phoneme t vls alv stop - vowelin f1=0 f2=1700 -300 300 f3=100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 - wave ustop/t - before _ NULL lengthmod 2 + Vowelin f1=0 f2=1700 -300 300 f3=100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + IF nextPh(isPause2) THEN + WAV(NULL) + ENDIF + WAV(ustop/t) endphoneme -//phoneme ng // synonym for [N] -// vcd vel nasal -// starttype N endtype N -// vowelout f1=3 f2=2300 300 400 f3=-200 80 len=40 rms=20 brk -// after _ nn/_nn -// before _ nn/nn_ -// before (r) nn/nnj -// lengthmod 8 // longer than 'n' -//endphoneme //==================================================== // Vowels and Diphtnongs //==================================================== phoneme aa - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 230 - formants vowel/aa + FMT(vowel/aa) endphoneme phoneme aai - vowel starttype (a) endtype (i) + vowel starttype #a endtype #i length 270 - formants vdiph/aai + FMT(vdiph/aai) endphoneme phoneme aau - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 260 - formants vdiph/aau_2 + FMT(vdiph/aau_2) endphoneme phoneme ang - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 220 - formants vwl_zh/ang + FMT(vwl_zh/ang) endphoneme phoneme aang - vowel starttype (a) endtype (a) + vowel starttype #a endtype #a length 270 - formants vwl_zh/aang + FMT(vwl_zh/aang) endphoneme phoneme a - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 150 - formants vowel/a#_3 + FMT(vowel/a#_3) endphoneme phoneme ai - vowel starttype (@) endtype (i) + vowel starttype #@ endtype #i length 200 - formants vdiph/@i_3 + FMT(vdiph/@i_3) endphoneme phoneme au - vowel starttype (a) endtype (u) + vowel starttype #a endtype #u length 200 - formants vdiph/au_2 + FMT(vdiph/au_2) endphoneme phoneme e - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 220 - formants vowel/ee_1 + FMT(vowel/ee_1) endphoneme phoneme ei - vowel starttype (e) endtype (i) + vowel starttype #e endtype #i length 220 - formants vdiph/ei + FMT(vdiph/ei) endphoneme phoneme eng - vowel starttype (e) endtype (e) + vowel starttype #e endtype #e length 220 - formants vwl_zh/eng + FMT(vwl_zh/eng) endphoneme phoneme eu - vowel starttype (e) endtype (u) + vowel starttype #e endtype #u length 260 - formants vdiph/eeu + FMT(vdiph/eeu) endphoneme phoneme i - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 190 - formants vowel/i - before k vowel/ii-40 - before N vowel/ii-40 - after w w/wi - linkout ; + IfNextVowelAppend(;) + + IF nextPhW(k) OR nextPhW(N) THEN + Length 150 + FMT(vowel/ii) + ENDIF + + FMT(vowel/i) endphoneme phoneme ing - vowel starttype (i) endtype (i) + vowel starttype #i endtype #i length 220 - formants vwl_zh/ing + FMT(vwl_zh/ing) endphoneme phoneme iu - vowel starttype (i) endtype (u) + vowel starttype #i endtype #u length 200 - formants vdiph2/iu + FMT(vdiph2/iu) endphoneme phoneme ng // synonym for [N] - vowel starttype ng endtype ng -// vowelout f1=3 f2=2300 300 400 f3=-200 80 len=40 rms=20 brk + vowel // starttype ng endtype ng length 350 - formants vwl_zh/ng - beforevowel N -// before (@) vnasal/ -// before o vnasal/nn- -// lengthmod 8 + IF nextPh(isVowel) THEN + ChangePhoneme(N) + ENDIF + FMT(vwl_zh/ng) endphoneme phoneme o - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 170 - formants vowel/oo + FMT(vowel/oo) endphoneme phoneme oeng - vowel starttype (o) endtype (e) + vowel starttype #o endtype #e length 280 - formants vwl_zh/oeng + FMT(vwl_zh/oeng) endphoneme phoneme oi - vowel starttype (o) endtype (i) + vowel starttype #o endtype #i length 200 - formants vdiph/ooi + FMT(vdiph/ooi) endphoneme phoneme ou - vowel starttype (o) endtype (u) + vowel starttype #o endtype #u length 200 - formants vdiph/ou + FMT(vdiph/ou) endphoneme phoneme ong - vowel starttype (o) endtype (o) + vowel starttype #o endtype #o length 220 - formants vwl_zh/ong + FMT(vwl_zh/ong) endphoneme phoneme u - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 170 - formants vowel/u_bck - before k vowel/uu_bck - before N vowel/uu_bck + IF nextPhW(k) OR nextPhW(N) THEN + FMT(vowel/uu_bck) + ENDIF + + FMT(vowel/u_bck) endphoneme phoneme ung - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 200 - formants vwl_zh/ung + FMT(vwl_zh/ung) endphoneme phoneme ui - vowel starttype (u) endtype (i) + vowel starttype #u endtype #i length 220 - formants vdiph/ui + FMT(vdiph/ui) endphoneme phoneme oe - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 230 - formants vowel/y# + FMT(vowel/y#) endphoneme phoneme eo - vowel starttype (@) endtype (@) + vowel starttype #@ endtype #@ length 170 - formants vowel/8_3 + FMT(vowel/8_3) endphoneme phoneme eoi - vowel starttype (@) endtype (i) + vowel starttype #@ endtype #i length 220 - formants vdiph/y#y_2 + FMT(vdiph/y#y_2) endphoneme phoneme yu - vowel starttype (u) endtype (u) + vowel starttype #u endtype #u length 220 - formants vowel/y + FMT(vowel/y) endphoneme diff --git a/phsource/phonemes b/phsource/phonemes index 3929c95c..08dc29f8 100644 --- a/phsource/phonemes +++ b/phsource/phonemes @@ -2,36 +2,6 @@ // This is the master phoneme file. -// These are fixed phoneme code numbers, which can be used -// directly within the program. -phonemenumber 1 < -phonemenumber 2 %% -phonemenumber 3 % -phonemenumber 4 , -phonemenumber 5 ,, -phonemenumber 6 ' -phonemenumber 7 '' -phonemenumber 8 = // stress previous syllable -phonemenumber 9 _: // pause -phonemenumber 10 _ // short pause -phonemenumber 11 _! // short pause, no link -phonemenumber 12 : -phonemenumber 13 @ -phonemenumber 14 @- -phonemenumber 15 || -phonemenumber 16 (r) -phonemenumber 17 1 // (numeral 1) default tone (for tone language) -phonemenumber 18 (X1) // capital letter indication -phonemenumber 19 ? // glottal stop -phonemenumber 20 - // syllabic consonant -phonemenumber 21 _^_ // Change language -phonemenumber 22 _X1 // a language specific action -phonemenumber 23 _| // very short pause -phonemenumber 24 _:: // long pause -phonemenumber 25 t# // reduced version of [t] -phonemenumber 26 '! // stress - emphasized -phonemenumber 27 _;_ // clause pause - // The base phoneme table contains the utility phonemes, the consonants, // and a schwa. The vowels are defined in the language specific phoneme // tables, which can also redefine consonants if they wish. @@ -41,28 +11,23 @@ phonemenumber 27 _;_ // clause pause // UTILITY PHONEMES //******************************************************************* -phoneme < // Start of control string NOT USED - pause - length 0 - lengthmod 1 -endphoneme -phoneme %% // Unstressed - stress - stress_type 0 -endphoneme - -phoneme % // Diminished stress +phoneme % // Unstressed stress stress_type 1 endphoneme -phoneme , // Secondary stress +phoneme %% // Diminished stress + stress + stress_type 0 +endphoneme + +phoneme \, // [,] Secondary stress stress stress_type 2 endphoneme -phoneme ,, // Secondary stress +phoneme \,\, // [,,] Secondary stress stress stress_type 3 endphoneme @@ -89,108 +54,100 @@ endphoneme phoneme || // End Word pause - length 0 lengthmod 1 endphoneme -phoneme _ // Short pause +phoneme _ // Short pause pause - formants NULL starttype _ endtype _ - length 25 lengthmod 1 + length 25 endphoneme phoneme _! // Short pause, don't replace by linking pause - formants NULL starttype _ endtype _ - length 35 lengthmod 1 nolink + length 35 endphoneme phoneme _| // Very short pause pause - formants NULL starttype _ endtype _ - length 1 lengthmod 5 + length 1 endphoneme phoneme _: // Standard pause pause - formants NULL starttype _ endtype _ - length 75 lengthmod 1 + length 75 endphoneme phoneme _:: // Long pause pause - formants NULL starttype _ endtype _ - length 150 lengthmod 1 + length 150 endphoneme phoneme _;_ // clause pause pause - formants NULL starttype _ endtype _ - length 200 lengthmod 1 + length 200 endphoneme phoneme _^_ // Change dictionary (followed by language-code in ascii pause starttype _ endtype _ - length 10 lengthmod 1 + length 10 endphoneme phoneme _X1 // a language specific action pause starttype _ endtype _ - length 10 lengthmod 1 + length 10 endphoneme phoneme ? // glottal stop vls glt stop - vowelin glstop - vowelout glstop - wave ustop/null lengthmod 2 // ?? nolink + Vowelin glstop + Vowelout glstop + WAV(ustop/null) endphoneme -phoneme : // Lengthen previous vowel by "length" +phoneme : // lengthen previous vowel by "length" virtual length 70 endphoneme phoneme - // Indicates the previous phoneme is a syllabic consonant virtual - length 0 endphoneme phoneme @ // Schwa - vowel starttype (@) endtype (@) - formants vowel/@ + vowel starttype #@ endtype #@ unstressed length 140 + FMT(vowel/@) endphoneme phoneme @- // very short schwa vowel nonsyllabic - starttype (@) endtype (@) - formants vowel/@- + starttype #@ endtype #@ unstressed length 50 + FMT(vowel/@-) endphoneme @@ -198,10 +155,10 @@ endphoneme // Other sounds //******************************************************************* -phoneme (X1) // click, use for indicating capital letters +phoneme #X1 // click, use for indicating capital letters vls alv frc sibilant lengthmod 3 - wave ustop/percus10 + WAV(ustop/percus10) endphoneme @@ -210,157 +167,22 @@ endphoneme // These each apply to a class of vowels //******************************************************************* -phoneme (@) virtual - after j j/j@ - after ; j2/j2@ - after w w/w@ - after l l/l@ - after l^ l^/j2@ - after #r r/r@-15 - after r- r2/r2@ - after m m/m@ - after n n/n@ - after n. n/nr@ - after N nn/nn@ - after n^ n^/n^@ - before l/ DFT-60+l/L1_@L - before l/2 DFT-60+l/L2_@L - before l/3 DFT+l/l_@ - before l DFT-50+l/xl - before w DFT-30+w/xw - before j DFT-30+j/xj - before #r DFT-50+r/xr - before r- DFT-60+r/xr - before r/ DFT+r3/r_@ +phoneme #@ virtual endphoneme -phoneme (a) virtual - after j j/ja - after ; j2/j2a - after w w/wa - after l l/la - after l^ l^/j2a - after #r r/ra-15 - after r- r2/r2a - after m m/ma - after n n/na - after n. n/nra - after N nn/nna - after n^ n^/n^a - before l/ DFT-40+l/L1_aL - before l/2 DFT-50+l/L2_aL - before l/3 DFT+l/l_a - before l DFT-40+l/xl - before w DFT-30+w/xw - before j DFT-30+j/xj - before #r DFT-50+r/xr - before r- DFT-60+r/xr - before r/ DFT+r3/r_a +phoneme #a virtual endphoneme -phoneme (e) virtual - after j j/je - after ; j2/j2e - after w w/we - after l l/le - after l^ l^/j2e - after #r r/re-15 - after r- r2/r2e - after m m/me - after n n/ne - after n. n/nre - after N nn/nne - after n^ n^/n^e - before l/ DFT-30+l/L1_eL - before l/2 DFT-40+l/L2_eL - before l/3 DFT+l/l_e - before l DFT-40+l/xl - before w DFT-30+w/xw - before j DFT-30+j/xj - before #r DFT-50+r/xr - before r- DFT-60+r/xr - before r/ DFT+r3/r_e +phoneme #e virtual endphoneme -phoneme (i) virtual - after j j/ji - after ; j2/j2i - after w w/wi - after l l/li-10 - after l^ l^/j2i - after #r r/ri-15 - after r- r2/r2i - after m m/mi - after n n/ni - after n. n/nri - after N nn/nni - after n^ n^/n^i - before l/ DFT-30+l/L1_iL - before l/2 DFT-30+l/L2_iL - before l/3 DFT+l/l_i - before N DFT-40+nn/inn - before ; DFT-40+j2/xj2 - before l DFT-40+l/xl - before w DFT-30+w/xw - before j DFT-30+j/xj - before r- DFT-60+r/xr - before r/ DFT+r3/r_i +phoneme #i virtual endphoneme -phoneme (o) virtual - after j j/jo - after ; j2/j2o - after w w/wo - after l l/lo - after l^ l^/j2o - after #r r/ro-15 - after r- r2/r2o - after m m/mo - after n n/no - after n. n/nro - after N nn/nno - after n^ n^/n^o - before l/ DFT-40+l/L1_oL - before l/2 DFT-50+l/L2_oL - before l/3 DFT+l/l_o - before l DFT-40+l/xl - before w DFT-30+w/xw - before j DFT-30+j/xj - before #r DFT-50+r/xr - before r- DFT-60+r/xr - before r/ DFT+r3/r_o +phoneme #o virtual endphoneme -phoneme (u) virtual - after j j/ju - after ; j2/j2u - after w w/wu - after l l/lu - after l^ l^/j2u - after #r r/ru-15 - after r- r2/r2u - after m m/mu - after n n/nu - after n. n/nru - after N nn/nnu - after n^ n^/n^u - before l/ DFT-40+l/L1_uL - before l/2 DFT-40+l/L2_uL - before l/3 DFT-20+l/l_u - before l DFT-40+l/xl - before w DFT-30+w/xw - before j DFT-30+j/xj - before #r DFT-50+r/xr - before r- DFT-60+r/xr - before r/ DFT+r3/r_u -endphoneme - -phoneme (r) virtual -// use to mean general sonorant -endphoneme - -phoneme #r virtual -// use for English r in virtual phonemes +phoneme #u virtual endphoneme @@ -369,269 +191,558 @@ endphoneme //******************************************************************* -phoneme r - liquid starttype #r endtype #r - rhotic - length 100 - lengthmod 7 - beforenotvowel r/ - formants r/r - after _ r/_r - after t r/tr - after p r/tr - after k r/tr - before _ r/r_ +phoneme r- // syllabic r + vowel starttype #@ endtype #@ + unstressed + length 220 + FMT(vowelr/r-voc) endphoneme +phoneme l- // syllabic l + vowel starttype #@ endtype #@ + unstressed + length 200 + FMT(vwl_hi/l-voc) +endphoneme + + +phoneme r + liquid rhotic + lengthmod 7 + + IF nextPh(isNotVowel) THEN + ChangePhoneme(r/) + ENDIF + + NextVowelStarts + VowelStart(r/r@, -15) + VowelStart(r/ra, -15) + VowelStart(r/re, -15) + VowelStart(r/ri, -15) + VowelStart(r/ro, -15) + VowelStart(r/ru, -15) + EndSwitch + + IF prevPh(isVowel) THEN + VowelEnding(r/xr, -50) + ENDIF + + IF prevPh(isPause) THEN + FMT(r/_r) + ELIF prevPh(t) OR prevPh(p) OR prevPh(k) THEN + FMT(r/tr) + ENDIF + + FMT(r/r) +endphoneme + + phoneme r/ // used for [r] when not preceding a vowel - liquid - length 100 - lengthmod 2 // - formants r3/r_+r3/rx - before n r3/r_n+r3/rx - after _ r/rr - after t r/trr - after p r/trr - after k r/trr + liquid rhotic + lengthmod 2 + + IF nextPh(n) THEN + FMT(r3/r_n) addWav(r3/rx) + ENDIF + + IF prevPh(t) OR prevPh(p) OR prevPh(k) THEN + FMT(r/trr) + ENDIF + + IF prevPh(isNotVowel) THEN + FMT(r/rr) + ENDIF + + FMT(r3/r_) addWav(r3/rx) endphoneme -phoneme r- // linking r, used between certain vowels and a following vowel - liquid - length 100 - lengthmod 0 - formants r/r - after _ r2/_r2 -endphoneme - phoneme R liquid - vowelin f1=0 f2=1600 -300 300 f3=-200 80 - vowelout f1=2 f2=1600 -300 300 f3=-200 80 brk - formants r3/r_trill2+r3/r_trill2.wav%65 trill lengthmod 6 + Vowelin f1=0 f2=1600 -300 300 f3=-200 80 + Vowelout f1=2 f2=1600 -300 300 f3=-200 80 brk + FMT(r3/r_trill2) addWav(r3/r_trill2.wav, 65) endphoneme phoneme R2 // this is [R] from Slovak/Czech liquid - vowelin f1=0 f2=1700 -300 300 f3=-300 80 - vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk - formants r3/r_trill+r3/r_trill.wav%50 trill 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, 50) endphoneme phoneme R3 // Afrikaans - liquid starttype #r endtype #r - length 60 - vowelin f1=2 f2=2700 -300 -200 f3=-1300 80 - vowelout f1=2 f2=1700 -300 -200 f3=-1300 80 - formants r3/r_trill+r3/r_trill3.wav%99 - before _ r3/r_trill+r3/r_trill3.wav%99 + liquid trill lengthmod 6 + length 60 + Vowelin f1=2 f2=2700 -300 -200 f3=-1300 80 + Vowelout f1=2 f2=1700 -300 -200 f3=-1300 80 + + // vowel modifier is the same as for [r] + NextVowelStarts + VowelStart(r/r@, -15) + VowelStart(r/ra, -15) + VowelStart(r/re, -15) + VowelStart(r/ri, -15) + VowelStart(r/ro, -15) + VowelStart(r/ru, -15) + EndSwitch + + IF prevPh(isVowel) THEN + VowelEnding(r/xr, -50) + ENDIF + + FMT(r3/r_trill) addWav(r3/r_trill3.wav) endphoneme phoneme r" // uvular trill vcd uvl frc - formants r3/r_uvl+r3/r_uvl.wav%75 - before _ r3/r_uvl+r3/r_uvl.wav%50 lengthmod 6 + IF nextPh(isNotVowel) THEN + FMT(r3/r_uvl) addWav(r3/r_uvl.wav, 50) + ENDIF + FMT(r3/r_uvl) addWav(r3/r_uvl.wav, 75) endphoneme +procedure vowelstart_l + NextVowelStarts + VowelStart(l/l@) + VowelStart(l/la) + VowelStart(l/le) + VowelStart(l/li, -10) + VowelStart(l/lo) + VowelStart(l/lu) + EndSwitch +endprocedure + phoneme l liquid - length 100 lengthmod 7 - beforenotvowel l/ - formants l/l - after _ l/_l - after t l/tl - after l/ l/l_long // double l, make it longer + + IF nextPh(isNotVowel) THEN + ChangePhoneme(l/) + ENDIF + + CALL vowelstart_l + + IF prevPh(#@) THEN + VowelEnding(l/xl, -50) + ELIF prevPh(isVowel) THEN + VowelEnding(l/xl, -40) + 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/ // used for [l] when not before a vowel liquid - length 100 lengthmod 7 - formants l/l_ - before (r) l/_l - beforevowel l -endphoneme -phoneme l/3 // used for [l] when not before a vowel - liquid - length 100 - lengthmod 7 - formants l/l_ - before (r) l/_l - beforevowel l -endphoneme + 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_) +endphoneme phoneme l/2 // 'dark' [l] after a vowel liquid - length 100 lengthmod 7 - beforevowel l + + IF nextPh(isVowel) THEN + ChangePhoneme(l) + ENDIF + + PrevVowelEndings + VowelEnding(l/L2_@L, -60) + VowelEnding(l/L2_aL, -50) + VowelEnding(l/L2_eL, -40) + VowelEnding(l/L2_iL, -30) + VowelEnding(l/L2_oL, -50) + VowelEnding(l/L2_uL, -40) + EndSwitch endphoneme +phoneme l/3 // Replacement for [l/] + liquid + lengthmod 7 + + IF nextPh(isVowel) THEN + ChangePhoneme(l) + ENDIF + + PrevVowelEndings + VowelEnding(l/l_@) + VowelEnding(l/l_a) + VowelEnding(l/l_e) + VowelEnding(l/l_i) + VowelEnding(l/l_o) + VowelEnding(l/l_u, -20) + EndSwitch + +// IF nextPh(isLiquid) THEN +// FMT(l/_l) +// ENDIF + + FMT(l/l_) +endphoneme + + + phoneme l^ // palatal l - vowelout len=60 lenadd rate liquid - formants l^/l^ - after _ l^/_l^ 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^) + ENDIF + + FMT(l^/l^) endphoneme +phoneme l. + liquid rfx + lengthmod 7 + FMT(l^/l_rfx) +endphoneme + + + phoneme w liquid - length 100 - beforenotvowel w/ lengthmod 7 - formants w/w - after _ w/_w + + IF nextPh(isVowel) THEN + NextVowelStarts + VowelStart(w/w@) + VowelStart(w/wa) + VowelStart(w/we) + VowelStart(w/wi) + VowelStart(w/wo) + VowelStart(w/wu) + EndSwitch + + VowelEnding(w/xw, -30) + + IF prevPh(isPause) THEN + FMT(w/_w) + ELSE + FMT(w/_w) + ENDIF + ELSE + // no vowel follows + Vowelout len=50 + IF prevPh(#i) THEN + FMT(w/iw_) + ENDIF + FMT(w/w_) + ENDIF endphoneme -phoneme w/ // used for [w] when not before a vowel - liquid - vowelout len=50 - length 100 - formants w/w_ - after (i) w/iw_ - lengthmod 7 - beforevowel w -endphoneme - phoneme j - liquid - palatal - length 100 - beforenotvowel j/ - formants NULL - after _ j/_j - after v NULL + 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) + ENDIF + ELSE + // no vowel follows + Vowelout len=70 + FMT(j/j_) + ENDIF endphoneme -phoneme j/ // used for [j] when not before a vowel - liquid - palatal - vowelout len=70 - length 100 - formants j/j_ - lengthmod 7 - beforevowel j -endphoneme - - - -phoneme ; // linking j, (formerly [j-]) used between (i) vowels - // and a following vowel +phoneme ; // linking j, used between (i) vowels and a following vowel // also to palatalize consonants - liquid - palatal - length 100 + liquid palatal lengthmod 0 - formants NULL - beforenotvowel NULL // this is to ignore this phoneme if not before a vowel - after _ j2/_j2 + + IF nextPh(isNotVowel) THEN + ChangePhoneme(NULL) // this is to ignore this phoneme if not before a vowel + ENDIF + + NextVowelStarts + VowelStart(j2/j2@) + VowelStart(j2/j2a) + VowelStart(j2/j2e) + VowelStart(j2/j2i) + VowelStart(j2/j2o) + VowelStart(j2/j2u) + EndSwitch + + IF prevPh(#i) THEN + VowelEnding(j2/xj2, -40) + ENDIF + + IF prevPh(isPause) THEN + FMT(j2/_j2) + ENDIF endphoneme +//******************************************************************* +// NASAL CONSONANTS +//******************************************************************* + + phoneme m vcd blb nasal - vowelout f1=2 f2=1000 -500 -350 f3=-200 80 brk - length 100 + Vowelout f1=2 f2=1000 -500 -350 f3=-200 80 brk lengthmod 4 - formants NULL - after _ m/_m - before _ m/m_ - before (r) m/mj + + 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 thisPh(isNotVowel) AND nextPhW(isLiquid) THEN + FMT(m/mj) + ELIF prevPh(isPause) THEN + FMT(m/_m) + ELIF nextPh(isNotVowel) THEN + FMT(m/m_) + ENDIF endphoneme phoneme n vcd alv nasal - vowelout f1=2 f2=1700 -300 250 f3=-100 80 rms=20 brk - length 100 + Vowelout f1=2 f2=1700 -300 250 f3=-100 80 rms=20 brk lengthmod 4 - formants NULL - after _ n/_n - after n n/_n // lengthen [nn] - before _ n/n_ - before (r) n/nj + + IF KlattSynth THEN + Vowelin f1=0 f2=1500 -200 200 f3=0 80 + FMT(klatt/n) + ENDIF + + NextVowelStarts + VowelStart(n/n@) + VowelStart(n/na) + VowelStart(n/ne) + VowelStart(n/ni) + VowelStart(n/no) + VowelStart(n/nu) + EndSwitch + + IF thisPh(isNotVowel) AND nextPhW(isLiquid) THEN + FMT(n/nj) + ELIF prevPh(isPause) OR prevPh(n) THEN + FMT(n/_n) + ELIF nextPh(isNotVowel) THEN + FMT(n/n_) + ENDIF endphoneme phoneme n. vcd rfx nasal - vowelin f1=2 f2=1200 -300 250 f3=-500 80 rms=20 colr=2 - vowelout f1=2 f2=1200 -300 250 f3=-500 80 rms=20 brk colr=2 - length 100 + starttype n endtype n + Vowelin f1=2 f2=1200 -300 250 f3=-500 80 rms=20 colr=2 + Vowelout f1=2 f2=1200 -300 250 f3=-500 80 rms=20 brk colr=2 lengthmod 4 - formants NULL - after _ n/_nr - after n n/_nr // lengthen [nn] - before _ n/nr_ - before (r) n/nj -endphoneme + IF KlattSynth THEN + FMT(klatt/nr) + ENDIF + + NextVowelStarts + VowelStart(n/n@) + VowelStart(n/na) + VowelStart(n/ne) + VowelStart(n/ni) + VowelStart(n/no) + VowelStart(n/nu) + EndSwitch + + IF thisPh(isNotVowel) AND nextPhW(isLiquid) THEN + FMT(n/nj) + ELIF prevPh(isPause) OR prevPh(n.) THEN + FMT(n/_nr) + ELIF nextPh(isNotVowel) THEN + FMT(n/nr_) + ENDIF +endphoneme phoneme n^ vcd pal nasal palatal - vowelout f1=3 f2=2500 300 500 f3=100 80 len=45 brk rate - length 100 + Vowelout f1=3 f2=2500 300 500 f3=100 80 len=45 brk rate lengthmod 4 - formants NULL - after _ n^/_n^ - before _ n^/n^_ - before (r) n/nj -endphoneme + IF KlattSynth THEN + VowelStart(klatt/n^@) + FMT(klatt/n^) + ENDIF + + NextVowelStarts + VowelStart(n^/n^@) + VowelStart(n^/n^a) + VowelStart(n^/n^e) + VowelStart(n^/n^i) + VowelStart(n^/n^o) + VowelStart(n^/n^u) + EndSwitch + + IF prevPh(isPause) THEN + FMT(n^/_n^) + ELIF nextPh(isNotVowel) THEN + FMT(n^/n^_) + ENDIF +endphoneme phoneme N vcd vel nasal -// vowelout brk - vowelout f1=3 f2=2300 300 400 f3=-200 80 len=40 rms=20 brk - length 100 - formants NULL - after _ nn/_nn - before _ nn/nn_ - before (r) nn/nnj + Vowelout f1=3 f2=2300 300 400 f3=-200 80 len=40 rms=20 brk lengthmod 8 // longer than 'n' + + IF KlattSynth THEN + Vowelin f1=0 f2=2100 50 300 f3=0 80 + FMT(klatt/nn) + ENDIF + + NextVowelStarts + VowelStart(nn/nn@) + VowelStart(nn/nna) + VowelStart(nn/nne) + VowelStart(nn/nni) + VowelStart(nn/nno) + VowelStart(nn/nnu) + EndSwitch + + IF prevPh(#i) THEN + VowelEnding(nn/inn, -40) + ENDIF + + IF thisPh(isNotVowel) AND nextPhW(isLiquid) THEN + FMT(nn/nnj) + ELIF prevPh(isPause) THEN + FMT(nn/_nn) + ELIF nextPh(isNotVowel) THEN + FMT(nn/nn_) + ENDIF endphoneme + phoneme ** // TEST flap liquid alv - vowelout f1=3 f2=1600 -300 300 f3=-300 80 rms=35 len=15 - vowelin f1=2 f2=1600 -300 300 f3=-100 80 len=20 - formants r3/@tap - after (e) r3/@tap2 - after (i) r3/@tap2 lengthmod 3 + Vowelout f1=3 f2=1600 -300 300 f3=-300 80 rms=35 len=15 + Vowelin f1=2 f2=1600 -300 300 f3=-100 80 len=20 + + IF prevPh(#i) OR prevPh(#e) THEN + FMT(r3/@tap2) + ENDIF + FMT(r3/@tap) endphoneme + +phoneme * // flap + vcd alv flp + brkafter + lengthmod 3 + + IF nextPh(#e) OR nextPh(#i) THEN + Vowelin f1=0 f2=1500 -300 300 f3=-200 80 + FMT(d/tap1) addWav(r3/rx, 150) + FMT(d/tap1) addWav(r3/rx, 150) + ENDIF + + Vowelin f1=2 f2=1500 -300 300 f3=-200 80 + IF nextPh(#a) THEN + FMT(d/tap3) addWav(r3/rx, 200) + ENDIF + + IF nextPh(r) THEN + FMT(d/dr) + ENDIF + + Vowelout f1=3 f2=1500 -400 300 f3=-200 80 rms=35 len=50 + Vowelin f1=0 f2=1500 -300 300 f3=-200 80 + FMT(d/tap3) addWav(r3/rx, 200) +endphoneme + + + phoneme r. // retroflex liquid rfx - vowelout f1=3 f2=1400 -400 300 f3=-400 80 rms=35 len=15 colr=2 - vowelin f1=2 f2=1400 -400 300 f3=-400 80 len=20 - formants r3/@tap_rfx lengthmod 3 + Vowelout f1=3 f2=1400 -400 300 f3=-400 80 rms=35 len=15 colr=2 + Vowelin f1=2 f2=1400 -400 300 f3=-400 80 len=20 + FMT(r3/@tap_rfx) endphoneme @@ -640,146 +751,171 @@ endphoneme //******************************************************************* - phoneme b vcd blb stop - vowelout f1=2 f2=1000 -500 -300 f3=-300 80 brk - formants b/b+x/b - before _ b/b_+x/b_ - before (a) b/ba+x/b - before (@) b/b@+x/b - before (e) b/be+x/b - before (i) b/bi+x/b - before (o) b/bo+x/b - before (u) b/bu+x/b - before @- b/b@2+x/b - after _ NULL - after @ b/xb + voicingswitch p + Vowelout f1=2 f2=1000 -500 -300 f3=-300 80 brk lengthmod 5 - switchvoicing p -endphoneme + IF PreVoicing THEN + FMT(b/xb) + ENDIF + + IF KlattSynth THEN + Vowelin f1=1 f2=1000 -500 -300 f3=-300 80 + IF nextPh(isPause2) THEN + FMT(klatt/b) addWav(x/b_) + ENDIF + FMT(klatt/b) addWav(x/b) + ENDIF + + IF nextPh(isPause2) THEN + FMT(b/b_) addWav(x/b_) + ELIF nextPh(@-) THEN + FMT(b/b@2) addWav(x/b) + ELIF nextPh(#@) THEN + FMT(b/b@) addWav(x/b) + ELIF nextPh(#a) THEN + FMT(b/ba) addWav(x/b) + ELIF nextPh(#e) THEN + FMT(b/be) addWav(x/b) + ELIF nextPh(#i) THEN + FMT(b/bi) addWav(x/b) + ELIF nextPh(#o) THEN + FMT(b/bo) addWav(x/b) + ELIF nextPh(#u) THEN + FMT(b/bu) addWav(x/b) + ENDIF + + FMT(b/b) addWav(x/b) +endphoneme phoneme d vcd alv stop - vowelin f1=1 f2=1700 -300 300 f3=-100 80 - vowelout f1=2 f2=1700 -300 300 f3=-100 80 - formants d/d+x/d - before _ d/d_+x/d_ - before r d/dr+x/d - after _ NULL - after @ d/xd + voicingswitch t lengthmod 5 - switchvoicing t + 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) + ENDIF + + IF nextPh(isPause2) THEN + FMT(d/d_) addWav(x/d_) +// ELIF nextPh(r) THEN +// FMT(d/dr) addWav(x/d) + ENDIF + + FMT(d/d) addWav(x/d) endphoneme phoneme d[ vcd dnt stop - vowelin f1=2 f2=1500 -300 300 f3=-150 80 - vowelout f1=2 f2=1500 -300 300 f3=-150 80 - formants d/d+x/d_dnt%110 - before _ d/d_+x/d_ - before r d/dr+x/d_dnt%110 - after _ NULL - after @ d/xd + voicingswitch t[ lengthmod 5 - switchvoicing t[ + Vowelin f1=2 f2=1500 -300 300 f3=-150 80 + Vowelout f1=2 f2=1500 -300 300 f3=-150 80 + + IF PreVoicing THEN + FMT(d/xd) + ENDIF + + IF nextPh(isPause2) THEN + FMT(d/d_) addWav(x/d_) + ELIF nextPh(r) THEN + FMT(d/dr) addWav(x/d_dnt, 110) + ENDIF + + FMT(d/d) addWav(x/d_dnt, 110) endphoneme -phoneme * // flap - vcd alv flp - brkafter - vowelout f1=3 f2=1500 -400 300 f3=-200 80 rms=35 len=50 - vowelin f1=0 f2=1500 -300 300 f3=-200 80 - formants d/tap3+r3/rx%200 - vowelin f1=0 f2=1500 -300 300 f3=-200 80 - before (i) d/tap1+r3/rx%150 - before (e) d/tap1+r3/rx%150 - vowelin f1=2 f2=1500 -300 300 f3=-200 80 - before (a) d/tap3+r3/rx%200 - before r d/dr - lengthmod 3 -endphoneme - - - phoneme dZ vcd pla afr sibilant - vowelin f1=2 f2=2300 200 400 f3=100 80 - vowelout f1=2 f2=2300 250 300 f3=100 80 brk - formants dzh/dzh+x/dzh - before _ dzh/dzh_+x/dzh_ - after _ NULL - after @ dzh/xdzh + voicingswitch tS lengthmod 5 - switchvoicing tS -endphoneme + Vowelin f1=2 f2=2300 200 400 f3=100 80 + Vowelout f1=2 f2=2300 250 300 f3=100 80 brk + IF PreVoicing THEN + FMT(dzh/xdzh) + ENDIF -phoneme dz; // this should be different from dZ; - vcd pla afr sibilant palatal - vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 - formants dzh/dzh+x/dz_pzd - before _ dzh/dzh_+x/dzh_ - after _ NULL - after @ dzh/xdzh - lengthmod 5 - switchvoicing ts; + IF nextPh(isPause2) THEN + FMT(dzh/dzh_) addWav(x/dzh_) + ENDIF + FMT(dzh/dzh) addWav(x/dzh) endphoneme phoneme dZ; vcd pla afr sibilant palatal - vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 - formants dzh/dzh+x/dz_pzd - before _ dzh/dzh_+x/dzh_ - after _ NULL - after @ dzh/xdzh + voicingswitch tS; lengthmod 5 - switchvoicing tS; + Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 + Vowelout f1=2 f2=2700 400 600 f3=300 80 + + IF PreVoicing THEN + FMT(dzh/xdzh) + ENDIF + + IF KlattSynth THEN + IF nextPh(isPause2) THEN + FMT(dzh/dzh_) addWav(x/dzh_) + ENDIF + FMT(dzh/dzh) addWav(x/dz_pzd) + ENDIF + + IF nextPh(isPause2) THEN + FMT(dzh/dzh_) addWav(x/dzh_) + ENDIF + FMT(dzh/dzh) addWav(x/dz_pzd) endphoneme phoneme J - vcd pla afr sibilant - vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 - vowelout f1=2 f2=2700 400 600 f3=300 80 colr=1 - formants dzh/dz_pzd+x/dzh%45 - before _ dzh/dz_pzd_+x/dzh%35 - after _ NULL - after @ dzh/xdz_pzd + vcd pal afr sibilant + voicingswitch c lengthmod 5 - switchvoicing c -endphoneme + Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 + Vowelout f1=2 f2=2700 400 600 f3=300 80 colr=1 + IF PreVoicing THEN + FMT(dzh/xdz_pzd) + ENDIF + + IF KlattSynth THEN + IF nextPh(isPause2) THEN + FMT(klatt/dz_pzd_) addWav(x/dzh, 35) + ENDIF + FMT(klatt/dz_pzd) addWav(x/dzh, 45) + ENDIF + + IF nextPh(isPause2) THEN + FMT(dzh/dz_pzd_) addWav(x/dzh, 35) + ENDIF + FMT(dzh/dz_pzd) addWav(x/dzh, 45) +endphoneme phoneme g vcd vel stop - vowelin f1=2 f2=2300 200 300 f3=-300 80 - vowelout f1=2 f2=2300 250 300 f3=-300 80 brk -// formants g/g+x/g - formants g/g+x/g2%150 - before _ g/g_+x/g_ - after _ NULL - after @ g/xg + voicingswitch k lengthmod 5 - switchvoicing k -endphoneme + Vowelin f1=2 f2=2300 200 300 f3=-300 80 + Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk + IF PreVoicing THEN + FMT(g/xg) + ENDIF -phoneme g- // linking g, used between N and a vowel - vcd vel stop - vowelin f1=2 f2=2300 200 400 f3=-100 80 - vowelout f1=2 f2=2300 250 300 f3=-300 80 brk - formants g2/g+x/g2_ - before _ g2/g_+x/g2_ - after _ NULL - after @ g2/xg - lengthmod 5 + IF nextPh(isPause2) THEN + FMT(g/g_) addWav(x/g_) + ENDIF + FMT(g/g) addWav(x/g2, 150) endphoneme @@ -791,257 +927,363 @@ endphoneme phoneme B vcd blb frc - vowelin f1=2 f2=1000 -300 -200 f3=-100 100 - vowelout f1=2 f2=1000 -500 -300 f3=-100 60 len=50 + voicingswitch f lengthmod 6 - formants voc/bh+vocw/v - before _ voc/v_+vocw/v - switchvoicing f + Vowelin f1=2 f2=1000 -300 -200 f3=-100 100 + Vowelout f1=2 f2=1000 -500 -300 f3=-100 60 len=50 + + IF KlattSynth THEN + IF nextPh(isPause2) THEN + FMT(klatt/v_) addWav(vocw/v) + ENDIF + FMT(klatt/bh) addWav(vocw/v) + ENDIF + + IF nextPh(isPause2) THEN + FMT(voc/v_) addWav(vocw/v) + ENDIF + FMT(voc/bh) addWav(vocw/v) endphoneme phoneme v vcd lbd frc - vowelin f1=0 f2=1000 -300 -200 f3=-300 100 - vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50 + voicingswitch f lengthmod 6 - formants voc/v+vocw/v - before (r) voc/vj+vocw/v - before _ voc/v_+vocw/v - switchvoicing f + Vowelin f1=0 f2=1000 -300 -200 f3=-300 100 + Vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50 + + IF KlattSynth THEN + Vowelout f1=1 f2=1000 -500 -300 f3=-300 60 len=50 brk + IF nextPh(isPause2) THEN + FMT(klatt/v_) addWav(vocw/v) + ENDIF + FMT(klatt/v) addWav(vocw/v, 150) + ENDIF + + IF nextPh(isPause2) THEN + FMT(voc/v_) addWav(vocw/v) + ENDIF + IF thisPh(isWordStart) AND nextPhW(isLiquid) THEN + Length 70 + ENDIF + FMT(voc/v) addWav(vocw/v) endphoneme -phoneme v# // approximant, not fricative +phoneme v# // approximant, not fricative vcd lbd frc - vowelin f1=1 f2=900 -300 -300 f3=-100 100 - vowelout f1=1 f2=900 -500 -300 f3=-100 60 len=50 lengthmod 6 - formants voc/v# - before _ voc/v#_ - switchvoicing f + voicingswitch f + Vowelin f1=0 f2=1000 -300 -200 f3=-300 100 + Vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50 + IF nextPh(isPause2) THEN + FMT(voc/v#_) + ENDIF + FMT(voc/v#) endphoneme phoneme D vcd dnt frc - vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 - formants voc/dh+vocw/dh - before _ voc/dh_+vocw/dh + voicingswitch T lengthmod 6 - switchvoicing T + Vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 + + IF KlattSynth THEN + Vowelin f1=0 f2=1290 -300 300 f3=0 0 + ENDIF + + IF nextPh(isPause2) THEN + FMT(voc/dh_) addWav(vocw/dh) + ENDIF + FMT(voc/dh) addWav(vocw/dh) endphoneme phoneme z vcd alv frc sibilant - vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 - formants voc/z+ufric/s_ - before _ voc/z_+ufric/s_%85 + voicingswitch s lengthmod 6 - switchvoicing s + Vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 + + IF KlattSynth THEN + Vowelin f1=0 f2=1390 -300 300 f3=0 0 + Vowelout f1=1 f2=1390 -300 300 f3=-100 60 len=50 brk + ENDIF + + IF nextPh(isPause2) THEN + FMT(voc/z_) addWav(ufric/s_, 85) + ENDIF + FMT(voc/z) addWav(ufric/s_) endphoneme phoneme Z vcd pla frc sibilant - vowelin f1=0 f2=2000 0 300 f3=-200 80 - vowelout f1=2 f2=2000 0 300 f3=-200 80 brk - formants voc/zh+vocw/zh%130 - before _ voc/zh_+vocw/zh + voicingswitch S lengthmod 6 - switchvoicing S + Vowelin f1=0 f2=2000 0 300 f3=-200 80 + Vowelout f1=2 f2=2000 0 300 f3=-200 80 brk + + IF KlattSynth THEN + IF nextPh(isPause2) THEN + FMT(klatt/zh_) addWav(vocw/zh) + ENDIF + FMT(klatt/zh) addWav(vocw/zh, 130) + ENDIF + + IF nextPh(isPause2) THEN + FMT(voc/zh_) addWav(vocw/zh) + ENDIF + FMT(voc/zh) addWav(vocw/zh, 130) endphoneme phoneme z. vcd pla frc sibilant - vowelin f1=0 f2=1800 -100 300 f3=-300 80 - vowelout f1=2 f2=1800 -100 300 f3=-300 80 brk - formants voc/zh+vocw/zh_rfx - before _ voc/zh_+vocw/zh_rfx + voicingswitch s. lengthmod 6 - switchvoicing s. + Vowelin f1=0 f2=1800 -100 300 f3=-300 80 + Vowelout f1=2 f2=1800 -100 300 f3=-300 80 brk + + IF KlattSynth THEN + IF nextPh(isPause2) THEN + FMT(klatt/zh_) addWav(vocw/zh_rfx) + ENDIF + FMT(klatt/zh) addWav(vocw/zh_rfx) + ENDIF + + IF nextPh(isPause2) THEN + FMT(voc/zh_) addWav(vocw/zh_rfx) + ENDIF + FMT(voc/zh) addWav(vocw/zh_rfx) endphoneme phoneme z; vcd pal frc sibilant palatal - vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 - vowelout f1=2 f2=2300 250 300 f3=-300 80 brk - formants voc/z_pzd+ufric/s_pzd%80 - before _ voc/z_pzd_+ufric/s_pzd_%80 + voicingswitch s; lengthmod 6 - switchvoicing s; + Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 + Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk + + IF nextPh(isPause2) THEN + FMT(voc/z_pzd_) addWav(ufric/s_pzd_, 80) + ENDIF + FMT(voc/z_pzd) addWav(ufric/s_pzd, 80) endphoneme phoneme Z; vcd pal frc sibilant palatal - vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 - vowelout f1=2 f2=2300 250 300 f3=-300 80 brk - formants voc/z_pzd+ufric/sh_pzd%80 - before _ voc/z_pzd_+ufric/sh_pzd_ + voicingswitch S; lengthmod 6 - switchvoicing Z; + Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70 + Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk + + IF nextPh(isPause2) THEN + FMT(voc/z_pzd_) addWav(ufric/sh_pzd_) + ENDIF + FMT(voc/z_pzd) addWav(ufric/sh_pzd, 80) endphoneme phoneme J^ // palatal fricative (Kirshenbaum C) vcd pal frc palatal - vowelin f1=1 f2=2700 400 600 f3=200 70 - vowelout f1=1 f2=2700 400 600 f3=200 70 len=100 + voicingswitch C lengthmod 6 - formants voc/j+ufric/ch%25 + Vowelin f1=1 f2=2700 400 600 f3=200 70 + Vowelout f1=1 f2=2700 400 600 f3=200 70 len=100 + + FMT(voc/j) addWav(ufric/ch, 25) endphoneme - - phoneme Q vcd vel frc - vowelin f1=2 f2=2300 200 400 f3=-100 80 - vowelout f1=2 f2=2300 250 300 f3=-300 80 brk + voicingswitch x lengthmod 6 - formants voc/Q+vocw/Q - before _ voc/Q_+vocw/Q_ - switchvoicing x + Vowelin f1=2 f2=2300 200 400 f3=-100 80 + Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk + + IF KlattSynth THEN + IF nextPh(isPause2) THEN + FMT(klatt/qqh_) addWav(vocw/Q_) + ENDIF + FMT(klatt/qqh) addWav(vocw/Q) + ENDIF + + IF nextPh(isPause2) THEN + FMT(voc/Q_) addWav(vocw/Q_) + ENDIF + FMT(voc/Q) addWav(vocw/Q) endphoneme + phoneme Q^ vcd vel frc - vowelin f1=2 f2=2700 400 600 f3=200 80 - vowelout f1=2 f2=2700 40 600 f3=200 80 brk lengthmod 6 - formants voc/Q+vocw/Q - before _ voc/Q_+vocw/Q_ - switchvoicing x + Vowelin f1=2 f2=2700 400 600 f3=200 80 + Vowelout f1=2 f2=2700 40 600 f3=200 80 brk + + IF nextPh(isPause2) THEN + FMT(voc/Q_) addWav(vocw/Q_) + ENDIF + FMT(voc/Q) addWav(vocw/Q) endphoneme + phoneme Q" // voiced velar fricative vcd uvl frc - formants voc/Q_ulv+ufric/xx%80 - before _ voc/Q_ulv+ufric/xx%60 lengthmod 6 + + IF nextPh(isPause2) THEN + FMT(voc/Q_ulv) addWav(ufric/xx, 60) + ENDIF + FMT(voc/Q_ulv) addWav(ufric/xx, 80) endphoneme + //******************************************************************* // UNVOICED STOPS //******************************************************************* - phoneme p vls blb stop - vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11 - vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22 + voicingswitch b lengthmod 2 - wave ustop/p - before _ ustop/p_ - before r ustop/pr%70 - before R ustop/pr - before @- ustop/p_unasp - before l ustop/pl - switchvoicing b + Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11 + Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22 + + IF nextPh(isPause2) THEN + WAV(ustop/p_) + ELIF nextPh(r) THEN + WAV(ustop/pr, 70) + ELIF nextPh(R) OR nextPh(R2) THEN + WAV(ustop/pr) + ELIF nextPh(@-) THEN + WAV(ustop/p_unasp) + ELIF nextPh(l) THEN + WAV(ustop/pl) + ENDIF + WAV(ustop/p) endphoneme phoneme t vls alv stop - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + voicingswitch d lengthmod 2 - wave ustop/t%90 - before _ ustop/t_ - before @- ustop/t_dnt%50 - before r ustop/tr - before R ustop/tr - switchvoicing d + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + + IF nextPh(isPause2) THEN + WAV(ustop/t_) + ELIF nextPh(r) OR nextPh(R) OR nextPh(R2) THEN + WAV(ustop/tr) + ELIF nextPh(@-) THEN + WAV(ustop/t_dnt, 50) + ENDIF + WAV(ustop/t, 90) endphoneme phoneme t[ // dental variant of /t/ vls dnt stop - vowelin f1=1 f2=1500 -250 250 f3=-100 80 amp=16 - vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20 + voicingswitch d[ lengthmod 2 - wave ustop/t_hi%60 - before _ ustop/t_dnt%35 - switchvoicing d[ + Vowelin f1=1 f2=1500 -250 250 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_hi, 70) endphoneme - - phoneme tS vls pla afr sibilant - vowelin f1=0 f2=2300 200 400 f3=-100 80 + voicingswitch dZ lengthmod 2 - wave ustop/tsh - before _ ustop/tsh_ - switchvoicing dZ -endphoneme + Vowelin f1=0 f2=2300 200 400 f3=-100 80 - -phoneme ts; // this should be different from tS; - vls pal afr sibilant palatal - vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 - lengthmod 2 - wave ustop/ts_pzd - before _ ustop/ts_pzd - switchvoicing dz; + IF nextPh(isPause2) THEN + WAV(ustop/tsh_) + ENDIF + WAV(ustop/tsh) endphoneme phoneme tS; vls pal afr sibilant palatal - vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 + voicingswitch dZ; lengthmod 2 - wave ustop/ts_pzd - before _ ustop/ts_pzd - switchvoicing dZ; + Vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 + + IF nextPh(isPause2) THEN + WAV(ustop/ts_pzd) + ENDIF + WAV(ustop/ts_pzd) endphoneme - - phoneme c vls pal stop palatal - vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 - vowelout f1=1 f2=2700 400 600 f3=200 70 len=50 colr=1 + voicingswitch J lengthmod 2 - wave ustop/c%130 - before _ ustop/t_pzd%30 - switchvoicing J + Vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70 + Vowelout f1=1 f2=2700 400 600 f3=200 70 len=50 colr=1 + + IF nextPh(isPause2) THEN + WAV(ustop/t_pzd, 30) + ENDIF + WAV(ustop/c, 130) endphoneme phoneme k vls vel stop - vowelin f1=0 f2=2300 200 300 f3=-200 80 - vowelout f1=0 f2=2300 300 400 f3=-200 80 rms=20 + voicingswitch g lengthmod 2 - wave ustop/k - before _ ustop/k_ - before r ustop/kr - before R ustop/kr - before @- ustop/k_unasp%70 - before l ustop/kl - before (i) ustop/ki - before ; ustop/ki - switchvoicing g + Vowelin f1=0 f2=2300 200 300 f3=-200 80 + Vowelout f1=0 f2=2300 300 400 f3=-200 80 rms=20 + + IF KlattSynth THEN + Vowelout f1=0 f2=2300 200 300 f3=-200 80 rms=20 + ENDIF + + IF nextPh(isPause2) THEN + WAV(ustop/k_) + ELIF nextPh(r) OR nextPh(R) OR nextPh(R2) THEN + WAV(ustop/kr) + ELIF nextPh(#i) OR nextPh(;) THEN + WAV(ustop/ki) + ELIF nextPh(l) THEN + WAV(ustop/kl) + ELIF nextPh(@-) THEN + WAV(ustop/k_unasp, 70) + ENDIF + WAV(ustop/k) endphoneme + phoneme q vls uvl stop - vowelin f1=1 f2=1700 0 200 f3=-300 80 paus f4 rms=30 - vowelout f1=1 f2=1700 -100 200 f3=-300 80 f4 rms=35 lengthmod 2 - wave ustop/q%48 - before (u) ustop/q_u%80 - before _ ustop/q%40 + Vowelin f1=1 f2=1700 0 200 f3=-300 80 paus f4 rms=30 + Vowelout f1=1 f2=1700 -100 200 f3=-300 80 f4 rms=35 + + IF nextPh(isPause2) THEN + WAV(ustop/q, 40) + ELIF nextPh(#u) THEN + WAV(ustop/q_u, 80) + ENDIF + WAV(ustop/q, 48) endphoneme @@ -1050,152 +1292,184 @@ endphoneme // UNVOICED fricatives //******************************************************************* - - phoneme f vls lbd frc - vowelout f1=0 f2=1000 -500 -350 f3=-200 80 + voicingswitch v lengthmod 3 - wave ufric/f - before _ ufric/f_ - switchvoicing v + Vowelout f1=0 f2=1000 -500 -350 f3=-200 80 + + IF nextPh(isPause) THEN + WAV(ufric/f_) + ENDIF + WAV(ufric/f) endphoneme phoneme T vls dnt frc - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + voicingswitch D lengthmod 3 - wave ufric/th - before _ ufric/th_ - switchvoicing D + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + + IF nextPh(isPause) THEN + WAV(ufric/th_) + ENDIF + WAV(ufric/th) endphoneme phoneme s vls alv frc sibilant - vowelin f1=0 f2=1700 -300 300 f3=-100 80 - vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + voicingswitch z lengthmod 3 - wave ufric/s - before _ ufric/s_ - before p ufric/s! - before t ufric/s! - before k ufric/s! - switchvoicing z + Vowelin f1=0 f2=1700 -300 300 f3=-100 80 + Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 + + IF nextPh(isPause) THEN + WAV(ufric/s_) + ELIF nextPh(p) OR nextPh(t) OR nextPh(k) THEN + WAV(ufric/s!) + ENDIF + WAV(ufric/s) endphoneme phoneme S vls pla frc sibilant - vowelin f1=0 f2=2100 100 300 f3=-100 80 - vowelout f1=0 f2=2100 100 300 f3=-100 80 - length 100 + voicingswitch Z lengthmod 3 - wave ufric/sh - before _ ufric/sh_ - switchvoicing Z -endphoneme + Vowelin f1=0 f2=2100 100 300 f3=-100 80 + Vowelout f1=0 f2=2100 100 300 f3=-100 80 - -phoneme s; - vls pal frc sibilant palatal - vowelin f1=1 f2=2700 400 600 f3=200 70 rate len=70 - vowelout f1=1 f2=2700 400 600 f3=200 70 rate len=70 - length 100 - lengthmod 3 - wave ufric/s_pzd - before _ ufric/s_pzd_ - switchvoicing z; + IF nextPh(isPause) THEN + WAV(ufric/sh_) + ENDIF + WAV(ufric/sh) endphoneme phoneme s. vls pla frc sibilant - vowelin f1=0 f2=1800 -100 300 f3=-300 80 - vowelout f1=0 f2=1800 -100 300 f3=-300 80 - length 100 + voicingswitch z. lengthmod 3 - wave ufric/sh_rfx%90 - before _ ufric/sh_rfx%60 - switchvoicing z. + Vowelin f1=0 f2=1800 -100 300 f3=-300 80 + Vowelout f1=0 f2=1800 -100 300 f3=-300 80 + + IF nextPh(isPause) THEN + WAV(ufric/sh_rfx, 60) + ENDIF + WAV(ufric/sh_rfx, 90) +endphoneme + + +phoneme s; + vls pal frc sibilant palatal + voicingswitch z; + lengthmod 3 + Vowelin f1=1 f2=2700 400 600 f3=200 70 rate len=70 + Vowelout f1=1 f2=2700 400 600 f3=200 70 rate len=70 + + IF nextPh(isPause) THEN + WAV(ufric/s_pzd_) + ENDIF + WAV(ufric/s_pzd) endphoneme phoneme S; vls pal frc sibilant palatal - vowelin f1=1 f2=2700 400 600 f3=200 70 rate len=70 - vowelout f1=1 f2=2700 400 600 f3=200 70 rate - length 100 + voicingswitch Z; lengthmod 3 - wave ufric/sh_pzd - before _ ufric/sh_pzd_ - switchvoicing Z; + Vowelin f1=1 f2=2700 400 600 f3=200 70 rate len=70 + Vowelout f1=1 f2=2700 400 600 f3=200 70 rate + + IF nextPh(isPause) THEN + WAV(ufric/sh_pzd_) + ENDIF + WAV(ufric/sh_pzd) endphoneme phoneme L // Welsh "ll" vls alv frc - starttype l endtype l - length 100 lengthmod 3 - wave ufric/ll%80 -// before _ ufric/ll_ + + NextVowelStarts + VowelStart(l/l@) + VowelStart(l/la) + VowelStart(l/le) + VowelStart(l/li, -10) + VowelStart(l/lo) + VowelStart(l/lu) + EndSwitch + + IF prevPh(isVowel) THEN + VowelEnding(l/xl, -40) + ENDIF + + WAV(ufric/ll, 80) endphoneme phoneme C vls pal frc palatal - vowelin f1=0 f2=2700 400 600 f3=200 70 - vowelout f1=0 f2=2700 400 600 f3=200 70 rms=20 - length 100 lengthmod 3 - wave ufric/ch - before _ ufric/ch_ + Vowelin f1=0 f2=2700 400 600 f3=200 70 + Vowelout f1=0 f2=2700 400 600 f3=200 70 rms=20 + + IF nextPh(isPause) THEN + WAV(ufric/ch_) + ENDIF + WAV(ufric/ch) endphoneme phoneme x vls vel frc - vowelin f1=0 f2=2300 200 400 f3=-100 80 - vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 - length 100 + voicingswitch Q lengthmod 3 - wave ufric/x_hr%30 - before _ ufric/x%120 - switchvoicing Q + Vowelin f1=0 f2=2300 200 400 f3=-100 80 + Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 + + IF nextPh(isPause) THEN + WAV(ufric/x, 120) + ENDIF + WAV(ufric/x_hr, 30) endphoneme + phoneme X vls uvl frc + voicingswitch Q" lengthmod 3 - wave ufric/xx - before _ ufric/xx%70 + + IF nextPh(isPause) THEN + WAV(ufric/xx, 70) + ENDIF + WAV(ufric/xx) endphoneme -//phoneme H -// vls phr frc -// lengthmod 3 -// wave h/h_phr%90 -// before _ h/h_phr%60 -//endphoneme - - phoneme h vls glt apr - length 100 lengthmod 3 - wave h/h_%70 // no vowel following - before (@) h/h@ - before (a) h/ha - before (e) h/he - before (i) h/hi - before (o) h/ho - before (u) h/hu -endphoneme + IF nextPh(#@) THEN + WAV(h/h@) + ELIF nextPh(#a) THEN + WAV(h/ha) + ELIF nextPh(#e) THEN + WAV(h/he) + ELIF nextPh(#i) THEN + WAV(h/hi) + ELIF nextPh(#o) THEN + WAV(h/ho) + ELIF nextPh(#u) THEN + WAV(h/hu) + ENDIF + WAV(h/h_, 70) // no vowel following +endphoneme @@ -1203,6 +1477,10 @@ endphoneme // ADDITIONAL PHONEME TABLES //******************************************************************* +phonemetable consonants base +include ph_consonants + + phonemetable base2 base include ph_base2 @@ -1285,9 +1563,6 @@ include ph_macedonian phonemetable sr hr include ph_serbian -phonemetable ru base -include ph_russian - phonemetable it base2 include ph_italian @@ -1328,6 +1603,9 @@ include ph_norwegian phonemetable is base include ph_icelandic +phonemetable ru base +include ph_russian + phonemetable vi base include ph_vi @@ -1366,24 +1644,24 @@ include ph_kinyarwanda phonemetable ml hi include ph_malayalam -phonemetable kn hi -include ph_kannada +//phonemetable kn hi +//include ph_kannada -phonemetable bn hi -include ph_bengali +//phonemetable bn hi +//include ph_bengali phonemetable ne hi include ph_nepali -phonemetable mr hi -include ph_marathi +//phonemetable mr hi +//include ph_marathi -phonemetable eu base2 -include ph_basque +//phonemetable eu base2 +//include ph_basque -phonemetable mn base -include ph_mongolian +//phonemetable mn base +//include ph_mongolian phonemetable pa hi include ph_punjabi diff --git a/phsource/r/_r b/phsource/r/_r index 22d7ff13..319c7abe 100644 Binary files a/phsource/r/_r and b/phsource/r/_r differ diff --git a/phsource/r/a_ b/phsource/r/a_ index c13212fd..ba2e1b80 100644 Binary files a/phsource/r/a_ and b/phsource/r/a_ differ diff --git a/phsource/r/r b/phsource/r/r index 756581f3..f6e5efcc 100644 Binary files a/phsource/r/r and b/phsource/r/r differ diff --git a/phsource/r/r@ b/phsource/r/r@ index 2784265d..2e247fb1 100644 Binary files a/phsource/r/r@ and b/phsource/r/r@ differ diff --git a/phsource/r/ra b/phsource/r/ra index 79b20739..72bed942 100644 Binary files a/phsource/r/ra and b/phsource/r/ra differ diff --git a/phsource/r/re b/phsource/r/re index af18118c..ad3e245f 100644 Binary files a/phsource/r/re and b/phsource/r/re differ diff --git a/phsource/r/ri b/phsource/r/ri index 7af4548d..5ed30dcd 100644 Binary files a/phsource/r/ri and b/phsource/r/ri differ diff --git a/phsource/r/ro b/phsource/r/ro index ce6f64c6..224e6b95 100644 Binary files a/phsource/r/ro and b/phsource/r/ro differ diff --git a/phsource/r/rr b/phsource/r/rr index 8e34822c..23acf2f2 100644 Binary files a/phsource/r/rr and b/phsource/r/rr differ diff --git a/phsource/r/ru b/phsource/r/ru index bb8b5084..9b1f276c 100644 Binary files a/phsource/r/ru and b/phsource/r/ru differ diff --git a/phsource/r/tr b/phsource/r/tr index d81545e8..864822df 100644 Binary files a/phsource/r/tr and b/phsource/r/tr differ diff --git a/phsource/r/trr b/phsource/r/trr index 38e3fb1e..496e7144 100644 Binary files a/phsource/r/trr and b/phsource/r/trr differ diff --git a/phsource/r2/r2@ b/phsource/r2/r2@ index 207bfeee..55995cdb 100644 Binary files a/phsource/r2/r2@ and b/phsource/r2/r2@ differ diff --git a/phsource/r2/r2a b/phsource/r2/r2a index 046f1742..7e68d7f8 100644 Binary files a/phsource/r2/r2a and b/phsource/r2/r2a differ diff --git a/phsource/r2/r2e b/phsource/r2/r2e index ed1bc375..2f9cbafa 100644 Binary files a/phsource/r2/r2e and b/phsource/r2/r2e differ diff --git a/phsource/r2/r2i b/phsource/r2/r2i index 291434a7..53479760 100644 Binary files a/phsource/r2/r2i and b/phsource/r2/r2i differ diff --git a/phsource/r2/r2o b/phsource/r2/r2o index 79111e91..6344bd03 100644 Binary files a/phsource/r2/r2o and b/phsource/r2/r2o differ diff --git a/phsource/r2/r2u b/phsource/r2/r2u index 71f90d30..bf9c6dfd 100644 Binary files a/phsource/r2/r2u and b/phsource/r2/r2u differ diff --git a/phsource/r3/@tap b/phsource/r3/@tap index 6a7e0001..4e296e89 100644 Binary files a/phsource/r3/@tap and b/phsource/r3/@tap differ diff --git a/phsource/r3/@tap2 b/phsource/r3/@tap2 index 15775662..2a7a7cda 100644 Binary files a/phsource/r3/@tap2 and b/phsource/r3/@tap2 differ diff --git a/phsource/r3/r_ b/phsource/r3/r_ index 44f3c0e7..6b81ca50 100644 Binary files a/phsource/r3/r_ and b/phsource/r3/r_ differ diff --git a/phsource/r3/r_n b/phsource/r3/r_n index 10f35ec9..f8e2b06f 100644 Binary files a/phsource/r3/r_n and b/phsource/r3/r_n differ diff --git a/phsource/r3/r_trill b/phsource/r3/r_trill index 8ffd8590..92a95046 100644 Binary files a/phsource/r3/r_trill and b/phsource/r3/r_trill differ diff --git a/phsource/r3/r_trill2 b/phsource/r3/r_trill2 index 4ac7dc74..41115b79 100644 Binary files a/phsource/r3/r_trill2 and b/phsource/r3/r_trill2 differ diff --git a/phsource/r3/r_uvl b/phsource/r3/r_uvl index e3aef214..1f7f5032 100644 Binary files a/phsource/r3/r_uvl and b/phsource/r3/r_uvl differ diff --git a/phsource/vdiph/aae b/phsource/vdiph/aae index 85e23d62..397fd286 100644 Binary files a/phsource/vdiph/aae and b/phsource/vdiph/aae differ diff --git a/phsource/vdiph/ae_2 b/phsource/vdiph/ae_2 index ec40a5d6..ef1a2fec 100644 Binary files a/phsource/vdiph/ae_2 and b/phsource/vdiph/ae_2 differ diff --git a/phsource/vdiph/ai b/phsource/vdiph/ai index e6efc202..968df949 100644 Binary files a/phsource/vdiph/ai and b/phsource/vdiph/ai differ diff --git a/phsource/vdiph/ai_2 b/phsource/vdiph/ai_2 index 3a3895d2..bc9d5c87 100644 Binary files a/phsource/vdiph/ai_2 and b/phsource/vdiph/ai_2 differ diff --git a/phsource/vdiph/ai_5 b/phsource/vdiph/ai_5 index f1efddaf..b561f360 100644 Binary files a/phsource/vdiph/ai_5 and b/phsource/vdiph/ai_5 differ diff --git a/phsource/vdiph/ai_6 b/phsource/vdiph/ai_6 index 04672db3..f5a4efad 100644 Binary files a/phsource/vdiph/ai_6 and b/phsource/vdiph/ai_6 differ diff --git a/phsource/vdiph/ai_8 b/phsource/vdiph/ai_8 index 8aceb248..c03d73c2 100644 Binary files a/phsource/vdiph/ai_8 and b/phsource/vdiph/ai_8 differ diff --git a/phsource/vdiph/aoo b/phsource/vdiph/aoo index 8ffb9f3c..08859555 100644 Binary files a/phsource/vdiph/aoo and b/phsource/vdiph/aoo differ diff --git a/phsource/vdiph/au b/phsource/vdiph/au index 5ea097eb..6d104ab6 100644 Binary files a/phsource/vdiph/au and b/phsource/vdiph/au differ diff --git a/phsource/vdiph/au_3 b/phsource/vdiph/au_3 index 9a84fb3d..c3dbfc61 100644 Binary files a/phsource/vdiph/au_3 and b/phsource/vdiph/au_3 differ diff --git a/phsource/vdiph/eei b/phsource/vdiph/eei index 03925791..79f9cbf3 100644 Binary files a/phsource/vdiph/eei and b/phsource/vdiph/eei differ diff --git a/phsource/vdiph/vowelchart.png b/phsource/vdiph/vowelchart.png index 89729917..95ed80cb 100644 Binary files a/phsource/vdiph/vowelchart.png and b/phsource/vdiph/vowelchart.png differ diff --git a/phsource/vdiph2/ee@_2 b/phsource/vdiph2/ee@_2 index e48d8c55..e1e5fa82 100644 Binary files a/phsource/vdiph2/ee@_2 and b/phsource/vdiph2/ee@_2 differ diff --git a/phsource/voc/dh b/phsource/voc/dh index 68a35ffc..f0dd736d 100644 Binary files a/phsource/voc/dh and b/phsource/voc/dh differ diff --git a/phsource/voc/dh_ b/phsource/voc/dh_ index 3c327985..ca893eae 100644 Binary files a/phsource/voc/dh_ and b/phsource/voc/dh_ differ diff --git a/phsource/voc/j b/phsource/voc/j index 36fa49fb..c8aedb2d 100644 Binary files a/phsource/voc/j and b/phsource/voc/j differ diff --git a/phsource/voc/z b/phsource/voc/z index b74f0e38..87c6e87d 100644 Binary files a/phsource/voc/z and b/phsource/voc/z differ diff --git a/phsource/voc/z_ b/phsource/voc/z_ index c60f6d34..95815441 100644 Binary files a/phsource/voc/z_ and b/phsource/voc/z_ differ diff --git a/phsource/voc/z_pzd b/phsource/voc/z_pzd index 964d041e..1d8e6950 100644 Binary files a/phsource/voc/z_pzd and b/phsource/voc/z_pzd differ diff --git a/phsource/voc/z_pzd_ b/phsource/voc/z_pzd_ index 1f2befc0..7c2edb40 100644 Binary files a/phsource/voc/z_pzd_ and b/phsource/voc/z_pzd_ differ diff --git a/phsource/vowel/& b/phsource/vowel/& index 569ebbcb..4096cca7 100644 Binary files a/phsource/vowel/& and b/phsource/vowel/& differ diff --git a/phsource/vowel/0 b/phsource/vowel/0 index d99d3639..1f42fd0e 100644 Binary files a/phsource/vowel/0 and b/phsource/vowel/0 differ diff --git a/phsource/vowel/@ b/phsource/vowel/@ index 9978716c..5c7b45d6 100644 Binary files a/phsource/vowel/@ and b/phsource/vowel/@ differ diff --git a/phsource/vowel/@- b/phsource/vowel/@- index a808e232..893756c1 100644 Binary files a/phsource/vowel/@- and b/phsource/vowel/@- differ diff --git a/phsource/vowel/V_3 b/phsource/vowel/V_3 index ff1198b2..0f823735 100644 Binary files a/phsource/vowel/V_3 and b/phsource/vowel/V_3 differ diff --git a/phsource/vowel/a b/phsource/vowel/a index 4f93d735..7c362b12 100644 Binary files a/phsource/vowel/a and b/phsource/vowel/a differ diff --git a/phsource/vowel/a_2 b/phsource/vowel/a_2 index 3d157bb8..cafadec2 100644 Binary files a/phsource/vowel/a_2 and b/phsource/vowel/a_2 differ diff --git a/phsource/vowel/a_3 b/phsource/vowel/a_3 index 3fe07d68..1f5b6dca 100644 Binary files a/phsource/vowel/a_3 and b/phsource/vowel/a_3 differ diff --git a/phsource/vowel/a_4 b/phsource/vowel/a_4 index e62c0e7e..3fcbda42 100644 Binary files a/phsource/vowel/a_4 and b/phsource/vowel/a_4 differ diff --git a/phsource/vowel/a_5 b/phsource/vowel/a_5 index c250b9a0..a7939401 100644 Binary files a/phsource/vowel/a_5 and b/phsource/vowel/a_5 differ diff --git a/phsource/vowel/a_6 b/phsource/vowel/a_6 index a6f4e24a..522b2fa4 100755 Binary files a/phsource/vowel/a_6 and b/phsource/vowel/a_6 differ diff --git a/phsource/vowel/aa_2 b/phsource/vowel/aa_2 index c852e445..f21051d8 100644 Binary files a/phsource/vowel/aa_2 and b/phsource/vowel/aa_2 differ diff --git a/phsource/vowel/aa_5 b/phsource/vowel/aa_5 index 895df7cd..7af70196 100644 Binary files a/phsource/vowel/aa_5 and b/phsource/vowel/aa_5 differ diff --git a/phsource/vowel/ee b/phsource/vowel/ee index 766fb26d..dfbafaa5 100644 Binary files a/phsource/vowel/ee and b/phsource/vowel/ee differ diff --git a/phsource/vowel/ee_1 b/phsource/vowel/ee_1 index 39a9a016..a0ebec5f 100644 Binary files a/phsource/vowel/ee_1 and b/phsource/vowel/ee_1 differ diff --git a/phsource/vowel/ee_5 b/phsource/vowel/ee_5 index 5b33da39..22612fb9 100644 Binary files a/phsource/vowel/ee_5 and b/phsource/vowel/ee_5 differ diff --git a/phsource/vowel/ii_2 b/phsource/vowel/ii_2 index c4446e94..d6b72414 100644 Binary files a/phsource/vowel/ii_2 and b/phsource/vowel/ii_2 differ diff --git a/phsource/vowel/ii_4 b/phsource/vowel/ii_4 index b9db07e7..db3807c2 100644 Binary files a/phsource/vowel/ii_4 and b/phsource/vowel/ii_4 differ diff --git a/phsource/vowel/ii_final b/phsource/vowel/ii_final index 6e610908..fd49442a 100644 Binary files a/phsource/vowel/ii_final and b/phsource/vowel/ii_final differ diff --git a/phsource/vowel/vowelchart.png b/phsource/vowel/vowelchart.png index 3e0aaef9..6ae324a6 100644 Binary files a/phsource/vowel/vowelchart.png and b/phsource/vowel/vowelchart.png differ diff --git a/phsource/vowelr/r-voc b/phsource/vowelr/r-voc index ed441daf..35d8b059 100644 Binary files a/phsource/vowelr/r-voc and b/phsource/vowelr/r-voc differ diff --git a/phsource/vwl_en/aI@ b/phsource/vwl_en/aI@ index 7e47228f..32b40175 100644 Binary files a/phsource/vwl_en/aI@ and b/phsource/vwl_en/aI@ differ diff --git a/phsource/vwl_en/aU@ b/phsource/vwl_en/aU@ index 9c5116d3..b65fa935 100644 Binary files a/phsource/vwl_en/aU@ and b/phsource/vwl_en/aU@ differ diff --git a/phsource/vwl_en_rp/aU@ b/phsource/vwl_en_rp/aU@ index 309f413a..e863d7bc 100644 Binary files a/phsource/vwl_en_rp/aU@ and b/phsource/vwl_en_rp/aU@ differ diff --git a/phsource/vwl_hi/l-voc b/phsource/vwl_hi/l-voc index 5f120614..8077c978 100644 Binary files a/phsource/vwl_hi/l-voc and b/phsource/vwl_hi/l-voc differ diff --git a/phsource/vwl_ro/ii- b/phsource/vwl_ro/ii- index 5b68b6c5..b426fdbf 100644 Binary files a/phsource/vwl_ro/ii- and b/phsource/vwl_ro/ii- differ diff --git a/phsource/w/_w b/phsource/w/_w index b8e38e69..863e2a13 100644 Binary files a/phsource/w/_w and b/phsource/w/_w differ diff --git a/phsource/w/iw_ b/phsource/w/iw_ index 0cc3e2a0..3920f3ab 100644 Binary files a/phsource/w/iw_ and b/phsource/w/iw_ differ diff --git a/phsource/w/w b/phsource/w/w index 6642ed6b..65cbe6e4 100644 Binary files a/phsource/w/w and b/phsource/w/w differ diff --git a/phsource/w/w@ b/phsource/w/w@ index 4bc3f08c..1fd9a6eb 100644 Binary files a/phsource/w/w@ and b/phsource/w/w@ differ diff --git a/phsource/w/w_ b/phsource/w/w_ index 000a5e90..b18964a6 100644 Binary files a/phsource/w/w_ and b/phsource/w/w_ differ diff --git a/phsource/w/wa b/phsource/w/wa index 2a76b683..5c553bf6 100644 Binary files a/phsource/w/wa and b/phsource/w/wa differ diff --git a/phsource/w/we b/phsource/w/we index 3d758b91..884e5504 100644 Binary files a/phsource/w/we and b/phsource/w/we differ diff --git a/phsource/w/wi b/phsource/w/wi index 7ccf9c96..40817f2f 100644 Binary files a/phsource/w/wi and b/phsource/w/wi differ diff --git a/phsource/w/wi2 b/phsource/w/wi2 index 9b21e189..5d081186 100644 Binary files a/phsource/w/wi2 and b/phsource/w/wi2 differ diff --git a/phsource/w/wo b/phsource/w/wo index 6367b23c..d4dcdae8 100644 Binary files a/phsource/w/wo and b/phsource/w/wo differ diff --git a/phsource/w/wu b/phsource/w/wu index 82576dde..fc6d3843 100644 Binary files a/phsource/w/wu and b/phsource/w/wu differ diff --git a/phsource/w/xw b/phsource/w/xw index a1acbadc..063f6277 100644 Binary files a/phsource/w/xw and b/phsource/w/xw differ diff --git a/platforms/windows/windows_cmd/src/speech.h b/platforms/windows/windows_cmd/src/speech.h index d7c5c986..861e7d52 100755 --- a/platforms/windows/windows_cmd/src/speech.h +++ b/platforms/windows/windows_cmd/src/speech.h @@ -32,7 +32,7 @@ #define USE_PORTAUDIO #define NO_VARIADIC_MACROS #define ESPEAK_API -//#define INCLUDE_KLATT +#define INCLUDE_KLATT // will look for espeak_data directory here, and also in user's home directory #define PATH_ESPEAK_DATA "/usr/share/espeak-data" diff --git a/platforms/windows/windows_dll/src/speech.h b/platforms/windows/windows_dll/src/speech.h index dac2e351..5d6127cb 100755 --- a/platforms/windows/windows_dll/src/speech.h +++ b/platforms/windows/windows_dll/src/speech.h @@ -33,6 +33,7 @@ #define NO_VARIADIC_MACROS #define ESPEAK_API __declspec(dllexport) #define LIBRARY +#define INCLUDE_KLATT // will look for espeak_data directory here, and also in user's home directory #define PATH_ESPEAK_DATA "/usr/share/espeak-data" diff --git a/platforms/windows/windows_sapi/src/speech.h b/platforms/windows/windows_sapi/src/speech.h index ec90b165..f1fcd0b7 100755 --- a/platforms/windows/windows_sapi/src/speech.h +++ b/platforms/windows/windows_sapi/src/speech.h @@ -36,7 +36,7 @@ //#define __cdecl // define as null, needed for Borland compiler ? //#define USE_PORTAUDIO //#define USE_NANOSLEEP -//#define INCLUDE_KLATT +#define INCLUDE_KLATT // will look for espeak_data directory here, and also in user's home directory #define PATH_ESPEAK_DATA "/usr/share/espeak-data" diff --git a/src/compiledata.cpp b/src/compiledata.cpp index 22e23f4d..fe513b43 100755 --- a/src/compiledata.cpp +++ b/src/compiledata.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005 to 2007 by Jonathan Duddington * + * Copyright (C) 2005 to 2009 by Jonathan Duddington * * email: jonsd@users.sourceforge.net * * * * This program is free software; you can redistribute it and/or modify * @@ -40,56 +40,529 @@ #include #endif - - -#define tNUMBER 1 -#define tSTRING 2 -#define tPHONEMEMNEM 3 -#define tKEYWORD 4 -#define tSIGNEDNUMBER 5 - -#define tPHONEMESTART 1 -#define tEND 2 -#define tSPECT 3 -#define tWAVE 4 -#define tSTARTTYPE 5 -#define tENDTYPE 6 -#define tBEFORE 7 -#define tAFTER 8 -#define tTONESPEC 9 -#define tLENGTHMOD 11 -#define tLENGTH 12 -#define tLONGLENGTH 13 -#define tOLDNAME 14 -#define tREDUCETO 15 -#define tFIXEDCODE 16 - -#define tBEFOREVOWEL 17 -#define tBEFOREVOWELPAUSE 18 -#define tBEFORENOTVOWEL 19 -#define tBEFORENOTVOWEL2 20 -#define tSWITCHVOICING 21 -#define tBEFORE_R 22 - -#define tLINKOUT 23 -#define tVOWELIN 24 -#define tVOWELOUT 25 -#define tAPPENDPH 26 // always insert another phoneme (linkout) after this one -#define tIMPORTPH 27 -#define tBEFOREPAUSE 28 - -#define tPHONEMENUMBER 29 -#define tPHONEMETABLE 30 -#define tINCLUDE 31 -#define tSTRESSTYPE 32 - - -static const int flags_alternative[] = {phBEFOREVOWEL,phBEFOREVOWELPAUSE,phBEFORENOTVOWEL,phBEFORENOTVOWEL2,phSWITCHVOICING,phBEFORE_R}; - -extern void MakeVowelLists(void); extern void FindPhonemesUsed(void); -extern void DrawEnvelopes(); -extern int LoadEnvelope2(FILE *f, const char *fname); +char path_source[sizeof(path_home)+20]; + + +typedef struct { // total 48 bytes + short frflags; + unsigned char length; + unsigned char rms; + short ffreq[4]; // f0,1,2,3 + unsigned char ffreq2[6]; // nasal(*2) f4,5,6,7,8(*20) + unsigned char fheight[9]; // f0-8 + unsigned char fwidth[6]; // width/4 f0-5 + unsigned char fright[4]; // width/4 f0-3 + unsigned char bw[6]; // nasal, f1,2,3,4,5 (*2) + unsigned char klattp[5]; // amp, tilt, kopen, asp, +} frame_t3; + + +typedef struct { + const char *mnem; + int type; + int data; +} keywtab_t; + +#define k_AND 1 +#define k_OR 2 +#define k_THEN 3 + +#define kTHISSTRESS 0x800 + +// keyword types +enum { + tPHONEME_TYPE = 1, + tPHONEME_FLAG, + tTRANSITION, + tPLACE, + tSTATEMENT, + tINSTRN1, + tWHICH_PHONEME, + tTEST, +}; + +static keywtab_t k_conditions[] = { + {"AND", 0, k_AND}, + {"OR", 0, k_OR}, + {"THEN", 0, k_THEN}, + {"prevPh", tWHICH_PHONEME, 0x000}, + {"thisPh", tWHICH_PHONEME, 0x100}, + {"nextPh", tWHICH_PHONEME, 0x200}, + {"next2Ph", tWHICH_PHONEME, 0x300}, + {"nextPhW", tWHICH_PHONEME, 0x400}, + {"prevPhW", tWHICH_PHONEME, 0x500}, + {"nextVowel",tWHICH_PHONEME, 0x600}, + +// {"numVowels", tTEST, 0x000}, +// {"afterStress", tTEST, 0x000}, + + {"PreVoicing", tTEST, 0xf01}, + {"KlattSynth", tTEST, 0xf02}, + {NULL, 0, 0} +}; + +static keywtab_t k_properties[] = { + {"isPause", 0, phPAUSE}, + {"isVowel", 0, phVOWEL}, + {"isNasal", 0, phNASAL}, + {"isLiquid", 0, phLIQUID}, + {"isVFricative", 0, phVFRICATIVE}, + + {"isPalatal", 0, i_isPalatal}, + {"isRhotic", 0, i_isRhotic}, + + {"isDiminished", 0, i_isDiminished}, + {"isUnstressed", 0, i_isUnstressed}, + {"isNotStressed",0, i_isNotStressed}, + {"isStressed", 0, i_isStressed}, + {"isMaxStress", 0, i_isMaxStress}, + + {"isBreak", 0, i_isBreak}, + {"isPause2", 0, i_isBreak}, // synonym for isBreak + {"isWordStart", 0, i_isWordStart}, + {"notWordStart", 0, i_notWordStart}, + {"isWordEnd", 0, i_isWordEnd}, + {"isAfterStress",0, i_isAfterStress}, + {"isNotVowel", 0, i_isNotVowel}, + {"isFinalVowel", 0, i_isFinalVowel}, + + {NULL, 0, 0} +}; + +enum { + kPHONEMESTART = 1, + kPROCEDURE, + kENDPHONEME, + kENDPROCEDURE, + kPHONEMENUMBER, + kPHONEMETABLE, + kINCLUDE, + kIMPORT_PH, + + kSTARTTYPE, + kENDTYPE, + kSTRESSTYPE, + kVOICINGSWITCH, + + kIF, + kELSE, + kELIF, + kENDIF, + kCALLPH, + + kSWITCH_PREVVOWEL, + kSWITCH_NEXTVOWEL, + kENDSWITCH, + + kFMT, + kWAV, + kVOWELSTART, + kVOWELENDING, + kANDWAV, + + kVOWELIN, + kVOWELOUT, + kTONESPEC, + + kRETURN, + kCONTINUE, +}; + + +static keywtab_t keywords[] = { + {"vowel", tPHONEME_TYPE, phVOWEL}, + {"liquid", tPHONEME_TYPE, phLIQUID}, + {"pause", tPHONEME_TYPE, phPAUSE}, + {"stress", tPHONEME_TYPE, phSTRESS}, + {"virtual", tPHONEME_TYPE, phVIRTUAL}, + + {"fricative", tPHONEME_TYPE, phFRICATIVE}, + {"vstop", tPHONEME_TYPE, phVSTOP}, + {"vfricative",tPHONEME_TYPE, phVFRICATIVE}, + {"delete_phoneme", tPHONEME_TYPE, phDELETED}, + + // type of consonant + {"stop", tPHONEME_TYPE, phSTOP}, + {"frc", tPHONEME_TYPE, phFRICATIVE}, + {"nasal", tPHONEME_TYPE, phNASAL}, + {"flp", tPHONEME_TYPE, phVSTOP}, + {"afr", tPHONEME_TYPE, phSTOP}, // treat as stop + {"apr", tPHONEME_TYPE, phFRICATIVE}, // [h] voiceless approximant + + + // keywords + {"phonemenumber",tSTATEMENT, kPHONEMENUMBER}, + {"phonemetable",tSTATEMENT, kPHONEMETABLE}, + {"include", tSTATEMENT, kINCLUDE}, + + {"phoneme", tSTATEMENT, kPHONEMESTART}, + {"procedure", tSTATEMENT, kPROCEDURE}, + {"endphoneme", tSTATEMENT, kENDPHONEME}, + {"endprocedure", tSTATEMENT, kENDPROCEDURE}, + {"import_phoneme", tSTATEMENT, kIMPORT_PH}, + {"stress_type",tSTATEMENT, kSTRESSTYPE}, + {"starttype", tSTATEMENT, kSTARTTYPE}, + {"endtype", tSTATEMENT, kENDTYPE}, + {"voicingswitch", tSTATEMENT, kVOICINGSWITCH}, + + + {"IF", tSTATEMENT, kIF}, + {"ELSE", tSTATEMENT, kELSE}, + {"ELIF", tSTATEMENT, kELIF}, + {"ELSEIF", tSTATEMENT, kELIF}, // same as ELIF + {"ENDIF", tSTATEMENT, kENDIF}, + {"CALL", tSTATEMENT, kCALLPH}, + {"RETURN", tSTATEMENT, kRETURN}, + + {"PrevVowelEndings", tSTATEMENT, kSWITCH_PREVVOWEL}, + {"NextVowelStarts", tSTATEMENT, kSWITCH_NEXTVOWEL}, + {"EndSwitch", tSTATEMENT, kENDSWITCH}, + + {"Tone", tSTATEMENT, kTONESPEC}, + {"FMT", tSTATEMENT, kFMT}, + {"WAV", tSTATEMENT, kWAV}, + {"VowelStart", tSTATEMENT, kVOWELSTART}, + {"VowelEnding",tSTATEMENT, kVOWELENDING}, + {"addWav", tSTATEMENT, kANDWAV}, + + + {"Vowelin", tSTATEMENT, kVOWELIN}, + {"Vowelout", tSTATEMENT, kVOWELOUT}, + {"Continue", tSTATEMENT, kCONTINUE}, + + {"ChangePhoneme", tINSTRN1, i_CHANGE_PHONEME}, + {"ReplaceNextPhoneme", tINSTRN1, i_REPLACE_NEXT_PHONEME}, + {"InsertPhoneme", tINSTRN1, i_INSERT_PHONEME}, + {"AppendPhoneme", tINSTRN1, i_APPEND_PHONEME}, + {"IfNextVowelAppend", tINSTRN1, i_APPEND_IFNEXTVOWEL}, + {"ChangeIfDiminished", tINSTRN1, i_CHANGE_IF + 0}, + {"ChangeIfUnstressed", tINSTRN1, i_CHANGE_IF + 1}, + {"ChangeIfNotStressed", tINSTRN1, i_CHANGE_IF + 2}, + {"ChangeIfStressed", tINSTRN1, i_CHANGE_IF + 3}, + + {"PauseBefore",tINSTRN1, i_PAUSE_BEFORE}, + {"PauseAfter", tINSTRN1, i_PAUSE_AFTER}, + {"Length", tINSTRN1, i_SET_LENGTH}, + {"length", tINSTRN1, i_SET_LENGTH}, + {"LongLength", tINSTRN1, i_LONG_LENGTH}, + {"LengthAdd", tINSTRN1, i_ADD_LENGTH}, + {"Lengthmod", tINSTRN1, i_LENGTH_MOD}, + {"lengthmod", tINSTRN1, i_LENGTH_MOD}, + + // flags + {"wavef", tPHONEME_FLAG, phWAVE}, + {"unstressed", tPHONEME_FLAG, phUNSTRESSED}, + {"fortis", tPHONEME_FLAG, phFORTIS}, + {"sibilant", tPHONEME_FLAG, phSIBILANT}, + {"nolink", tPHONEME_FLAG, phNOLINK}, + {"trill", tPHONEME_FLAG, phTRILL}, + {"vowel2", tPHONEME_FLAG, phVOWEL2}, + {"palatal", tPHONEME_FLAG, phPALATAL}, + {"long", tPHONEME_FLAG, phLONG}, + {"brkafter", tPHONEME_FLAG, phBRKAFTER}, + {"rhotic", tPHONEME_FLAG, phRHOTIC}, + {"nonsyllabic",tPHONEME_FLAG, phNONSYLLABIC}, + {"lengthenstop",tPHONEME_FLAG, phLENGTHENSTOP}, + + // voiced / unvoiced + {"vcd", tPHONEME_FLAG, phVOICED}, + {"vls", tPHONEME_FLAG, phFORTIS}, + + // place of articulation + {"blb", tPLACE, 1}, + {"lbd", tPLACE, 2}, + {"dnt", tPLACE, 3}, + {"alv", tPLACE, 4}, + {"rfx", tPLACE, 5}, + {"pla", tPLACE, 6}, + {"pal", tPLACE, 7}, + {"vel", tPLACE, 8}, + {"lbv", tPLACE, 9}, + {"uvl", tPLACE, 10}, + {"phr", tPLACE, 11}, + {"glt", tPLACE, 12}, + + // vowel transition attributes + {"len=", tTRANSITION, 1}, + {"rms=", tTRANSITION, 2}, + {"f1=", tTRANSITION, 3}, + {"f2=", tTRANSITION, 4}, + {"f3=", tTRANSITION, 5}, + {"brk", tTRANSITION, 6}, + {"rate", tTRANSITION, 7}, + {"glstop", tTRANSITION, 8}, + {"lenadd", tTRANSITION, 9}, + {"f4", tTRANSITION, 10}, + {"paus", tTRANSITION, 11}, + {"colr=", tTRANSITION, 12}, + {"amp=", tTRANSITION, 13}, // set rms of 1st frame as fraction of rms of 2nd frame (1/30ths) + + {NULL, 0, -1} +}; + + +static keywtab_t *keyword_tabs[] = { +keywords, k_conditions, k_properties }; + + +static PHONEME_TAB *phoneme_out; + +static int n_phcodes_list[N_PHONEME_TABS]; +static PHONEME_TAB_LIST phoneme_tab_list2[N_PHONEME_TABS]; +static PHONEME_TAB *phoneme_tab2; + +#define N_PROCS 50 +int n_procs; +int proc_addr[N_PROCS]; +char proc_names[40][N_PROCS]; + +USHORT *prog_out; +USHORT prog_buf[2000]; + + +static const char *KeyToMnem(keywtab_t *ktab, int type, int value) +{//=============================================================== + while(ktab->mnem != NULL) + { + if(ktab->data == value) + { + if((type == -1) || (type == ktab->type)) + return(ktab->mnem); + } + ktab++; + } + return(NULL); +} + +static void DecompilePhoneme(FILE *f_out, PHONEME_TAB *ph, int compile_phoneme) +{//============================================================================ + USHORT *pc; + int instn; + int instn_category; + int address, address2; + int data1; + int type2; + int ix; + int any; + const char *name; + + static char *INV = "Invalid"; + + static const char *instn_category_string[16] = { + "", "", "IF", "IF OR", + "", "", "", "", + "", "", "", "FMT", + "WAV", "NextVowelStart", "PrevVowelEnd", "+wav" }; + + static const char *nextPh_string[6] = { + "prevPh", "thisPh", "nextPh", "next2Ph", "nextPhW", "**", + }; + + static const char *instn0_string[] = { + "invalid", "RETURN", "Continue", "DeleteNextPhoneme", + }; + + static const char *instn10_string[] = { + "", "VowelIn", "VowelOut", "Tone", "", + }; + + static const char *instn_jumps[] = { + "JMP", INV, INV, INV, + "JMP false", "SwitchNextVowelType", "SwitchPrevVowelType", INV}; + + static char instn1_paramtype[] = { + 0, 3, 3, 3, 3, 3, 3, 1, + 1, 1, 1, 1, 1, 0, 0, 0, + 3, 3, 3, 3, 3, 3, 3, 3, + 0, 0, 0, 0, 0, 0, 0, 0}; + +return; + + if(compile_phoneme) + { + fprintf(f_out,"\nPhoneme %s (%d)\n",WordToString(ph->mnemonic),ph->code); + } + else + { + fprintf(f_out,"\nProcedure %s\n",proc_names[n_procs]); + } + + pc = prog_buf; + while(pc < prog_out) + { + instn = *pc++; + instn_category = (instn >> 12) & 0xf; + data1 = instn & 0xff; + type2 = (instn >> 8) & 0xf; + fprintf(f_out, " %.3x: %.4x %s",pc-prog_buf,instn,instn_category_string[instn_category]); + + switch(instn_category) + { + case 0: + case 1: + type2 = instn >> 8; + + if(instn < 0x100) + { + if(data1 > 2) + data1 = 0; + fprintf(f_out,"%s",instn0_string[data1]); + } + else + { + fprintf(f_out,"%s(",KeyToMnem(keywords, tINSTRN1, type2)); + switch(instn1_paramtype[type2]) + { + case 0: + fprintf(f_out,"%.4x",instn); + break; + case 1: + fprintf(f_out,"%d",data1); + break; + case 3: + fprintf(f_out,"%s",WordToString(phoneme_tab2[data1].mnemonic)); + break; + } + fprintf(f_out,")"); + } + break; + + case 2: + case 3: + if(type2 < 12) + { + fprintf(f_out," %s(",nextPh_string[type2 % 6]); + if(type2 >= 6) + { + switch(data1 >> 5) + { + case 0: + name = KeyToMnem(keywords, tPHONEME_TYPE, (data1 & 0x1f)); + if(name != NULL) + fprintf(f_out,"is%s",name); + else + fprintf(f_out,"%d %d",(data1 >> 5),(data1 & 0x1f)); + break; + case 1: + fprintf(f_out,"%d %d",(data1 >> 5),(data1 & 0x1f)); + break; + case 2: + fprintf(f_out,"%d %d",(data1 >> 5),(data1 & 0x1f)); + break; + case 4: + name = KeyToMnem(k_properties, -1, 0x80+(data1 & 0x1f)); + if(name != NULL) + fprintf(f_out,"%s",name); + else + fprintf(f_out,"%d %d",(data1 >> 5),(data1 & 0x1f)); + break; + default: + fprintf(f_out,"%d %d",(data1 >> 5),(data1 & 0x1f)); + break; + } + } + else + { + fprintf(f_out,"%s",WordToString(phoneme_tab2[data1].mnemonic)); + } + } + else + if(type2 == 8) + { + // list of numbers + fprintf(f_out," StressLevel("); + any = 0; + for(ix=0; ix<8; ix++) + { + if(data1 & (1 << ix)) + { + if(any) + fputc(',',f_out); + any = 1; + fprintf(f_out,"%d",ix); + } + } + } + else + { + name = KeyToMnem(k_conditions, tTEST, instn & 0xfff); + fprintf(f_out,"%s(",name); + } + fprintf(f_out,")"); + break; + + case 6: + fprintf(f_out,"%s",instn_jumps[(instn >> 9) & 7]); + fprintf(f_out," %d",instn & 0x1ff); + break; + + case 9: + address = ((data1 & 0xf) << 4) + *pc++; + fprintf(f_out,"CALL %.5x",address); + break; + + case 10: + fprintf(f_out,"%s",instn10_string[type2]); + switch(type2) + { + case 1: + case 2: + address = (data1 << 16) + pc[0]; + address2 = (pc[1] << 16) + pc[2]; + pc += 3; + fprintf(f_out, " %.6x %.8x",address,address2); + break; + case 3: + address = ((instn & 0xf) << 16) + *pc++; + address2 = ((instn & 0xf0) << 12) + *pc++; + fprintf(f_out, " %.5x %.5x",address,address2); + break; + } + break; + + case 11: + case 12: + case 13: + case 14: + case 15: + address = ((instn & 0xf) << 16) + *pc++; + fprintf(f_out, " %d %.5x",(instn >> 4) & 0xff,address*4); + break; + } + fprintf(f_out,"\n"); + } +} + + + + + +static int n_phoneme_tabs; +static int n_phcodes; + +// outout files +static FILE *f_phdata; +static FILE *f_phindex; +static FILE *f_phtab; +static FILE *f_phcontents; +static FILE *f_errors = stderr; + + +static FILE *f_in; +static int f_in_linenum; +static int f_in_displ; + + +static int linenum; +static int count_references = 0; +static int duplicate_references = 0; +static int count_frames = 0; +static int error_count = 0; +static int then_count = 0; +static int after_if = 0; + +static char current_fname[80]; static int markers_used[8]; @@ -101,214 +574,423 @@ typedef struct { char string[1]; } REF_HASH_TAB; +static REF_HASH_TAB *ref_hash_tab[256]; + #define N_ENVELOPES 30 #define ENV_LEN 128 -int n_envelopes = 0; -char envelope_paths[N_ENVELOPES][80]; -unsigned char envelope_dat[N_ENVELOPES][ENV_LEN]; -static FILE *f_phdata; +static int n_envelopes = 0; +static char envelope_paths[N_ENVELOPES][80]; +static unsigned char envelope_dat[N_ENVELOPES][ENV_LEN]; - -class Compile -{//========== -public: - Compile(); - void CPhonemeTab(const char *path); - -private: - int CPhoneme(); - void StartPhonemeTable(const char *name); - void EndPhonemeTable(); - void CPhonemeFiles(); - int NextItem(int type); - void UngetItem(); - void Error(const char *msg); - void Error(const char *msg, const char *msg2); - void Summary(FILE *f); - void SummarySpect(FILE *f,unsigned int value); - void SummarySpectList(FILE *f,int ref,const char *label); - const char *PhonemeMnem(int phcode); - void WritePhonemeTable(); - void Report(); - - int LookupPhoneme(const char *string, int declare); - void ReservePhCode(const char *string, int value); - const char *GetKeyMnem(int value); - int LoadSpect(const char *path, int control); - int LoadWavefile(FILE *f, const char *fname); - int LoadEnvelope(FILE *f, const char *fname); - int LoadDataFile(const char *path, int control); - int AddSpect(int phcode, int *list, int control); - void AddSpectList(int *list, int control); - void AddEnvelope(int *list); - void VowelTransition(int which, unsigned int *trans); - void ImportPhoneme(void); - - - FILE *f_in; - FILE *f_phcontents; - FILE *f_errors; - FILE *f_phindex; - FILE *f_phtab; - int f_in_displ; - int f_in_linenum; - - PHONEME_TAB *ph; - - int linenum; - int item_type; - char current_fname[80]; - char item_string[256]; - char phoneme_tab_name[N_PHONEME_TAB_NAME]; - unsigned int vowel_in[2]; - unsigned int vowel_out[2]; - - int n_phcodes_list[N_PHONEME_TABS]; - PHONEME_TAB_LIST phoneme_tab_list2[N_PHONEME_TABS]; - PHONEME_TAB *phoneme_tab2; - int n_phoneme_tabs; - - - int n_phcodes; - - int count_references; - int duplicate_references; - int count_frames; - int error_count; - - REF_HASH_TAB *ref_hash_tab[256]; - - typedef struct { - FILE *file; - int linenum; - char fname[80]; - } STACK; - - #define N_STACK 12 - int stack_ix; - STACK stack[N_STACK]; - -}; - -char path_source[sizeof(path_home)+20]; - -Compile *compile; - typedef struct { - const char *mnem; - int data; -} keywtab_t; + FILE *file; + int linenum; + char fname[80]; +} STACK; -static keywtab_t keywords[] = { - {"vowel", 0x1000000+phVOWEL}, - {"liquid", 0x1000000+phLIQUID}, - {"pause", 0x1000000+phPAUSE}, - {"stress", 0x1000000+phSTRESS}, - {"virtual", 0x1000000+phVIRTUAL}, +#define N_STACK 12 +int stack_ix; +STACK stack[N_STACK]; - {"fricative", 0x1000000+phFRICATIVE}, - {"vstop", 0x1000000+phVSTOP}, - {"vfricative",0x1000000+phVFRICATIVE}, - {"delete_phoneme", 0x1000000+phDELETED}, - - // type of consonant - {"stop", 0x1000000+phSTOP}, - {"frc", 0x1000000+phFRICATIVE}, - {"nasal", 0x1000000+phNASAL}, - {"flp", 0x1000000+phVSTOP}, - {"afr", 0x1000000+phSTOP}, // treat as stop - {"apr", 0x1000000+phFRICATIVE}, // [h] voiceless approximant +#define N_IF_STACK 12 +int if_level; +typedef struct { + USHORT *p_then; + USHORT *p_else; + int returned; +} IF_STACK; +IF_STACK if_stack[N_IF_STACK]; - // keywords - {"phonemenumber", 29}, - {"phonemetable", 30}, - {"include", 31}, - - {"phoneme", 1}, - {"endphoneme", 2}, - {"formants", 3}, - {"wave", 4}, - {"starttype",5}, - {"endtype", 6}, - {"before", 7}, - {"after", 8}, - {"tone", 9}, - {"lengthmod",11}, - {"length", 12}, - {"longlength", 13}, - {"reduceto", 15}, - {"beforevowel", tBEFOREVOWEL}, - {"beforevowelpause", tBEFOREVOWELPAUSE}, - {"beforenotvowel",tBEFORENOTVOWEL}, - {"beforenotvowel2",tBEFORENOTVOWEL2}, - {"before_r",tBEFORE_R}, - {"linkout",tLINKOUT}, - {"switchvoicing",tSWITCHVOICING}, - {"vowelin",tVOWELIN}, - {"vowelout",tVOWELOUT}, - {"appendph",tAPPENDPH}, - {"import_phoneme",tIMPORTPH}, - {"beforepause",tBEFOREPAUSE}, - {"stress_type",tSTRESSTYPE}, - - // flags - {"wavef", 0x2000000+phWAVE}, - {"unstressed", 0x2000000+phUNSTRESSED}, - {"fortis", 0x2000000+phFORTIS}, - {"sibilant", 0x2000000+phSIBILANT}, - {"nolink", 0x2000000+phNOLINK}, - {"trill", 0x2000000+phTRILL}, - {"vowel2", 0x2000000+phVOWEL2}, - {"palatal", 0x2000000+phPALATAL}, - {"long", 0x2000000+phLONG}, - {"brkafter", 0x2000000+phBRKAFTER}, - {"rhotic", 0x2000000+phRHOTIC}, - {"nonsyllabic",0x2000000+phNONSYLLABIC}, - {"lengthenstop",0x2000000+phLENGTHENSTOP}, - - // voiced / unvoiced - {"vcd", 0x2000000+phVOICED}, - {"vls", 0x2000000+phFORTIS}, - - // place of articulation - {"blb", 0x2010000}, - {"lbd", 0x2020000}, - {"dnt", 0x2030000}, - {"alv", 0x2040000}, - {"rfx", 0x2050000}, - {"pla", 0x2060000}, - {"pal", 0x2070000}, - {"vel", 0x2080000}, - {"lbv", 0x2090000}, - {"uvl", 0x20a0000}, - {"phr", 0x20b0000}, - {"glt", 0x20c0000}, - - // vowel transition attributes - {"len=", 0x3000001}, - {"rms=", 0x3000002}, - {"f1=", 0x3000003}, - {"f2=", 0x3000004}, - {"f3=", 0x3000005}, - {"brk", 0x3000006}, - {"rate", 0x3000007}, - {"glstop", 0x3000008}, - {"lenadd", 0x3000009}, - {"f4", 0x300000a}, - {"paus", 0x300000b}, - {"colr=",0x300000c}, - {"amp=", 0x300000d}, // set rms of 1st frame as fraction of rms of 2nd frame (1/30ths) - - {"", -1} +enum { + tENDFILE = 1, + tSTRING, + tNUMBER, + tSIGNEDNUMBER, + tPHONEMEMNEM, + tOPENBRACKET, + tKEYWORD, + tCONDITION, + tPROPERTIES, }; +int item_type; +int item_terminator; +#define N_ITEM_STRING 256 +char item_string[N_ITEM_STRING]; -extern void strncpy0(char *to,const char *from, int size); +static int ref_sorter(char **a, char **b) +{//====================================== + int ix; + + REF_HASH_TAB *p1 = (REF_HASH_TAB *)(*a); + REF_HASH_TAB *p2 = (REF_HASH_TAB *)(*b); + + ix = strcoll(p1->string,p2->string); + if(ix != 0) + return ix; + + ix = p1->ph_table - p2->ph_table; + if(ix != 0) + return ix; + + return(p1->ph_mnemonic - p2->ph_mnemonic); +} /* end of ref_sorter */ + + + +static void CompileReport(void) +{//============================ + int ix; + int hash; + int n; + REF_HASH_TAB *p; + REF_HASH_TAB **list; + FILE *f_report; + const char *data_path; + int prev_table; + int prev_mnemonic; + char fname[sizeof(path_source)+20]; + + // make a list of all the references and sort it + list = (REF_HASH_TAB **)malloc((count_references)* sizeof(REF_HASH_TAB *)); + if(list == NULL) + return; + + sprintf(fname,"%scompile_report",path_source); + f_report = fopen(fname,"w"); + if(f_report == NULL) + { + free(list); + return; + } + + fprintf(f_report,"%d phoneme tables\n",n_phoneme_tabs); + fprintf(f_report," new total\n"); + for(ix=0; ixlink); + } + } + n = ix; + qsort((void *)list,n,sizeof(REF_HASH_TAB *),(int (*)(const void *,const void *))ref_sorter); + + data_path = ""; + prev_mnemonic = 0; + prev_table = 0; + for(ix=0; ixstring, data_path) != 0) + { + data_path = list[ix]->string; + j = strlen(data_path); + fprintf(f_report,"%s",data_path); + } + else + { + if((list[ix]->ph_table == prev_table) && (list[ix]->ph_mnemonic == prev_mnemonic)) + continue; // same phoneme, don't list twice + } + + while(j < 14) + { + fputc(' ',f_report); // pad filename with spaces + j++; + } + + fprintf(f_report," [%s] %s",WordToString(prev_mnemonic = list[ix]->ph_mnemonic), phoneme_tab_list2[prev_table = list[ix]->ph_table].name); + fputc('\n',f_report); + } + + for(ix=0; ixtype; + if(t1 > phVOWEL) t1 = phVOWEL+1; + + t2 = p2->type; + if(t2 > phVOWEL) t2 = phVOWEL+1; + + if((ix = t1 - t2) != 0) + return(ix); + + strcpy(mnem1,WordToString(p1->mnemonic)); + return(strcasecmp(mnem1,WordToString(p2->mnemonic))); +} /* end of ph_sorter */ + + + +static void PrintPhonemesUsed(FILE *f, const char *dictname) +{//========================================================= + int ix; + PHONEME_TAB *ph; + PHONEME_TAB *ph_tab[N_PHONEME_TAB]; + int count = 0; + int n_ph = 0; + int section = 0; + + fprintf(f,"\n\nDictionary %s_dict\n",dictname); + fflush(f); + + for(ix=0; (ixtype > 1) + { + if((ph->type > phVOWEL) && (section == 0)) + { + section = 1; + count = 0; + fputc('\n',f); + } + if((count & 0x7) == 0) + fputc('\n',f); + fprintf(f,"%-4s ",WordToString(ph->mnemonic)); + count++; + } + } + fputc('\n',f); +} // end of PrintPhonemesUsed + + + +static wxString CompileAllDictionaries() +{//===================================== + wxString filename; + wxFileName fname; + wxString dictstr; + wxString filetype; + wxString report = _T(""); + int err; + int errors = 0; + int dict_count = 0; + FILE *f_in; + FILE *log; + FILE *f_phused; + char dictname[80]; + char fname_log[sizeof(path_dsource)+20]; + char save_voice_name[80]; + char path[sizeof(path_home)+40]; // path_dsource+20 + char buf[200]; + char voicename[80]; + + if(!wxDirExists(path_dictsource)) + { + if(gui_flag) + { + wxString dirname = wxDirSelector(_T("Directory of dictionary files"),path_phsource); + if(!dirname.IsEmpty()) + { + path_dictsource = dirname; + strncpy0(path_dsource,path_dictsource.mb_str(wxConvLocal),sizeof(path_dsource)-1); + strcat(path_dsource,"/"); + } + } + else + { + fprintf(stderr,"Can't find dictionary files: %s\n",path_dsource); + } + } + + wxDir dir(path_dictsource); + if(!dir.IsOpened()) + { + return(_T(" No dictionaries")); + } + + strcpy(save_voice_name,voice_name2); + + sprintf(fname_log,"%s%s",path_dsource,"dict_log"); + log = fopen(fname_log,"w"); + sprintf(fname_log,"%s%s",path_dsource,"dict_phonemes"); + f_phused = fopen(fname_log,"w"); + + if(f_phused) + { + fprintf(f_phused,"Phonemes which are used in the *_rules and *_list files\n"); + } + + bool cont = dir.GetFirst(&filename, _T("*_rules*"), wxDIR_FILES); + while ( cont ) + { + fname = wxFileName(filename); + filetype = fname.GetName().AfterLast('_'); + if((filetype != _T("rules")) && (filetype != _T("rules.txt"))) + { + cont = dir.GetNext(&filename); + continue; + } + + dictstr = fname.GetName().BeforeLast('_'); + strcpy(dictname,dictstr.mb_str(wxConvLocal)); + + dict_count++; + strcpy(voicename,dictname); + + // read the *_rules file to see if a phoneme table is specified though a voice name + sprintf(path,"%s%s_rules.txt",path_dsource,dictname); + if((f_in = fopen(path,"r")) == NULL) + { + sprintf(path,"%s%s_rules",path_dsource,dictname); + f_in = fopen(path,"r"); + } + + if(f_in != NULL) + { + unsigned int ix; + unsigned int c; + + for(ix=0; ix<20; ix++) + { + if(fgets(buf,sizeof(buf),f_in) == NULL) + break; + + if(memcmp(buf,"//voice=",8)==0) + { + for(ix=0; ix 0) + { + report = report + dictstr + wxString::Format(_T(" %d, "),err); + errors += err; + } + + if(f_phused != NULL) + { + memset(phoneme_tab_flags,0,sizeof(phoneme_tab_flags)); + FindPhonemesUsed(); + PrintPhonemesUsed(f_phused,dictname); + } + + cont = dir.GetNext(&filename); + } + if(log != NULL) + fclose(log); + if(f_phused != NULL) + fclose(f_phused); + + LoadVoiceVariant(save_voice_name,0); + + if(errors == 0) + return(wxString::Format(_T(" Compiled %d dictionaries"),dict_count)); + else + { + return(_T(" Dictionary errors: ") + report); + } + +} // end of CompileAllDictionaries + + + + +static void error(const char *format, const char *string) +{//====================================================== + fprintf(f_errors,"%4d: ",linenum-1); + fprintf(f_errors,format,string); + fprintf(f_errors,"\n"); + error_count++; +} + +static void Error(const char *string) +{//================================== + error(string,NULL); +} + +static FILE *fopen_log(FILE *f_log, const char *fname,const char *access) +{//===================================================================== +// performs fopen, but produces error message to f_log if it fails + FILE *f; + + if((f = fopen(fname,access)) == NULL) + { + if(f_log != NULL) + fprintf(f_log,"Can't access (%s) file '%s'\n",access,fname); + } + return(f); +} + static unsigned int StringToWord(const char *string) {//================================================= @@ -328,107 +1010,65 @@ static unsigned int StringToWord(const char *string) } +static MNEM_TAB reserved_phonemes[] = { + {"<", phonCONTROL}, // NOT USED + {"%", phonSTRESS_U}, + {"%%", phonSTRESS_D}, + {",", phonSTRESS_2}, + {",,", phonSTRESS_3}, + {"'", phonSTRESS_P}, + {"''", phonSTRESS_P2}, + {"=", phonSTRESS_PREV}, // stress previous syllable + {"_:", phonPAUSE}, // pause + {"_", phonPAUSE_SHORT}, // short pause + {"_!", phonPAUSE_NOLINK}, // short pause, no link + {":", phonLENGTHEN}, + {"@", phonSCHWA}, + {"@-", phonSCHWA_SHORT}, + {"||", phonEND_WORD}, + {"1", phonDEFAULTTONE}, // (numeral 1) default tone (for tone language) + {"#X1",phonCAPITAL}, // capital letter indication + {"?", phonGLOTTALSTOP}, // glottal stop + {"-", phonSYLLABIC}, // syllabic consonant + {"_^_",phonSWITCH}, // Change language + {"_X1",phonX1}, // a language specific action + {"_|", phonPAUSE_VSHORT}, // very short pause + {"_::",phonPAUSE_LONG}, // long pause + {"t#", phonT_REDUCED}, // reduced version of [t] + {"'!", phonSTRESS_TONIC}, // stress - emphasized + {"_;_",phonPAUSE_CLAUSE}, // clause pause -static FILE *fopen_log(FILE *f_log, const char *fname,const char *access) -{//================================================== -// performs fopen, but produces error message to f_log if it fails - FILE *f; + {"#@", phonVOWELTYPES}, // vowel type groups, these must be consecutive + {"#a", phonVOWELTYPES+1}, + {"#e", phonVOWELTYPES+2}, + {"#i", phonVOWELTYPES+3}, + {"#o", phonVOWELTYPES+4}, + {"#u", phonVOWELTYPES+5}, + {NULL, 0} }; - if((f = fopen(fname,access)) == NULL) + +static void ReservePhCodes() +{//========================= +// Reserve phoneme codes which have fixed numbers so that they can be +// referred to from the program code. + unsigned int word; + MNEM_TAB *p; + + p = reserved_phonemes; + while(p->mnem != NULL) { - if(f_log != NULL) - fprintf(f_log,"Can't access (%s) file '%s'\n",access,fname); - } - return(f); -} - - -static int Hash8(const char *string) -//================================== -/* Generate a hash code from the specified string */ -{ - int c; - int chars=0; - int hash=0; - - while((c = *string++) != 0) - { - c = tolower(c) - 'a'; - hash = hash * 8 + c; - hash = (hash & 0x1ff) ^ (hash >> 8); /* exclusive or */ - chars++; - } - - return((hash+chars) & 0xff); -} // end of Hash8 - - - - - -Compile::Compile() -{//=============== - - linenum = 0; -} - - -void Compile::Error(const char *msg) -{//================================= - fprintf(f_errors,"%3d: %s\n",linenum,msg); - error_count++; -} - -void Compile::Error(const char *msg, const char *msg2) -{//================================= - fprintf(f_errors,"%3d: %s: '%s'\n",linenum,msg,msg2); - error_count++; -} - - - -const char *Compile::PhonemeMnem(int phcode) -{//========================================== - if((phcode >= 0) && (phcode < N_PHONEME_TAB)) - return(WordToString(phoneme_tab2[phcode].mnemonic)); - else - return("???"); -} - - -const char *Compile::GetKeyMnem(int value) -{//======================================= - keywtab_t *p; - - p = keywords; - - while(p->data != -1) - { - if(p->data == value) - return(p->mnem); + word = StringToWord(p->mnem); + phoneme_tab2[p->value].mnemonic = word; + phoneme_tab2[p->value].code = p->value; + if(n_phcodes <= p->value) + n_phcodes = p->value+1; p++; } - return("???"); -} +} // end of ReservePhCodes -void Compile::ReservePhCode(const char *string, int value) -{//======================================================= -// Use a fixed number for this phoneme. Must be used before any -// phonemes are declared - unsigned int word; - - word = StringToWord(string); - - phoneme_tab2[value].mnemonic = word; - phoneme_tab2[value].code = value; - if(n_phcodes <= value) - n_phcodes = value+1; -} - - -int Compile::LookupPhoneme(const char *string, int control) -{//======================================================== +static int LookupPhoneme(const char *string, int control) +{//====================================================== // control = 0 explicit declaration // control = 1 declare phoneme if not found // control = 2 start looking after control & stress phonemes @@ -444,7 +1084,7 @@ int Compile::LookupPhoneme(const char *string, int control) ix = strlen(string); if((ix==0) || (ix> 4)) { - Error("Bad phoneme",string); + error("Bad phoneme name '%s'",string); } word = StringToWord(string); @@ -467,10 +1107,10 @@ int Compile::LookupPhoneme(const char *string, int control) } } -// if(control != 1) return(-1); // not found - if(use == 0) { + if(control == 0) + return(-1); if(n_phcodes >= N_PHONEME_TAB-1) return(-1); // phoneme table is full use = n_phcodes++; @@ -479,75 +1119,82 @@ int Compile::LookupPhoneme(const char *string, int control) // add this phoneme to the phoneme table phoneme_tab2[use].mnemonic = word; phoneme_tab2[use].type = phINVALID; - phoneme_tab2[use].spect = linenum; // for error report if the phoneme remains undeclared + phoneme_tab2[use].program = linenum; // for error report if the phoneme remains undeclared return(use); } // end of Compile::LookupPhoneme -int Compile::NextItem(int type) -{//============================ +static unsigned int get_char() +{//=========================== + unsigned int c; + c = fgetc(f_in); + if(c == '\n') + linenum++; + return(c); +} + +static void unget_char(unsigned int c) +{//=================================== + ungetc(c,f_in); + if(c == '\n') + linenum--; +} + + +static int NextItem(int type) +{//========================== int acc; unsigned char c=0; unsigned char c2; int ix; int sign; int keyword; - keywtab_t *p; + char *p; + keywtab_t *pk; + item_type = -1; + f_in_displ = ftell(f_in); f_in_linenum = linenum; while(!feof(f_in)) { - c = fgetc(f_in); + c = get_char(); if(c=='/') { - if((c2 = fgetc(f_in))=='/') + if((c2 = get_char())=='/') { // comment, ignore to end of line - while(!feof(f_in) && ((c=fgetc(f_in)) != '\n')); + while(!feof(f_in) && ((c = get_char()) != '\n')); } else { - ungetc(c2,f_in); + unget_char(c2); } } - if(c == '\n') linenum++; if(!isspace(c)) { break; } } if(feof(f_in)) - return(tEND); + return(-2); - if((type == tNUMBER) || (type == tSIGNEDNUMBER)) + if(c == '(') { - acc = 0; - sign = 1; - if((c == '-') && (type == tSIGNEDNUMBER)) - { - sign = -1; - c = fgetc(f_in); - } - if(!isdigit(c)) - Error("Expected number"); - while(isdigit(c)) - { - acc *= 10; - acc += (c - '0'); - c = fgetc(f_in); - } - ungetc(c,f_in); - return(acc * sign); + if(type == tOPENBRACKET) + return(1); + return(-1); } ix = 0; - while(!feof(f_in) && !isspace(c)) + while(!feof(f_in) && !isspace(c) && (c != '(') && (c != ')') && (c != ',')) { + if(c == '\\') + c = get_char(); item_string[ix++] = c; - c = fgetc(f_in); + c = get_char(); if(feof(f_in)) break; if(item_string[ix-1] == '=') @@ -555,8 +1202,20 @@ int Compile::NextItem(int type) } item_string[ix] = 0; + while(isspace(c)) + { + c = get_char(); + } + + item_terminator = ' '; + if((c == ')') || (c == '(') || (c == ',')) + item_terminator = c; + + if((c == ')') || (c == ',')) + c = ' '; + if(!feof(f_in)) - ungetc(c,f_in); + unget_char(c); keyword = -1; @@ -564,18 +1223,42 @@ int Compile::NextItem(int type) { return(0); } - if(type == tKEYWORD) + + if((type == tNUMBER) || (type == tSIGNEDNUMBER)) { - p = keywords; - while(p->data != -1) + acc = 0; + sign = 1; + p = item_string; + + if((*p == '-') && (type == tSIGNEDNUMBER)) { - if(strcmp(item_string,p->mnem)==0) - { - item_type = p->data >> 24; - return(p->data & 0xffffff); - } + sign = -1; p++; } + if(!isdigit(*p)) + error("Expected a number",NULL); + while(isdigit(*p)) + { + acc *= 10; + acc += (*p - '0'); + p++; + } + return(acc * sign); + } + + + if((type >= tKEYWORD) && (type <= tPROPERTIES)) + { + pk = keyword_tabs[type-tKEYWORD]; + while(pk->mnem != NULL) + { + if(strcmp(item_string,pk->mnem)==0) + { + item_type = pk->type; + return(pk->data); + } + pk++; + } item_type = -1; return(-1); // keyword not found } @@ -584,19 +1267,183 @@ int Compile::NextItem(int type) return(LookupPhoneme(item_string,2)); } return(-1); -} // end of Compile::NextItem +} // end of NextItem -void Compile::UngetItem() -{//====================== + +static int NextItemBrackets(int type, int control) +{//=============================================== +// Expect a parameter inside parantheses +// control: bit 0 0= need ( +// bit 1 1= allow comma + + int value; + + if((control & 1) == 0) + { + if(!NextItem(tOPENBRACKET)) + { + error("Expected '('", NULL); + } + } + + value = NextItem(type); + if((control & 2) && (item_terminator == ',')) + return(value); + + if(item_terminator != ')') + { + error("Expected ')'", NULL); + } + return(value); + +} + + +static void UngetItem() +{//==================== fseek(f_in,f_in_displ,SEEK_SET); linenum = f_in_linenum; -} // end of Compile::UngetItem +} // end of UngetItem -int Compile::LoadSpect(const char *path, int control) -{//================================================= + +static int Range(int value, int divide, int min, int max) +{//====================================================== + if(value < 0) + value -= divide/2; + else + value += divide/2; + value = value / divide; + + if(value > max) + value = max; + if(value < min) + value = min; + return(value - min); +} + + +int CompileVowelTransition(int which) +{//================================== +// Compile a vowel transition + int key; + int len=0; + int rms=0; + int f1=0; + int f2=0; + int f2_min=0; + int f2_max=0; + int f3_adj=0; + int f3_amp=0; + int flags=0; + int vcolour=0; + int x; + int instn = i_VOWELIN; + int word1; + int word2; + + if(which==1) + { +// instn = i_VOWELIN; + len = 50 / 2; // defaults for transition into vowel + rms = 25 / 2; + + if(phoneme_out->type == phSTOP) + { + len = 42 / 2; // defaults for transition into vowel + rms = 30 / 2; + } + } + else + if(which==2) + { + instn = i_VOWELOUT; + len = 36 / 2; // defaults for transition out of vowel + rms = 16 / 2; + } + + for(;;) + { + key = NextItem(tKEYWORD); + if(item_type != tTRANSITION) + { + UngetItem(); + break; + } + + switch(key & 0xf) + { + case 1: + len = Range(NextItem(tNUMBER), 2, 0, 63) & 0x3f; + flags |= 1; + break; + case 2: + rms = Range(NextItem(tNUMBER), 2, 0, 31) & 0x1f; + flags |= 1; + break; + case 3: + f1 = NextItem(tNUMBER); + break; + case 4: + f2 = Range(NextItem(tNUMBER), 50, 0, 63) & 0x3f; + f2_min = Range(NextItem(tSIGNEDNUMBER), 50, -15, 15) & 0x1f; + f2_max = Range(NextItem(tSIGNEDNUMBER), 50, -15, 15) & 0x1f; + if(f2_min > f2_max) + { + x = f2_min; + f2_min = f2_max; + f2_max = x; + } + break; + case 5: + f3_adj = Range(NextItem(tSIGNEDNUMBER), 50, -15, 15) & 0x1f; + f3_amp = Range(NextItem(tNUMBER), 8, 0, 15) & 0x1f; + break; + case 6: + flags |= 2; // break + break; + case 7: + flags |= 4; // rate + break; + case 8: + flags |= 8; // glstop + break; + case 9: + flags |= 16; // lenadd + break; + case 10: + flags |= 32; // f4 + break; + case 11: + flags |= 64; // paus + break; + case 12: + vcolour = NextItem(tNUMBER); + break; + case 13: + // set rms of 1st frame as fraction of rms of 2nd frame (1/30ths) + rms = (Range(NextItem(tNUMBER), 1, 0, 31) & 0x1f) | 0x20; + flags |= 1; + break; + } + } + word1 = len + (rms << 6) + (flags << 12); + word2 = f2 + (f2_min << 6) + (f2_max << 11) + (f3_adj << 16) + (f3_amp << 21) + (f1 << 26) + (vcolour << 29); + prog_out[0] = instn + ((word1 >> 16) & 0xff); + prog_out[1] = word1; + prog_out[2] = word2 >> 16; + prog_out[3] = word2; + prog_out += 4; + + return(0); +} // end of VowelTransition + + + +int LoadSpect(const char *path, int control) +{//========================================= SpectSeq *spectseq; int peak; int displ; @@ -630,7 +1477,7 @@ int Compile::LoadSpect(const char *path, int control) if(stream.Ok() == FALSE) { - Error("Failed to open",path); + error("Failed to open: '%s'",path); return(0); } spectseq->Load(stream); @@ -811,12 +1658,12 @@ for(ix=0; ix<8; ix++) delete spectseq; return(displ); -} // end of Compile::LoadSpect +} // end of LoadSpect -int Compile::LoadWavefile(FILE *f, const char *fname) -{//================================================== +static int LoadWavefile(FILE *f, const char *fname) +{//================================================ int displ; unsigned char c1; unsigned char c3; @@ -842,11 +1689,11 @@ int Compile::LoadWavefile(FILE *f, const char *fname) if(sr1 != samplerate) { fprintf(f_errors,"Wrong samplerate %d, wants %d\n",sr1,samplerate); - Error("Wrong samplerate: ",fname); + error("Wrong samplerate: %s",fname); } if(sr2 != sr1*2) { - Error("Not mono: ",fname); + error("Not mono: %s",fname); } #else { @@ -859,7 +1706,7 @@ int Compile::LoadWavefile(FILE *f, const char *fname) sprintf(command,"sox \"%s%s.wav\" -r %d -c 1 -w %s polyphase\n",path_source,fname,samplerate,fname_temp); if(system(command) < 0) { - Error("Failed to resample: ",command); + error("Failed to resample: %s",command); return(0); } } @@ -867,7 +1714,7 @@ int Compile::LoadWavefile(FILE *f, const char *fname) f = fopen(fname_temp,"rb"); if(f == NULL) { - Error("Can't read temp file: ",fname_temp); + error("Can't read temp file: %s",fname_temp); return(0); } resample_wav = 1; @@ -956,12 +1803,12 @@ int Compile::LoadWavefile(FILE *f, const char *fname) remove(fname_temp); } return(displ | 0x800000); // set bit 23 to indicate a wave file rather than a spectrum -} // end of Compile::LoadWavefile +} // end of LoadWavefile -int Compile::LoadEnvelope(FILE *f, const char *fname) -{//================================================== +static int LoadEnvelope(FILE *f, const char *fname) +{//================================================ int displ; char buf[128]; @@ -979,839 +1826,32 @@ int Compile::LoadEnvelope(FILE *f, const char *fname) } return(displ); -} +} // end of LoadEnvelope -int Compile::LoadDataFile(const char *path, int control) -{//==================================================== - // load spectrum sequence or sample data from a file. - // return index into spect or sample data area. bit 23=1 if a sample - FILE *f; - int id; - int hash; - int addr = 0; - int type_code=' '; - REF_HASH_TAB *p, *p2; - char buf[sizeof(path_source)+120]; +static int Hash8(const char *string) +//================================== +/* Generate a hash code from the specified string */ +{ + int c; + int chars=0; + int hash=0; - if(strcmp(path,"NULL")==0) - return(0); - if(strcmp(path,"DFT")==0) - return(1); + while((c = *string++) != 0) + { + c = tolower(c) - 'a'; + hash = hash * 8 + c; + hash = (hash & 0x1ff) ^ (hash >> 8); /* exclusive or */ + chars++; + } - count_references++; + return((hash+chars) & 0xff); +} // end of Hash8 - hash = Hash8(path); - p = ref_hash_tab[hash]; - while(p != NULL) - { - if(strcmp(path,p->string)==0) - { - duplicate_references++; - addr = p->value; // already loaded this data - break; - } - p = (REF_HASH_TAB *)p->link; - } - if(addr == 0) - { - sprintf(buf,"%s%s",path_source,path); - - if((f = fopen(buf,"rb")) == NULL) - { - sprintf(buf,"%s%s.wav",path_source,path); - if((f = fopen(buf,"rb")) == NULL) - { - Error("Can't read file",path); - return(0); - } - } - id = Read4Bytes(f); - rewind(f); - - if(id == 0x43455053) - { - addr = LoadSpect(path, control); - type_code = 'S'; - } - else - if(id == 0x46464952) - { - addr = LoadWavefile(f,path); - type_code = 'W'; - } - else - if(id == 0x43544950) - { - addr = LoadEnvelope(f,path); - type_code = 'E'; - } - else - if(id == 0x45564E45) - { - addr = LoadEnvelope2(f,path); - type_code = 'E'; - } - else - { - Error("File not SPEC or RIFF",path); - addr = -1; - } - fclose(f); - - if(addr > 0) - { - fprintf(f_phcontents,"%c 0x%.5x %s\n",type_code,addr & 0x7fffff,path); - } - } - - // add this item to the hash table - if(addr > 0) - { - p = ref_hash_tab[hash]; - p2 = (REF_HASH_TAB *)malloc(sizeof(REF_HASH_TAB)+strlen(path)+1); - p2->value = addr; - p2->ph_mnemonic = ph->mnemonic; // phoneme which uses this file - p2->ph_table = n_phoneme_tabs-1; - strcpy(p2->string,path); - p2->link = (char *)p; - ref_hash_tab[hash] = p2; - } - - return(addr); -} // end of Compile::LoadDataFile - - - -void Compile::AddEnvelope(int *list) -{//================================ - NextItem(tSTRING); - *list++ = LoadDataFile(item_string,0); - list[0] = 0; -} - - -int Compile::AddSpect(int phcode, int *list, int control) -{//===================================================== - int sign; - int sign2; - int all_digits; - char *p; - char *p2; - int spect; - int value; - int count = 0; - int v_in = vowel_in[0]; - int v_out = vowel_out[0]; - - sign = 0; - all_digits=0; - p = p2 = item_string; - for(;;) - { - if((*p == 0) || (*p == '+') || (((*p == '-') || (*p == '%')) && isdigit(p[1]))) - { - sign2 = *p; - *p = 0; - - if(all_digits) - { - value = atoi(p2); - if(sign == '+') - *list++ = 1 + (value<<8); - else - if(sign == '-') - *list++ = 2 + (value<<8); - else - { - value = (value * 32)/100; // convert from % to 1/32s - *list++ = 3 + (value<<8); - } - count++; - } - else - { - spect = LoadDataFile(p2, control); - if(spect != -1) - { - *list++ = phcode + (spect<<8); - count++; - - - // vowel formant transitions specified ? - if(v_in != 0) - { - *list++ = 0x4 + (vowel_in[0] << 8); - *list++ = vowel_in[1]; - v_in = 0; - count+=2; - } - if(v_out != 0) - { - *list++ = 0x5 + (vowel_out[0] << 8); - *list++ = vowel_out[1]; - v_out = 0; - count+=2; - } - - } - phcode = 0; - } - - if((sign = sign2)==0) break; - p2 = p+1; - all_digits=1; - } - else - { - if(!isdigit(*p)) - all_digits=0; - } - p++; - } - *list = 0; - return(count); -} // end of AddSpect - - - -void Compile::AddSpectList(int *list, int control) -{//============================================== - int phcode; - int key; - - while(*list != 0) list++; // find end of the list - - for(;;) - { - key = NextItem(tKEYWORD); - UngetItem(); - if(key != -1) - break; - - phcode = NextItem(tPHONEMEMNEM); - - if(phcode == -1) - Error("Undeclared phoneme",item_string); - - if(NextItem(tSTRING) == -1) - break; - - list += AddSpect(phcode, list, control); - } - - *list++ = 0; -} // end of Compile::AddSpectList - - - -static int Range(int value, int divide, int min, int max) -{//====================================================== - if(value < 0) - value -= divide/2; - else - value += divide/2; - value = value / divide; - - if(value > max) - value = max; - if(value < min) - value = min; - return(value - min); -} - - -void Compile::VowelTransition(int which, unsigned int *trans) -{//========================================================== -// Compile a vowel transition - int key; - int len=0; - int rms=0; - int f1=0; - int f2=0; - int f2_min=0; - int f2_max=0; - int f3_adj=0; - int f3_amp=0; - int flags=0; - int vcolour=0; - int x; - - if(which==1) - { - len = 50 / 2; // defaults for transition into vowel - rms = 25 / 2; - - if(ph->type == phSTOP) - { - len = 42 / 2; // defaults for transition into vowel - rms = 30 / 2; - } - } - else - if(which==2) - { - len = 36 / 2; // defaults for transition out of vowel - rms = 16 / 2; - } - - for(;;) - { - key = NextItem(tKEYWORD); - if(item_type != 3) - { - UngetItem(); - break; - } - - switch(key & 0xf) - { - case 1: - len = Range(NextItem(tNUMBER), 2, 0, 63) & 0x3f; - flags |= 1; - break; - case 2: - rms = Range(NextItem(tNUMBER), 2, 0, 31) & 0x1f; - flags |= 1; - break; - case 3: - f1 = NextItem(tNUMBER); - break; - case 4: - f2 = Range(NextItem(tNUMBER), 50, 0, 63) & 0x3f; - f2_min = Range(NextItem(tSIGNEDNUMBER), 50, -15, 15) & 0x1f; - f2_max = Range(NextItem(tSIGNEDNUMBER), 50, -15, 15) & 0x1f; - if(f2_min > f2_max) - { - x = f2_min; - f2_min = f2_max; - f2_max = x; - } - break; - case 5: - f3_adj = Range(NextItem(tSIGNEDNUMBER), 50, -15, 15) & 0x1f; - f3_amp = Range(NextItem(tNUMBER), 8, 0, 15) & 0x1f; - break; - case 6: - flags |= 2; // break - break; - case 7: - flags |= 4; // rate - break; - case 8: - flags |= 8; // glstop - break; - case 9: - flags |= 16; // lenadd - break; - case 10: - flags |= 32; // f4 - break; - case 11: - flags |= 64; // paus - break; - case 12: - vcolour = NextItem(tNUMBER); - break; - case 13: - // set rms of 1st frame as fraction of rms of 2nd frame (1/30ths) - rms = (Range(NextItem(tNUMBER), 1, 0, 31) & 0x1f) | 0x20; - flags |= 1; - break; - } - } - trans[0] = len + (rms << 6) + (flags << 12) + 0x80000000; - trans[1] = f2 + (f2_min << 6) + (f2_max << 11) + (f3_adj << 16) + (f3_amp << 21) + (f1 << 26) + (vcolour << 29); -} // end of VowelTransition - - -void Compile::ImportPhoneme(void) -{//============================== - int ix; - unsigned int mnem; - unsigned int ph_mnem; - unsigned int ph_code; - PHONEME_TAB_LIST *phtab = NULL; - - NextItem(tSTRING); - mnem = StringToWord(item_string); - - NextItem(tSTRING); - for(ix=0; ixphoneme_tab_ptr[ix].mnemonic) - { - ph_mnem = ph->mnemonic; - ph_code = ph->code; - memcpy(ph,&phtab->phoneme_tab_ptr[ix],sizeof(PHONEME_TAB)); - ph->mnemonic = ph_mnem; - ph->code = ph_code; - break; - } - } - if(ix == 256) - { - Error("Import phoneme not found",WordToString(mnem)); - } -} - -int Compile::CPhoneme() -{//==================== - int phcode; - int phindex; - int value; - int item; - int finish=0; - int *intp; - int before_tab[N_PHONEME_TAB]; - int after_tab[N_PHONEME_TAB]; - int default_spect[N_PHONEME_TAB]; - - NextItem(tSTRING); - phindex = LookupPhoneme(item_string,1); // declare phoneme if not already there - if(phindex == -1) return(0); - - ph = &phoneme_tab2[phindex]; - memset(ph,0,sizeof(PHONEME_TAB)); - ph->mnemonic = StringToWord(item_string); - ph->type = 0xff; // undefined - ph->code = phindex; - before_tab[0] = 0; - after_tab[0] = 0; - default_spect[0] = 0; - vowel_in[0] = 0; - vowel_in[1] = 0; - vowel_out[0] = 0; - vowel_out[1] = 0; - - while(!finish) - { - item = NextItem(tKEYWORD); - - if(item_type==2) - ph->phflags |= item & 0xffffff; - else - if(item_type==1) - { - if(ph->type != 0xff) - { - Error("Phoneme type already set",item_string); - } - ph->type = item & 0xff; - } - else - switch(item) - { - case tLENGTHMOD: - ph->length_mod = NextItem(tNUMBER); - break; - - case tLENGTH: - ph->std_length = NextItem(tNUMBER); - break; - - case tSTRESSTYPE: - ph->std_length = NextItem(tNUMBER); - break; - - case tWAVE: - ph->phflags |= phWAVE; // drop through to tSPECT - case tSPECT: - if(NextItem(tSTRING) == -1) - Error("Syntax error",item_string); - else - { - if(ph->type == phVOWEL) - AddSpect(phonPAUSE,default_spect,1); - else - AddSpect(phonPAUSE,default_spect,0); - } - break; - - case tSTARTTYPE: - phcode = NextItem(tPHONEMEMNEM); - if(phcode == -1) - phcode = LookupPhoneme(item_string,1); - ph->start_type = phcode; - break; - - case tENDTYPE: - phcode = NextItem(tPHONEMEMNEM); - if(phcode == -1) - phcode = LookupPhoneme(item_string,1); - ph->end_type = phcode; - break; - - case tTONESPEC: - ph->start_type = NextItem(tNUMBER); // tone's min pitch (range 0-50) - ph->end_type = NextItem(tNUMBER); // tone's max pitch (range 0-50) - if(ph->start_type > ph->end_type) - { - // ensure pitch1 < pitch2 - value = ph->start_type; - ph->start_type = ph->end_type; - ph->end_type = value; - } - AddEnvelope(default_spect); // envelope for pitch change, rise or fall or fall/rise, etc - AddEnvelope(after_tab); // envelope for amplitude change - break; - - case tREDUCETO: - phcode = NextItem(tPHONEMEMNEM); - if(phcode == -1) - phcode = LookupPhoneme(item_string,1); - ph->reduce_to = phcode; - value = NextItem(tNUMBER); - ph->phflags = (ph->phflags & 0xfffffff) + (value << 28); - break; - - case tBEFOREVOWEL: - case tBEFOREVOWELPAUSE: - case tBEFORENOTVOWEL: - case tBEFORENOTVOWEL2: - case tSWITCHVOICING: - case tBEFORE_R: - ph->phflags |= flags_alternative[item - tBEFOREVOWEL]; - if((phcode = NextItem(tPHONEMEMNEM)) == -1) - phcode = LookupPhoneme(item_string,1); - ph->alternative_ph = phcode; - break; - - case tBEFOREPAUSE: - ph->phflags |= phBEFOREPAUSE; - if((phcode = NextItem(tPHONEMEMNEM)) == -1) - phcode = LookupPhoneme(item_string,1); - ph->link_out = phcode; - break; - - case tAPPENDPH: - ph->phflags |= phAPPENDPH; // drop through to tLINKOUT - case tLINKOUT: - phcode = NextItem(tPHONEMEMNEM); - if(phcode == -1) - phcode = LookupPhoneme(item_string,1); - ph->link_out = phcode; - break; - - case tBEFORE: - AddSpectList(before_tab,0); - break; - - case tAFTER: - AddSpectList(after_tab,0); - break; - - case tEND: - finish = 1; - break; - - case tVOWELIN: - VowelTransition(1,vowel_in); - break; - - case tVOWELOUT: - VowelTransition(2,vowel_out); - break; - - case tIMPORTPH: - ImportPhoneme(); - break; - - default: - Error("Syntax error",item_string); - break; - } - } - // write out indices - if(before_tab[0] != 0) - { - ph->before = ftell(f_phindex) / 4; - intp = before_tab; - for(;;) - { - fwrite(intp,4,1,f_phindex); - if(*intp++ == 0) break; - } - } - if(after_tab[0] != 0) - { - ph->after = ftell(f_phindex) / 4; - intp = after_tab; - for(;;) - { - fwrite(intp,4,1,f_phindex); - if(*intp++ == 0) break; - } - } - if(default_spect[0] != 0) - { - ph->spect = ftell(f_phindex) / 4; - intp = default_spect; - for(;;) - { - fwrite(intp,4,1,f_phindex); - if(*intp++ == 0) break; - } - } - - if(ph->phflags & phVOICED) - { - if(ph->type == phSTOP) - ph->type = phVSTOP; - else - if(ph->type == phFRICATIVE) - ph->type = phVFRICATIVE; - } - - ph->std_length |= 0x8000; // 'locally declared' indicator - - if(ph->type == phDELETED) - { - ph->mnemonic = 0x01; // will not be recognised - } - - return(phindex); -} // end of Compile::CPhoneme - - - -void Compile::WritePhonemeTable() -{//============================== - int ix; - int j; - int n; - int value; - int count; - PHONEME_TAB *p; - - value = n_phoneme_tabs; - fputc(value,f_phtab); - fputc(0,f_phtab); - fputc(0,f_phtab); - fputc(0,f_phtab); - - for(ix=0; ix= N_PHONEME_TABS-1) - { - Error("Too many phonemetables"); - return; - } - p = (PHONEME_TAB *)calloc(sizeof(PHONEME_TAB),N_PHONEME_TAB); - - if(p == NULL) - { - Error("Out of memory"); - return; - } - - if(gui_flag) - progress->Update(n_phoneme_tabs); - - phoneme_tab_list2[n_phoneme_tabs].phoneme_tab_ptr = phoneme_tab2 = p; - memset(phoneme_tab_list2[n_phoneme_tabs].name, 0, N_PHONEME_TAB_NAME); - strncpy0(phoneme_tab_list2[n_phoneme_tabs].name, name, N_PHONEME_TAB_NAME); - n_phcodes = 1; - phoneme_tab_list2[n_phoneme_tabs].includes = 0; - - if(n_phoneme_tabs > 0) - { - NextItem(tSTRING); // name of base phoneme table - for(ix=0; ixstring,p2->string); - if(ix != 0) - return ix; - - ix = p1->ph_table - p2->ph_table; - if(ix != 0) - return ix; - - return(p1->ph_mnemonic - p2->ph_mnemonic); -} /* end of ref_sorter */ - - - -void Compile::Report(void) -{//======================= - int ix; + FILE *f; + int id; int hash; - int n; - REF_HASH_TAB *p; - REF_HASH_TAB **list; - FILE *f_report; - const char *data_path; - int prev_table; - int prev_mnemonic; - char fname[sizeof(path_source)+20]; + int addr = 0; + int type_code=' '; + REF_HASH_TAB *p, *p2; + char buf[sizeof(path_source)+120]; - // make a list of all the references and sort it - list = (REF_HASH_TAB **)malloc((count_references)* sizeof(REF_HASH_TAB *)); - if(list == NULL) - return; + if(strcmp(path,"NULL")==0) + return(0); + if(strcmp(path,"DFT")==0) + return(1); - sprintf(fname,"%scompile_report",path_source); - f_report = fopen(fname,"w"); - if(f_report == NULL) + count_references++; + + hash = Hash8(path); + p = ref_hash_tab[hash]; + while(p != NULL) { - free(list); - return; + if(strcmp(path,p->string)==0) + { + duplicate_references++; + addr = p->value; // already loaded this data + break; + } + p = (REF_HASH_TAB *)p->link; } - fprintf(f_report,"%d phoneme tables\n",n_phoneme_tabs); - fprintf(f_report," new total\n"); - for(ix=0; ix 0) + { + fprintf(f_phcontents,"%c 0x%.5x %s\n",type_code,addr & 0x7fffff,path); + } + } + + // add this item to the hash table + if(addr > 0) { p = ref_hash_tab[hash]; - while(p != NULL) - { - list[ix++] = p; - p = (REF_HASH_TAB *)(p->link); - } + p2 = (REF_HASH_TAB *)malloc(sizeof(REF_HASH_TAB)+strlen(path)+1); + p2->value = addr; + p2->ph_mnemonic = phoneme_out->mnemonic; // phoneme which uses this file + p2->ph_table = n_phoneme_tabs-1; + strcpy(p2->string,path); + p2->link = (char *)p; + ref_hash_tab[hash] = p2; + } + + return(addr); +} // end of LoadDataFile + + +static int CompileToneSpec(void) +{//============================= + int pitch1=0; + int pitch2=0; + int pitch_env = 0; + int amp_env = 0; + + pitch1 = NextItemBrackets(tNUMBER,2); + pitch2 = NextItemBrackets(tNUMBER,3); + + if(item_terminator == ',') + { + NextItemBrackets(tSTRING,3); + pitch_env = LoadDataFile(item_string, 0); + } + + if(item_terminator == ',') + { + NextItemBrackets(tSTRING,1); + amp_env = LoadDataFile(item_string, 0); + } + + if(pitch1 < pitch2) + { + phoneme_out->start_type = pitch1; + phoneme_out->end_type = pitch2; + } + else + { + phoneme_out->start_type = pitch2; + phoneme_out->end_type = pitch1; + } + + if(pitch_env != 0) + { + *prog_out++ = i_PITCHENV + ((pitch_env >> 16) & 0xf); + *prog_out++ = pitch_env; + } + if(amp_env != 0) + { + *prog_out++ = i_AMPENV + ((amp_env >> 16) & 0xf); + *prog_out++ = amp_env; } - n = ix; - qsort((void *)list,n,sizeof(REF_HASH_TAB *),(int (*)(const void *,const void *))ref_sorter); - data_path = ""; - prev_mnemonic = 0; - prev_table = 0; - for(ix=0; ixstring, data_path) != 0) + + +int CompileSound(int keyword, int isvowel) +{//======================================= + int addr; + int value = 0; + char path[N_ITEM_STRING]; + static int sound_instns[] = {i_FMT, i_WAV, i_VWLSTART, i_VWLENDING, i_WAVADD}; + + NextItemBrackets(tSTRING,2); + strcpy(path, item_string); + if(item_terminator == ',') + { + value = NextItemBrackets(tSIGNEDNUMBER,1); + } + addr = LoadDataFile(path, isvowel); + addr = addr / 4; // addr is words not bytes + + *prog_out++ = sound_instns[keyword-kFMT] + ((value & 0xff) << 4) + ((addr >> 16) & 0xf); + *prog_out++ = addr & 0xffff; + return(0); +} // end of CompileSound + + + +/* +Condition +bits 14,15 1 +bit 13 1 = AND, 0 = OR +bit 12 spare +bit 8-11 + =0-3 p,t,n,n2 data=phoneme code + =4-7 p,t,n,n2 data=(bits5-7: phtype, place, property, special) (bits0-4: data) + =8 data = stress bitmap + =9 special tests +*/ + +int CompileIf(int elif) +{//==================== + int key; + int finish = 0; + int word = 0; + int data; + int bitmap; + int brackets; + USHORT *prog_last_if = NULL; + + then_count = 2; + after_if = 1; + + while(!finish) + { + if((key = NextItem(tCONDITION)) < 0) + error("Expected a condition, not '%s'",item_string); + + if(item_type == tWHICH_PHONEME) { - data_path = list[ix]->string; - j = strlen(data_path); - fprintf(f_report,"%s",data_path); + // prevPh(), thisPh(), nextPh(), next2Ph() + data = NextItemBrackets(tPROPERTIES,0); + if(data >= 0) + { + word = key + data + 0x700; + } + else + { + data = LookupPhoneme(item_string,2); + word = key + data; + } + } + else + if(item_type == tTEST) + { + if(key == kTHISSTRESS) + { + bitmap = 0; + brackets = 2; + do { + data = NextItemBrackets(tNUMBER,brackets); + if(data > 7) + error("Expected list of stress levels",NULL); + bitmap |= (1 << data); + + brackets = 3; + } while(item_terminator == ','); + word = i_StressLevel | bitmap; + } + else + { + word = key; + } } else { - if((list[ix]->ph_table == prev_table) && (list[ix]->ph_mnemonic == prev_mnemonic)) - continue; // same phoneme, don't list twice + error("Unexpected keyword '%s'",item_string); } - while(j < 14) + // output the word + prog_last_if = prog_out; + *prog_out++ = word | i_CONDITION; + + // expect AND, OR, THEN + switch(NextItem(tCONDITION)) { - fputc(' ',f_report); // pad filename with spaces - j++; - } - - fprintf(f_report," [%s] %s",WordToString(prev_mnemonic = list[ix]->ph_mnemonic), phoneme_tab_list2[prev_table = list[ix]->ph_table].name); - fputc('\n',f_report); - } - - for(ix=0; ixtype; - if(t1 > phVOWEL) t1 = phVOWEL+1; - - t2 = p2->type; - if(t2 > phVOWEL) t2 = phVOWEL+1; - - if((ix = t1 - t2) != 0) - return(ix); - - strcpy(mnem1,WordToString(p1->mnemonic)); - return(strcasecmp(mnem1,WordToString(p2->mnemonic))); -} /* end of ph_sorter */ - - - -void PrintPhonemesUsed(FILE *f, const char *dictname) -{//================================================== - int ix; - PHONEME_TAB *ph; - PHONEME_TAB *ph_tab[N_PHONEME_TAB]; - int count = 0; - int n_ph = 0; - int section = 0; - - fprintf(f,"\n\nDictionary %s_dict\n",dictname); - fflush(f); - - for(ix=0; (ixtype > 1) + if(elif == 0) + { + if_level++; + if_stack[if_level].p_else = NULL; + } + + if_stack[if_level].returned = 0; + if_stack[if_level].p_then = prog_out; + *prog_out++ = i_JUMP_FALSE; + + return(0); +} // end of CompileIf + + +void FillThen(int add) +{//=================== + USHORT *p; + int offset; + + p = if_stack[if_level].p_then; + if(p != NULL) + { + offset = prog_out - p + add; + + if((then_count == 1) && (if_level == 1)) { - if((ph->type > phVOWEL) && (section == 0)) + // The THEN part only contains one statement, we can remove the THEN jump + // and the interpreter will implicitly skip the statement. + while(p < prog_out) { - section = 1; - count = 0; - fputc('\n',f); + p[0] = p[1]; + p++; } - if((count & 0x7) == 0) - fputc('\n',f); - fprintf(f,"%-4s ",WordToString(ph->mnemonic)); - count++; + prog_out--; } + else + { + if(offset > MAX_JUMP) + { + error("IF block is too long",NULL); + } + *p = i_JUMP_FALSE + offset; + } + if_stack[if_level].p_then = NULL; } - fputc('\n',f); -} // end of PrintPhonemesUsed + + then_count = 0; +} // end of FillThen + + +int CompileElse(void) +{//================== + USHORT *ref; + USHORT *p; + + if(if_level < 1) + { + error("ELSE not expected",NULL); + return(0); + } + + if(if_stack[if_level].returned == 0) + { + FillThen(1); + } + else + { + FillThen(0); + } + + if(if_stack[if_level].returned == 0) + { + ref = prog_out; + *prog_out++ = 0; + + if((p = if_stack[if_level].p_else) != NULL) + { + *ref = ref - p; // backwards offset to the previous else + } + if_stack[if_level].p_else = ref; + } + + return(0); +} // end of CompileElse + + +int CompileElif(void) +{//=================== + if(if_level < 1) + { + error("ELIF not expected",NULL); + return(0); + } + + CompileElse(); + CompileIf(1); + return(0); +} + + +int CompileEndif(void) +{//=================== + USHORT *p; + int chain; + int offset; + + if(if_level < 1) + { + error("ENDIF not expected",NULL); + return(0); + } + + FillThen(0); + + if((p = if_stack[if_level].p_else) != NULL) + { + do + { + chain = *p; // a chain of previous else links + + offset = prog_out - p; + if(offset > MAX_JUMP) + { + error("IF block is too long",NULL); + } + *p = i_JUMP + offset; + + p -= chain; + } while (chain > 0); + } + + if_level--; + return(0); +} // end of CompileEndif + + +static int CompileSwitch(int type) +{//=============================== +// Type 0: EndSwitch +// 1: SwitchPrevVowelType +// 2: SwitchNextVowelType + + if(type == 0) + { + // check the instructions in the Switch + return(0); + } + +// count_VowelStart = 0; +// count_VowelEnding = 0; + + if(type == 1) + *prog_out++ = i_SWITCH_PREVVOWEL+6; + if(type == 2) + *prog_out++ = i_SWITCH_NEXTVOWEL+6; + return(0); +} // end of CompileSwitch -wxString CompileAllDictionaries() -{//============================== - wxString filename; - wxFileName fname; - wxString dictstr; - wxString filetype; - wxString report = _T(""); - int err; - int errors = 0; - int dict_count = 0; - FILE *f_in; - FILE *log; - FILE *f_phused; - char dictname[80]; - char fname_log[sizeof(path_dsource)+20]; - char save_voice_name[80]; - char path[sizeof(path_home)+40]; // path_dsource+20 +static PHONEME_TAB *FindPhoneme(const char *string) +{//================================================ + PHONEME_TAB_LIST *phtab = NULL; + int ix; + unsigned int mnem; + char *phname; char buf[200]; - char voicename[80]; - if(!wxDirExists(path_dictsource)) + // is this the name of a phoneme which is ijn scope + if((strlen(string) <= 4) && ((ix = LookupPhoneme(string,0)) != -1)) { - if(gui_flag) + return(&phoneme_tab2[ix]); + } + + // no, treat the name as phonemetable/phoneme + strcpy(buf,string); + if((phname = strchr(buf,'/')) != 0) + { + *phname++ = 0; + } + + for(ix=0; ixphoneme_tab_ptr[ix].mnemonic) + { + return(&phtab->phoneme_tab_ptr[ix]); + } + } + + error("Phoneme reference not found: '%s'",string); + return(NULL); +} + + +static void ImportPhoneme(void) +{//============================ + unsigned int ph_mnem; + unsigned int ph_code; + PHONEME_TAB *ph; + + NextItem(tSTRING); + + if((ph = FindPhoneme(item_string)) == NULL) + return; + + ph_mnem = phoneme_out->mnemonic; + ph_code = phoneme_out->code; + memcpy(phoneme_out,ph,sizeof(PHONEME_TAB)); + phoneme_out->mnemonic = ph_mnem; + phoneme_out->code = ph_code; + if(phoneme_out->type != phVOWEL) + { + phoneme_out->end_type = 0; // voicingswitch, this must be set later to refer to a local phoneme + } + +} // end of ImportPhoneme + + +static void CallPhoneme(void) +{//========================== + PHONEME_TAB *ph; + int ix; + int addr = 0; + + NextItem(tSTRING); + + // first look for a procedure name + for(ix=0; ixprogram; + } + + *prog_out++ = i_CALLPH + (addr >> 16); + *prog_out++ = addr; +} // end of CallPhoneme + + +static void DecThenCount() +{//======================= + if(then_count >0) + then_count--; +} + +static void InstnPlusPhoneme(int instn) +{//==================================== + int phcode; + DecThenCount(); + + phcode = NextItemBrackets(tPHONEMEMNEM,0); + *prog_out++ = instn + phcode; +} + + +int CompilePhoneme(int compile_phoneme) +{//==================================== + int endphoneme = 0; + int phoneme_flags = 0; + int place_articulation = 0; + int keyword; + int value; + int phcode = 0; + PHONEME_TAB phoneme_out2; + + prog_out = prog_buf; + if_level = 0; + if_stack[0].returned = 0; + after_if = 0; + + NextItem(tSTRING); + if(compile_phoneme) + { + phcode = LookupPhoneme(item_string,1); // declare phoneme if not already there + if(phcode == -1) return(0); + phoneme_out = &phoneme_tab2[phcode]; + } + else + { + // declare a procedure + if(n_procs >= N_PROCS) + { + error("Too many procedures",NULL); + return(0); + } + strcpy(proc_names[n_procs], item_string); + phoneme_out = &phoneme_out2; + } + + phoneme_out->code = phcode; + phoneme_out->program = 0; + phoneme_out->type = phINVALID; + phoneme_out->std_length = 0; + phoneme_out->start_type = 0; + phoneme_out->end_type = 0; + phoneme_out->length_mod = 0; + + while(!endphoneme && !feof(f_in)) + { + if((keyword = NextItem(tKEYWORD)) < 0) + { + if(keyword == -2) { - path_dictsource = dirname; - strncpy0(path_dsource,path_dictsource.mb_str(wxConvLocal),sizeof(path_dsource)-1); - strcat(path_dsource,"/"); + error("Missing 'endphoneme' before end-of-file",NULL); // end of file + break; } - } - else - { - fprintf(stderr,"Can't find dictionary files: %s\n",path_dsource); - } - } - - wxDir dir(path_dictsource); - if(!dir.IsOpened()) - { - return(_T(" No dictionaries")); - } - - strcpy(save_voice_name,voice_name2); - - sprintf(fname_log,"%s%s",path_dsource,"dict_log"); - log = fopen(fname_log,"w"); - sprintf(fname_log,"%s%s",path_dsource,"dict_phonemes"); - f_phused = fopen(fname_log,"w"); - - if(f_phused) - { - fprintf(f_phused,"Phonemes which are used in the *_rules and *_list files\n"); - } - - bool cont = dir.GetFirst(&filename, _T("*_rules*"), wxDIR_FILES); - while ( cont ) - { - fname = wxFileName(filename); - filetype = fname.GetName().AfterLast('_'); - if((filetype != _T("rules")) && (filetype != _T("rules.txt"))) - { - cont = dir.GetNext(&filename); + error("Bad keyword in phoneme definition '%s'",item_string); continue; } - dictstr = fname.GetName().BeforeLast('_'); - strcpy(dictname,dictstr.mb_str(wxConvLocal)); - - dict_count++; - strcpy(voicename,dictname); - - // read the *_rules file to see if a phoneme table is specified though a voice name - sprintf(path,"%s%s_rules.txt",path_dsource,dictname); - if((f_in = fopen(path,"r")) == NULL) + switch(item_type) { - sprintf(path,"%s%s_rules",path_dsource,dictname); - f_in = fopen(path,"r"); - } + case tPHONEME_TYPE: + if(phoneme_out->type != phINVALID) + error("More than one phoneme type: %s",item_string); + phoneme_out->type = keyword; + break; - if(f_in != NULL) - { - unsigned int ix; - unsigned int c; + case tPLACE: + if(place_articulation > 0) + error("Place of articulation has already been given: %s",item_string); + place_articulation = keyword; + break; - for(ix=0; ix<20; ix++) + case tPHONEME_FLAG: + phoneme_flags |= keyword; + break; + + case tINSTRN1: +// instruction group 0, with 8 bit operands which set data in PHONEME_DATA + switch(keyword) { - if(fgets(buf,sizeof(buf),f_in) == NULL) - break; + case i_CHANGE_PHONEME: + case i_APPEND_PHONEME: + case i_APPEND_IFNEXTVOWEL: + case i_INSERT_PHONEME: + case i_REPLACE_NEXT_PHONEME: + case i_VOICING_SWITCH: + case i_CHANGE_IF+0: + case i_CHANGE_IF+1: + case i_CHANGE_IF+2: + case i_CHANGE_IF+3: + InstnPlusPhoneme(keyword << 8); + break; - if(memcmp(buf,"//voice=",8)==0) + case i_PAUSE_BEFORE: + value = NextItem(tNUMBER); + *prog_out++ = (i_PAUSE_BEFORE << 8) + value; + break; + + case i_PAUSE_AFTER: + value = NextItem(tNUMBER); + *prog_out++ = (i_PAUSE_AFTER << 8) + value; + break; + + case i_SET_LENGTH: + value = NextItem(tNUMBER); + if(after_if == 0) { - for(ix=0; ixstd_length = value/2; } + else + { + *prog_out++ = (i_SET_LENGTH << 8) + value/2; + DecThenCount(); + } + break; + + case i_ADD_LENGTH: + value = NextItem(tSIGNEDNUMBER); + *prog_out++ = (i_ADD_LENGTH << 8) + value/2; + DecThenCount(); + break; + + case i_LENGTH_MOD: + value = NextItem(tNUMBER); + phoneme_out->length_mod = value; + break; } - fclose(f_in); + break; + + case tSTATEMENT: + switch(keyword) + { + case kIMPORT_PH: + ImportPhoneme(); + phoneme_flags = phoneme_out->phflags; + break; + + case kSTARTTYPE: + phcode = NextItem(tPHONEMEMNEM); + if(phcode == -1) + phcode = LookupPhoneme(item_string,1); + phoneme_out->start_type = phcode; + break; + + case kENDTYPE: + phcode = NextItem(tPHONEMEMNEM); + if(phcode == -1) + phcode = LookupPhoneme(item_string,1); + if(phoneme_out->type == phVOWEL) + { + phoneme_out->end_type = phcode; + } + else + { + if(phcode != phoneme_out->start_type) + { + error("endtype must equal starttype for consonants",NULL); + } + } + break; + + case kVOICINGSWITCH: + phcode = NextItem(tPHONEMEMNEM); + if(phcode == -1) + phcode = LookupPhoneme(item_string,1); + phoneme_out->end_type = phcode; // use end_type field for consonants as voicing_switch + break; + + case kSTRESSTYPE: + value = NextItem(tNUMBER); + phoneme_out->std_length = value; + break; + + case kIF: + endphoneme = CompileIf(0); + break; + + case kELSE: + endphoneme = CompileElse(); + break; + + case kELIF: + endphoneme = CompileElif(); + break; + + case kENDIF: + endphoneme = CompileEndif(); + break; + + case kENDSWITCH: + break; + + case kSWITCH_PREVVOWEL: + endphoneme = CompileSwitch(1); + break; + + case kSWITCH_NEXTVOWEL: + endphoneme = CompileSwitch(2); + break; + + case kCALLPH: + CallPhoneme(); + break; + + case kFMT: + DecThenCount(); + if(phoneme_out->type == phVOWEL) + endphoneme = CompileSound(keyword,1); + else + endphoneme = CompileSound(keyword,0); + break; + + case kWAV: + if_stack[if_level].returned = 1; + case kVOWELSTART: + case kVOWELENDING: + case kANDWAV: + DecThenCount(); + endphoneme = CompileSound(keyword,0); + break; + + case kVOWELIN: + DecThenCount(); + endphoneme = CompileVowelTransition(1); + break; + + case kVOWELOUT: + DecThenCount(); + endphoneme = CompileVowelTransition(2); + break; + + case kTONESPEC: + endphoneme = CompileToneSpec(); + break; + + case kCONTINUE: + *prog_out++ = i_CONTINUE; + DecThenCount(); + break; + + case kRETURN: + *prog_out++ = i_RETURN; + break; + + case kINCLUDE: + case kPHONEMENUMBER: + case kPHONEMETABLE: + error("Missing 'endphoneme' before '%s'",item_string); // drop through to endphoneme + case kENDPHONEME: + case kENDPROCEDURE: + endphoneme = 1; + if(if_level > 0) + { + error("Missing ENDIF",NULL); + } + if((prog_out > prog_buf) && (if_stack[0].returned == 0)) + { + *prog_out++ = i_RETURN; + } + break; + } + + break; } - - LoadVoice(voicename,0); - - if((err = CompileDictionary(path_dsource, dictname,log,NULL,0)) > 0) - { - report = report + dictstr + wxString::Format(_T(" %d, "),err); - errors += err; - } - - if(f_phused != NULL) - { - memset(phoneme_tab_flags,0,sizeof(phoneme_tab_flags)); - FindPhonemesUsed(); - PrintPhonemesUsed(f_phused,dictname); - } - - cont = dir.GetNext(&filename); } - if(log != NULL) - fclose(log); - if(f_phused != NULL) - fclose(f_phused); - LoadVoiceVariant(save_voice_name,0); + if(endphoneme != 1) + { + error("'endphoneme' not expected here",NULL); + } - if(errors == 0) - return(wxString::Format(_T(" Compiled %d dictionaries"),dict_count)); + if(compile_phoneme) + { + if(phoneme_out->type == phINVALID) + { + error("Phoneme type is missing",NULL); + phoneme_out->type = 0; + } + phoneme_out->phflags = place_articulation << 16; + phoneme_out->phflags |= phoneme_flags; + + if(phoneme_out->phflags & phVOICED) + { + if(phoneme_out->type == phSTOP) + phoneme_out->type = phVSTOP; + else + if(phoneme_out->type == phFRICATIVE) + phoneme_out->type = phVFRICATIVE; + } + + if(phoneme_out->std_length == 0) + { + if(phoneme_out->type == phVOWEL) + phoneme_out->std_length = 180/2; // default length for vowel + } + + phoneme_out->phflags |= phLOCAL; //declared in this phoneme table + + if(phoneme_out->type == phDELETED) + { + phoneme_out->mnemonic = 0x01; // will not be recognised + } + } + + DecompilePhoneme(f_errors, phoneme_out, compile_phoneme); + + if(prog_out > prog_buf) + { + // write out the program for this phoneme + fflush(f_phindex); + phoneme_out->program = ftell(f_phindex) / sizeof(USHORT); + if(compile_phoneme == 0) + { + proc_addr[n_procs++] = ftell(f_phindex) / sizeof(USHORT); + } + fwrite(prog_buf, sizeof(USHORT), prog_out - prog_buf, f_phindex); + } + + return(0); +} // end of CompilePhoneme + + + + + +static void WritePhonemeTables() +{//============================= + int ix; + int j; + int n; + int value; + int count; + PHONEME_TAB *p; + + value = n_phoneme_tabs; + fputc(value,f_phtab); + fputc(0,f_phtab); + fputc(0,f_phtab); + fputc(0,f_phtab); + + for(ix=0; ix= N_PHONEME_TABS-1) + { + Error("Too many phonemetables"); + return; + } + p = (PHONEME_TAB *)calloc(sizeof(PHONEME_TAB),N_PHONEME_TAB); + + if(p == NULL) + { + Error("Out of memory"); + return; + } + + if(gui_flag) + progress->Update(n_phoneme_tabs); + + phoneme_tab_list2[n_phoneme_tabs].phoneme_tab_ptr = phoneme_tab2 = p; + memset(phoneme_tab_list2[n_phoneme_tabs].name, 0, N_PHONEME_TAB_NAME); + strncpy0(phoneme_tab_list2[n_phoneme_tabs].name, name, N_PHONEME_TAB_NAME); + n_phcodes = 1; + phoneme_tab_list2[n_phoneme_tabs].includes = 0; + + if(n_phoneme_tabs > 0) + { + NextItem(tSTRING); // name of base phoneme table + for(ix=0; ixCPhonemeTab("phonemes"); - delete compile; + CompilePhonemeData2("phonemes"); + return; } + diff --git a/src/dictionary.cpp b/src/dictionary.cpp index bc44097e..a4e62738 100755 --- a/src/dictionary.cpp +++ b/src/dictionary.cpp @@ -36,7 +36,6 @@ #include "translate.h" - int dictionary_skipwords; char dictionary_name[40]; @@ -482,7 +481,7 @@ void DecodePhonemes(const char *inptr, char *outptr) if((ph = phoneme_tab[phcode]) == NULL) continue; - if((ph->type == phSTRESS) && (ph->std_length <= 4) && (ph->spect == 0)) + if((ph->type == phSTRESS) && (ph->std_length <= 4) && (ph->program == 0)) { if(ph->std_length > 1) *outptr++ = stress_chars[ph->std_length]; @@ -847,26 +846,26 @@ return(0); -static int GetVowelStress(Translator *tr, unsigned char *phonemes, unsigned char *vowel_stress, int &vowel_count, int &stressed_syllable, int control) -{//==================================================================================================================================================== +static int GetVowelStress(Translator *tr, unsigned char *phonemes, signed char *vowel_stress, int &vowel_count, int &stressed_syllable, int control) +{//================================================================================================================================================= // control = 1, set stress to 1 for forced unstressed vowels unsigned char phcode; PHONEME_TAB *ph; unsigned char *ph_out = phonemes; int count = 1; - int max_stress = 0; + int max_stress = -1; int ix; int j; - int stress = 0; + int stress = -1; int primary_posn = 0; - vowel_stress[0] = 0; + vowel_stress[0] = 1; while(((phcode = *phonemes++) != 0) && (count < (N_WORD_PHONEMES/2)-1)) { if((ph = phoneme_tab[phcode]) == NULL) continue; - if((ph->type == phSTRESS) && (ph->spect == 0)) + if((ph->type == phSTRESS) && (ph->program == 0)) { /* stress marker, use this for the following vowel */ @@ -876,7 +875,7 @@ static int GetVowelStress(Translator *tr, unsigned char *phonemes, unsigned char j = count - 1; while((j > 0) && (stressed_syllable == 0) && (vowel_stress[j] < 4)) { - if(vowel_stress[j] != 1) + if((vowel_stress[j] != 0) && (vowel_stress[j] != 1)) { // don't promote a phoneme which must be unstressed vowel_stress[j] = 4; @@ -920,11 +919,11 @@ static int GetVowelStress(Translator *tr, unsigned char *phonemes, unsigned char max_stress = stress; } - if((stress == 0) && (control & 1) && (ph->phflags & phUNSTRESSED)) + if((stress < 0) && (control & 1) && (ph->phflags & phUNSTRESSED)) vowel_stress[count] = 1; /* weak vowel, must be unstressed */ count++; - stress = 0; + stress = -1; } else if(phcode == phonSYLLABIC) @@ -937,7 +936,7 @@ static int GetVowelStress(Translator *tr, unsigned char *phonemes, unsigned char *ph_out++ = phcode; } - vowel_stress[count] = 0; + vowel_stress[count] = 1; *ph_out = 0; /* has the position of the primary stress been specified by $1, $2, etc? */ @@ -959,7 +958,7 @@ static int GetVowelStress(Translator *tr, unsigned char *phonemes, unsigned char if(vowel_stress[ix] == 4) { if(tr->langopts.stress_flags & 0x20000) - vowel_stress[ix] = 0; + vowel_stress[ix] = 1; else vowel_stress[ix] = 3; } @@ -980,7 +979,7 @@ static int GetVowelStress(Translator *tr, unsigned char *phonemes, unsigned char -static char stress_phonemes[] = {phonSTRESS_U, phonSTRESS_D, phonSTRESS_2, phonSTRESS_3, +static char stress_phonemes[] = {phonSTRESS_D, phonSTRESS_U, phonSTRESS_2, phonSTRESS_3, phonSTRESS_P, phonSTRESS_P2, phonSTRESS_TONIC}; @@ -992,7 +991,7 @@ void ChangeWordStress(Translator *tr, char *word, int new_stress) int vowel_count; // num of vowels + 1 int stressed_syllable=0; // position of stressed syllable unsigned char phonetic[N_WORD_PHONEMES]; - unsigned char vowel_stress[N_WORD_PHONEMES/2]; + signed char vowel_stress[N_WORD_PHONEMES/2]; strcpy((char *)phonetic,word); max_stress = GetVowelStress(tr, phonetic, vowel_stress, vowel_count, stressed_syllable, 0); @@ -1026,8 +1025,8 @@ void ChangeWordStress(Translator *tr, char *word, int new_stress) { if((phoneme_tab[*p]->type == phVOWEL) && !(phoneme_tab[*p]->phflags & phNONSYLLABIC)) { - if(vowel_stress[ix] != 0) - *word++ = stress_phonemes[vowel_stress[ix]]; + if((vowel_stress[ix] == 0) || (vowel_stress[ix] > 1)) + *word++ = stress_phonemes[(unsigned char)vowel_stress[ix]]; ix++; } @@ -1073,7 +1072,7 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, int done; int stressflags; - unsigned char vowel_stress[N_WORD_PHONEMES/2]; + signed char vowel_stress[N_WORD_PHONEMES/2]; char syllable_weight[N_WORD_PHONEMES/2]; char vowel_length[N_WORD_PHONEMES/2]; unsigned char phonetic[N_WORD_PHONEMES]; @@ -1116,12 +1115,15 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, } max_stress = GetVowelStress(tr, phonetic, vowel_stress, vowel_count, stressed_syllable, 1); - - if((max_stress == 0) && (tr->langopts.stress_flags & 1) && (vowel_count == 2)) + if(max_stress < 0) { - // option: don't stress monosyllables except at end-of-clause - vowel_stress[1] = 1; - dictionary_flags[0] |= FLAG_STRESS_END2; + if((tr->langopts.stress_flags & 1) && (vowel_count == 2)) + { + // lang=fr: don't stress monosyllables except at end-of-clause + vowel_stress[1] = 0; + dictionary_flags[0] |= FLAG_STRESS_END2; + } + max_stress = 0; } // heavy or light syllables @@ -1233,7 +1235,7 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, } } - if(vowel_stress[stressed_syllable] == 1) + if((vowel_stress[stressed_syllable] == 0) || (vowel_stress[stressed_syllable] == 1)) { // but this vowel is explicitly marked as unstressed if(stressed_syllable > 1) @@ -1248,7 +1250,7 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, } // only set the stress if it's not already marked explicitly - if(vowel_stress[stressed_syllable] == 0) + if(vowel_stress[stressed_syllable] < 0) { // don't stress if next and prev syllables are stressed if((vowel_stress[stressed_syllable-1] < 4) || (vowel_stress[stressed_syllable+1] < 4)) @@ -1267,7 +1269,7 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, while(stressed_syllable > 0) { // find the last vowel which is not unstressed - if(vowel_stress[stressed_syllable] == 0) + if(vowel_stress[stressed_syllable] < 0) { vowel_stress[stressed_syllable] = 4; break; @@ -1329,7 +1331,7 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, // find the heaviest syllable, excluding the final syllable for(ix = 1; ix < (vowel_count-1); ix++) { - if(vowel_stress[ix] == 0) + if(vowel_stress[ix] < 0) { if((wt = syllable_weight[ix]) >= max_weight) { @@ -1377,7 +1379,7 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, case 9: // mark all as stressed for(ix=1; ix 2) && (vowel_stress[2] >= 4)) @@ -1411,7 +1413,7 @@ void SetWordStress(Translator *tr, char *output, unsigned int *dictionary_flags, done = 0; for(v=1; v 1) && (max_stress >= 4) && (stressflags & 4) && (v == (vowel_count-1))) { // option: mark unstressed final syllable as diminished - v_stress = 1; + v_stress = 0; } else if((stressflags & 2) || (v == 1) || (v == (vowel_count-1))) { // first or last syllable, or option 'don't set diminished stress' - v_stress = 0; + v_stress = 1; } else if((v == (vowel_count-2)) && (vowel_stress[vowel_count-1] <= 1)) { // penultimate syllable, followed by an unstressed final syllable - v_stress = 0; + v_stress = 1; } else { // unstressed syllable within a word - if((vowel_stress[v-1] != 1) || ((stressflags & 0x10000) == 0)) + if((vowel_stress[v-1] < 0) || ((stressflags & 0x10000) == 0)) { - v_stress = 1; /* change from 0 (unstressed) to 1 (diminished stress) */ + v_stress = 0; /* change to 0 (diminished stress) */ vowel_stress[v] = v_stress; } } } - if(v_stress > 0) - *output++ = stress_phonemes[v_stress]; // mark stress of all vowels except 0 (unstressed) + if((v_stress == 0) || (v_stress > 1)) + *output++ = stress_phonemes[v_stress]; // mark stress of all vowels except 1 (unstressed) if(vowel_stress[v] > max_stress) @@ -2830,39 +2832,39 @@ void ApplySpecialAttribute(Translator *tr, char *phonemes, int dict_flags) // common letter pairs, encode these as a single byte static const short pairs_ru[] = { -0x010c, // ла 21052 0x23 -0x010e, // на 18400 -0x0113, // та 14254 -0x0301, // ав 31083 -0x030f, // ов 13420 -0x060e, // не 21798 -0x0611, // ре 19458 -0x0903, // ви 16226 -0x0b01, // ак 14456 -0x0b0f, // ок 17836 -0x0c01, // ал 13324 -0x0c09, // ил 16877 -0x0e01, // ан 15359 -0x0e06, // ен 13543 0x30 -0x0e09, // ин 17168 -0x0e0e, // нн 15973 -0x0e0f, // он 22373 -0x0e1c, // ын 15052 -0x0f03, // во 24947 -0x0f11, // ро 13552 -0x0f12, // со 16368 -0x100f, // оп 19054 -0x1011, // рп 17067 -0x1101, // ар 23967 -0x1106, // ер 18795 -0x1109, // ир 13797 -0x110f, // ор 21737 -0x1213, // тс 25076 -0x1220, // яс 14310 +0x010c, // ла 21052 0x23 +0x010e, // на 18400 +0x0113, // та 14254 +0x0301, // ав 31083 +0x030f, // ов 13420 +0x060e, // не 21798 +0x0611, // ре 19458 +0x0903, // ви 16226 +0x0b01, // ак 14456 +0x0b0f, // ок 17836 +0x0c01, // ал 13324 +0x0c09, // ил 16877 +0x0e01, // ан 15359 +0x0e06, // ен 13543 0x30 +0x0e09, // ин 17168 +0x0e0e, // нн 15973 +0x0e0f, // он 22373 +0x0e1c, // ын 15052 +0x0f03, // во 24947 +0x0f11, // ро 13552 +0x0f12, // со 16368 +0x100f, // оп 19054 +0x1011, // рп 17067 +0x1101, // ар 23967 +0x1106, // ер 18795 +0x1109, // ир 13797 +0x110f, // ор 21737 +0x1213, // тс 25076 +0x1220, // яс 14310 0x7fff}; -//0x040f ог 12976 -//0x1306 ет 12826 -//0x0f0d мо 12688 +//0x040f ог 12976 +//0x1306 ет 12826 +//0x0f0d мо 12688 int TransposeAlphabet(char *text, int offset, int min, int max) @@ -2985,7 +2987,6 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor wlen = strlen(word); } - hash = HashDictionary(word); p = tr->dict_hashtab[hash]; diff --git a/src/espeak.cpp b/src/espeak.cpp index 766734e9..38f2b8a5 100644 --- a/src/espeak.cpp +++ b/src/espeak.cpp @@ -37,8 +37,8 @@ static const char *help_text = "\nspeak [options] [\"\"]\n\n" "-f Text file to speak\n" "--stdin Read text input from stdin instead of a file\n\n" -"If neither -f nor --stdin, are spoken, or if none then text is\n" -"spoken from stdin, each line separately.\n\n" +"If neither -f nor --stdin, then are spoken, or if none then text\n" +"is spoken from stdin, each line separately.\n\n" "-a \n" "\t Amplitude, 0 to 200, default is 100\n" "-g \n" @@ -63,11 +63,11 @@ static const char *help_text = "--stdout Write speech output to stdout\n" "--compile=\n" "\t Compile the pronunciation rules and dictionary in the current\n" -"\t directory. = is optional and specifies which language\n" +"\t directory. specifies the language\n" "--path=\"\"\n" "\t Specifies the directory containing the espeak-data directory\n" "--phonout=\"\"\n" -"\t Write output from -x -X commands and mbrola phoneme data to this file\n" +"\t Write output from -x -X commands, and mbrola phoneme data, to this file\n" "--punct=\"\"\n" "\t Speak the names of punctuation characters during speaking. If\n" "\t = is omitted, all punctuation is spoken.\n" @@ -78,7 +78,7 @@ static const char *help_text = "\t If is omitted, then list all voices.\n" "-k \n" "\t Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n" -"\t higher values = a pitch increase (try -k20).\n"; +"\t higher values indicate a pitch increase (try -k20).\n"; diff --git a/src/espeakedit.cpp b/src/espeakedit.cpp index 216f071a..ddaaba43 100755 --- a/src/espeakedit.cpp +++ b/src/espeakedit.cpp @@ -62,7 +62,7 @@ extern void ConvertToUtf8(); extern void FormatDictionary(const char *dictname); extern void init_z(); -extern void CompileInit(void); +extern void CompilePhonemeData(void); extern void CompileMbrola(); extern void InitSpectrumDisplay(); extern void InitProsodyDisplay(); @@ -146,7 +146,7 @@ extern void VoiceReset(int control); if(strcmp(param,"--compile")==0) { - CompileInit(); + CompilePhonemeData(); exit(0); } } @@ -558,7 +558,7 @@ void MyFrame::OnTools(wxCommandEvent& event) break; case MENU_COMPILE_PH: - CompileInit(); + CompilePhonemeData(); break; case MENU_COMPILE_MBROLA: diff --git a/src/extras.cpp b/src/extras.cpp index dc453958..2b788906 100644 --- a/src/extras.cpp +++ b/src/extras.cpp @@ -232,7 +232,7 @@ static void DecodePhonemes2(const char *inptr, char *outptr) if((ph = phoneme_tab[phcode]) == NULL) continue; - if((ph->type == phSTRESS) && (ph->std_length <= 4) && (ph->spect == 0)) + if((ph->type == phSTRESS) && (ph->std_length <= 4) && (ph->program == 0)) { if(ph->std_length > 2) *outptr++ = stress_chars[ph->std_length]; @@ -305,7 +305,7 @@ void Lexicon_It(int pass) FILE *f_in; FILE *f_out; FILE *f_listx; - FILE *f_list_in; + FILE *f_list_in = NULL; long int displ; const char *alt_string; char buf[200]; @@ -1322,8 +1322,8 @@ void FormatDictionary(const char *dictname) char *p_start; unsigned short *pw; unsigned short *pw_match; - unsigned short *pw_post; - unsigned short *pw_phonemes; + unsigned short *pw_post = NULL; + unsigned short *pw_phonemes = NULL; int c; int ix; int n_pre; @@ -1733,6 +1733,7 @@ void Test2() const char* text1 = "Hello world. Testing."; +extern void TestCompile2(void); void TestTest(int control) {//======================= @@ -1747,8 +1748,6 @@ void TestTest(int control) //CharsetToUnicode("ISO-8859-4"); //CharsetToUnicode("ISCII"); -return; - if(control==2) { return; @@ -1778,8 +1777,8 @@ if(control==2) espeak_SetSynthCallback(TestSynthCallback); espeak_SetUriCallback(TestUriCallback); - espeak_Synth(text1, strlen(text1)+1, 0, POS_CHARACTER, 0, espeakSSML|espeakCHARS_UTF8, &unique_identifier, (void *)user_data); - espeak_Synth(text1, strlen(text1)+1, 0, POS_CHARACTER, 0, espeakSSML|espeakCHARS_UTF8, &unique_identifier, (void *)(user_data+1)); + espeak_Synth(textbuf, strlen(textbuf)+1, 0, POS_CHARACTER, 0, espeakSSML|espeakCHARS_UTF8, &unique_identifier, (void *)user_data); +// espeak_Synth(text1, strlen(text1)+1, 0, POS_CHARACTER, 0, espeakSSML|espeakCHARS_UTF8, &unique_identifier, (void *)(user_data+1)); espeak_SetParameter(espeakPUNCTUATION, 1, 0); espeak_Synchronize(); diff --git a/src/intonation.cpp b/src/intonation.cpp index d35ae1b6..164c94cc 100755 --- a/src/intonation.cpp +++ b/src/intonation.cpp @@ -840,7 +840,7 @@ static void CalcPitches_Tone(Translator *tr, int clause_tone) p->tone_ph = PhonemeCode2('4','4'); // tone 5 is unstressed (shorter) - p->stresslevel = 1; // diminished stress + p->stresslevel = 0; // diminished stress } } @@ -859,7 +859,7 @@ static void CalcPitches_Tone(Translator *tr, int clause_tone) { tone_ph = p->tone_ph; - if(p->stresslevel != 1) // TEST, consider all syllables as stressed + if(p->stresslevel != 0) // TEST, consider all syllables as stressed { if(ix == final_stressed) { diff --git a/src/klatt.cpp b/src/klatt.cpp index 2768ceb6..955540c6 100644 --- a/src/klatt.cpp +++ b/src/klatt.cpp @@ -241,8 +241,6 @@ static int parwave(klatt_frame_ptr frame) static double sourc; int ix; - frame_init(frame); /* get parameters for next frame of speech */ - flutter(frame); /* add f0 flutter */ #ifdef LOG_FRAMES @@ -468,7 +466,7 @@ if(option_log_frames) { temp = 32767.0; } - + *out_ptr++ = int(temp); *out_ptr++ = int(temp) >> 8; sample_count++; @@ -483,28 +481,36 @@ if(option_log_frames) -/* -function PARWAVE_INIT -Initialises all parameters used in parwave, sets resonator internal memory -to zero. -*/ - -static void reset_resonators() +void KlattReset(int control) { int r_ix; -#ifdef LOG_FRAMES -if(option_log_frames) -{ - FILE *f_log; - f_log=fopen("log-klatt","a"); - if(f_log != NULL) + + if(control == 2) { - fprintf(f_log,"Reset\n"); - fclose(f_log); + //Full reset + kt_globals.FLPhz = (950 * kt_globals.samrate) / 10000; + kt_globals.BLPhz = (630 * kt_globals.samrate) / 10000; + kt_globals.minus_pi_t = -PI / kt_globals.samrate; + kt_globals.two_pi_t = -2.0 * kt_globals.minus_pi_t; + setabc(kt_globals.FLPhz,kt_globals.BLPhz,&(kt_globals.rsn[RLP])); + + } + + if(control > 0) + { + kt_globals.nper = 0; + kt_globals.T0 = 0; + kt_globals.nopen = 0; + kt_globals.nmod = 0; + + for(r_ix=RGL; r_ix < N_RSN; r_ix++) + { + kt_globals.rsn[r_ix].p1 = 0; + kt_globals.rsn[r_ix].p2 = 0; + } + } -} -#endif for(r_ix=0; r_ix <= R6p; r_ix++) { @@ -514,22 +520,6 @@ if(option_log_frames) } -void KlattReset() -{ - kt_globals.FLPhz = (950 * kt_globals.samrate) / 10000; - kt_globals.BLPhz = (630 * kt_globals.samrate) / 10000; - kt_globals.minus_pi_t = -PI / kt_globals.samrate; - kt_globals.two_pi_t = -2.0 * kt_globals.minus_pi_t; - setabc(kt_globals.FLPhz,kt_globals.BLPhz,&(kt_globals.rsn[RLP])); - kt_globals.nper = 0; - kt_globals.T0 = 0; - kt_globals.nopen = 0; - kt_globals.nmod = 0; - - reset_resonators(); -} - - /* function FRAME_INIT @@ -996,6 +986,7 @@ int Wavegen_Klatt(int resume) int pk; int x; int ix; + int fade; if(resume==0) { @@ -1071,22 +1062,37 @@ int Wavegen_Klatt(int resume) if(kt_globals.nspfr > STEPSIZE) kt_globals.nspfr = STEPSIZE; + frame_init(&kt_frame); /* get parameters for next frame of speech */ + if(parwave(&kt_frame) == 1) { - return(1); + return(1); // output buffer is full } } - if(end_wave == 1) + if(end_wave > 0) { +#ifdef deleted + if(end_wave == 2) + { + fade = (kt_globals.T0 - kt_globals.nper)/4; // samples until end of current cycle + if(fade < 64) + fade = 64; + } + else +#endif + { + fade = 64; // not followd by formant synthesis + } + // fade out to avoid a click - kt_globals.fadeout = 64; + kt_globals.fadeout = fade; end_wave = 0; - sample_count -= 64; - kt_globals.nspfr = 64; + sample_count -= fade; + kt_globals.nspfr = fade; if(parwave(&kt_frame) == 1) { - return(1); + return(1); // output buffer is full } } @@ -1100,6 +1106,7 @@ void SetSynth_Klatt(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v DOUBLEX next; int qix; int cmd; + frame_t *fr3; static frame_t prev_fr; if(wvoice != NULL) @@ -1129,6 +1136,17 @@ void SetSynth_Klatt(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v if(cmd==WCMD_KLATT) { end_wave = 0; // next wave generation is from another spectrum + + fr3 = (frame_t *)wcmdq[qix][2]; + for(ix=1; ix<6; ix++) + { + if(fr3->ffreq[ix] != fr2->ffreq[ix]) + { + // there is a discontinuity in formants + end_wave = 2; + break; + } + } break; } if((cmd==WCMD_WAVE) || (cmd==WCMD_PAUSE)) @@ -1162,39 +1180,18 @@ if(option_log_frames) if(control & 1) { - if(wdata.prev_was_synth == 0) + for(ix=1; ix<6; ix++) { - // A break, not following on from another synthesized sound. - // Reset the synthesizer - KlattReset(); - } - else - { - for(ix=1; ix<6; ix++) + if(prev_fr.ffreq[ix] != fr1->ffreq[ix]) { - if(prev_fr.ffreq[ix] != fr1->ffreq[ix]) - { - // Discontinuity in formants. - // fade out to avoid a click, but only up to the end of output buffer - ix = (out_end - out_ptr)/2; - if(ix > 64) - ix = 64; - kt_globals.fadeout = ix; - kt_globals.nspfr = ix; - parwave(&kt_frame); - reset_resonators(); - break; - } + // Discontinuity in formants. + // end_wave was set in SetSynth_Klatt() to fade out the previous frame + KlattReset(0); + break; } } - wdata.prev_was_synth = 1; memcpy(&prev_fr,fr2,sizeof(prev_fr)); } - if(fr2->frflags & FRFLAG_BREAK) - { -// fr2 = fr1; -// reset_resonators(&kt_globals); - } for(ix=0; ixphonemes -static int ChangePhonemes(Translator *tr, PHONEME_LIST2 *phlist, int n_ph, int index, PHONEME_TAB *ph, CHANGEPH *ch) -{//================================================================================================================= -// Called for each phoneme in the phoneme list, to allow a language to make changes -// ph The current phoneme - - if(tr->translator_name == L('r','u')) - return(ChangePhonemes_ru(tr, phlist, n_ph, index, ph, ch)); - - return(0); -} - - -static int SubstitutePhonemes(Translator *tr, PHONEME_LIST2 *plist_out) -{//==================================================================== +static int SubstitutePhonemes(Translator *tr, PHONEME_LIST *plist_out) +{//=================================================================== // Copy the phonemes list and perform any substitutions that are required for the // current voice int ix; @@ -59,14 +47,8 @@ static int SubstitutePhonemes(Translator *tr, PHONEME_LIST2 *plist_out) int replace_flags; int n_plist_out = 0; int word_end; - int max_stress = -1; int switched_language = 0; - int max_stress_posn=0; - int n_syllables = 0; - int syllable = 0; - int syllable_stressed = 0; PHONEME_LIST2 *plist2; - PHONEME_LIST2 *pl; PHONEME_TAB *next=NULL; for(ix=0; (ix < n_ph_list2) && (n_plist_out < N_PHONEME_LIST); ix++) @@ -86,66 +68,6 @@ static int SubstitutePhonemes(Translator *tr, PHONEME_LIST2 *plist_out) if((plist2+1)->sourceix || ((next != 0) && (next->type == phPAUSE))) word_end = 1; // this phoneme is the end of a word - if(tr->langopts.phoneme_change != 0) - { - // this language does changes to phonemes after translation - - if(plist2->sourceix) - { - // start of a word, find the stressed vowel - syllable = 0; - syllable_stressed = 0; - n_syllables = 0; - - max_stress = -1; - max_stress_posn = ix; - for(k=ix; k < n_ph_list2; k++) - { - if(((pl = &ph_list2[k])->sourceix != 0) && (k > ix)) - break; - - pl->stresslevel &= 0xf; - - if(phoneme_tab[pl->phcode]->type == phVOWEL) - { - n_syllables++; - - if(pl->stresslevel > max_stress) - { - syllable_stressed = n_syllables; - max_stress = pl->stresslevel; - max_stress_posn = k; - } - } - } - } - - if(phoneme_tab[plist2->phcode]->type == phVOWEL) - { - syllable++; - } - - // make any language specific changes - int flags; - CHANGEPH ch; - flags = 0; - if(ix == max_stress_posn) - flags |= 2; - if(ix > max_stress_posn) - flags |= 4; - if(ph_list2[ix].synthflags & SFLAG_DICTIONARY) - flags |= 8; - ch.flags = flags | word_end; - - ch.stress = plist2->stresslevel; - ch.stress_highest = max_stress; - ch.n_vowels = n_syllables; - ch.vowel_this = syllable; - ch.vowel_stressed = syllable_stressed; - - ChangePhonemes(tr, ph_list2, n_ph_list2, ix, phoneme_tab[ph_list2[ix].phcode], &ch); - } - // check whether a Voice has specified that we should replace this phoneme for(k=0; kphflags & phALTERNATIVE)==phSWITCHVOICING)) + if((voicing==2) && (ph->end_type != 0)) // use end_type field for voicing_switch for consonants { - plist2[j].phcode = ph->alternative_ph; // change to voiced equivalent + plist2[j].phcode = ph->end_type; // change to voiced equivalent } } else @@ -284,9 +211,9 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) voicing = 2; } else - if((voicing==1) && ((ph->phflags & phALTERNATIVE)==phSWITCHVOICING)) + if((voicing==1) && (ph->end_type != 0)) { - plist2[j].phcode = ph->alternative_ph; // change to unvoiced equivalent + plist2[j].phcode = ph->end_type; // change to unvoiced equivalent } } else @@ -310,47 +237,56 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) } } - n_ph_list2 = SubstitutePhonemes(tr,ph_list3) - 2; + n_ph_list3 = SubstitutePhonemes(tr,ph_list3) - 2; // transfer all the phonemes of the clause into phoneme_list ph = phoneme_tab[phonPAUSE]; + ph_list3[0].ph = ph; + switched_language = 0; - for(j=0; insert_ph || ((j < n_ph_list2) && (ix < N_PHONEME_LIST-3)); j++) + for(j=0; insert_ph || ((j < n_ph_list3) && (ix < N_PHONEME_LIST-3)); j++) { prev = ph; - plist2 = &ph_list3[j]; + plist3 = &ph_list3[j]; if(insert_ph != 0) { // we have a (linking) phoneme which we need to insert here - next = phoneme_tab[plist2->phcode]; // this phoneme, i.e. after the insert + next = phoneme_tab[plist3->phcode]; // this phoneme, i.e. after the insert // re-use the previous entry for the inserted phoneme. - // That's OK because we don't look backwards from plist2 + // That's OK because we don't look backwards from plist3 j--; - plist2 = plist2_inserted = &ph_list3[j]; - memset(plist2, 0, sizeof(*plist2)); - plist2->phcode = insert_ph; + plist3 = plist3_inserted = &ph_list3[j]; + if(j > 0) + { + memcpy(&plist3[-1], &plist3[0], sizeof(*plist3)); + } + memset(&plist3[0], 0, sizeof(*plist3)); + plist3->phcode = insert_ph; ph = phoneme_tab[insert_ph]; + plist3->ph = ph; insert_ph = 0; } else { // otherwise get the next phoneme from the list - ph = phoneme_tab[plist2->phcode]; + ph = phoneme_tab[plist3->phcode]; + plist3[0].ph = ph; - if(plist2->phcode == phonSWITCH) + if(plist3->phcode == phonSWITCH) { // change phoneme table - SelectPhonemeTable(plist2->tone_ph); + SelectPhonemeTable(plist3->tone_ph); switched_language ^= SFLAG_SWITCHED_LANG; } - next = phoneme_tab[(plist2+1)->phcode]; // the phoneme after this one + next = phoneme_tab[plist3[1].phcode]; // the phoneme after this one + plist3[1].ph = next; } - if(plist2->sourceix) + if(plist3->sourceix) { // start of a word int k; @@ -358,7 +294,7 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) first_vowel = 1; // find the highest stress level in this word - for(k=j+1; k < n_ph_list2; k++) + for(k=j+1; k < n_ph_list3; k++) { if(ph_list3[k].sourceix) break; // start of the next word @@ -366,14 +302,46 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) if(ph_list3[k].stresslevel > word_stress) word_stress = ph_list3[k].stresslevel; } + while(--k >= j) + { + ph_list3[k].wordstress = word_stress; + } } if(ph == NULL) continue; + InterpretPhoneme(tr, 0x100, plist3, &phdata); + + if((alternative = phdata.pd_param[pd_CHANGEPHONEME]) == 1) + continue; // NULL phoneme, discard + + if(alternative > 1) + { + PHONEME_TAB *ph2; + ph2 = ph; + ph = phoneme_tab[alternative]; + plist3->phcode = alternative; + plist3->ph = ph; + + if(ph->type == phVOWEL) + { + plist3->synthflags |= SFLAG_SYLLABLE; + if(ph2->type != phVOWEL) + plist3->stresslevel = 0; // change from non-vowel to vowel, make sure it's unstressed + } + else + plist3->synthflags &= ~SFLAG_SYLLABLE; + + // re-interpret the changed phoneme + // But it doesn't obey a second ChangePhoneme() + InterpretPhoneme(tr, 0x100, plist3, &phdata); + } + if(ph->type == phVOWEL) { - // check for consecutive unstressed syllables - if(plist2->stresslevel == 0) + // Check for consecutive unstressed syllables, even across word boundaries. + // Do this after changing phonemes according to stress level. + if(plist3->stresslevel == 1) { // an unstressed vowel unstress_count++; @@ -381,14 +349,14 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) { // in a sequence of unstressed syllables, reduce alternate syllables to 'diminished' // stress. But not for the last phoneme of a stressed word - if((tr->langopts.stress_flags & 0x2) || ((word_stress > 3) && ((plist2+1)->sourceix!=0))) + if((tr->langopts.stress_flags & 0x2) || ((word_stress > 3) && ((plist3+1)->sourceix!=0))) { // An unstressed final vowel of a stressed word unstress_count=1; // try again for next syllable } else { - plist2->stresslevel = 1; // change stress to 'diminished' + plist3->stresslevel = 0; // change stress to 'diminished' } } } @@ -398,82 +366,21 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) } } - alternative = 0; - - if(ph->alternative_ph > 0) - { - switch(ph->phflags & phALTERNATIVE) - { - // This phoneme changes if vowel follows, or doesn't follow, depending on its phNOTFOLLOWS flag - case phBEFORENOTVOWEL: - if(next->type != phVOWEL) - alternative = ph->alternative_ph; - break; - - case phBEFORENOTVOWEL2: // LANG=tr - if(((plist2+1)->sourceix != 0) || - ((next->type != phVOWEL) && ((phoneme_tab[(plist2+2)->phcode]->type != phVOWEL) || ((plist2+2)->sourceix != 0)))) - { - alternative = ph->alternative_ph; - } - break; - - case phBEFOREVOWELPAUSE: - if((next->type == phVOWEL) || (next->type == phPAUSE)) - alternative = ph->alternative_ph; - break; - - case phBEFOREVOWEL: - if(next->type == phVOWEL) - alternative = ph->alternative_ph; - break; - - case phBEFORE_R: - if(next->phflags & phRHOTIC) - { - alternative = ph->alternative_ph; - } - break; - } - } - if(ph->phflags & phBEFOREPAUSE) - { - if(next->type == phPAUSE) - alternative = ph->link_out; // replace with the link_out phoneme - } - - if(alternative == 1) - continue; // NULL phoneme, discard - - if(alternative > 1) - { - PHONEME_TAB *ph2; - ph2 = ph; - ph = phoneme_tab[alternative]; - - if(ph->type == phVOWEL) - { - plist2->synthflags |= SFLAG_SYLLABLE; - if(ph2->type != phVOWEL) - plist2->stresslevel = 0; // change from non-vowel to vowel, make sure it's unstressed - } - else - plist2->synthflags &= ~SFLAG_SYLLABLE; - } - +#ifdef deleted if(tr->langopts.param[LOPT_REDUCE_T]) { - if((ph->mnemonic == 't') && (plist2->sourceix == 0) && ((prev->type == phVOWEL) || (prev->mnemonic == 'n'))) + if((ph->mnemonic == 't') && (plist3->sourceix == 0) && ((prev->type == phVOWEL) || (prev->mnemonic == 'n'))) { - if(((plist2+1)->sourceix == 0) && ((plist2+1)->stresslevel < 3) && (next->type == phVOWEL)) + if(((plist3+1)->sourceix == 0) && ((plist3+1)->stress < 3) && (next->type == phVOWEL)) { ph = phoneme_tab[phonT_REDUCED]; } } } +#endif - - while((ph->reduce_to != 0) && (!(plist2->synthflags & SFLAG_DICTIONARY) || (tr->langopts.param[LOPT_REDUCE] & 1))) +#ifdef deleted + while((ph->reduce_to != 0) && (!(plist3->synthflags & SFLAG_DICTIONARY) || (tr->langopts.param[LOPT_REDUCE] & 1))) { int reduce_level; int stress_level; @@ -483,13 +390,13 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) if(ph->type == phVOWEL) { - stress_level = plist2->stresslevel; + stress_level = plist3->stress; } else { // consonant, get stress from the following vowel if(next->type == phVOWEL) - stress_level = (plist2+1)->stresslevel; + stress_level = (plist3+1)->stress; else break; } @@ -514,22 +421,23 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) else break; } +#endif if(ph->type == phVOWEL) first_vowel = 0; - if((plist2+1)->synthflags & SFLAG_LENGTHEN) + if((plist3+1)->synthflags & SFLAG_LENGTHEN) { static char types_double[] = {phFRICATIVE,phVFRICATIVE,phNASAL,phLIQUID,0}; if(strchr(types_double,next->type)) { // lengthen this consonant by doubling it insert_ph = next->code; - (plist2+1)->synthflags ^= SFLAG_LENGTHEN; + (plist3+1)->synthflags ^= SFLAG_LENGTHEN; } } - if((plist2+1)->sourceix != 0) + if((plist3+1)->sourceix != 0) { int x; @@ -562,7 +470,7 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) insert_ph = phonPAUSE_VSHORT; } - if(((plist2+1)->stresslevel >= 4) && (tr->langopts.vowel_pause & 0x100)) + if(((plist3+1)->stresslevel >= 4) && (tr->langopts.vowel_pause & 0x100)) { // pause before a words which starts with a stressed vowel insert_ph = phonPAUSE_SHORT; @@ -570,7 +478,7 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) } } - if(plist2 != plist2_inserted) + if(plist3 != plist3_inserted) { if((x = (tr->langopts.word_gap & 0x7)) != 0) { @@ -587,33 +495,12 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) } } - next2 = phoneme_tab[(plist2+2)->phcode]; + next2 = phoneme_tab[plist3[2].phcode]; + plist3[2].ph = next2; - if((insert_ph == 0) && (ph->link_out != 0) && !(ph->phflags & phBEFOREPAUSE) && (((plist2+1)->synthflags & SFLAG_EMBEDDED)==0)) + if((insert_ph == 0) && (phdata.pd_param[pd_APPENDPHONEME] != 0)) { - if(ph->phflags & phAPPENDPH) - { - // always append the specified phoneme, unless it already is the next phoneme - if((ph->link_out != (plist2+1)->phcode) && (next->type == phVOWEL)) -// if(ph->link_out != (plist2+1)->phcode) - { - insert_ph = ph->link_out; - } - } - else - if(((tr->langopts.word_gap & 8)==0) || ((plist2+1)->sourceix == 0)) - { - // This phoneme can be linked to a following vowel by inserting a linking phoneme - if(next->type == phVOWEL) - insert_ph = ph->link_out; - else - if(next->code == phonPAUSE_SHORT) - { - // Pause followed by Vowel, replace the Short Pause with the linking phoneme, - if(next2->type == phVOWEL) - (plist2+1)->phcode = ph->link_out; // replace pause by linking phoneme - } - } + insert_ph = phdata.pd_param[pd_APPENDPHONEME]; } if(ph->phflags & phVOICED) @@ -627,14 +514,16 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) phlist[ix].ph = ph; phlist[ix].type = ph->type; phlist[ix].env = PITCHfall; // default, can be changed in the "intonation" module - phlist[ix].synthflags = plist2->synthflags | switched_language; - phlist[ix].stresslevel = plist2->stresslevel & 0xf; - phlist[ix].tone_ph = plist2->tone_ph; + phlist[ix].synthflags = plist3->synthflags | switched_language; + phlist[ix].stresslevel = plist3->stresslevel & 0xf; + phlist[ix].wordstress = plist3->wordstress; + phlist[ix].tone_ph = plist3->tone_ph; phlist[ix].sourceix = 0; + phlist[ix].phcode = ph->code; - if(plist2->sourceix != 0) + if(plist3->sourceix != 0) { - phlist[ix].sourceix = plist2->sourceix; + phlist[ix].sourceix = plist3->sourceix; phlist[ix].newword = 1; // this phoneme is the start of a word if(start_sentence) @@ -648,7 +537,8 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) phlist[ix].newword = 0; } - phlist[ix].length = ph->std_length; +// phlist[ix].length = ph->std_length; + phlist[ix].length = phdata.pd_param[i_SET_LENGTH]*2; if((ph->code == phonPAUSE_LONG) && (option_wordgap > 0)) { phlist[ix].ph = phoneme_tab[phonPAUSE_SHORT]; @@ -669,12 +559,14 @@ void MakePhonemeList(Translator *tr, int post_pause, int start_sentence) } phlist[ix].newword = 2; // end of clause + phlist[ix].phcode = phonPAUSE; phlist[ix].type = phPAUSE; // terminate with 2 Pause phonemes phlist[ix].length = post_pause; // length of the pause, depends on the punctuation phlist[ix].sourceix = end_sourceix; phlist[ix].synthflags = 0; - phlist[ix++].ph = phoneme_tab[phonPAUSE]; + + phlist[ix].phcode = phonPAUSE; phlist[ix].type = phPAUSE; phlist[ix].length = 0; phlist[ix].sourceix=0; diff --git a/src/prosodydisplay.cpp b/src/prosodydisplay.cpp index 12759e31..1a4c290e 100755 --- a/src/prosodydisplay.cpp +++ b/src/prosodydisplay.cpp @@ -28,6 +28,7 @@ #include "phoneme.h" #include "synthesize.h" #include "prosodydisplay.h" +#include "translate.h" extern MyFrame *myframe; extern ChildFrProsody *prosodyframe; @@ -113,7 +114,7 @@ int ProsodyDisplay::GetWidth(PHONEME_LIST *p) if(p->ph == NULL) return(0); - w = p->ph->std_length; + w = (p->ph->std_length * 2); if(w == 0) w = 60; if(p->length != 0) @@ -334,6 +335,7 @@ void ProsodyDisplay::DrawEnv(wxDC& dc, int x1, int y1, int width, PHONEME_LIST * int x,y; int y2=0; unsigned char *env; + PHONEME_DATA phdata_tone; if(width <= 0) return; @@ -354,7 +356,8 @@ void ProsodyDisplay::DrawEnv(wxDC& dc, int x1, int y1, int width, PHONEME_LIST * if((ph->type == phVOWEL) && (ph->tone_ph != 0)) { // the envelope is given by a Tone phoneme acting on this vowel - env = LookupEnvelope(phoneme_tab[ph->tone_ph]->spect); + InterpretPhoneme2(ph->tone_ph, &phdata_tone); + env = LookupEnvelope(phdata_tone.pitch_env); } for(ix=0; ix<=width; ix+=4) diff --git a/src/setlengths.cpp b/src/setlengths.cpp index 6fce8ed4..6d4c4335 100755 --- a/src/setlengths.cpp +++ b/src/setlengths.cpp @@ -298,6 +298,7 @@ void CalcLengths(Translator *tr) int emphasized; int tone_mod; unsigned char *pitch_env=NULL; + PHONEME_DATA phdata_tone; for(ix=1; ixamp = tr->stress_amps[1]; // unless changed later + p->amp = tr->stress_amps[0]; // unless changed later p->length = 256; // TEMPORARY min_drop = 0; @@ -474,6 +475,10 @@ void CalcLengths(Translator *tr) if(stress > 7) stress = 7; +if(stress <= 1) +{ + stress = stress ^ 1; // swap diminished and unstressed (until we swap stress_amps,stress_lengths in tr_languages) +} if(pre_sonorant) p->amp = tr->stress_amps[stress]-1; else @@ -562,7 +567,7 @@ void CalcLengths(Translator *tr) { length_mod += 20; } - + if((len = tr->stress_lengths[stress]) == 0) len = tr->stress_lengths[6]; @@ -580,7 +585,7 @@ void CalcLengths(Translator *tr) if(end_of_clause == 2) { // this is the last syllable in the clause, lengthen it - more for short vowels - len = p->ph->std_length; + len = (p->ph->std_length * 2); if(tr->langopts.stress_flags & 0x40000) len=200; // don't lengthen short vowels more than long vowels at end-of-clause length_mod = length_mod * (256 + (280 - len)/3)/256; @@ -608,7 +613,8 @@ if(p->type != phVOWEL) if(p->tone_ph != 0) { - pitch_env = LookupEnvelope(phoneme_tab[p->tone_ph]->spect); + InterpretPhoneme2(p->tone_ph, &phdata_tone); + pitch_env = LookupEnvelope(phdata_tone.pitch_env); } else { diff --git a/src/speak.cpp b/src/speak.cpp index 8ad86ca7..2ed30f56 100755 --- a/src/speak.cpp +++ b/src/speak.cpp @@ -69,8 +69,8 @@ static const char *help_text = "\nspeak [options] [\"\"]\n\n" "-f Text file to speak\n" "--stdin Read text input from stdin instead of a file\n\n" -"If neither -f nor --stdin, are spoken, or if none then text is\n" -"spoken from stdin, each line separately.\n\n" +"If neither -f nor --stdin, then are spoken, or if none then text\n" +"is spoken from stdin, each line separately.\n\n" "-a \n" "\t Amplitude, 0 to 200, default is 100\n" "-g \n" @@ -95,11 +95,11 @@ static const char *help_text = "--stdout Write speech output to stdout\n" "--compile=\n" "\t Compile the pronunciation rules and dictionary in the current\n" -"\t directory. = is optional and specifies which language\n" +"\t directory. specifies the language\n" "--path=\"\"\n" "\t Specifies the directory containing the espeak-data directory\n" "--phonout=\"\"\n" -"\t Write output from -x -X commands and mbrola phoneme data to this file\n" +"\t Write output from -x -X commands, and mbrola phoneme data, to this file\n" "--punct=\"\"\n" "\t Speak the names of punctuation characters during speaking. If\n" "\t = is omitted, all punctuation is spoken.\n" @@ -110,7 +110,7 @@ static const char *help_text = "\t If is omitted, then list all voices.\n" "-k \n" "\t Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n" -"\t higher values = a pitch increase (try -k20).\n"; +"\t higher values indicate a pitch increase (try -k20).\n"; void DisplayVoices(FILE *f_out, char *language); diff --git a/src/spectdisplay.cpp b/src/spectdisplay.cpp index d170561c..46c72db0 100755 --- a/src/spectdisplay.cpp +++ b/src/spectdisplay.cpp @@ -171,6 +171,7 @@ void SpectDisplay::OnActivate(int active) } else { + formantdlg->GetValues(spectseq, sframe); ReadDialogValues(); } } diff --git a/src/spectseq.cpp b/src/spectseq.cpp index 1b55f3a6..c383d6d7 100755 --- a/src/spectseq.cpp +++ b/src/spectseq.cpp @@ -41,7 +41,7 @@ extern int Wavegen_Klatt(int resume); extern void SetSynth(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v); extern int Wavegen(); extern void CloseWaveFile2(); -extern void KlattReset(); +extern void KlattReset(int control); extern FILE *f_wave; static int frame_width; @@ -1006,7 +1006,7 @@ void SpectSeq::MakeWave(int start, int end, PitchEnvelope &pitch) if(voice->klattv[0]) { synthesizer_type = 1; - KlattReset(); + KlattReset(2); } SpeakNextClause(NULL,NULL,2); // stop speaking file @@ -1125,7 +1125,7 @@ void SpectFrame::MakeWaveF(int control, PitchEnvelope &pitche, int amplitude, in if(voice->klattv[0]) { synthesizer_type = 1; - KlattReset(); + KlattReset(2); } SpeakNextClause(NULL,NULL,2); // stop speaking file diff --git a/src/synth_mbrola.cpp b/src/synth_mbrola.cpp index 1055f549..29873079 100755 --- a/src/synth_mbrola.cpp +++ b/src/synth_mbrola.cpp @@ -540,6 +540,8 @@ void MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, FILE *f_mbrola) PHONEME_LIST *p; PHONEME_LIST *next; PHONEME_LIST *prev; + PHONEME_DATA phdata; + FMT_PARAMS fmtp; int pause = 0; int released; int name2; @@ -655,10 +657,11 @@ void MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, FILE *f_mbrola) if(next->type==phVOWEL) released = 1; if(next->type==phLIQUID && !next->newword) released = 1; - if(released) - len = DoSample(p->ph,next->ph,2,0,-1); - else - len = DoSample(p->ph,phoneme_tab[phonPAUSE],2,0,-1); + if(released == 0) + p->synthflags |= SFLAG_NEXT_PAUSE; + InterpretPhoneme(NULL, 0, p, &phdata); + len = DoSample3(&phdata, 0, -1); + len = (len * 1000)/samplerate; // convert to mS len += PauseLength(p->prepause,1); break; @@ -669,9 +672,10 @@ void MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, FILE *f_mbrola) case phFRICATIVE: len = 0; + InterpretPhoneme(NULL, 0, p, &phdata); if(p->synthflags & SFLAG_LENGTHEN) - len = DoSample(ph,ph_next,2,p->length,-1); // play it twice for [s:] etc. - len += DoSample(ph,ph_next,2,p->length,-1); + len = DoSample3(&phdata, p->length, -1); // play it twice for [s:] etc. + len += DoSample3(&phdata, p->length, -1); len = (len * 1000)/samplerate; // convert to mS break; @@ -679,7 +683,12 @@ void MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, FILE *f_mbrola) case phNASAL: if(next->type != phVOWEL) { - len = DoSpect(p->ph,prev->ph,phoneme_tab[phonPAUSE],2,p,-1); + memset(&fmtp, 0, sizeof(fmtp)); + InterpretPhoneme(NULL, 0, p, &phdata); + fmtp.fmt_addr = phdata.sound_addr[pd_FMT]; + fmtp.fmt_length = phdata.sound_param[pd_FMT]; + len = DoSpect2(p->ph, 0, &fmtp, p, -1); +// len = DoSpect(p->ph,prev->ph,phoneme_tab[phonPAUSE],2,p,-1); len = (len * 1000)/samplerate; if(next->type == phPAUSE) len += 50; diff --git a/src/synthdata.cpp b/src/synthdata.cpp index 8ce681a0..48cbb3b3 100755 --- a/src/synthdata.cpp +++ b/src/synthdata.cpp @@ -35,8 +35,8 @@ #include "translate.h" #include "wave.h" -const char *version_string = "1.42.09 13.Dec.09"; -const int version_phdata = 0x014200; +const char *version_string = "1.42.21 19.Dec.09"; +const int version_phdata = 0x014220; int option_device_number = -1; FILE *f_logespeak = NULL; @@ -48,7 +48,7 @@ int current_phoneme_table; PHONEME_TAB *phoneme_tab[N_PHONEME_TAB]; unsigned char phoneme_tab_flags[N_PHONEME_TAB]; // bit 0: not inherited -static unsigned int *phoneme_index=NULL; +static USHORT *phoneme_index=NULL; char *spects_data=NULL; unsigned char *wavefile_data=NULL; static unsigned char *phoneme_tab_data = NULL; @@ -116,7 +116,7 @@ int LoadPhData() if((phoneme_tab_data = (unsigned char *)ReadPhFile((void *)(phoneme_tab_data),"phontab")) == NULL) return(-1); - if((phoneme_index = (unsigned int *)ReadPhFile((void *)(phoneme_index),"phonindex")) == NULL) + if((phoneme_index = (USHORT *)ReadPhFile((void *)(phoneme_index),"phonindex")) == NULL) return(-1); if((spects_data = ReadPhFile((void *)(spects_data),"phondata")) == NULL) return(-1); @@ -204,172 +204,9 @@ int LookupPhonemeString(const char *string) -static unsigned int LookupSound2(int index, unsigned int other_phcode, int control) -{//================================================================================ -// control=1 get formant transition data only - unsigned int code; - unsigned int value, value2; - - while((value = phoneme_index[index++]) != 0) - { - if((code = (value & 0xff)) == other_phcode) - { - while(((value2 = phoneme_index[index]) != 0) && ((value2 & 0xff) < 8)) - { - switch(value2 & 0xff) - { - case 0: - // next entry is a wavefile to be played along with the synthesis - if(control==0) - { - wavefile_ix = value2 >> 8; - } - break; - case 1: - if(control==0) - { - seq_len_adjust = value2 >> 8; - } - break; - case 2: - if(control==0) - { - seq_len_adjust = value2 >> 8; - seq_len_adjust = -seq_len_adjust; - } - break; - case 3: - if(control==0) - { - wavefile_amp = value2 >> 8; - } - break; - case 4: - // formant transition data, 2 words - vowel_transition[0] = value2 >> 8; - vowel_transition[1] = phoneme_index[index++ + 1]; - break; - case 5: - // formant transition data, 2 words - vowel_transition[2] = value2 >> 8; - vowel_transition[3] = phoneme_index[index++ + 1]; - break; - } - index++; - } - return(value >> 8); - } - else - if((code == 4) || (code == 5)) - { - // formant transition data, ignore next word of data - index++; - } - } - return(3); // not found -} // end of LookupSound2 - - -unsigned int LookupSound(PHONEME_TAB *this_ph, PHONEME_TAB *other_ph, int which, int *match_level, int control) -{//============================================================================================================ - // follows, 1 other_ph preceeds this_ph, 2 other_ph follows this_ph - // control: 1= get formant transition data only - int spect_list; - int spect_list2; - int s_list; - unsigned char virtual_ph; - int result; - int level=0; - unsigned int other_code; - unsigned int other_virtual; - - if(control==0) - { - wavefile_ix = 0; - wavefile_amp = 32; - seq_len_adjust = 0; - } - memset(vowel_transition,0,sizeof(vowel_transition)); - - other_code = other_ph->code; - if(phoneme_tab[other_code]->type == phPAUSE) - other_code = phonPAUSE_SHORT; // use this version of Pause for matching - - if(which==1) - { - spect_list = this_ph->after; - virtual_ph = this_ph->start_type; - spect_list2 = phoneme_tab[virtual_ph]->after; - other_virtual = other_ph->end_type; - } - else - { - spect_list = this_ph->before; - virtual_ph = this_ph->end_type; - spect_list2 = phoneme_tab[virtual_ph]->before; - other_virtual = other_ph->start_type; - } - - result = 3; - // look for ph1-ph2 combination - if((s_list = spect_list) != 0) - { - if((result = LookupSound2(s_list,other_code,control)) != 3) - { - level = 2; - } - else - if(other_virtual != 0) - { - if((result = LookupSound2(spect_list,other_virtual,control)) != 3) - { - level = 1; - } - } - } - // not found, look in a virtual phoneme if one is given for this phoneme - if((result==3) && (virtual_ph != 0) && ((s_list = spect_list2) != 0)) - { - if((result = LookupSound2(s_list,other_code,control)) != 3) - { - level = 1; - } - else - if(other_virtual != 0) - { - if((result = LookupSound2(spect_list2,other_virtual,control)) != 3) - { - level = 1; - } - } - } - - if(match_level != NULL) - *match_level = level; - - if(result==0) - return(0); // NULL was given in the phoneme source - - // note: values = 1 indicates use the default for this phoneme, even though we found a match - // which set a secondary reference - if(result >= 4) - { - // values 1-3 can be used for special codes - // 1 = DFT from the phoneme source file - return(result); - } - - // no match found for other_ph, return the default - return(LookupSound2(this_ph->spect,phonPAUSE,control)); - -} // end of LookupSound - - - -frameref_t *LookupSpect(PHONEME_TAB *this_ph, PHONEME_TAB *prev_ph, PHONEME_TAB *next_ph, - int which, int *match_level, int *n_frames, PHONEME_LIST *plist) -{//========================================================================================================= +frameref_t *LookupSpect(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, int *n_frames, PHONEME_LIST *plist) +{//=================================================================================================================== int ix; int nf; int nf1; @@ -380,19 +217,10 @@ frameref_t *LookupSpect(PHONEME_TAB *this_ph, PHONEME_TAB *prev_ph, PHONEME_TAB int length_factor; SPECT_SEQ *seq, *seq2; SPECT_SEQK *seqk, *seqk2; - PHONEME_TAB *next2_ph; frame_t *frame; static frameref_t frames_buf[N_SEQ_FRAMES]; - PHONEME_TAB *other_ph; - if(which == 1) - other_ph = prev_ph; - else - other_ph = next_ph; - - if((ix = LookupSound(this_ph,other_ph,which,match_level,0)) < 4) - return(NULL); - seq = (SPECT_SEQ *)(&spects_data[ix]); + seq = (SPECT_SEQ *)(&spects_data[fmt_params->fmt_addr]); seqk = (SPECT_SEQK *)seq; nf = seq->n_frames; @@ -400,8 +228,8 @@ frameref_t *LookupSpect(PHONEME_TAB *this_ph, PHONEME_TAB *prev_ph, PHONEME_TAB if(nf >= N_SEQ_FRAMES) nf = N_SEQ_FRAMES - 1; + seq_len_adjust = fmt_params->fmt2_lenadj + fmt_params->fmt_length; seq_break = 0; - length1 = 0; for(ix=0; ixtype == phVOWEL) + if((this_ph->type == phVOWEL) && (fmt_params->fmt2_addr == 0) && (fmt_params->use_vowelin)) { - if((which==2) && ((frames[nf-1].frflags & FRFLAG_BREAK) == 0)) - { - // lookup formant transition for the following phoneme - - if((*match_level == 0) || (next_ph->type == phNASAL)) - { - LookupSound(next_ph,this_ph,1,NULL,1); - seq_len_adjust += FormantTransition2(frames,nf,vowel_transition[2],vowel_transition[3],next_ph,which); - } - else - if(next_ph->phflags == phVOWEL2) - { - // not really a consonant, rather a coloured vowel - if(LookupSound(next_ph,this_ph,1,NULL,1) == 0) - { - next2_ph = plist[2].ph; - LookupSound(next2_ph,next_ph,1,NULL,1); - seq_len_adjust += FormantTransition2(frames,nf,vowel_transition[2],vowel_transition[3],next2_ph,which); - } - } - } - else - { - if(*match_level == 0) - seq_len_adjust = FormantTransition2(frames,nf,vowel_transition0,vowel_transition1,prev_ph,which); - } + seq_len_adjust += FormantTransition2(frames,nf,fmt_params->transition0,fmt_params->transition1,NULL,which); } + length1 = 0; nf1 = nf - 1; for(ix=0; ixfmt2_addr != 0) { // a secondary reference has been returned, which is not a wavefile // add these spectra to the main sequence - seq2 = (SPECT_SEQ *)(&spects_data[wavefile_ix]); + seq2 = (SPECT_SEQ *)(&spects_data[fmt_params->fmt2_addr]); seqk2 = (SPECT_SEQK *)seq2; // first frame of the addition just sets the length of the last frame of the main seq @@ -493,18 +296,18 @@ frameref_t *LookupSpect(PHONEME_TAB *this_ph, PHONEME_TAB *prev_ph, PHONEME_TAB wavefile_ix = 0; } - if((this_ph->type == phVOWEL) && (length1 > 0)) + if(length1 > 0) { if(which==2) { // adjust the length of the main part to match the standard length specified for the vowel // less the front part of the vowel and any added suffix - - length_std = this_ph->std_length + seq_len_adjust - 45; + + length_std = fmt_params->std_length + seq_len_adjust - 45; if(length_std < 10) length_std = 10; if(plist->synthflags & SFLAG_LENGTHEN) - length_std += phoneme_tab[phonLENGTHEN]->std_length; // phoneme was followed by an extra : symbol + length_std += (phoneme_tab[phonLENGTHEN]->std_length * 2); // phoneme was followed by an extra : symbol // can adjust vowel length for stressed syllables here @@ -518,22 +321,29 @@ frameref_t *LookupSpect(PHONEME_TAB *this_ph, PHONEME_TAB *prev_ph, PHONEME_TAB } else { - // front of a vowel - if(*match_level == 0) + if(which == 1) { - // allow very short vowels to have shorter front parts - if(this_ph->std_length < 130) - frames[0].length = (frames[0].length * this_ph->std_length)/130; + // front of a vowel + if(fmt_params->fmt_control == 1) + { + // This is the default start of a vowel. + // Allow very short vowels to have shorter front parts + if(fmt_params->std_length < 130) + frames[0].length = (frames[0].length * fmt_params->std_length)/130; + } + } + else + { + //not a vowel + if(fmt_params->std_length > 0) + { + seq_len_adjust += (fmt_params->std_length - length1); + } } if(seq_len_adjust != 0) { - length_std = 0; - for(ix=0; ixmnemonic)); +} + + +static bool StressCondition(Translator *tr, PHONEME_LIST *plist, int condition, int control) +{//======================================================================================== +// condition: +// 0 if diminished, 1 if unstressed, 2 if not stressed, 3 if stressed, 4 if max stress + + int stress_level; + PHONEME_LIST *pl; + static int condition_level[4] = {1,2,4,15}; + + if(phoneme_tab[plist[0].phcode]->type == phVOWEL) + { + pl = plist; + } + else + { + // consonant, get stress from the following vowel + if(phoneme_tab[plist[1].phcode]->type == phVOWEL) + { + pl = &plist[1]; + } + else + return(false); // no stress elevel for this consonant + } + + stress_level = pl->stresslevel & 0xf; + + if(tr != NULL) + { + if((control & 1) && (plist->synthflags & SFLAG_DICTIONARY) && ((tr->langopts.param[LOPT_REDUCE] & 1)==0)) + { + // change phoneme. Don't change phonemes which are given for the word in the dictionary. + return(false); + } + + if((tr->langopts.param[LOPT_REDUCE] & 0x2) && (stress_level >= pl->wordstress)) + { + // treat the most stressed syllable in an unstressed word as stressed + stress_level = 4; + } + } + + if(condition == 4) + { + return(stress_level >= pl->wordstress); + } + + if(condition == 3) + { + // if stressed + if(stress_level > 3) + return(true); + } + else + { + if(stress_level < condition_level[condition]) + return(true); + } + return(false); + +} // end of StressCondition + + +static bool InterpretCondition(Translator *tr, int control, PHONEME_LIST *plist, int instn) +{//======================================================================================== + int which; + unsigned int data; + int instn2; + PHONEME_TAB *ph; + PHONEME_LIST *plist_this; + static int ph_position[7] = {0, 1, 2, 3, 2, 0, 1}; + + data = instn & 0xff; + instn2 = instn >> 8; + + if(instn2 < 14) + { + which = (instn2) % 7; + + if(which==4) + { + // nextPh not word boundary + if(plist[1].sourceix) + return(false); + } + if(which==5) + { + // prevPh, not word boundary + if(plist[0].sourceix) + return(false); + } + if(which==6) + { + // nextVowel, not word boundary + for(which=2;;which++) + { + if(plist[which-1].sourceix) + return(false); + if(phoneme_tab[plist[which-1].phcode]->type == phVOWEL) + break; + } + } + else + { + which = ph_position[which]; + } + plist_this = plist; + plist = &plist[which-1]; + + if(control & 0x100) + { + // change phonemes pass + plist->ph = phoneme_tab[plist->phcode]; + } + ph = plist->ph; + + if(instn2 < 7) + { + // 'data' is a phoneme number + if((phoneme_tab[data]->mnemonic == ph->mnemonic) == true) + return(true); + if((which == 0) && (ph->type == phVOWEL)) + return(data == ph->end_type); // prevPh() match on end_type + return(data == ph->start_type); // thisPh() or nextPh(), match on start_type + } + + data = instn & 0x1f; + + switch(instn & 0xe0) + { + case 0x00: + // phoneme type, vowel, nasal, fricative, etc + return(ph->type == data); + break; + + case 0x20: + // place of articulation + return(((ph->phflags >> 16) & 0xf) == data); + break; + + case 0x40: + // is a bit set in phoneme flags + return((ph->phflags & (1 << data)) != 0); + break; + + case 0x80: + switch(data) + { + case 0: + case 1: + case 2: + case 3: + case 4: + return(StressCondition(tr, plist, data, 0)); + + case 5: // isBreak, Either pause phoneme, or (stop/vstop/vfric not followed by vowel or (liquid in same word)) + return((ph->type == phPAUSE) || (plist_this->synthflags & SFLAG_NEXT_PAUSE)); + + case 6: // isWordStart + return(plist->sourceix != 0); + + case 7: // notWordStart + return(plist->sourceix == 0); + + case 8: // isWordEnd + return(plist[1].sourceix || (plist[1].ph->type == phPAUSE)); + break; + + case 9: // isAfterStress + if(plist->sourceix != 0) + return(false); + do { + plist--; + if((plist->stresslevel & 0xf) >= 4) + return(true); + + } while (plist->sourceix == 0); + break; + + case 10: // isNotVowel + return(ph->type != phVOWEL); + + case 11: // isFinalVowel + for(;;) + { + plist++; + plist->ph = phoneme_tab[plist->phcode]; + if(plist->sourceix != 0) + return(true); // start of next word, without finding another vowel + if(plist->ph->type == phVOWEL) + return(false); + } + break; + } + break; + + } + return(false); + } + else + if(instn2 == 0xf) + { + // Other conditions + switch(data) + { + case 1: // PreVoicing + return(control & 1); + case 2: // KlattSynth + return(voice->klattv[0] != 0); + } + } + return(false); +} // end of InterpretCondition + + +static void SwitchVowelType(PHONEME_LIST *plist, PHONEME_DATA *phdata, USHORT **p_prog, int instn_type) +{//===================================================================================================== + USHORT *prog; + int voweltype; + signed char x; + + if(instn_type == 2) + { + phdata->pd_control |= pd_FORNEXTPH; + voweltype = plist[1].ph->start_type; // SwitchNextVowelType + } + else + { + voweltype = plist[-1].ph->end_type; // SwitchPrevVowelType + } + + voweltype -= phonVOWELTYPES; + if((voweltype >= 0) && (voweltype < 6)) + { + prog = *p_prog + voweltype*2; + phdata->sound_addr[instn_type] = (((prog[1] & 0xf) << 16) + prog[2]) * 4; + x = (prog[1] >> 4) & 0xff; + phdata->sound_param[instn_type] = x; // sign extend + } + + *p_prog += 12; +} // end of SwitchVowelType + + +static int NumInstnWords(USHORT *prog) +{//=================================== + int instn; + int instn2; + int instn_type; + static char n_words[11] = {1,1,1,1,1,1,1,1,1,2,4}; + + instn = *prog; + instn_type = instn >> 12; + if(instn_type < 11) + return(n_words[instn_type]); + + // 11 to 15, 2 words + instn2 = prog[2]; + if((instn2 >> 12) == 0xf) + { + // addWav(), 2 more words + return(4); + } + if(instn2 == i_CONTINUE) + { + return(3); + } + return(2); +} // end of NumInstnWords + + + +void InterpretPhoneme(Translator *tr, int control, PHONEME_LIST *plist, PHONEME_DATA *phdata) +{//========================================================================================== +// control: +//bit 0: PreVoicing +//bit 8: change phonemes + PHONEME_TAB *ph; + USHORT *prog; + USHORT instn; + int instn2; + int or_flag; + bool truth; + int data; + int end_flag; + int ix; + signed char param_sc; + + #define N_RETURN 10 + int n_return=0; + USHORT *return_addr[N_RETURN]; // return address stack + + ph = plist->ph; + + memset(phdata, 0, sizeof(PHONEME_DATA)); + phdata->pd_param[i_SET_LENGTH] = ph->std_length; + phdata->pd_param[i_LENGTH_MOD] = ph->length_mod; + + if(ph->program == 0) + return; + + end_flag = 0; + + for(prog = &phoneme_index[ph->program]; end_flag != 1; prog++) + { + instn = *prog; + instn2 = (instn >> 8) & 0xf; + or_flag = 0; + + switch(instn >> 12) + { + case 0: + data = instn & 0xff; + + if(instn2 == 0) + { + // instructions with no operand + switch(data) + { + case i_RETURN: + end_flag = 1; + break; + + case i_CONTINUE: + break; + + default: + InvalidInstn(ph,instn); + break; + } + } + else + if(instn2 == i_APPEND_IFNEXTVOWEL) + { + if(phoneme_tab[plist[1].phcode]->type == phVOWEL) + phdata->pd_param[i_APPEND_PHONEME] = data; + } + else + if(instn2 < N_PHONEME_DATA_PARAM) + { + if(instn2 == i_CHANGE_PHONEME2) + { + phdata->pd_param[i_CHANGE_PHONEME] = data; // also set ChangePhoneme + } + phdata->pd_param[instn2] = data; + if((instn2 == i_CHANGE_PHONEME) && (control & 0x100)) + { + // found ChangePhoneme() in PhonemeList mode, exit + end_flag = 1; + } + } + else + { + InvalidInstn(ph,instn); + } + break; + + case 1: + if(tr == NULL) + break; // ignore if in synthesis stage + + if(instn2 < 8) + { + // ChangeIf + if(StressCondition(tr, plist, instn2 & 7, 1)) + { + phdata->pd_param[i_CHANGE_PHONEME] = instn & 0xff; + end_flag = 1; // change phoneme, exit + } + } + break; + + case 2: + case 3: + // conditions + or_flag = 0; + truth = true; + while((instn & 0xe000) == 0x2000) + { + // process a sequence of conditions, using boolean accumulator + if(or_flag) + truth = (truth || InterpretCondition(tr, control, plist, instn & 0xfff)); + else + truth = (truth && InterpretCondition(tr, control, plist, instn & 0xfff)); + or_flag = instn & 0x1000; + instn = *(++prog); + } + + if(truth == false) + { + if((instn & 0xf800) == i_JUMP_FALSE) + { + prog += instn & 0xff; + } + else + { + // instruction after a condition is not JUMP_FALSE, so skip the instruction. + prog += NumInstnWords(prog); + if((prog[0] & 0xfe00) == 0x6000) + prog++; // and skip ELSE jump + } + } + prog--; + break; + + case 6: + // JUMP + switch(instn2 >> 1) + { + case 0: + prog += (instn & 0xff) - 1; + break; + + case 4: + // conditional jumps should have been processed in the Condition section + break; + + case 5: // NexttVowelStarts + SwitchVowelType(plist, phdata, &prog, 2); + break; + + case 6: // PrevVowelTypeEndings + SwitchVowelType(plist, phdata, &prog, 3); + break; + } + break; + + case 9: + data = ((instn & 0xf) << 16) + prog[1]; + switch(instn2) + { + case 1: + // call a procedure or another phoneme + if(n_return < N_RETURN) + { + return_addr[n_return++] = prog+1; + prog = &phoneme_index[data] - 1; + } + break; + + case 2: + // pitch envelope + phdata->pitch_env = data; + break; + + case 3: + // amplitude envelope + phdata->amp_env = data; + break; + } + break; + + case 10: // Vowelin, Vowelout + if(instn2 == 1) + ix = 0; + else + ix = 2; + + phdata->vowel_transition[ix] = ((prog[0] & 0xff) << 16) + prog[1]; + phdata->vowel_transition[ix+1] = (prog[2] << 16) + prog[3]; + prog += 3; + break; + + case 11: // FMT + case 12: // WAV + case 13: // VowelStart + case 14: // VowelEnd + case 15: // addWav + instn2 = (instn >> 12) - 11; + phdata->sound_addr[instn2] = ((instn & 0xf) << 18) + (prog[1] << 2); + param_sc = phdata->sound_param[instn2] = (instn >> 4) & 0xff; + prog++; + + if(prog[1] != i_CONTINUE) + { + if(instn2 < 2) + { + // FMT() and WAV() imply Return + end_flag = 1; + if((prog[1] >> 12) == 0xf) + { + // Return after the following addWav() + end_flag = 2; + } + } + else + if(instn2 == 4) + { + // addWav(), return if previous instruction was FMT() or WAV() + end_flag--; + } + + if((instn2 != 1) && (instn2 != 4)) + { + // FMT, VowelStart or VowelEnding. + phdata->sound_param[instn2] = param_sc; // sign extend + } + } + break; + + default: + InvalidInstn(ph,instn); + break; + } + + if(ph->phflags & phSINGLE_INSTN) + { + end_flag = 1; // this phoneme has a one-instruction program, with an implicit Return + } + + if((end_flag == 1) && (n_return > 0)) + { + // return from called procedure or phoneme + end_flag = 0; + prog = return_addr[--n_return]; + } + } + +} // end of InterpretPhoneme + + +void InterpretPhoneme2(int phcode, PHONEME_DATA *phdata) +{//===================================================== +// Examine the program of a single isolated phoneme + int ix; + PHONEME_LIST plist[4]; + memset(plist, 0, sizeof(plist)); + + for(ix=0; ix<4; ix++) + { + plist[ix].phcode = phonPAUSE; + plist[ix].ph = phoneme_tab[phonPAUSE]; + } + + plist[1].phcode = phcode; + plist[1].ph = phoneme_tab[phcode]; + plist[2].sourceix = 1; + + InterpretPhoneme(NULL, 0, &plist[1], phdata); +} // end of InterpretPhoneme2 diff --git a/src/synthesize.cpp b/src/synthesize.cpp index c9b3b46f..f71aa229 100755 --- a/src/synthesize.cpp +++ b/src/synthesize.cpp @@ -219,72 +219,153 @@ static void DoPause(int length, int control) extern int seq_len_adjust; // temporary fix to advance the start point for playing the wav sample -static int DoSample2(int index, int which, int length_mod, int amp) -{//================================================================ +static int DoSample2(int index, int which, int std_length, int control, int length_mod, int amp) +{//============================================================================================= int length; - int length1; + int wav_length; int format; int min_length; - int start=0; + int x; + int len4; long *q; unsigned char *p; index = index & 0x7fffff; p = &wavefile_data[index]; format = p[2]; - length1 = (p[1] * 256); - length1 += p[0]; // length in bytes + wav_length = (p[1] * 256); + wav_length += p[0]; // length in bytes - if(seq_len_adjust > 0) - { - start = (seq_len_adjust * samplerate)/1000; - if(format == 0) - start *= 2; - length1 -= start; - index += start; - } - - - if(length_mod > 0) - length = (length1 * length_mod) / 256; - else - length = length1; - - - length = (length * speed.speed_factor2)/256; min_length = speed.min_sample_len; if(format==0) min_length *= 2; + if(std_length > 0) + { + std_length = (std_length * samplerate)/1000; + if(format == 0) + std_length *= 2; + + x = (min_length * std_length)/wav_length; + if(x > min_length) + min_length = x; + } + else + { + // no length specified, use the length of the stored sound + std_length = wav_length; + } + + if(length_mod > 0) + { + std_length = (std_length * length_mod)/256; + } + + length = (std_length * speed.speed_factor2)/256; + + if(control & pd_DONTLENGTHEN) + { + // this option is used for Stops, with short noise bursts. + // Don't change their length much. + if(length > std_length) + { + // don't let length exceed std_length + length = std_length; + } + else + { + // reduce the reduction in length +// length = (length + std_length)/2; + } + } + if(length < min_length) length = min_length; - if(length > length1) - length = length1; // don't exceed wavefile length - if(format==0) - length /= 2; // 2 byte samples + if(format == 0) + { + // 16 bit samples + length /= 2; + wav_length /= 2; + } + if(amp < 0) + return(length); + + len4 = wav_length / 4; index += 4; - if(amp >= 0) + if(which & 0x100) { + // mix this with synthesised wave last_wcmdq = wcmdq_tail; q = wcmdq[wcmdq_tail]; - if(which & 0x100) - q[0] = WCMD_WAVE2; // mix this with synthesised wave - else - q[0] = WCMD_WAVE; - q[1] = length; // length in samples + q[0] = WCMD_WAVE2; + q[1] = length | (wav_length << 16); // length in samples q[2] = long(&wavefile_data[index]); q[3] = format + (amp << 8); WcmdqInc(); + return(length); } + + if(length > wav_length) + { + x = len4*3; + length -= x; + } + else + { + x = length; + length = 0; + } + + last_wcmdq = wcmdq_tail; + q = wcmdq[wcmdq_tail]; + q[0] = WCMD_WAVE; + q[1] = x; // length in samples + q[2] = long(&wavefile_data[index]); + q[3] = format + (amp << 8); + WcmdqInc(); + + + while(length > len4*3) + { + x = len4; + if(format == 0) + x *= 2; + + last_wcmdq = wcmdq_tail; + q = wcmdq[wcmdq_tail]; + q[0] = WCMD_WAVE; + q[1] = len4*2; // length in samples + q[2] = long(&wavefile_data[index+x]); + q[3] = format + (amp << 8); + WcmdqInc(); + + length -= len4*2; + } + + if(length > 0) + { + x = wav_length - length; + if(format == 0) + x *= 2; + last_wcmdq = wcmdq_tail; + q = wcmdq[wcmdq_tail]; + q[0] = WCMD_WAVE; + q[1] = length; // length in samples + q[2] = long(&wavefile_data[index+x]); + q[3] = format + (amp << 8); + WcmdqInc(); + } + return(length); -} // end of Synthesize::DoSample2 +} // end of DoSample2 +#ifdef deleted int DoSample(PHONEME_TAB *ph1, PHONEME_TAB *ph2, int which, int length_mod, int amp) {//====================== ========================================================== int index; @@ -304,10 +385,37 @@ int DoSample(PHONEME_TAB *ph1, PHONEME_TAB *ph2, int which, int length_mod, int if(amp == -1) amp2 = amp; - result = DoSample2(index,which,length_mod,amp2); + result = DoSample2(index,which,length_mod,0,amp2); last_frame = NULL; return(result); -} // end of Synthesize::DoSample +} // end of DoSample +#endif + + +int DoSample3(PHONEME_DATA *phdata, int length_mod, int amp) +{//========================================================= + int amp2; + int len; + EndPitch(1); + + if(amp == -1) + { + // just get the length, don't produce sound + amp2 = amp; + } + else + { + amp2 = phdata->sound_param[pd_WAV]; + if(amp2 == 0) + amp2 = 100; + amp2 = (amp2 * 32)/100; + } + +seq_len_adjust=0; + len = DoSample2(phdata->sound_addr[pd_WAV], 2, phdata->pd_param[pd_LENGTHMOD]*2, phdata->pd_control, length_mod, amp2); + last_frame = NULL; + return(len); +} // end of DoSample3 @@ -554,7 +662,7 @@ static short vcolouring[N_VCOLOUR][5] = { if(voice->klattv[0]) { // fr->klattp[KLATT_AV] = 53; // reduce the amplituide of the start of a vowel - fr->klattp[KLATT_AV] = seq[1].frame->klattp[KLATT_AV] - 6; + fr->klattp[KLATT_AV] = seq[1].frame->klattp[KLATT_AV] - 4; } if(f2 != 0) { @@ -861,10 +969,10 @@ static void StartSyllable(void) } -int DoSpect(PHONEME_TAB *this_ph, PHONEME_TAB *prev_ph, PHONEME_TAB *next_ph, - int which, PHONEME_LIST *plist, int modulation) -{//=================================================================================== - // which 1 start of phoneme, 2 body and end + +int DoSpect2(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, PHONEME_LIST *plist, int modulation) +{//======================================================================================================== + // which 0 not a vowel, 1 start of vowel, 2 body and end of vowel // length_mod: 256 = 100% // modulation: -1 = don't write to wcmdq @@ -877,70 +985,47 @@ int DoSpect(PHONEME_TAB *this_ph, PHONEME_TAB *prev_ph, PHONEME_TAB *next_ph, int ix; long *q; int len; - int min; - int match_level; int frame_length; int frame1_length; int frame2_length; int length_factor; int length_mod; - int length_mod2; // reduced effect length_mod int total_len = 0; - int len_adjust_factor = 256; static int wave_flag = 0; int wcmd_spect = WCMD_SPECT; + if(fmt_params->fmt_addr == 0) + return(0); + length_mod = plist->length; if(length_mod==0) length_mod=256; - length_mod2 = (length_mod*(256-speed.speed_factor3) + 256*speed.speed_factor3)/256; - - if(which==1) +if(which==1) +{ + // limit the shortening of sonorants before shortened (eg. unstressed vowels) + if((this_ph->type==phLIQUID) || (plist[-1].type==phLIQUID) || (plist[-1].type==phNASAL)) { - // limit the shortening of sonorants before shortened (eg. unstressed vowels) - if((this_ph->type==phLIQUID) || (prev_ph->type==phLIQUID) || (prev_ph->type==phNASAL)) + if(length_mod < (len = translator->langopts.param[LOPT_SONORANT_MIN])) { - if(length_mod < (len = translator->langopts.param[LOPT_SONORANT_MIN])) - { - length_mod = len; - } + length_mod = len; } } +} + modn_flags = 0; - frames = LookupSpect(this_ph,prev_ph,next_ph,which,&match_level,&n_frames, plist); + frames = LookupSpect(this_ph, which, fmt_params, &n_frames, plist); if(frames == NULL) return(0); // not found -// if((which==2) && (this_ph->phflags & phLONG)) - if((which==2) && (this_ph->std_length >= 200)) - { - // apply a minimum length for long vowels at fast speeds, to keep the distinction with short vowels - total_len = 0; - for(frameix=0; frameix<(n_frames-1); frameix++) - { - length_factor = length_mod; - if(frames[frameix].frflags & FRFLAG_LEN_MOD) // reduce effect of length mod - { - length_factor = length_mod2; - } - len = (frames[frameix].length * samplerate)/1000; - len = (len * length_factor)/256; - total_len += len; - } - - min = translator->langopts.param[LOPT_MIN_LONG_VOWEL] * (samplerate)/1000; - min = (min * length_mod2)/256; - if(total_len < min) - { - len_adjust_factor = (min*256)/total_len; - } - } - frame1 = frames[0].frame; frame1_length = frames[0].length; if(voice->klattv[0]) wcmd_spect = WCMD_KLATT; + wavefile_ix = fmt_params->wav_addr; + wavefile_amp = (fmt_params->wav_amp * 32)/100; + if(wavefile_amp == 0) + wavefile_amp = 32; if(wavefile_ix == 0) { if(wave_flag) @@ -990,30 +1075,29 @@ int DoSpect(PHONEME_TAB *this_ph, PHONEME_TAB *prev_ph, PHONEME_TAB *next_ph, syllable_centre = wcmdq_tail; } - total_len = 0; frame_length = frame1_length; for(frameix=1; frameixfrflags & FRFLAG_DEFER_WAV)==0)) + if((fmt_params->wav_addr != 0) && ((frame1->frflags & FRFLAG_DEFER_WAV)==0)) { // there is a wave file to play along with this synthesis seq_len_adjust = 0; - DoSample2(wavefile_ix,which+0x100,0,wavefile_amp); + DoSample2(fmt_params->wav_addr, which+0x100, 0, fmt_params->fmt_control, 0, wavefile_amp); wave_flag = 1; wavefile_ix = 0; + fmt_params->wav_addr = 0; } length_factor = length_mod; if(frame1->frflags & FRFLAG_LEN_MOD) // reduce effect of length mod { - length_factor = length_mod2; + length_factor = (length_mod*(256-speed.speed_factor3) + 256*speed.speed_factor3)/256; } len = (frame_length * samplerate)/1000; len = (len * length_factor)/256; - len = (len * len_adjust_factor)/256; if(modulation >= 0) { @@ -1054,7 +1138,9 @@ int DoSpect(PHONEME_TAB *this_ph, PHONEME_TAB *prev_ph, PHONEME_TAB *next_ph, } } return(total_len); -} // end of Synthesize::DoSpect +} // end of DoSpect + + static void DoMarker(int type, int char_posn, int length, int value) @@ -1158,6 +1244,12 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume) PHONEME_TAB *prev_ph; static int sourceix=0; + PHONEME_DATA phdata; + PHONEME_DATA phdata_prev; + PHONEME_DATA phdata_next; + PHONEME_DATA phdata_tone; + FMT_PARAMS fmtp; + #ifdef TEST_MBROLA if(mbrola_name[0] != 0) return(MbrolaGenerate(phoneme_list,n_ph,resume)); @@ -1252,20 +1344,29 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume) if(next->type==phLIQUID) released = 1; // if(((p->ph->phflags & phPLACE) == phPLACE_blb) && (next->ph->phflags & phSIBILANT)) released = 1; } + if(released == 0) + p->synthflags |= SFLAG_NEXT_PAUSE; - if(released) - DoSample(p->ph,next->ph,2,0,0); - else - DoSample(p->ph,phoneme_tab[phonPAUSE],2,0,0); + InterpretPhoneme(NULL, 0, p, &phdata); + phdata.pd_control |= pd_DONTLENGTHEN; + DoSample3(&phdata, 0, 0); break; case phFRICATIVE: + InterpretPhoneme(NULL, 0, p, &phdata); + if(p->synthflags & SFLAG_LENGTHEN) - DoSample(p->ph,next->ph,2,p->length,0); // play it twice for [s:] etc. - DoSample(p->ph,next->ph,2,p->length,0); + { + DoSample3(&phdata, p->length, 0); // play it twice for [s:] etc. + } + DoSample3(&phdata, p->length, 0); break; case phVSTOP: + ph = p->ph; + memset(&fmtp, 0, sizeof(fmtp)); + fmtp.fmt_control = pd_DONTLENGTHEN; + pre_voiced = 0; if(next->type==phVOWEL) { @@ -1292,11 +1393,15 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume) if((prev->type==phVOWEL) || (prev->ph->phflags & phVOWEL2)) { // a period of voicing before the release - DoSpect(p->ph,phoneme_tab[phonSCHWA],next->ph,1,p,0); + InterpretPhoneme(NULL, 0x01, p, &phdata); + fmtp.fmt_addr = phdata.sound_addr[pd_FMT]; + fmtp.fmt_length = phdata.sound_param[pd_FMT]; + + DoSpect2(ph, 0, &fmtp, p, 0); if(p->synthflags & SFLAG_LENGTHEN) { DoPause(20,0); - DoSpect(p->ph,phoneme_tab[phonSCHWA],next->ph,1,p,0); + DoSpect2(ph, 0, &fmtp, p, 0); } } else @@ -1311,18 +1416,24 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume) { // followed by a vowel, or liquid + vowel StartSyllable(); - DoSpect(p->ph,prev->ph,next->ph,2,p,0); } else { - DoSpect(p->ph,prev->ph,phoneme_tab[phonPAUSE],2,p,0); - if((p->newword == 0) && (next2->newword == 0)) - { - if((next->type == phVFRICATIVE) && (p->ph->mnemonic !='d')) - DoPause(20,0); - if((next->type == phFRICATIVE) || (next->type == phNASAL)) - DoPause(12,0); - } + p->synthflags |= SFLAG_NEXT_PAUSE; + } + InterpretPhoneme(NULL,0, p, &phdata); + fmtp.fmt_addr = phdata.sound_addr[pd_FMT]; + fmtp.fmt_length = phdata.sound_param[pd_FMT]; + fmtp.wav_addr = phdata.sound_addr[pd_ADDWAV]; + fmtp.wav_amp = phdata.sound_param[pd_ADDWAV]; + DoSpect2(ph, 0, &fmtp, p, 0); + + if((p->newword == 0) && (next2->newword == 0)) + { + if(next->type == phVFRICATIVE) + DoPause(20,0); + if(next->type == phFRICATIVE) + DoPause(12,0); } break; @@ -1347,22 +1458,29 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume) } } - if((next->type==phVOWEL) || ((next->type==phLIQUID) && (next->newword==0))) // ?? test 14.Aug.2007 + if((next->type==phVOWEL) || ((next->type==phLIQUID)) && (next->newword==0)) // ?? test 14.Aug.2007 { StartSyllable(); - if(p->synthflags & SFLAG_LENGTHEN) - DoSpect(p->ph,prev->ph,next->ph,2,p,0); - DoSpect(p->ph,prev->ph,next->ph,2,p,0); } else { - if(p->synthflags & SFLAG_LENGTHEN) - DoSpect(p->ph,prev->ph,phoneme_tab[phonPAUSE],2,p,0); - DoSpect(p->ph,prev->ph,phoneme_tab[phonPAUSE],2,p,0); + p->synthflags |= SFLAG_NEXT_PAUSE; } + InterpretPhoneme(NULL,0, p, &phdata); + memset(&fmtp, 0, sizeof(fmtp)); + fmtp.std_length = phdata.pd_param[i_SET_LENGTH]*2; + fmtp.fmt_addr = phdata.sound_addr[pd_FMT]; + fmtp.fmt_length = phdata.sound_param[pd_FMT]; + fmtp.wav_addr = phdata.sound_addr[pd_ADDWAV]; + fmtp.wav_amp = phdata.sound_param[pd_ADDWAV]; + + if(p->synthflags & SFLAG_LENGTHEN) + DoSpect2(p->ph, 0, &fmtp, p, 0); + DoSpect2(p->ph, 0, &fmtp, p, 0); break; case phNASAL: + memset(&fmtp, 0, sizeof(fmtp)); if(!(p->synthflags & SFLAG_SEQCONTINUE)) { DoAmplitude(p->amp,NULL); @@ -1374,29 +1492,32 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume) last_frame = NULL; } + InterpretPhoneme(NULL,0, p, &phdata); + fmtp.std_length = phdata.pd_param[i_SET_LENGTH]*2; + fmtp.fmt_addr = phdata.sound_addr[pd_FMT]; + fmtp.fmt_length = phdata.sound_param[pd_FMT]; + if(next->type==phVOWEL) { StartSyllable(); - DoSpect(p->ph,prev->ph,next->ph,1,p,0); + DoSpect2(p->ph, 0, &fmtp, p, 0); } else if(prev->type==phVOWEL && (p->synthflags & SFLAG_SEQCONTINUE)) { - DoSpect(p->ph,prev->ph,phoneme_tab[phonPAUSE],2,p,0); + DoSpect2(p->ph, 0, &fmtp, p, 0); } else { last_frame = NULL; // only for nasal ? - if(next->type == phLIQUID) - DoSpect(p->ph,prev->ph,phoneme_tab[phonSONORANT],2,p,0); - else - DoSpect(p->ph,prev->ph,phoneme_tab[phonPAUSE],2,p,0); + DoSpect2(p->ph, 0, &fmtp, p, 0); last_frame = NULL; } break; case phLIQUID: + memset(&fmtp, 0, sizeof(fmtp)); modulation = 0; if(p->ph->phflags & phTRILL) modulation = 5; @@ -1419,17 +1540,14 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume) if(next->type==phVOWEL) { StartSyllable(); - DoSpect(p->ph,prev_ph,next->ph,1,p,modulation); // (,)r - } - else - if(prev->type==phVOWEL && (p->synthflags & SFLAG_SEQCONTINUE)) - { - DoSpect(p->ph,prev_ph,next->ph,1,p,modulation); - } - else - { - DoSpect(p->ph,prev_ph,next->ph,1,p,modulation); } + InterpretPhoneme(NULL, 0, p, &phdata); + fmtp.std_length = phdata.pd_param[i_SET_LENGTH]*2; + fmtp.fmt_addr = phdata.sound_addr[pd_FMT]; + fmtp.fmt_length = phdata.sound_param[pd_FMT]; + fmtp.wav_addr = phdata.sound_addr[pd_ADDWAV]; + fmtp.wav_amp = phdata.sound_param[pd_ADDWAV]; + DoSpect2(p->ph, 0, &fmtp, p, modulation); break; @@ -1437,16 +1555,46 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume) ph = p->ph; stress = p->stresslevel & 0xf; - // vowel transition from the preceding phoneme - vowel_transition0 = vowel_transition[0]; - vowel_transition1 = vowel_transition[1]; + memset(&fmtp, 0, sizeof(fmtp)); + + InterpretPhoneme(NULL, 0, p, &phdata); + fmtp.std_length = phdata.pd_param[i_SET_LENGTH] * 2; + + if(((fmtp.fmt_addr = phdata.sound_addr[pd_VWLSTART]) != 0) && ((phdata.pd_control & pd_FORNEXTPH) == 0)) + { + // a vowel start has been specified by the Vowel program + fmtp.fmt_length = phdata.sound_param[pd_VWLSTART]; + } + else + if(prev->type != phPAUSE) + { + // check the previous phoneme + InterpretPhoneme(NULL, 0, prev, &phdata_prev); + if((fmtp.fmt_addr = phdata_prev.sound_addr[pd_VWLSTART]) != 0) + { + // a vowel start has been specified by the Vowel program + fmtp.fmt2_lenadj = phdata_prev.sound_param[pd_VWLSTART]; + } + fmtp.transition0 = phdata_prev.vowel_transition[0]; + fmtp.transition1 = phdata_prev.vowel_transition[1]; + } + + if(fmtp.fmt_addr == 0) + { + // use the default start for this vowel + fmtp.use_vowelin = 1; + fmtp.fmt_control = 1; + fmtp.fmt_addr = phdata.sound_addr[pd_FMT]; +// fmtp.fmt_length = phdata.sound_param[pd_FMT]; + } pitch_env = envelope_data[p->env]; amp_env = NULL; if(p->tone_ph != 0) { - pitch_env = LookupEnvelope(phoneme_tab[p->tone_ph]->spect); - amp_env = LookupEnvelope(phoneme_tab[p->tone_ph]->after); + InterpretPhoneme2(p->tone_ph, &phdata_tone); + pitch_env = LookupEnvelope(phdata_tone.pitch_env); + amp_env = LookupEnvelope(phdata_tone.amp_env); } StartSyllable(); @@ -1462,13 +1610,13 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume) { DoAmplitude(p->amp,amp_env); DoPitch(pitch_env,p->pitch1,p->pitch2); // don't use prevocalic rising tone - DoSpect(ph,prev->ph,next->ph,1,p,modulation); + DoSpect2(ph, 1, &fmtp, p, modulation); } else if(prev->type==phLIQUID || prev->type==phNASAL) { DoAmplitude(p->amp,amp_env); - DoSpect(ph,prev->ph,next->ph,1,p,modulation); // continue with pre-vocalic rising tone + DoSpect2(ph, 1, &fmtp, p, modulation); // continue with pre-vocalic rising tone DoPitch(pitch_env,p->pitch1,p->pitch2); } else @@ -1479,7 +1627,7 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume) DoPitch(pitch_env,p->pitch1,p->pitch2); } - DoSpect(ph,prev->ph,next->ph,1,p,modulation); + DoSpect2(ph, 1, &fmtp, p, modulation); } if(option_phoneme_events) @@ -1487,9 +1635,33 @@ int Generate(PHONEME_LIST *phoneme_list, int *n_ph, int resume) DoMarker(espeakEVENT_PHONEME, sourceix, 0, p->ph->mnemonic); } - DoSpect(p->ph,prev->ph,next->ph,2,p,modulation); + fmtp.fmt_addr = phdata.sound_addr[pd_FMT]; + fmtp.fmt_length = phdata.sound_param[pd_FMT]; + fmtp.transition0 = 0; + fmtp.transition1 = 0; + + if((fmtp.fmt2_addr = phdata.sound_addr[pd_VWLEND]) != 0) + { + fmtp.fmt2_lenadj = phdata.sound_param[pd_VWLEND]; + } + else + if(next->type != phPAUSE) + { + fmtp.fmt2_lenadj = 0; + InterpretPhoneme(NULL, 0, next, &phdata_next); + + fmtp.use_vowelin = 1; + fmtp.transition0 = phdata_next.vowel_transition[2]; // always do vowel_transition, even if ph_VWLEND ?? consider [N] + fmtp.transition1 = phdata_next.vowel_transition[3]; + + if((fmtp.fmt2_addr = phdata_next.sound_addr[pd_VWLEND]) != 0) + { + fmtp.fmt2_lenadj = phdata_next.sound_param[pd_VWLEND]; + } + } + + DoSpect2(ph, 2, &fmtp, p, modulation); - memset(vowel_transition,0,sizeof(vowel_transition)); break; } ix++; diff --git a/src/synthesize.h b/src/synthesize.h index 193b9329..00ec4eb0 100755 --- a/src/synthesize.h +++ b/src/synthesize.h @@ -47,6 +47,9 @@ #define SFLAG_SWITCHED_LANG 0x20 // this word uses phonemes from a different language #define SFLAG_PROMOTE_STRESS 0x40 // this unstressed word can be promoted to stressed +#define SFLAG_PREV_PAUSE 0x1000 // consider previous phoneme as pause +#define SFLAG_NEXT_PAUSE 0x2000 // consider next phoneme as pause + // embedded command numbers #define EMBED_P 1 // pitch #define EMBED_S 2 // speed (used in setlengths) @@ -170,10 +173,11 @@ int n_mix_wavefile; // length in bytes int mix_wave_scale; // 0=2 byte samples int mix_wave_amp; int mix_wavefile_ix; +int mix_wavefile_max; // length of available WAV data (in bytes) +int mix_wavefile_offset; int amplitude; int amplitude_v; -int prev_was_synth; // previous sound was synthesized (not a played wave or pause) } WGEN_DATA; @@ -207,24 +211,147 @@ typedef struct { frame_t *frame; } frameref_t; +// a clause translated into phoneme codes (first stage) +typedef struct { + unsigned char phcode; + unsigned char stresslevel; + unsigned char wordstress; + unsigned char tone_ph; // tone phoneme to use with this vowel + unsigned short synthflags; + unsigned short sourceix; // ix into the original source text string, only set at the start of a word +} PHONEME_LIST2; + typedef struct { +// The first section is a copy of PHONEME_LIST2 + unsigned char phcode; + unsigned char stresslevel; + unsigned char wordstress; + unsigned char tone_ph; // tone phoneme to use with this vowel + unsigned short synthflags; + unsigned short sourceix; // ix into the original source text string, only set at the start of a word + PHONEME_TAB *ph; unsigned char env; // pitch envelope number - unsigned char stresslevel; unsigned char type; unsigned char prepause; + unsigned char postpause; unsigned char amp; - unsigned char tone_ph; // tone phoneme to use with this vowel unsigned char newword; // bit 0=start of word, bit 1=end of clause, bit 2=start of sentence - unsigned char synthflags; short length; // length_mod short pitch1; // pitch, 0-4095 within the Voice's pitch range short pitch2; - unsigned short sourceix; // ix into the original source text string, only set at the start of a word } PHONEME_LIST; +#define pd_FMT 0 +#define pd_WAV 1 +#define pd_VWLSTART 2 +#define pd_VWLEND 3 +#define pd_ADDWAV 4 + +#define N_PHONEME_DATA_PARAM 16 +#define pd_APPENDPHONEME i_APPEND_PHONEME +#define pd_CHANGEPHONEME i_CHANGE_PHONEME +#define pd_LENGTHMOD i_SET_LENGTH + +#define pd_FORNEXTPH 0x2 +#define pd_DONTLENGTHEN 0x4 +#define pd_REDUCELENGTHCHANGE 0x8 +typedef struct { + int pd_control; + int pd_param[N_PHONEME_DATA_PARAM]; // set from group 0 instructions + int sound_addr[5]; + int sound_param[5]; + int vowel_transition[4]; + int pitch_env; + int amp_env; +} PHONEME_DATA; + + +typedef struct { + int fmt_control; + int use_vowelin; + int fmt_addr; + int fmt_length; + int fmt2_addr; + int fmt2_lenadj; + int wav_addr; + int wav_amp; + int transition0; + int transition1; + int std_length; +} FMT_PARAMS; + + +// instructions + +#define i_RETURN 0x0001 +#define i_CONTINUE 0x0002 + +// Group 0 instrcutions with 8 bit operand. These value go into bits 8-15 if the instruction +#define i_CHANGE_PHONEME 0x01 +#define i_REPLACE_NEXT_PHONEME 0x02 +#define i_INSERT_PHONEME 0x03 +#define i_APPEND_PHONEME 0x04 +#define i_APPEND_IFNEXTVOWEL 0x05 +#define i_VOICING_SWITCH 0x06 +#define i_PAUSE_BEFORE 0x07 +#define i_PAUSE_AFTER 0x08 +#define i_LENGTH_MOD 0x09 +#define i_SET_LENGTH 0x0a +#define i_LONG_LENGTH 0x0b +#define i_CHANGE_PHONEME2 0x0c // not yet used +#define i_CHANGE_IF 0x10 // 0x10 to 0x14 + +#define i_ADD_LENGTH 0x0c + + +// conditions and jumps +#define i_CONDITION 0x2000 +#define i_OR 0x1000 // added to i_CONDITION + +#define i_JUMP 0x6000 +#define i_JUMP_FALSE 0x6800 +#define i_SWITCH_NEXTVOWEL 0x6a00 +#define i_SWITCH_PREVVOWEL 0x6c00 +#define MAX_JUMP 255 // max jump distance + +// multi-word instructions +#define i_CALLPH 0x9100 +#define i_PITCHENV 0x9200 +#define i_AMPENV 0x9300 +#define i_VOWELIN 0xa100 +#define i_VOWELOUT 0xa200 +#define i_FMT 0xb000 +#define i_WAV 0xc000 +#define i_VWLSTART 0xd000 +#define i_VWLENDING 0xe000 +#define i_WAVADD 0xf000 + +// conditions +#define i_isDiminished 0x80 +#define i_isUnstressed 0x81 +#define i_isNotStressed 0x82 +#define i_isStressed 0x83 +#define i_isMaxStress 0x84 + +#define i_isBreak 0x85 +#define i_isWordStart 0x86 +#define i_notWordStart 0x87 +#define i_isWordEnd 0x88 +#define i_isAfterStress 0x89 +#define i_isNotVowel 0x8a +#define i_isFinalVowel 0x8b + + +#define i_isPalatal 0x49 // bit 9 in phflags +#define i_isRhotic 0x56 // bit 22 in phflags + +#define i_StressLevel 0x800 + + + typedef struct { int name; int length; @@ -317,7 +444,7 @@ extern char mbrola_name[20]; // from synthdata file unsigned int LookupSound(PHONEME_TAB *ph1, PHONEME_TAB *ph2, int which, int *match_level, int control); -frameref_t *LookupSpect(PHONEME_TAB *ph1, PHONEME_TAB *prev_ph, PHONEME_TAB *next_ph, int which, int *match_level, int *n_frames, PHONEME_LIST *plist); +frameref_t *LookupSpect(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, int *n_frames, PHONEME_LIST *plist); unsigned char *LookupEnvelope(int ix); int LoadPhData(); @@ -365,13 +492,15 @@ espeak_ERROR LoadMbrolaTable(const char *mbrola_voice, const char *phtrans, int void SetParameter(int parameter, int value, int relative); void MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, FILE *f_mbrola); //int MbrolaSynth(char *p_mbrola); -int DoSample(PHONEME_TAB *ph1, PHONEME_TAB *ph2, int which, int length_mod, int amp); -int DoSpect(PHONEME_TAB *this_ph, PHONEME_TAB *prev_ph, PHONEME_TAB *next_ph, - int which, PHONEME_LIST *plist, int modulation); +//int DoSample(PHONEME_TAB *ph1, PHONEME_TAB *ph2, int which, int length_mod, int amp); +int DoSample3(PHONEME_DATA *phdata, int length_mod, int amp); +int DoSpect2(PHONEME_TAB *this_ph, int which, FMT_PARAMS *fmt_params, PHONEME_LIST *plist, int modulation); int PauseLength(int pause, int control); int LookupPhonemeTable(const char *name); void InitBreath(void); void KlattInit(); +void KlattReset(int control); int Wavegen_Klatt2(int length, int modulation, int resume, frame_t *fr1, frame_t *fr2); + diff --git a/src/tr_languages.cpp b/src/tr_languages.cpp index 8989cab5..921ef42a 100644 --- a/src/tr_languages.cpp +++ b/src/tr_languages.cpp @@ -1183,8 +1183,9 @@ typedef struct { */ -#define RUSSIAN2 + #ifdef RUSSIAN2 +// This is now done in the phoneme data, ph_russian int ChangePhonemes_ru(Translator *tr, PHONEME_LIST2 *phlist, int n_ph, int index, PHONEME_TAB *ph, CHANGEPH *ch) {//============================================================================================================= @@ -1276,96 +1277,6 @@ PH('V','#'),PH('I','3'),PH('I','2'),PH('E','3')}; return(0); } -#else - -int ChangePhonemes_ru(Translator *tr, PHONEME_LIST2 *phlist, int n_ph, int index, PHONEME_TAB *ph, CHANGEPH *ch) -{//============================================================================================================= -// Called for each phoneme in the phoneme list, to allow a language to make changes -// flags: bit 0=1 last phoneme in a word -// bit 1=1 this is the highest stressed vowel in the current word -// bit 2=1 after the highest stressed vowel in the current word -// bit 3=1 the phonemes were specified explicitly, or found from an entry in the xx_list dictionary -// ph The current phoneme - - int variant; - int vowelix; - PHONEME_TAB *prev, *next; - - if(ch->flags & 8) - return(0); // full phoneme translation has already been given - - // Russian vowel softening and reduction rules - if(ph->type == phVOWEL) - { - #define N_VOWELS_RU 7 - static unsigned char vowels_ru[N_VOWELS_RU] = {'a','A','o','E','i','u','y'}; - - // each line gives: soft, reduced, soft-reduced, post-tonic - static unsigned short vowel_replace[N_VOWELS_RU][4] = { - {'&', 'V', 'I', 'V'}, // a - {'&', 'V', 'I', 'V'}, // A - {'8', 'V', 'I', 'V'}, // o - {'e', 'I', 'I', 'I'}, // E - {'i', 'I', 'I', 'I'}, // i - {'u'+('"'<<8), 'U', 'U', 'U'}, // u - {'y', 'Y', 'Y', 'Y'}}; // y - - prev = phoneme_tab[phlist[index-1].phcode]; - next = phoneme_tab[phlist[index+1].phcode]; - -if(prev->mnemonic == 'j') - return(0); - - // lookup the vowel name to get an index into the vowel_replace[] table - for(vowelix=0; vowelixmnemonic) - break; - } - if(vowelix == N_VOWELS_RU) - return(0); - - // do we need a variant of this vowel, depending on the stress and adjacent phonemes ? - variant = -1; - if(ch->flags & 2) - { - // a stressed vowel - if((prev->phflags & phPALATAL) && ((next->phflags & phPALATAL) || phoneme_tab[phlist[index+2].phcode]->mnemonic == ';')) - { - // between two palatal consonants, use the soft variant - variant = 0; - } - } - else - { - // an unstressed vowel - if(prev->phflags & phPALATAL) - { - variant = 2; // unstressed soft - } - else - if((ph->mnemonic == 'o') && ((prev->phflags & phPLACE) == phPLACE_pla)) - { - variant = 2; // unstressed soft ([o] vowel following: ш ж - } - else - if(ch->flags & 4) - { - variant = 3; // post tonic - } - else - { - variant = 1; // unstressed - } - } - if(variant >= 0) - { - phlist[index].phcode = PhonemeCode(vowel_replace[vowelix][variant]); - } - } - - return(0); -} #endif diff --git a/src/translate.cpp b/src/translate.cpp index c74997dc..8917d9b4 100755 --- a/src/translate.cpp +++ b/src/translate.cpp @@ -962,7 +962,7 @@ if((wmark > 0) && (wmark < 8)) if(prefix_type & SUFX_B) { -// SUFX_B is used for Turkish, tr_rules contains "(Pb£ +// SUFX_B is used for Turkish, tr_rules contains "(Pb£ // retranslate the prefix part char *wordpf; char prefix_phonemes2[12]; @@ -1593,7 +1593,7 @@ static int TranslateWord2(Translator *tr, char *word, WORD_TAB *wtab, int pre_pa plist2 = &ph_list2[n_ph_list2]; stress = 0; - next_stress = 0; + next_stress = 1; srcix = 0; max_stress = -1; @@ -1663,7 +1663,7 @@ static int TranslateWord2(Translator *tr, char *word, WORD_TAB *wtab, int pre_pa // don't add stress phonemes codes to the list, but give their stress // value to the next vowel phoneme // std_length is used to hold stress number or (if >10) a tone number for a tone language - if(ph->spect == 0) + if(ph->program == 0) next_stress = ph->std_length; else { @@ -1720,7 +1720,7 @@ static int TranslateWord2(Translator *tr, char *word, WORD_TAB *wtab, int pre_pa if(ph->type == phVOWEL) { stress = next_stress; - next_stress = 0; + next_stress = 1; // default is 'unstressed' if(stress >= 4) { @@ -2272,7 +2272,7 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre if((c == 0x92) || (c == 0xb4) || (c == 0x2019) || (c == 0x2032)) c = '\''; // 'microsoft' quote or sexed closing single quote, or prime - possibly used as apostrophe - if((c == '?') && IsAlpha(prev_out) && IsAlpha(next_in)) + if(((c == 0x2018) || (c == '?')) && IsAlpha(prev_out) && IsAlpha(next_in)) { // ? between two letters may be a smart-quote replaced by ? c = '\''; diff --git a/src/translate.h b/src/translate.h index e8bfbc17..db5f56c5 100755 --- a/src/translate.h +++ b/src/translate.h @@ -229,15 +229,6 @@ typedef struct{ unsigned char length; } WORD_TAB; -// a clause translated into phoneme codes (first stage) -typedef struct { - unsigned char phcode; - unsigned char stresslevel; - unsigned char tone_ph; - unsigned char synthflags; - unsigned short sourceix; -} PHONEME_LIST2; - typedef struct { int type; @@ -642,5 +633,7 @@ void *TranslateClause(Translator *tr, FILE *f_text, const void *vp_input, int *t int ReadClause(Translator *tr, FILE *f_in, char *buf, short *charix, int *charix_top, int n_buf, int *tone_type); void SetVoiceStack(espeak_VOICE *v); +void InterpretPhoneme(Translator *tr, int control, PHONEME_LIST *plist, PHONEME_DATA *phdata); +void InterpretPhoneme2(int phcode, PHONEME_DATA *phdata); extern FILE *f_trans; // for logging diff --git a/src/vowelchart.cpp b/src/vowelchart.cpp index fde5bda0..3cb091fa 100644 --- a/src/vowelchart.cpp +++ b/src/vowelchart.cpp @@ -511,7 +511,7 @@ void MakeVowelLists(void) SPECT_SEQ *seq; SPECT_SEQK *seqk; frame_t *frame; - int match_level; + PHONEME_DATA phdata; char dirname[sizeof(path_source)+20]; char fname[sizeof(dirname)+40]; @@ -540,10 +540,12 @@ void MakeVowelLists(void) ph = phoneme_tab[phcode]; - if(ph->type != phVOWEL) + if((ph==NULL) || (ph->type != phVOWEL)) continue; - if((ix = LookupSound(ph, phoneme_tab[phonPAUSE], 1, &match_level, 0)) == 0) + InterpretPhoneme2(phcode, &phdata); + + if((ix = phdata.sound_addr[pd_FMT]) == 0) continue; seq = (SPECT_SEQ *)(&spects_data[ix]); @@ -572,9 +574,11 @@ void MakeVowelLists(void) } -extern int n_envelopes; -extern char envelope_paths[][80]; -extern unsigned char envelope_dat[][128]; +#define N_ENVELOPES 30 +#define ENV_LEN 128 +int n_envelopes = 0; +char envelope_paths[N_ENVELOPES][80]; +unsigned char envelope_dat[N_ENVELOPES][ENV_LEN]; #define HT_ENV 140 #define WD_ENV 128*2 diff --git a/src/wavegen.cpp b/src/wavegen.cpp index 3cb4e8fc..f423ee1b 100755 --- a/src/wavegen.cpp +++ b/src/wavegen.cpp @@ -720,7 +720,6 @@ void WavegenInit(int rate, int wavemult_fact) max_hval = 0; wdata.amplitude = 32; - wdata.prev_was_synth = 0; for(ix=0; ix> 10; z2 = (z2 * wdata.mix_wave_amp)/32; + + if((wdata.mix_wavefile_ix + wdata.mix_wavefile_offset) >= wdata.mix_wavefile_max) // reached the end of available WAV data + wdata.mix_wavefile_offset -= (wdata.mix_wavefile_max*3)/4; } z1 = z2 + (((total>>8) * amplitude2) >> 13); @@ -1864,14 +1866,14 @@ int WavegenFill(int fill_zeros) echo_complete -= length; } wdata.n_mix_wavefile = 0; - wdata.prev_was_synth = 0; + KlattReset(1); result = PlaySilence(length,resume); break; case WCMD_WAVE: echo_complete = echo_length; wdata.n_mix_wavefile = 0; - wdata.prev_was_synth = 0; + KlattReset(1); result = PlayWave(length,resume,(unsigned char*)q[2], q[3] & 0xff, q[3] >> 8); break; @@ -1879,11 +1881,15 @@ int WavegenFill(int fill_zeros) // wave file to be played at the same time as synthesis wdata.mix_wave_amp = q[3] >> 8; wdata.mix_wave_scale = q[3] & 0xff; + wdata.n_mix_wavefile = (length & 0xffff); + wdata.mix_wavefile_max = (length >> 16) & 0xffff; if(wdata.mix_wave_scale == 0) - wdata.n_mix_wavefile = length*2; - else - wdata.n_mix_wavefile = length; + { + wdata.n_mix_wavefile *= 2; + wdata.mix_wavefile_max *= 2; + } wdata.mix_wavefile_ix = 0; + wdata.mix_wavefile_offset = 0; wdata.mix_wavefile = (unsigned char *)q[2]; break;