eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cmn_rules 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. // This file is UTF8 encoded
  2. // Default is to handle latin characters as pinyin
  3. // ?1: speak latin characters as English words
  4. .replace
  5. //replace tone mark with tone number
  6. ˉ 1
  7. ˊ 2
  8. ˇ 3
  9. ˋ 4
  10. ā a1
  11. á a2
  12. ǎ a3
  13. à a4
  14. // TODO: àn is not handled
  15. ō o1
  16. ó o2
  17. ŏ o3
  18. ǒ o3
  19. ò o4
  20. ê ea
  21. ē e1
  22. é e2
  23. ĕ e3
  24. ě e3
  25. è e4
  26. ī i1
  27. í i2
  28. ĭ i3
  29. ǐ i3
  30. ì i4
  31. ū u1
  32. ú u2
  33. ǔ u3
  34. ù u4
  35. ǖ ü1
  36. ǘ ü2
  37. ŭ u3
  38. ǚ ü3
  39. ǜ ü4
  40. //some pinyin vaiants
  41. ŋ ng
  42. ɑ a
  43. ɡ g
  44. ẑ zh
  45. ĉ ch
  46. ŝ sh
  47. .L01 j q x y
  48. .L02 1 2 3 4 5 // tone number
  49. .L03 a o e i u v ai ei ui ao ou iu ie ve er an en in un vn ang eng ing ong ua ue uo uai uan uang ia iao ian iang
  50. // Note: ngK matches "ng" if not followed by a vowel
  51. // (D will match on a digit and also if no digit is present. (special for tone
  52. language).
  53. // 儿 兒 erhua
  54. .group a
  55. a _^_EN
  56. a (L02 A
  57. ai (L02 ai
  58. ao (L02 Au
  59. a (nL02 a
  60. a (ngL02 A
  61. y) a (L02 iA
  62. y) a (L02 Au
  63. y) a (nL02 iE
  64. y) a (ngL02 iA
  65. .group b
  66. b _^_EN
  67. b (L03L02 p
  68. .group c
  69. c _^_EN
  70. c (L03L02 tsh
  71. ch (L03L02 ts.h
  72. .group d
  73. d _^_EN
  74. d (L03L02 t
  75. .group e
  76. e _^_EN
  77. e (L02 o-
  78. d) e @
  79. t) e @
  80. n) e @
  81. l) e @
  82. y) e iE
  83. ei (L02 ei
  84. e (nL02 @ // en
  85. e (ngL02 @ // eng
  86. er (L02 @r
  87. .group f
  88. f _^_EN
  89. f (L03L02 f
  90. .group g
  91. g _^_EN
  92. g (L03L02 k
  93. .group h
  94. h _^_EN
  95. h (L03L02 X
  96. .group i
  97. i _^_EN
  98. i (L02 i
  99. i (nL02 i // in
  100. i (ngL02 i // ing
  101. z) i (L02 i[
  102. c) i (L02 i[
  103. s) i (L02 i[
  104. h) i (L02 i. //after zh ch sh
  105. r) i (L02 i.
  106. ia (L02 iA
  107. ia (nL02 iE
  108. ia (ngL02 iA
  109. iao (L02 jAu
  110. ie (L02 iE
  111. io (ngL02 y
  112. q) io (ngL02 u
  113. iu (L02 iou
  114. .group j
  115. j _^_EN
  116. j (L03L02 tS;
  117. .group k
  118. k _^_EN
  119. k (L03L02 kh
  120. .group l
  121. l _^_EN
  122. l (L03L02 l
  123. .group m
  124. m _^_EN
  125. m (L03L02 m
  126. .group n
  127. n _^_EN
  128. n (L03L02 n
  129. n (L02 n
  130. ng (L02 N // consider (ng+vowel) as (n g+vowel) ??
  131. _) ng (K N- // syllablic [N]
  132. .group o
  133. o _^_EN
  134. o (L02 o
  135. ou (L02 ou
  136. ong (L02 ong
  137. y) o (L02 io
  138. y) ou (L02 iou
  139. .group p
  140. p _^_EN
  141. p (L03L02 ph
  142. .group q
  143. q _^_EN
  144. q (L03L02 tS;h
  145. .group r
  146. r _^_EN
  147. r (L03L02 z.
  148. .group s
  149. s _^_EN
  150. s (L03L02 s
  151. sh (L03L02 s.
  152. .group t
  153. t _^_EN
  154. t (L03L02 th
  155. .group u
  156. u _^_EN
  157. u (L02 u
  158. ua (L02 wA
  159. ua (nL02 ua
  160. g) ua (nL02 wa
  161. k) ua (nL02 wa
  162. ua (ngL02 wA
  163. uai (L02 uai
  164. ue (L02 yE // üe
  165. ui (L02 uei
  166. sh) ui (L02 wei
  167. u (nL02 u@
  168. k) u (nL02 wu@
  169. _h) u (nL02 wu@
  170. t) u (nL02 wu@
  171. uo (L02 uo
  172. sh) ui (L02 rei
  173. sh) u (nL02 wo-
  174. sh) uo (L02 wo
  175. L01) u y /// j,q,x,y + u
  176. L01) u (DnK y@
  177. q) u (DnK+ yi
  178. L01) ua (DnK y&
  179. L01) ue yE
  180. .group ü
  181. ü _^_EN
  182. ü (L02 y
  183. üe (L02 yE
  184. .group v //variant of ü
  185. v _^_EN
  186. l) v (L02 y // ü
  187. n) v (L02 y // ü
  188. l) ve (L02 yE // üe
  189. n) ve (L02 yE // üe
  190. .group w
  191. w _^_EN
  192. wa (L02 wA // wa
  193. wa (nL02 wA // wan
  194. wa (ngL02 wA // wang
  195. wai (L02 wai
  196. wei (L02 wei
  197. we (nL02 wu@ // wen
  198. we (ngL02 wu@ // weng
  199. wo (L02 wo
  200. wu (L02 wu
  201. .group x
  202. x _^_EN
  203. x (L03L02 S;
  204. .group y
  205. y _^_EN
  206. y (L03L02 j
  207. .group z
  208. z _^_EN
  209. z (L03L02 ts
  210. zh (L03L02 ts.
  211. // tone number
  212. .group
  213. 1 55
  214. 2 35
  215. 3 214
  216. 4 51
  217. 5 11
  218. | _|