2 "Speech Synthesis in SpeakGoodChinese" "R.J.J.H. van Son" 20150916 0
3 <intro> "How to change the pinyin synthesis"
5 <entry> "Text-To-Speech synthesis in SpeakGoodChinese"
6 <normal> "SpeakGoodChinese uses the %%eSpeak% Text-To-Speech (%%TTS%)
7 engine that is build into Praat. %%eSpeak% has several Mandarin voices.
8 You cycle through them when you click on the %%Voice% button on the
9 %%Settings% page. Voices that start with an %%F% are supposed to be
10 ""female"" voices, those starting with an %%M% are supposed to be ""male"" voices. "
11 <normal> "The voice labled ""*"" is the system's default synthesizer.
12 On a Macintosh computer, this is the %%Say% program. On Linux this will
13 be the %%spd-say% speech dispatcher, if it is installed. The Macintosh %%Say%
14 program has a rather good synthesis quality. The Linux %%spd-say% program
15 is more like another %%eSpeak% instance."
17 <entry> "Installing Chinese voices on the Macintosh (OSX)"
18 <normal> "If the ""*"" voice does not work on your Macintosh computer,
19 you probably do not have the correct Mandarin voice installed.
20 To install Mandarin speech synthesis on you Macintosh, open
21 %%System Preferences...%. Locate and open the %%Dictation & Speech% item.
22 Select the %%Text to Speech% tab. Click on the %%System voice% menu.
23 At the bottom of the %%System voice% menu, select %%Customize...% and
24 scroll down until you find %%Chinese (China)% and tick the box for
26 <normal> "Your computer will download and install the selected voices.
27 This can take a lot of time."
29 <entry> "Installing Chinese voices on Windows"
30 <normal> "If the ""*"" voice does not work on your Windows computer,
31 you probably do not have the correct Mandarin voice installed. The
32 installation process is different for Windows 7, 8, and 10. Please refer
33 to the procedure for your system. When you select a Mandarin Chinese
34 voice, make sure you install a Chinese %%zh-CN% voice! %%SpeakGoodChinese%
35 uses a female voice. %%SpeakGoodChinese% is known to work with the
38 <entry> "Changing to another speech synthesis program"
39 <normal> "%%SpeakGoodChinese% can use external Text-To-Speech synthesis
40 programs as long as they have a %%command-line interface% (%%CLI%).
41 The command to call this program on the computer must be stored in a
42 text file in the %%TTS% folder in the %%Preferences% directory. "
43 <normal> "%%Note: This has not yet been tested on Windows.%"
45 <normal> "First, locate the %%Preferences% directory on the computer. "
47 <normal> "For a single user %%<User name>%, the local %%Preferences% directory is:"
48 <list_item> "\bu MS Windows: %%C:\bsDocuments and Settings\bs<User name>\bsSpeakGoodChinese2\bsTTS%"
49 <list_item> "\bu Mac OSX: %%/Users/<User name>/Library/Preferences/SpeakGoodChinese2/TTS%"
50 <list_item> "\bu Linux: %%/home/<User name>/.SpeakGoodChinese2/TTS%"
52 <normal> "To install this for all users, place them in the global %%Preferences% directory:"
53 <list_item> "\bu MS Windows: %%C:\bsDocuments and Settings\bsAll Users\bsApplication Data\bsSpeakGoodChinese2\bsTTS%"
54 <list_item> "\bu Mac OSX: %%/Library/Preferences/SpeakGoodChinese2/TTS%"
55 <list_item> "\bu Linux: %%/etc/SpeakGoodChinese2/TTS%"
57 <normal> "The name of the text file containing the %%TTS% command depends on the computer platform:"
58 <list_item> "\bu MS Windows: %%TTS_WINDOWS_eSpeak_command.txt%"
59 <list_item> "\bu Mac OSX: %%TTS_OSX_eSpeak_command.txt%"
60 <list_item> "\bu Linux: %%TTS_UNIX_eSpeak_command.txt%"
62 <normal> "The command file should only contain a single line of text
63 with the command to speak the text. The commands to call the TTS synthesis
64 should be constructed in such a way that a pinyin string can be appended at
65 the end. Note that the neutral tone will be indicated by the numeral %%5%."
67 <normal> "Often the (pinyin) words need to be placed at another position
68 in the command string or the command even needs Chinese characters or
69 expanded pinyin. Then the place of the pinyin or text should be marked
71 <list_item> "\bu ##\& \& \& #: will be replaced by the pinyin string."
72 <list_item> "\bu ##\@ \@ \@ #: will be replaced by an expanded pinyin string
73 (Windows style) %%ni3hao3% becomes %%ni 3 - hao 3%."
74 <list_item> "\bu ##\$ \$ \$ #: will be replaced by the Chinese characters (not recommended)."
76 <normal> "Examples of such commands are:"
77 <list_item> "\bu Mac OSX: $$say -vTing-Ting$"
78 <list_item> "\bu Windows: $$mshta.exe vbscript:Execute(""CreateObject(""""SAPI.SpVoice"""").Speak
79 """"<voice gender='female'><voice xml:lang='zh-CN'><rate speed='-5'>
80 <pron sym='\@ \@ \@ '/></rate></voice></voice>"""":Close"")$"
81 <list_item> "\bu Linux: $$spd-say -l zh -t female1 -r -60$"
83 <normal> "While such a file is present for the operating system running
84 %%SpeakGoodChinese%, the program will only use that to synthesize speech. "