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

* Restructure "option brackets" language option to "brackets" and "bracketsAnnounced". * 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. * New Language option: "lowercaseSentence" for ending a sentence if a period is followed by a lower case letter.
* Added voice variants * Added voice variants
* Renamed zh to cmn (Mandarin)
* Renamed zhy to yue (Cantonese)


documentation: documentation:
* Add documentation about voice and language options. * Add documentation about voice and language options.

+ 11
- 11
Makefile.am View File

phsource/ph_bulgarian \ phsource/ph_bulgarian \
phsource/ph_catalan \ phsource/ph_catalan \
phsource/ph_cherokee \ phsource/ph_cherokee \
phsource/ph_cmn \
phsource/ph_consonants \ phsource/ph_consonants \
phsource/ph_croatian \ phsource/ph_croatian \
phsource/ph_czech \ phsource/ph_czech \
phsource/ph_wolof \ phsource/ph_wolof \
phsource/ph_yoruba \ phsource/ph_yoruba \
phsource/ph_yue \ phsource/ph_yue \
phsource/ph_zh \
phsource/phonemes \ phsource/phonemes \
src/espeak-ng src/espeak-ng
ESPEAK_DATA_PATH=$(CURDIR) src/espeak-ng --compile-intonations && \ ESPEAK_DATA_PATH=$(CURDIR) src/espeak-ng --compile-intonations && \
espeak-ng-data/bs_dict \ espeak-ng-data/bs_dict \
espeak-ng-data/ca_dict \ espeak-ng-data/ca_dict \
espeak-ng-data/chr_dict \ espeak-ng-data/chr_dict \
espeak-ng-data/cmn_dict \
espeak-ng-data/cs_dict \ espeak-ng-data/cs_dict \
espeak-ng-data/cv_dict \ espeak-ng-data/cv_dict \
espeak-ng-data/cy_dict \ espeak-ng-data/cy_dict \
espeak-ng-data/ur_dict \ espeak-ng-data/ur_dict \
espeak-ng-data/uz_dict \ espeak-ng-data/uz_dict \
espeak-ng-data/vi_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 af: espeak-ng-data/af_dict
espeak-ng-data/af_dict: dictsource/af_list dictsource/af_rules dictsource/af_extra dictsource/af_emoji espeak-ng-data/af_dict: dictsource/af_list dictsource/af_rules dictsource/af_extra dictsource/af_emoji
vi: espeak-ng-data/vi_dict vi: espeak-ng-data/vi_dict
espeak-ng-data/vi_dict: dictsource/vi_list dictsource/vi_rules dictsource/vi_extra dictsource/vi_emoji 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 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 endif


yue: espeak-ng-data/yue_dict yue: espeak-ng-data/yue_dict
espeak-ng-data/mbrola_ph/ar1_phtrans \ espeak-ng-data/mbrola_ph/ar1_phtrans \
espeak-ng-data/mbrola_ph/ar2_phtrans \ espeak-ng-data/mbrola_ph/ar2_phtrans \
espeak-ng-data/mbrola_ph/ca_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/cr1_phtrans \
espeak-ng-data/mbrola_ph/cs_phtrans \ espeak-ng-data/mbrola_ph/cs_phtrans \
espeak-ng-data/mbrola_ph/de2_phtrans \ espeak-ng-data/mbrola_ph/de2_phtrans \
espeak-ng-data/mbrola_ph/tr1_phtrans \ espeak-ng-data/mbrola_ph/tr1_phtrans \
espeak-ng-data/mbrola_ph/us_phtrans \ espeak-ng-data/mbrola_ph/us_phtrans \
espeak-ng-data/mbrola_ph/us3_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 espeak-ng-data/mbrola_ph/%_phtrans: phsource/mbrola/% src/espeak-ng
mkdir -p espeak-ng-data/mbrola_ph mkdir -p espeak-ng-data/mbrola_ph

+ 7
- 7
configure.ac View File

[AS_HELP_STRING([--with-extdict-ru], [use the extended Russian Dictionary file @<:@default=no@:>@])], [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], AC_ARG_WITH([extdict-yue],
have_extdict_ru=no have_extdict_ru=no
fi fi


if test "$with_extdict_zh" = "yes" ; then
have_extdict_zh=yes
if test "$with_extdict_cmn" = "yes" ; then
have_extdict_cmn=yes
else else
have_extdict_zh=no
have_extdict_cmn=no
fi fi


if test "$with_extdict_yue" = "yes" ; then if test "$with_extdict_yue" = "yes" ; then
fi fi


AM_CONDITIONAL(HAVE_RU_EXTENDED_DICTIONARY, [test x"$have_extdict_ru" = xyes]) 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]) AM_CONDITIONAL(HAVE_YUE_EXTENDED_DICTIONARY, [test x"$have_extdict_yue" = xyes])


dnl ================================================================ dnl ================================================================


Extended Dictionaries: Extended Dictionaries:
Russian: ${have_extdict_ru} Russian: ${have_extdict_ru}
Chinese (Mandarin): ${have_extdict_zh}
Chinese (Mandarin): ${have_extdict_cmn}
Chinese (Cantonese): ${have_extdict_yue} 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

| Option | Extended Dictionary | Default | | Option | Extended Dictionary | Default |
|----------------------|---------------------|---------| |----------------------|---------------------|---------|
| `--with-extdict-ru` | Russian | no | | `--with-extdict-ru` | Russian | no |
| `--with-extdict-zh` | Mandarin Chinese | no |
| `--with-extdict-cmn` | Mandarin Chinese | no |
| `--with-extdict-yue` | Cantonese | no | | `--with-extdict-yue` | Cantonese | no |


The extended dictionaries are taken from The extended dictionaries are taken from

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

language zh-cmn language zh-cmn
language zh language zh


phonemes zh
dictionary zh
phonemes cmn
dictionary cmn
words 1 words 1
pitch 80 118 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

phonemetable ba base1 phonemetable ba base1
include ph_bashkir include ph_bashkir


phonemetable cmn base1
include ph_cmn

phonemetable cy base1 phonemetable cy base1
include ph_welsh include ph_welsh


phonemetable wo base1 phonemetable wo base1
include ph_wolof include ph_wolof


phonemetable zh base1
include ph_zh

phonemetable yue base1 phonemetable yue base1
include ph_yue include ph_yue



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

break; break;
case L3('c', 'm', 'n'): // no break, just go to 'zh' case case L3('c', 'm', 'n'): // no break, just go to 'zh' case
case L3('y', 'u', 'e'): 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 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 }; static const unsigned char stress_amps_zh[] = { 22, 16, 22, 22, 22, 22, 22, 22 };

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

<Target Name="vi" Inputs="$(ProjectDir)..\..\dictsource\vi_rules;$(ProjectDir)..\..\dictsource\vi_list" Outputs="$(ProjectDir)..\..\espeak-ng-data\vi_dict" DependsOnTargets="Phonemes"> <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" /> <Exec Command="cd $(ProjectDir)..\..\dictsource &amp;&amp; $(TargetDir)espeak-ng.exe --path=$(ProjectDir)..\.. --compile=vi" />
</Target> </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>
<Target Name="yue" Inputs="$(ProjectDir)..\..\dictsource\yue_rules;$(ProjectDir)..\..\dictsource\yue_list" Outputs="$(ProjectDir)..\..\espeak-ng-data\yue_dict" DependsOnTargets="Phonemes"> <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" /> <Exec Command="cd $(ProjectDir)..\..\dictsource &amp;&amp; $(TargetDir)espeak-ng.exe --path=$(ProjectDir)..\.. --compile=yue" />
</Target> </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> </Project>

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

<Component Id="vi_dict" Win64="$(var.Win64)" Guid="F4E1855E-A1C8-4DE1-A72F-0835C7794314"> <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"/> <File Name="vi_dict" Source="$(var.ProjectDir)..\..\..\espeak-ng-data\vi_dict" KeyPath="yes"/>
</Component> </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>
<Component Id="yue_dict" Win64="$(var.Win64)" Guid="D6BF57DA-A408-40FC-9D8E-610C8AED5836"> <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"/> <File Name="yue_dict" Source="$(var.ProjectDir)..\..\..\espeak-ng-data\yue_dict" KeyPath="yes"/>
</ComponentGroup> </ComponentGroup>
<ComponentGroup Id="LangChineseMandarin"> <ComponentGroup Id="LangChineseMandarin">
<ComponentRef Id="cmn"/> <ComponentRef Id="cmn"/>
<ComponentRef Id="zh_dict"/>
<ComponentRef Id="cmn_dict"/>
</ComponentGroup> </ComponentGroup>
<ComponentGroup Id="LangCroatian"> <ComponentGroup Id="LangCroatian">
<ComponentRef Id="hr"/> <ComponentRef Id="hr"/>

Loading…
Cancel
Save