ph_danish 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945
  1. // PB General rules for vowels:
  2. // Short vowels
  3. // ACC: Short "pille" [p?el@-], "andre" [AndRV]
  4. // AC[V]: Short "piler" [p?ilV] - verbs, not nouns, which is a problem
  5. // A[N]: Short "bange" [b?AN@-]
  6. // Long vowels
  7. // A + @- OR V: Long "ae" "aer" [&:@-]
  8. // AC + @- OR V: Long "pile" [pi:l@-]
  9. // AC[i]: Long "smidig" [smi:Di]
  10. // Vowel length changed by eSpeak
  11. // Between two voiced consonants
  12. // After [l/3]
  13. // Before [l/3]
  14. // After an "r" sound
  15. // Before [N]
  16. // Before voiced consonant + [i]
  17. // PROCEDURES
  18. // Change the length of SHORT vowels (?+vowel)
  19. procedure ShortVowelLength
  20. // "endelig", "ånder", "ynde" - Short initial vowel sounds too short TEST
  21. IF thisPh(isWordStart) AND nextPhW(n) THEN
  22. IF next2PhW(@-) OR next2PhW(V) THEN
  23. IF next2PhW(isWordEnd) THEN // NOT "ondeste"
  24. length 170
  25. RETURN
  26. ENDIF
  27. ENDIF
  28. ENDIF
  29. // "blod" "slutte", "løn" l/3 makes the vowel too long
  30. // NOT "mel'oner"
  31. IF prevPhW(l/3) AND thisPh(isFirstVowel) THEN
  32. IF thisPh(isStressed) THEN
  33. length 100
  34. IF nextPhW(N) THEN // [N] makes it even longer - "længden"
  35. LengthAdd -20
  36. ENDIF
  37. // Don't shorten it further if it comes after an "r" sound
  38. // Exit the procedure
  39. RETURN
  40. ENDIF
  41. // "transplantation" - the second a - between 2 voiced consonants
  42. IF nextPhW(isVoiced) AND nextPhW(isNotVowel) THEN
  43. length 100
  44. RETURN
  45. ENDIF
  46. ENDIF
  47. // "bygge", "bygget", "byggede" - consonant + [@-] makes the vowel too long
  48. IF NOT thisPh(?V) THEN // NOT "fjollet"
  49. IF prevPhW(isVoiced) AND nextPhW(isVoiced) THEN
  50. IF next2PhW(@-) THEN //AND next3PhW(D) THEN
  51. IF thisPh(isFirstVowel) THEN // NOT "cellof'anet"
  52. length 100
  53. RETURN
  54. ENDIF
  55. ENDIF
  56. ENDIF
  57. ENDIF
  58. // "byttet", "lyttet", "flyttet"
  59. IF prevPhW(isVoiced) AND prevPhW(isNotVowel) THEN
  60. IF nextPhW(isNotVowel) AND next2PhW(@-) AND next3PhW(D) THEN
  61. length 100
  62. ENDIF
  63. ENDIF
  64. // "firmaet", "politiet - 140 sounds too short
  65. IF nextPhW(@-) AND next2PhW(D) AND next2PhW(isWordEnd) THEN
  66. length 180
  67. ENDIF
  68. // "forsøgte" stressed second vowel too long TEST
  69. IF thisPh(isMaxStress) AND thisPh(isSecondVowel) THEN
  70. IF nextPhW(isVoiced) AND nextPhW(isNotVowel) THEN // NOT "papirer"
  71. // 2 voiced consonants seem to add further length ([gd] in "forsøgte")
  72. IF next2PhW(isVoiced) AND next2PhW(isNotVowel) THEN // NOT "moral"
  73. length 110
  74. RETURN
  75. ENDIF
  76. ENDIF
  77. ENDIF
  78. // "bygge", "forbandelse", "lynlås", "centralen" vowel between 2 voiced consonants - too long
  79. IF prevPhW(isVoiced) AND nextPhW(isVoiced) THEN // voiced
  80. IF prevPhW(isNotVowel) AND nextPhW(isNotVowel) THEN // consonants
  81. IF NOT nextPhW(isWordEnd) THEN // NOT "smil"
  82. IF NOT next2PhW(j) AND NOT prevPhW(R) THEN // NOT "vilje", "krympe"
  83. IF NOT nextPhW(r) AND NOT nextPhW(3-) THEN // NOT "moderne" - vowel + r/3-
  84. IF thisPh(isStressed) THEN // NOT [W] in "f'indelønnen"
  85. IF thisPh(isFirstVowel) THEN
  86. // IF NOT nextPhW(@-) THEN // NOT "væbne"
  87. IF NOT nextPhW(isNotVowel) AND NOT next2PhW(isNotVowel) THEN // NOT "væbne"
  88. length 110
  89. RETURN
  90. ENDIF
  91. ENDIF
  92. ENDIF
  93. ENDIF
  94. ENDIF
  95. IF prevPhW(R) THEN // "krympe" R makes the vowel longer than other voiced consonants
  96. // NOT [o] in "rod'eo", NOT [æ] in "trængte"
  97. IF thisPh(isMaxStress) AND NOT nextPhW(N) THEN
  98. length 90
  99. RETURN
  100. ENDIF
  101. // "trængte" - [N] after the vowel makes it even longer
  102. IF thisPh(isMaxStress) AND nextPhW(N) THEN
  103. length 75
  104. RETURN
  105. ENDIF
  106. ENDIF
  107. ENDIF
  108. ENDIF
  109. ENDIF
  110. // "buske" - only sg/sk? TEST
  111. IF prevPhW(isNotVowel) AND nextPhW(s) AND next2PhW(isNotVowel) AND next3PhW(@-) THEN
  112. length 100
  113. ENDIF
  114. // "projektet"
  115. IF prevPhW(S) AND nextPhW(isVoiced) AND nextPhW(isNotVowel) THEN
  116. length 100
  117. ENDIF
  118. // "rigtigt", "fred", "frem", "frikvarter" - R makes the vowel too long
  119. IF prevPhW(R) OR prevPhW(3-) OR prevPhW(r) THEN
  120. IF nextPhW(isNotVowel) THEN // NOT "krigen"
  121. IF thisPh(isFirstVowel) THEN // NOT the a in "moral"
  122. length 110
  123. RETURN
  124. ENDIF
  125. ENDIF
  126. // R makes the vowel too long
  127. IF thisPh(isWordEnd) THEN // "maleri"
  128. length 120
  129. RETURN
  130. ENDIF
  131. // "forbrydelse" between 2 voiced consonants
  132. IF nextPhW(isVoiced) AND nextPhW(isNotVowel) THEN
  133. length 110
  134. RETURN
  135. ENDIF
  136. ENDIF
  137. // "ring", "ringe", "fængsel", "spinkel", "vindspejl", "enke"
  138. IF nextPhW(N) THEN
  139. length 100
  140. ENDIF
  141. // "sigte", "henter" t/d + @-/V makes the vowel too long
  142. // ?? is this just between 2 voiced consonants ??
  143. // ?? does [h] act as a voiced consonant ??
  144. IF nextPhW(isNotVowel) AND next2PhW(t) OR next2PhW(d) THEN
  145. IF next3PhW(@-) OR next3PhW(V) OR next3PhW(?V) THEN
  146. IF thisPh(isFirstVowel) THEN // NOT [i] in "forsp'ildte"
  147. length 110
  148. RETURN
  149. ENDIF
  150. ENDIF
  151. ENDIF
  152. // "himlen", "pøblen" l/3 makes the vowel too long
  153. IF nextPhW(isNotVowel) AND next2PhW(l/3) AND next3PhW(@-) OR next3PhW(V) THEN
  154. length 110
  155. ENDIF
  156. // "filmen" vowel + l/3 makes the vowel too long
  157. // Probably due to 2 voiced consonants (lm) - Change the condition?
  158. IF nextPhW(l/3) AND next3PhW(@-) THEN
  159. IF NOT next2PhW(j) THEN // NOT "vilje"
  160. IF next2PhW(isVoiced) THEN // NOT [e] in "folkevogn"
  161. length 100
  162. ENDIF
  163. ENDIF
  164. ENDIF
  165. //"musikken", "piggen", "trafikken" consonant + [@-] makes the vowel too long
  166. // Probably wrong. Only k and g? Only [i]?
  167. // Could this be due to an English word like "physique" [fIz'i:k]?
  168. IF nextPhW(k) OR nextPhW(g)AND next2PhW(@-) THEN
  169. IF thisPh(?i) THEN
  170. length 100
  171. RETURN
  172. ENDIF
  173. ENDIF
  174. // "rodeo", lianen" abnormal stress sounds too short
  175. IF thisPh(isMaxStress) AND NOT thisPh(isFirstVowel) THEN
  176. IF NOT nextPhW(k) AND NOT nextPhW(g) THEN // NOT "ant'ikt" - Like "physique" above?
  177. IF NOT nextPhW(N) AND NOT next2PhW(isNotVowel) THEN // NOT "omkr'ing", "eks'empel"
  178. IF NOT nextPhW(isVoiced) AND NOT next2PhW(isVoiced) THEN // NOT "bestemme" TEST
  179. length 170
  180. ENDIF
  181. ENDIF
  182. ENDIF
  183. ENDIF
  184. endprocedure
  185. //--------------------------------------------------------------------
  186. // Change the length of NORMAL vowels (without ? in front of them)
  187. procedure LongVowelLength
  188. // "guldmine" [ul/3] makes the vowel extremely short
  189. IF prevVowel(l/3) AND prev2PhW(u) THEN
  190. length 350
  191. RETURN
  192. ENDIF
  193. // "guldur" [ul/3] makes the vowel extremely short
  194. IF prev2PhW(u) AND prevPhW(l/3) THEN
  195. IF NOT thisPh(isWordEnd) THEN // NOT "umulig"
  196. IF NOT nextPhW(t) AND NOT nextPhW(d) THEN // NOT "umuligt"
  197. IF NOT nextPhW(s) AND NOT nextPhW(S) THEN // NOT Drakulas, spekulationer ???
  198. length 325
  199. RETURN
  200. ENDIF
  201. ENDIF
  202. ENDIF
  203. ENDIF
  204. // "dage", "dagevis", fødselsdage" STRANGE BEHAVIOUR - too short at 240
  205. IF prevPhW(d) AND nextPhW(@-) THEN
  206. IF NOT next2PhW(D) THEN
  207. length 350
  208. RETURN
  209. ENDIF
  210. ENDIF
  211. // "tjeneste" TEST
  212. IF prevPhW(tS) AND nextPhW(isVoiced) AND nextPhW(isNotVowel) THEN
  213. length 180
  214. RETURN
  215. ENDIF
  216. // "havet", "lavet"
  217. IF nextPhW(isVoiced) AND next2PhW(@-) AND next3PhW(D) THEN
  218. length 180
  219. RETURN
  220. ENDIF
  221. // "videre"
  222. IF prevPhW(isVoiced) AND nextPhW(isVoiced) THEN // voiced
  223. IF prevPhW(isNotVowel) AND nextPhW(isNotVowel) THEN // consonants
  224. IF NOT prevPhW(R) AND NOT prevPhW(r) AND NOT prevPhW(3-) THEN
  225. length 180
  226. RETURN
  227. ELSE // [A] in "begravelse" - "r" adds extra length
  228. length 120
  229. RETURN
  230. ENDIF
  231. ENDIF
  232. ENDIF
  233. // "alene" - Short initial vowel sounds too short at length 140
  234. IF thisPh(isWordStart) THEN
  235. length 160
  236. // "år? [O] - The word is only 1 vowel: make it long
  237. IF thisPh(isWordEnd) THEN
  238. length 180
  239. ENDIF
  240. // "ønske" The vowel should have been made short becauce of 3 x consonant.
  241. // Take care of it here
  242. IF nextPhW(isNotVowel) AND next2PhW(isNotVowel) AND next3PhW(isNotVowel) THEN
  243. length 140
  244. ENDIF
  245. // "ære"
  246. IF nextPhW(V) AND nextPhW(isFinalVowel) THEN
  247. length 240
  248. ENDIF
  249. // "øge", "øgede"
  250. IF nextPhW(isNotVowel) AND next2PhW(@-) THEN
  251. length 225
  252. ENDIF
  253. // RETURN
  254. ENDIF
  255. // "døre" vowel + vowel: long
  256. IF nextPhW(@-) OR nextPhW(?V) THEN
  257. length 225
  258. ENDIF
  259. // "pæne" vowel + consonant + [@-]: long
  260. IF nextPhW(isNotVowel) AND next2PhW(@-) THEN
  261. IF thisPh(isFirstVowel) THEN
  262. IF prevPhW(isVoiced) AND nextPhW(isVoiced) THEN // "vide"
  263. length 180
  264. ELSE // "pæne"
  265. length 225
  266. ENDIF
  267. RETURN
  268. ENDIF
  269. // Stressed second syllable in words with initial be- and for-
  270. IF NOT thisPh(isSecondVowel) AND thisPh(isMaxStress) THEN // "beb'ude", "form'ode"
  271. length 140
  272. RETURN
  273. ENDIF
  274. ENDIF
  275. // "vildrede"
  276. IF nextPhW(D) AND next2PhW(@-) THEN
  277. IF NOT thisPh(isMaxStress) THEN
  278. length 225
  279. RETURN
  280. ENDIF
  281. ENDIF
  282. // "guderne", "møde"
  283. IF nextPhW(isNotVowel) AND next2PhW(?V) OR next2PhW(V) OR next2PhW(@-) THEN
  284. length 225
  285. ENDIF
  286. // "mødes", "vred", "møve", "mene", "dele" - vowel too long between 2 voiced consonants
  287. IF prevPhW(isVoiced) AND nextPhW(isVoiced) THEN
  288. IF prevPhW(isNotVowel) AND nextPhW(isNotVowel) THEN
  289. IF NOT prevPhW(R) AND NOT prevPhW(r) AND NOT prevPhW(3-) AND NOT prevPhW(l/3) THEN
  290. IF NOT next2PhW(isVoiced) THEN // NOT "bælte", "bomben"
  291. length 180 // mødes, dele
  292. RETURN
  293. ENDIF
  294. IF next2PhW(isNotVowel) THEN // bælte, svælge
  295. length 120
  296. ENDIF
  297. ELIF NOT prevPhW(l/3) AND thisPh(isMaxStress) THEN
  298. IF NOT prevPhW(R) AND NOT prevPhW(r) AND NOT prevPhW(3-) THEN
  299. length 120 // "vred", "vrede"
  300. RETURN
  301. ENDIF
  302. ENDIF
  303. IF prevPhW(R) AND prevPhW(isWordStart) THEN // "råderet"
  304. length 180
  305. RETURN
  306. ENDIF
  307. ENDIF
  308. ENDIF
  309. // "huske" - hACC@- vowel too long
  310. // 2 consonants - should have been short in da_rules
  311. // 140 too long because of [h]??
  312. IF prevPhW(h) AND nextPhW(isNotVowel) AND next2PhW(isNotVowel) AND next3PhW(@-) THEN
  313. length 110
  314. RETURN
  315. ENDIF
  316. // PB long vowel followed by [@-] or [V](vowel+vowel) - "pigen" [p'i@-n]
  317. IF nextPhW(@-) OR nextPhW(V) THEN
  318. IF thisPh(isFirstVowel) THEN // NOT "best'yrelse", "geb'yrer"
  319. length 225
  320. ENDIF
  321. ENDIF
  322. // "lydig"
  323. IF prevPhW(l/3) AND nextPhW(isVoiced) AND nextPhW(isNotVowel) THEN
  324. length 180
  325. RETURN
  326. ENDIF
  327. // PB "enig", "enige", "evig", "stædig" - vowel+consolant+[i]
  328. IF nextPhW(isNotVowel) AND next2PhW(i) THEN
  329. length 225
  330. RETURN
  331. ENDIF
  332. // "føden"
  333. IF nextPhW(D) AND next2PhW(@-) AND next3PhW(n) THEN
  334. IF thisPh(isFirstVowel) THEN
  335. length 180
  336. ENDIF
  337. ENDIF
  338. // l/3 + vowel makes the vowel too long
  339. IF prevPhW(l/3) AND nextPhW(isNotVowel) THEN
  340. // "klub", "klud", "slut"
  341. // The vowel should have been short but we fix it here
  342. IF NOT next2PhW(@-) AND NOT next2PhW(V) AND NOT next2PhW(?V) THEN // NOT "slæde"
  343. length 100
  344. ELSE
  345. // "slæde", "lader", "forlader"
  346. length 160
  347. ENDIF
  348. ENDIF
  349. // l/3 + vowel + voiced consonant makes the vowel too long
  350. IF prevPhW(l/3) AND nextPhW(isVoiced) AND nextPhW(isNotVowel) THEN
  351. length 130
  352. ENDIF
  353. // "fryser", "rige"
  354. IF prevPhW(r) OR prevPhW(R) OR prevPhW(3-) THEN
  355. length 130
  356. IF nextPhW(@-) THEN // "rige" [@-] seems to cancel the "r" effect
  357. length 240
  358. ENDIF
  359. ENDIF
  360. // "længe" - short - 2 consonants => 1 consonant (ng => [N])
  361. // Don't use isNasal here!
  362. IF nextPhW(N) THEN
  363. IF NOT prevPhW(R) AND NOT prevPhW(r) AND NOT prevPhW(3-) THEN
  364. length 140
  365. ENDIF
  366. ENDIF
  367. // "buskene", "krøbling" The vowel should have been made short becauce og 2 x consonant.
  368. // Take care of it here
  369. IF nextPhW(isNotVowel) AND next2PhW(isNotVowel) THEN
  370. IF NOT nextPhW(l/3) THEN
  371. IF NOT nextPhW(r) AND NOT prevPhW(R) AND NOT prevPhW(3-) THEN // NOT "Maria"
  372. length 110
  373. ENDIF
  374. ENDIF
  375. ENDIF
  376. endprocedure
  377. //----------------------------------------------------------------------
  378. // PHONEMES
  379. // A bit longer than [@-]
  380. phoneme @
  381. vwl starttype #@ endtype #@
  382. unstressed
  383. length 60
  384. IfNextVowelAppend(_!)
  385. FMT(vowel/@_3)
  386. endphoneme
  387. phoneme @- // very short schwa
  388. vwl starttype #@ endtype #@
  389. unstressed nsy
  390. ipa ə
  391. IF nextPhW(*) OR nextPhW(r) THEN
  392. ipa NULL // @-* is used to make 'r'
  393. ENDIF
  394. length 50
  395. // "femten", "manden" - only a short "n" sound
  396. IF nextPhW(n) THEN
  397. length 15
  398. ENDIF
  399. IF prevPhW(isNotVowel) AND thisPh(isWordEnd) THEN
  400. length 15
  401. ENDIF
  402. // "lige" [li@-]
  403. IF prevPhW(i) AND thisPh(isWordEnd) THEN
  404. length 15
  405. ENDIF
  406. IF nextPhW(isVowel) THEN
  407. ChangePhoneme(@)
  408. ENDIF
  409. FMT(vowel/@-)
  410. endphoneme
  411. // ToDo: change [@] to [a#] if adjacent to [r] or [R]
  412. phoneme 3
  413. vwl starttype #a endtype #a
  414. unstressed
  415. length 40
  416. FMT(vowel/a#_3)
  417. endphoneme
  418. // PB sort of schwa [ɐ] (0250+032F)
  419. // "spurgt" [sp'o3-d] – ipa [spˈoɐ̯d]
  420. phoneme 3- // used for 'r' after a vowel (to create a diphthong)
  421. liquid
  422. lengthmod 7
  423. ipa ɐ̯
  424. FMT(r/a_)
  425. endphoneme
  426. phoneme i
  427. vwl starttype #i endtype #i
  428. length 140
  429. CALL LongVowelLength
  430. FMT(vowel/i_4)
  431. endphoneme
  432. // PB short i
  433. // sviret vs. svirret
  434. phoneme ?i
  435. vwl starttype #i endtype #i
  436. length 140
  437. CALL ShortVowelLength
  438. // Don't link with the next vowel with [;] - vowel too short
  439. // IfNextVowelAppend(;)
  440. FMT(vowel/i_4)
  441. endphoneme
  442. // PB English i - Tim
  443. phoneme I
  444. vwl starttype #i endtype #i
  445. length 130
  446. IfNextVowelAppend(;)
  447. FMT(vowel/ii_2)
  448. endphoneme
  449. phoneme e
  450. vwl starttype #e endtype #e
  451. length 140
  452. CALL LongVowelLength
  453. FMT(vowel/e)
  454. endphoneme
  455. // PB short e
  456. // "skille" vs. "skele", "pille" vs. "pile"
  457. phoneme ?e
  458. vwl starttype #e endtype #e
  459. length 140
  460. CALL ShortVowelLength
  461. FMT(vowel/e)
  462. endphoneme
  463. phoneme E
  464. vwl starttype #e endtype #e
  465. length 140
  466. // no link with next vowel
  467. IF thisPh(isWordEnd) THEN
  468. IfNextVowelAppend(_!)
  469. ENDIF
  470. // "ære", "kærester", "ærefrygt" - vowel + vowel
  471. IF nextPhW(V) THEN
  472. length 225
  473. ENDIF
  474. // "dræber" TEST shortened by -70 in procedure because of the "r" sound
  475. IF prevPhW(R) OR prevPhW(r) OR prevPhW(3-) AND next2PhW(V) THEN
  476. length 225
  477. ENDIF
  478. CALL LongVowelLength
  479. // "værelse" [v'E3-Vls@_!]
  480. IF nextPhW(3-) AND next2PhW(V) THEN
  481. length 100
  482. ENDIF
  483. FMT(vowel/e_mid2)
  484. endphoneme
  485. // PB short E
  486. // "læsse" vs. "læse"
  487. phoneme ?E
  488. vwl starttype #e endtype #e
  489. ipa ε
  490. length 140
  491. CALL ShortVowelLength
  492. FMT(vowel/e_mid2)
  493. endphoneme
  494. phoneme &
  495. vwl starttype #e endtype #e
  496. ipa a
  497. length 140
  498. // "same", "sale", "bade" - consonant + @-: long
  499. // but NOT "hinanden"
  500. IF nextPhW(isNotVowel) AND next2PhW(@-) OR next2PhW(@) THEN
  501. IF NOT next3PhW(n) THEN
  502. length 225
  503. ENDIF
  504. ENDIF
  505. // ThisPh + V or @-
  506. // "ae", "aer" vowel + vowel: extra length
  507. IF nextPhW(@-) OR nextPhW(V) THEN
  508. length 260
  509. ENDIF
  510. CALL LongVowelLength
  511. FMT(vowel/ee_2)
  512. endphoneme
  513. // Short &
  514. // e.g. the last a in "staldkarl"
  515. // "sale" vs. "sal"
  516. phoneme ?&
  517. ipa a
  518. vwl starttype #e endtype #e
  519. length 140
  520. CALL ShortVowelLength
  521. FMT(vowel/ee_2)
  522. endphoneme
  523. // Added for the æ in "dræbt"
  524. phoneme &#
  525. vwl starttype #e endtype #e
  526. length 140
  527. ipa a
  528. CALL LongVowelLength
  529. FMT(vowel/&)
  530. endphoneme
  531. // PB short &#
  532. // "revl" vs. "tremme"
  533. phoneme ?&#
  534. vwl starttype #e endtype #e
  535. ipa ?a
  536. length 140
  537. CALL ShortVowelLength
  538. FMT(vowel/&)
  539. endphoneme
  540. phoneme A // PB changed to a_8
  541. vwl starttype #a endtype #a
  542. ipa ɑ
  543. length 140
  544. CALL LongVowelLength
  545. // "fare" [f'A:A]
  546. IF nextPhW(A) THEN
  547. length 225
  548. ENDIF
  549. FMT(vowel/a_8)
  550. endphoneme
  551. // Short A
  552. // "krabbe" vs. "drabelig"
  553. phoneme ?A
  554. vwl starttype #a endtype #a
  555. ipa ?ɑ
  556. length 140
  557. CALL ShortVowelLength
  558. FMT(vowel/a_8)
  559. endphoneme
  560. phoneme u
  561. vwl starttype #u endtype #u
  562. length 140
  563. // "suge", "uge", "bluse", "julegave"
  564. IF nextPhW(@-) OR nextPhW(V) OR next2PhW(@-) OR next2PhW(V)THEN
  565. length 225
  566. ENDIF
  567. IF NOT thisPh(isWordStart) THEN // NOT "undøvendig"
  568. CALL LongVowelLength
  569. ENDIF
  570. FMT(vowel/u_bck)
  571. endphoneme
  572. // Short u
  573. // "tude" vs. "tuden" - [tuD3] [t?uD@n]
  574. phoneme ?u
  575. vwl starttype #u endtype #u
  576. length 140
  577. CALL ShortVowelLength
  578. FMT(vowel/u_bck)
  579. endphoneme
  580. phoneme o
  581. vwl starttype #o endtype #o
  582. length 140
  583. // "kone", "koner" o + consonant + V or @-
  584. IF next2PhW(V) OR next2PhW(@-) THEN
  585. length 225
  586. ENDIF
  587. CALL LongVowelLength
  588. FMT(vowel/o_2)
  589. endphoneme
  590. // PB Short o
  591. // "patron" vs. "kone"
  592. phoneme ?o
  593. vwl starttype #o endtype #o
  594. length 140
  595. CALL ShortVowelLength
  596. FMT(vowel/o_2)
  597. endphoneme
  598. phoneme O
  599. vwl starttype #o endtype #o
  600. length 140
  601. ipa ɒ // changed from ɔ - Den Danske Ordbog: ɒ
  602. // "såre", "sårede" [s'O:?OD@-]
  603. IF nextPhW(O) OR nextPhW(?O) THEN
  604. length 225
  605. ENDIF
  606. CALL LongVowelLength
  607. FMT(vowel/o_5)
  608. endphoneme
  609. // Short O
  610. // "toget" vs. "tåget"
  611. phoneme ?O
  612. vwl starttype #o endtype #o
  613. ipa ɒ // changed from ɔ - Den Danske Ordbog: ɒ
  614. length 140
  615. CALL ShortVowelLength
  616. FMT(vowel/o_5)
  617. endphoneme
  618. phoneme V
  619. vwl starttype #@ endtype #@
  620. length 140
  621. CALL LongVowelLength
  622. FMT(vowel/V_4)
  623. endphoneme
  624. // PB Short V
  625. // "forstår" vs. "kåre"
  626. phoneme ?V
  627. vwl starttype #@ endtype #@
  628. length 140
  629. CALL ShortVowelLength
  630. FMT(vowel/V_4)
  631. endphoneme
  632. phoneme 0
  633. vwl starttype #o endtype #o
  634. length 140
  635. ipa ɔ
  636. CALL LongVowelLength
  637. FMT(vowel/oo_2)
  638. endphoneme
  639. // Short 0 "sukker", "provst"
  640. phoneme ?0
  641. vwl starttype #o endtype #o
  642. length 140
  643. ipa ɔ
  644. CALL ShortVowelLength
  645. FMT(vowel/oo_2)
  646. endphoneme
  647. phoneme y
  648. vwl starttype #i endtype #i
  649. length 140
  650. CALL LongVowelLength
  651. FMT(vowel/y)
  652. endphoneme
  653. // PB Short y
  654. // "kylling" vs. "kyle", "krybbe" vs. "krybe"
  655. phoneme ?y
  656. vwl starttype #i endtype #i
  657. length 140
  658. CALL ShortVowelLength
  659. FMT(vowel/y)
  660. endphoneme
  661. phoneme Y
  662. vwl starttype #i endtype #i
  663. length 140
  664. IF nextPhW(V) OR nextPhW(@-) THEN
  665. length 225
  666. ENDIF
  667. CALL LongVowelLength
  668. FMT(vowel/yy)
  669. endphoneme
  670. phoneme W
  671. vwl starttype #@ endtype #@
  672. length 140
  673. CALL LongVowelLength
  674. FMT(vowel/oe)
  675. endphoneme
  676. // Short W
  677. // "prøv" vs. "prøve"
  678. phoneme ?W
  679. vwl starttype #@ endtype #@
  680. length 140
  681. CALL ShortVowelLength
  682. FMT(vowel/oe)
  683. endphoneme
  684. // Added for the ø in "røv", "røg", "øje" instead of [V3]
  685. phoneme W#
  686. vwl starttype #@ endtype #@
  687. length 140
  688. CALL LongVowelLength
  689. FMT(vowel/V)
  690. endphoneme
  691. // Short W#
  692. // "rømme"
  693. phoneme ?W#
  694. vwl starttype #@ endtype #@
  695. length 140
  696. CALL ShortVowelLength
  697. FMT(vowel/V)
  698. endphoneme
  699. phoneme aI
  700. vwl starttype #a endtype #i
  701. length 300
  702. IF NOT next2Ph(3) AND NOT next2Ph(V) AND NOT next2Ph(@-) AND nextPhW(isNotVowel) THEN
  703. glstop
  704. length 225
  705. ENDIF
  706. // "dreje" [dR'aI@-_!]
  707. IF nextPhW(3) OR nextPhW(V) OR nextPhW(@) OR nextPhW(@-) THEN
  708. length 280
  709. ENDIF
  710. // PB "drej" vs. "dreje"
  711. IF thisPh(isWordEnd) THEN
  712. length 140
  713. ENDIF
  714. // "lejde" [l'aId@-_!], "lejder" [l'aIdV_!]
  715. IF nextPhW(isNotVowel) AND next2PhW(@-) OR next2PhW(V) THEN
  716. length 190
  717. ENDIF
  718. FMT(vdiph/ai)
  719. endphoneme
  720. // CONSONANTS
  721. // PB added l/3
  722. phoneme l
  723. liquid
  724. lengthmod 7
  725. // [ll] => [-l] - avoid double l
  726. IF nextPhW(l) THEN
  727. // ChangePhoneme(NULL)
  728. ENDIF
  729. ChangePhoneme(l/3)
  730. // CALL base1/l
  731. endphoneme
  732. phoneme l/3 // Replacement for [l/]
  733. liquid
  734. lengthmod 7
  735. length 80
  736. FMT(l/l_)
  737. endphoneme
  738. phoneme v // approximant, not fricative
  739. import_phoneme base1/v#
  740. voicingswitch f
  741. endphoneme
  742. // PB Actually a kind of schwa = [ɐ]? - "byder" [bˈyðɐʌ]
  743. phoneme r // used for 'r' after a vowel (to create a diphthong)
  744. liquid
  745. lengthmod 7
  746. ipa ɐ̯
  747. IF nextPhW(isVowel) AND NOT nextPhW(?V) AND NOT nextPhW(V) AND NOT nextPhW(@-) THEN
  748. ChangePhoneme(R)
  749. ENDIF
  750. // "generer" [Sen'e:Vr], "mysterier" - delete the r
  751. IF prevPhW(V) OR prevPhW(?V) AND thisPh(isWordEnd) THEN
  752. ChangePhoneme(_!)
  753. ENDIF
  754. // "plamagers" [pl&m'&SVrs] - delete the r
  755. IF prevPhW(V) OR prevPhW(?V) AND nextPhW(s) AND nextPhW(isWordEnd) THEN
  756. ChangePhoneme(NULL)
  757. ENDIF
  758. // "plamagerne" [pl&m'&SVrn@-] - delete the r
  759. IF prevPhW(V) OR prevPhW(?V) AND nextPhW(n) AND next2PhW(@-) THEN
  760. ChangePhoneme(NULL)
  761. ENDIF
  762. // "kreaturer" [kR,?E?&t'ur?V] - delete the r
  763. // Previous vowel stressed by $alt rule
  764. IF nextPhW(V) OR nextPhW(?V) AND nextPh(isWordEnd) THEN
  765. IF prevPhW(isMaxStress) THEN
  766. ChangePhoneme(NULL)
  767. ENDIF
  768. ENDIF
  769. FMT(r/a_)
  770. endphoneme
  771. phoneme R
  772. lengthmod 6
  773. liquid
  774. ipa ʁ
  775. FMT(r/aa)
  776. endphoneme
  777. // don't weaken consonants at end of word or before a stop
  778. phoneme s
  779. vls alv frc sib
  780. voicingswitch z
  781. lengthmod 3
  782. Vowelin f1=0 f2=1700 -300 300 f3=-100 80
  783. Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
  784. IF nextPh(p) OR nextPh(t) OR nextPh(k) THEN
  785. WAV(ufric/s!)
  786. ENDIF
  787. WAV(ufric/s)
  788. endphoneme
  789. phoneme p
  790. vls blb stp
  791. voicingswitch b
  792. lengthmod 7
  793. Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11
  794. Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22
  795. IF nextPh(isPause2) THEN
  796. WAV(ustop/p_unasp)
  797. ELIF nextPh(r) THEN
  798. WAV(ustop/pr, 70)
  799. ELIF nextPh(R) OR nextPh(R2) THEN
  800. WAV(ustop/pr)
  801. ELIF nextPh(@-) THEN
  802. WAV(ustop/p_unasp)
  803. ELIF nextPh(l) THEN
  804. WAV(ustop/pl)
  805. ENDIF
  806. WAV(ustop/p)
  807. endphoneme
  808. phoneme t
  809. vls alv stp
  810. voicingswitch d
  811. lengthmod 7
  812. Vowelin f1=0 f2=1700 -300 300 f3=-100 80
  813. Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
  814. IF nextPh(r) OR nextPh(R) OR nextPh(R2) THEN
  815. WAV(ustop/tr)
  816. ENDIF
  817. // "respekt" [REsp'Egd]
  818. IF thisPh(isWordEnd) THEN
  819. // ChangePhoneme(d)
  820. ENDIF
  821. WAV(ustop/t, 90)
  822. endphoneme
  823. phoneme j
  824. liquid pal
  825. lengthmod 7
  826. // no link with next vowel
  827. IF thisPh(isWordEnd) THEN
  828. IfNextVowelAppend(_!)
  829. ENDIF
  830. IF nextPhW(isVowel) THEN
  831. NextVowelStarts
  832. VowelStart(j/j@) // jøderne
  833. VowelStart(j/ja)
  834. VowelStart(j/je)
  835. VowelStart(j/ji)
  836. VowelStart(j/jo) // "kjole"
  837. VowelStart(j/ju)
  838. EndSwitch
  839. Vowelout len=70
  840. VowelEnding(j/xj, -30)
  841. IF prevPh(isPause) THEN
  842. FMT(j/_j)
  843. ENDIF
  844. ELSE
  845. // no vowel follows
  846. Vowelout len=70
  847. FMT(j/j_)
  848. ENDIF
  849. endphoneme