Browse Source

Rename zh (Mandarin) to cmn across the codebase.

See discussion in #933.
master
Juho Hiltunen 4 years ago
parent
commit
d91b7cf288

+ 2
- 0
CHANGELOG.md View File

@@ -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)

documentation:
* Add documentation about voice and language options.

+ 11
- 11
Makefile.am View File

@@ -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 \
@@ -435,7 +436,6 @@ phsource/phonemes.stamp: \
phsource/ph_wolof \
phsource/ph_yoruba \
phsource/ph_yue \
phsource/ph_zh \
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/yue_dict \
espeak-ng-data/zh_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,13 +934,13 @@ 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

yue: espeak-ng-data/yue_dict
@@ -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

+ 7
- 7
configure.ac View File

@@ -52,8 +52,8 @@ 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-yue],
@@ -281,10 +281,10 @@ 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_yue" = "yes" ; then
@@ -294,7 +294,7 @@ else
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_CMN_EXTENDED_DICTIONARY, [test x"$have_extdict_cmn" = xyes])
AM_CONDITIONAL(HAVE_YUE_EXTENDED_DICTIONARY, [test x"$have_extdict_yue" = xyes])

dnl ================================================================
@@ -359,6 +359,6 @@ AC_MSG_NOTICE([

Extended Dictionaries:
Russian: ${have_extdict_ru}
Chinese (Mandarin): ${have_extdict_zh}
Chinese (Mandarin): ${have_extdict_cmn}
Chinese (Cantonese): ${have_extdict_yue}
])

dictsource/zh_emoji → dictsource/cmn_emoji View File


dictsource/zh_list → dictsource/cmn_list View File


dictsource/zh_rules → dictsource/cmn_rules View File


dictsource/extra/zh_listx → dictsource/extra/cmn_listx View File


+ 1
- 1
docs/building.md View File

@@ -209,7 +209,7 @@ to build:
| Option | Extended Dictionary | Default |
|----------------------|---------------------|---------|
| `--with-extdict-ru` | Russian | no |
| `--with-extdict-zh` | Mandarin Chinese | no |
| `--with-extdict-cmn` | Mandarin Chinese | no |
| `--with-extdict-yue` | Cantonese | no |

The extended dictionaries are taken from

+ 2
- 2
espeak-ng-data/lang/sit/cmn View File

@@ -3,8 +3,8 @@ language cmn
language zh-cmn
language zh

phonemes zh
dictionary zh
phonemes cmn
dictionary cmn
words 1
pitch 80 118


phsource/mbrola/zh → phsource/mbrola/cmn View File


phsource/ph_zh → phsource/ph_cmn View File


+ 3
- 3
phsource/phonemes View File

@@ -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,9 +1817,6 @@ include ph_vietnam
phonemetable wo base1
include ph_wolof

phonemetable zh base1
include ph_zh

phonemetable yue base1
include ph_yue


+ 1
- 1
src/libespeak-ng/tr_languages.c View File

@@ -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 };

+ 3
- 3
src/windows/data.vcxproj View File

@@ -319,11 +319,11 @@
<Target Name="vi" Inputs="$(ProjectDir)..\..\dictsource\vi_rules;$(ProjectDir)..\..\dictsource\vi_list" Outputs="$(ProjectDir)..\..\espeak-ng-data\vi_dict" DependsOnTargets="Phonemes">
<Exec Command="cd $(ProjectDir)..\..\dictsource &amp;&amp; $(TargetDir)espeak-ng.exe --path=$(ProjectDir)..\.. --compile=vi" />
</Target>
<Target Name="zh" Inputs="$(ProjectDir)..\..\dictsource\zh_rules;$(ProjectDir)..\..\dictsource\zh_list" Outputs="$(ProjectDir)..\..\espeak-ng-data\zh_dict" DependsOnTargets="Phonemes">
<Exec Command="cd $(ProjectDir)..\..\dictsource &amp;&amp; $(TargetDir)espeak-ng.exe --path=$(ProjectDir)..\.. --compile=zh" />
<Target Name="cmn" Inputs="$(ProjectDir)..\..\dictsource\cmn_rules;$(ProjectDir)..\..\dictsource\cmn_list" Outputs="$(ProjectDir)..\..\espeak-ng-data\cmn_dict" DependsOnTargets="Phonemes">
<Exec Command="cd $(ProjectDir)..\..\dictsource &amp;&amp; $(TargetDir)espeak-ng.exe --path=$(ProjectDir)..\.. --compile=cmn" />
</Target>
<Target Name="yue" Inputs="$(ProjectDir)..\..\dictsource\yue_rules;$(ProjectDir)..\..\dictsource\yue_list" Outputs="$(ProjectDir)..\..\espeak-ng-data\yue_dict" DependsOnTargets="Phonemes">
<Exec Command="cd $(ProjectDir)..\..\dictsource &amp;&amp; $(TargetDir)espeak-ng.exe --path=$(ProjectDir)..\.. --compile=yue" />
</Target>
<Target Name="Dictionaries" DependsOnTargets="af;am;an;ar;as;az;bg;bn;bs;ca;cs;cy;da;de;el;en;eo;es;et;eu;fa;fi;fr;ga;gd;gn;grc;gu;hi;hr;hu;hy;ia;id;is;it;jbo;ja;ka;kl;kn;ko;ku;ky;la;lfn;lt;lv;mk;ml;mr;ms;mt;my;nci;ne;nl;no;om;or;pa;pap;pl;pt;ro;ru;si;sk;sl;sq;sr;sv;sw;ta;te;tn;tr;tt;ur;vi;yue;zh" />
<Target Name="Dictionaries" DependsOnTargets="af;am;an;ar;as;az;bg;bn;bs;ca;cmn;cs;cy;da;de;el;en;eo;es;et;eu;fa;fi;fr;ga;gd;gn;grc;gu;hi;hr;hu;hy;ia;id;is;it;jbo;ja;ka;kl;kn;ko;ku;ky;la;lfn;lt;lv;mk;ml;mr;ms;mt;my;nci;ne;nl;no;om;or;pa;pap;pl;pt;ro;ru;si;sk;sl;sq;sr;sv;sw;ta;te;tn;tr;tt;ur;vi;yue" />
</Project>

+ 3
- 3
src/windows/installer/Product.wxs View File

@@ -591,8 +591,8 @@
<Component Id="vi_dict" Win64="$(var.Win64)" Guid="F4E1855E-A1C8-4DE1-A72F-0835C7794314">
<File Name="vi_dict" Source="$(var.ProjectDir)..\..\..\espeak-ng-data\vi_dict" KeyPath="yes"/>
</Component>
<Component Id="zh_dict" Win64="$(var.Win64)" Guid="6DF6E437-BF8B-4FCD-B094-D88C65ACDE6E">
<File Name="zh_dict" Source="$(var.ProjectDir)..\..\..\espeak-ng-data\zh_dict" KeyPath="yes"/>
<Component Id="cmn_dict" Win64="$(var.Win64)" Guid="6DF6E437-BF8B-4FCD-B094-D88C65ACDE6E">
<File Name="cmn_dict" Source="$(var.ProjectDir)..\..\..\espeak-ng-data\cmn_dict" KeyPath="yes"/>
</Component>
<Component Id="yue_dict" Win64="$(var.Win64)" Guid="D6BF57DA-A408-40FC-9D8E-610C8AED5836">
<File Name="yue_dict" Source="$(var.ProjectDir)..\..\..\espeak-ng-data\yue_dict" KeyPath="yes"/>
@@ -1016,7 +1016,7 @@
</ComponentGroup>
<ComponentGroup Id="LangChineseMandarin">
<ComponentRef Id="cmn"/>
<ComponentRef Id="zh_dict"/>
<ComponentRef Id="cmn_dict"/>
</ComponentGroup>
<ComponentGroup Id="LangCroatian">
<ComponentRef Id="hr"/>

Loading…
Cancel
Save