Skip to content

Commit

Permalink
Merge pull request #943
Browse files Browse the repository at this point in the history
  • Loading branch information
valdisvi committed May 17, 2021
2 parents 17e6bd0 + c83d9f1 commit 7327895
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,10 @@ The espeak-ng project is a fork of the espeak project.
* Added voice variants
* Renamed zh to cmn (Mandarin)
* Renamed zhy to yue (Cantonese)
* cmn (Mandarin) now assumes all latin characters all English text.
Use cmn-latn-pinyin for interpreting latin characters as pinyin.



bug fixes:
* Fix reading malformed SSML (Christopher Brannon)
Expand Down
31 changes: 30 additions & 1 deletion dictsource/cmn_rules
@@ -1,5 +1,8 @@
// This file is UTF8 encoded

// Default is to handle latin characters as pinyin
// ?1: speak latin characters as English words

.replace
//replace tone mark with tone number
ˉ 1
Expand Down Expand Up @@ -53,6 +56,7 @@ language).
// 儿 兒 erhua

.group a
?1 a _^_EN
a A
ai ai
a1i ai55
Expand Down Expand Up @@ -82,19 +86,23 @@ language).
y) a (DngK iA

.group b
?1 b _^_EN
b p
@) b (K _^_EN

.group c
?1 c _^_EN
c tsh
ch (+ ts.h
@) c (K _^_EN

.group d
?1 d _^_EN
d t
@) d (K _^_EN

.group e
?1 e _^_EN
e o-
d) e @
t) e @
Expand All @@ -117,18 +125,22 @@ language).
e4r (K @r51

.group f
?1 f _^_EN
f f
@) f (K _^_EN

.group g
?1 g _^_EN
g k
@) g (K _^_EN

.group h
?1 h _^_EN
h X
@) h (K _^_EN

.group i
?1 i _^_EN
i i //i in ing
z) i i[
c) i i[
Expand All @@ -149,28 +161,34 @@ language).
iu iou

.group j
?1 j _^_EN
j tS;
@) j (K _^_EN

.group k
?1 k _^_EN
k kh
@) k (K _^_EN

.group l
?1 l _^_EN
l l
@) l (K _^_EN
@) l (v l

.group m
?1 m _^_EN
m m
@) m (K _^_EN

.group n
?1 n _^_EN
n n
ng (K N // consider (ng+vowel) as (n g+vowel) ??
_) ng (K N- // syllablic [N]

.group o
?1 o _^_EN
o o

ou ou
Expand All @@ -193,27 +211,33 @@ language).
y) o4u iou51

.group p
?1 p _^_EN
p ph
@) p (K _^_EN

.group q
?1 q _^_EN
q tS;h
@) q (K _^_EN

.group r
?1 r _^_EN
r z.
r (K @r11

.group s
?1 s _^_EN
s s
sh (+ s.
@) s (K _^_EN

.group t
?1 t _^_EN
t th
@) t (K _^_EN

.group u
?1 u _^_EN
u u
ua wA
ua (DnK ua
Expand Down Expand Up @@ -246,17 +270,20 @@ language).


.group ü
?1 ü _^_EN
ü y
üe yE

.group v //variant of ü
?1 v _^_EN
v v // foreign words
l) v y //ü
n) v y //ü
l) ve yE //üe
n) ve yE //üe

.group w
?1 w _^_EN
@) w (K _^_EN
wa wA //wa wan wang
wai wai
Expand All @@ -274,10 +301,12 @@ language).
wu wu

.group x
?1 x _^_EN
x S;
@) x (K _^_EN

.group y
?1 y _^_EN
y j //before a o e i
y (u //NULL before u
y (uK ;
Expand All @@ -287,6 +316,7 @@ language).
@) y (K _^_EN

.group z
?1 z _^_EN
z ts
zh (+ ts.
@) z (K _^_EN
Expand All @@ -300,4 +330,3 @@ language).
5 11

| _|

4 changes: 3 additions & 1 deletion espeak-ng-data/lang/sit/cmn
@@ -1,4 +1,4 @@
name Chinese (Mandarin)
name Chinese (Mandarin, latin as English)
language cmn
language zh-cmn
language zh
Expand All @@ -10,6 +10,8 @@ pitch 80 118

dict_min 100000

dictrules 1 // interpret latin characters as English text

//for some dialects

//[en]: replace ng with n
Expand Down
11 changes: 11 additions & 0 deletions espeak-ng-data/lang/sit/cmn-Latn-pinyin
@@ -0,0 +1,11 @@
name Chinese (Mandarin, latin as Pinyin)
language cmn-latn-pinyin
language zh-cmn
language zh

phonemes cmn
dictionary cmn
words 1
pitch 80 118

dict_min 100000
13 changes: 13 additions & 0 deletions espeak-ng-data/lang/sit/yue-Latn-jyutping
@@ -0,0 +1,13 @@
name Chinese (Cantonese, latin as Jyutping)
language yue
language zh-yue
language zh 8

phonemes yue
dictionary yue

// interpret English letters as 1=English words, 2=jyutping
dictrules 2

words 1
dict_min 10000

0 comments on commit 7327895

Please sign in to comment.