diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa15e5ba..7b8bd33c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,8 @@ The espeak-ng project is a fork of the espeak project.
* Restructure "option brackets" language option to "brackets" and "bracketsAnnounced".
* New Language option: "lowercaseSentence" for ending a sentence if a period is followed by a lower case letter.
* Added voice variants
+* Renamed zh to cmn (Mandarin)
+* Renamed zhy to yue (Cantonese)
bug fixes:
* Fix reading malformed SSML (Christopher Brannon)
diff --git a/Makefile.am b/Makefile.am
index 35effd64..8114af97 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -339,6 +339,7 @@ phsource/phonemes.stamp: \
phsource/ph_bulgarian \
phsource/ph_catalan \
phsource/ph_cherokee \
+ phsource/ph_cmn \
phsource/ph_consonants \
phsource/ph_croatian \
phsource/ph_czech \
@@ -434,8 +435,7 @@ phsource/phonemes.stamp: \
phsource/ph_welsh \
phsource/ph_wolof \
phsource/ph_yoruba \
- phsource/ph_zh \
- phsource/ph_zh_yue \
+ phsource/ph_yue \
phsource/phonemes \
src/espeak-ng
ESPEAK_DATA_PATH=$(CURDIR) src/espeak-ng --compile-intonations && \
@@ -506,6 +506,7 @@ dictionaries: \
espeak-ng-data/bs_dict \
espeak-ng-data/ca_dict \
espeak-ng-data/chr_dict \
+ espeak-ng-data/cmn_dict \
espeak-ng-data/cs_dict \
espeak-ng-data/cv_dict \
espeak-ng-data/cy_dict \
@@ -599,8 +600,7 @@ dictionaries: \
espeak-ng-data/ur_dict \
espeak-ng-data/uz_dict \
espeak-ng-data/vi_dict \
- espeak-ng-data/zh_dict \
- espeak-ng-data/zhy_dict
+ espeak-ng-data/yue_dict
af: espeak-ng-data/af_dict
espeak-ng-data/af_dict: dictsource/af_list dictsource/af_rules dictsource/af_extra dictsource/af_emoji
@@ -934,26 +934,26 @@ espeak-ng-data/uz_dict: dictsource/uz_list dictsource/uz_rules dictsource/uz_ext
vi: espeak-ng-data/vi_dict
espeak-ng-data/vi_dict: dictsource/vi_list dictsource/vi_rules dictsource/vi_extra dictsource/vi_emoji
-zh: espeak-ng-data/zh_dict
-dictsource/zh_listx:
- ln -svf extra/zh_listx dictsource/
-if HAVE_ZH_EXTENDED_DICTIONARY
-espeak-ng-data/zh_dict: dictsource/zh_list dictsource/zh_rules dictsource/zh_listx dictsource/zh_extra dictsource/zh_emoji
+cmn: espeak-ng-data/cmn_dict
+dictsource/cmn_listx:
+ ln -svf extra/cmn_listx dictsource/
+if HAVE_CMN_EXTENDED_DICTIONARY
+espeak-ng-data/cmn_dict: dictsource/cmn_list dictsource/cmn_rules dictsource/cmn_listx dictsource/cmn_extra dictsource/cmn_emoji
else
-espeak-ng-data/zh_dict: dictsource/zh_list dictsource/zh_rules dictsource/zh_extra dictsource/zh_emoji
+espeak-ng-data/cmn_dict: dictsource/cmn_list dictsource/cmn_rules dictsource/cmn_extra dictsource/cmn_emoji
endif
-zhy: espeak-ng-data/zhy_dict
-dictsource/zhy_listx:
- ln -svf extra/zhy_listx dictsource/
-if HAVE_ZHY_EXTENDED_DICTIONARY
-espeak-ng-data/zhy_dict: dictsource/zhy_list dictsource/zhy_rules dictsource/zhy_extra dictsource/zhy_listx dictsource/zhy_emoji
+yue: espeak-ng-data/yue_dict
+dictsource/yue_listx:
+ ln -svf extra/yue_listx dictsource/
+if HAVE_YUE_EXTENDED_DICTIONARY
+espeak-ng-data/yue_dict: dictsource/yue_list dictsource/yue_rules dictsource/yue_extra dictsource/yue_listx dictsource/yue_emoji
else
-espeak-ng-data/zhy_dict: dictsource/zhy_list dictsource/zhy_rules dictsource/zhy_extra dictsource/zhy_emoji
+espeak-ng-data/yue_dict: dictsource/yue_list dictsource/yue_rules dictsource/yue_extra dictsource/yue_emoji
endif
cd dictsource && ESPEAK_DATA_PATH=$(CURDIR) LD_LIBRARY_PATH=../src:${LD_LIBRARY_PATH} ../src/espeak-ng --compile=yue && cd ..
-dictsource/zhy_emoji:
+dictsource/yue_emoji:
@echo " EMOJI $@"
@if test x"${CLDR_PATH}" = x ; then \
touch $@ ; \
@@ -968,6 +968,7 @@ mbrola: \
espeak-ng-data/mbrola_ph/ar1_phtrans \
espeak-ng-data/mbrola_ph/ar2_phtrans \
espeak-ng-data/mbrola_ph/ca_phtrans \
+ espeak-ng-data/mbrola_ph/cmn_phtrans \
espeak-ng-data/mbrola_ph/cr1_phtrans \
espeak-ng-data/mbrola_ph/cs_phtrans \
espeak-ng-data/mbrola_ph/de2_phtrans \
@@ -1010,8 +1011,7 @@ mbrola: \
espeak-ng-data/mbrola_ph/tr1_phtrans \
espeak-ng-data/mbrola_ph/us_phtrans \
espeak-ng-data/mbrola_ph/us3_phtrans \
- espeak-ng-data/mbrola_ph/vz_phtrans \
- espeak-ng-data/mbrola_ph/zh_phtrans
+ espeak-ng-data/mbrola_ph/vz_phtrans
espeak-ng-data/mbrola_ph/%_phtrans: phsource/mbrola/% src/espeak-ng
mkdir -p espeak-ng-data/mbrola_ph
diff --git a/configure.ac b/configure.ac
index 92fe5ac4..4b8f77c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,12 +52,12 @@ AC_ARG_WITH([extdict-ru],
[AS_HELP_STRING([--with-extdict-ru], [use the extended Russian Dictionary file @<:@default=no@:>@])],
[])
-AC_ARG_WITH([extdict-zh],
- [AS_HELP_STRING([--with-extdict-zh], [use the extended Mandarin Chinese Dictionary file @<:@default=no@:>@])],
+AC_ARG_WITH([extdict-cmn],
+ [AS_HELP_STRING([--with-extdict-cmn], [use the extended Mandarin Chinese Dictionary file @<:@default=no@:>@])],
[])
-AC_ARG_WITH([extdict-zhy],
- [AS_HELP_STRING([--with-extdict-zhy], [use the extended Cantonese Chinese Dictionary file @<:@default=no@:>@])],
+AC_ARG_WITH([extdict-yue],
+ [AS_HELP_STRING([--with-extdict-yue], [use the extended Cantonese Chinese Dictionary file @<:@default=no@:>@])],
[])
AC_ARG_WITH([libfuzzer],
@@ -281,21 +281,21 @@ else
have_extdict_ru=no
fi
-if test "$with_extdict_zh" = "yes" ; then
- have_extdict_zh=yes
+if test "$with_extdict_cmn" = "yes" ; then
+ have_extdict_cmn=yes
else
- have_extdict_zh=no
+ have_extdict_cmn=no
fi
-if test "$with_extdict_zhy" = "yes" ; then
- have_extdict_zhy=yes
+if test "$with_extdict_yue" = "yes" ; then
+ have_extdict_yue=yes
else
- have_extdict_zhy=no
+ have_extdict_yue=no
fi
AM_CONDITIONAL(HAVE_RU_EXTENDED_DICTIONARY, [test x"$have_extdict_ru" = xyes])
-AM_CONDITIONAL(HAVE_ZH_EXTENDED_DICTIONARY, [test x"$have_extdict_zh" = xyes])
-AM_CONDITIONAL(HAVE_ZHY_EXTENDED_DICTIONARY, [test x"$have_extdict_zhy" = xyes])
+AM_CONDITIONAL(HAVE_CMN_EXTENDED_DICTIONARY, [test x"$have_extdict_cmn" = xyes])
+AM_CONDITIONAL(HAVE_YUE_EXTENDED_DICTIONARY, [test x"$have_extdict_yue" = xyes])
dnl ================================================================
dnl Compiler warnings.
@@ -359,6 +359,6 @@ AC_MSG_NOTICE([
Extended Dictionaries:
Russian: ${have_extdict_ru}
- Chinese (Mandarin): ${have_extdict_zh}
- Chinese (Cantonese): ${have_extdict_zhy}
+ Chinese (Mandarin): ${have_extdict_cmn}
+ Chinese (Cantonese): ${have_extdict_yue}
])
diff --git a/dictsource/zh_emoji b/dictsource/cmn_emoji
similarity index 100%
rename from dictsource/zh_emoji
rename to dictsource/cmn_emoji
diff --git a/dictsource/zh_list b/dictsource/cmn_list
similarity index 100%
rename from dictsource/zh_list
rename to dictsource/cmn_list
diff --git a/dictsource/zh_rules b/dictsource/cmn_rules
similarity index 100%
rename from dictsource/zh_rules
rename to dictsource/cmn_rules
diff --git a/dictsource/extra/zh_listx b/dictsource/extra/cmn_listx
similarity index 100%
rename from dictsource/extra/zh_listx
rename to dictsource/extra/cmn_listx
diff --git a/dictsource/extra/zhy_listx b/dictsource/extra/yue_listx
similarity index 99%
rename from dictsource/extra/zhy_listx
rename to dictsource/extra/yue_listx
index 2044641e..0032b9e0 100644
--- a/dictsource/extra/zhy_listx
+++ b/dictsource/extra/yue_listx
@@ -1,4 +1,4 @@
-// zhy_list - the Cantonese dictionary file for eSpeak and Ekho
+// yue_list - the Cantonese dictionary file for eSpeak and Ekho
// Maintainer: Cameron Wong, hgneng at gmail.com
// Website: http://www.eguidedog.net/cantonese.php
// License: Creative Commons Attribution-Share Alike 3.0
diff --git a/dictsource/zhy_emoji b/dictsource/yue_emoji
similarity index 100%
rename from dictsource/zhy_emoji
rename to dictsource/yue_emoji
diff --git a/dictsource/zhy_list b/dictsource/yue_list
similarity index 100%
rename from dictsource/zhy_list
rename to dictsource/yue_list
diff --git a/dictsource/zhy_rules b/dictsource/yue_rules
similarity index 100%
rename from dictsource/zhy_rules
rename to dictsource/yue_rules
diff --git a/docs/building.md b/docs/building.md
index b5c0fe64..d1900f0a 100644
--- a/docs/building.md
+++ b/docs/building.md
@@ -209,8 +209,8 @@ to build:
| Option | Extended Dictionary | Default |
|----------------------|---------------------|---------|
| `--with-extdict-ru` | Russian | no |
-| `--with-extdict-zh` | Mandarin Chinese | no |
-| `--with-extdict-zhy` | Cantonese | no |
+| `--with-extdict-cmn` | Mandarin Chinese | no |
+| `--with-extdict-yue` | Cantonese | no |
The extended dictionaries are taken from
[http://espeak.sourceforge.net/data/](http://espeak.sourceforge.net/data/) and
diff --git a/espeak-ng-data/lang/sit/cmn b/espeak-ng-data/lang/sit/cmn
index 7b7cfa26..5a4afff5 100644
--- a/espeak-ng-data/lang/sit/cmn
+++ b/espeak-ng-data/lang/sit/cmn
@@ -3,8 +3,8 @@ language cmn
language zh-cmn
language zh
-phonemes zh
-dictionary zh
+phonemes cmn
+dictionary cmn
words 1
pitch 80 118
diff --git a/espeak-ng-data/lang/sit/yue b/espeak-ng-data/lang/sit/yue
index c4c0c58d..d65fac1f 100644
--- a/espeak-ng-data/lang/sit/yue
+++ b/espeak-ng-data/lang/sit/yue
@@ -3,8 +3,8 @@ language yue
language zh-yue
language zh 8
-phonemes zhy
-dictionary zhy
+phonemes yue
+dictionary yue
// interpret English letters as 1=English words, 2=jyutping
dictrules 1
diff --git a/phsource/mbrola/zh b/phsource/mbrola/cmn
similarity index 100%
rename from phsource/mbrola/zh
rename to phsource/mbrola/cmn
diff --git a/phsource/ph_zh b/phsource/ph_cmn
similarity index 100%
rename from phsource/ph_zh
rename to phsource/ph_cmn
diff --git a/phsource/ph_zh_yue b/phsource/ph_yue
similarity index 100%
rename from phsource/ph_zh_yue
rename to phsource/ph_yue
diff --git a/phsource/phonemes b/phsource/phonemes
index 18d7588e..377f39b7 100644
--- a/phsource/phonemes
+++ b/phsource/phonemes
@@ -1687,6 +1687,9 @@ include ph_arabic
phonemetable ba base1
include ph_bashkir
+phonemetable cmn base1
+include ph_cmn
+
phonemetable cy base1
include ph_welsh
@@ -1814,11 +1817,8 @@ include ph_vietnam
phonemetable wo base1
include ph_wolof
-phonemetable zh base1
-include ph_zh
-
-phonemetable zhy base1
-include ph_zh_yue
+phonemetable yue base1
+include ph_yue
// *** Tables extending base2 ***
diff --git a/src/libespeak-ng/tr_languages.c b/src/libespeak-ng/tr_languages.c
index db46e80c..c69053b6 100644
--- a/src/libespeak-ng/tr_languages.c
+++ b/src/libespeak-ng/tr_languages.c
@@ -1590,7 +1590,7 @@ Translator *SelectTranslator(const char *name)
break;
case L3('c', 'm', 'n'): // no break, just go to 'zh' case
case L3('y', 'u', 'e'):
- case L('z','h'):
+ case L('z','h'): // zh is used for backwards compatibility. Prefer cmn or yue.
{
static const short stress_lengths_zh[8] = { 230, 150, 230, 230, 230, 0, 240, 250 }; // 1=tone5. end-of-sentence, 6=tone 1&4, 7=tone 2&3
static const unsigned char stress_amps_zh[] = { 22, 16, 22, 22, 22, 22, 22, 22 };
diff --git a/src/windows/data.vcxproj b/src/windows/data.vcxproj
index 31501581..b4a433f7 100644
--- a/src/windows/data.vcxproj
+++ b/src/windows/data.vcxproj
@@ -319,11 +319,11 @@
-
-
+
+
-
+
-
+
diff --git a/src/windows/installer/Product.wxs b/src/windows/installer/Product.wxs
index a91b0d8f..25cf3e06 100644
--- a/src/windows/installer/Product.wxs
+++ b/src/windows/installer/Product.wxs
@@ -591,11 +591,11 @@
-
-
+
+
-
-
+
+
@@ -1012,11 +1012,11 @@
-
+
-
+