Added linux pulseaudio patch
[sgc2.git] / ManPages / Speech_Synthesis_in_SpeakGoodChinese.man
blob3194c25143ac52f292667bd82534db178cc8d083
1 ManPagesTextFile
2 "Speech Synthesis in SpeakGoodChinese" "R.J.J.H. van Son" 20150916 0
3 <intro> "How to change the pinyin synthesis"
5 <entry> "Tone  and Speech synthesis in SpeakGoodChinese"
6 <normal> "%%SpeakGoodChinese% has three levels of tone and speech synthesis 
7 beside the option to add real spoken examples (%%Real examples% button). 
8 Which synthesis method is used is choosen on the %%Settings% page:"
9 <list_item> "\bu Humming tones - 
10 Deselect the %%Synthesis% and %%Real example% buttons"
11 <list_item> "\bu Rule-based Text-to-Speech (%%TTS%) synthesis (%%eSpeak%) -  
12 Select the %%Synthesis% button and select a %%Voice% other than ##*#"
13 <list_item> "\bu Native Text-to-Speech (%%TTS%) synthesis - Select the ##*# %%Voice%"
14 <normal> "The ""Humming"" option will stress the tone realizations. 
15 The two TTS options will also practice pronunciation, 
16 or at least phoneme perception. 
17 The phoneme pronunciation of the native Windows and Mac %%TTS% is much 
18 better than the build-in, rule-based, %%eSpeak% synthesis. 
19 However, the tone realizations of the high quality native %%TTS% are probably 
20 suboptimal for beginning students trying to practice tones. 
21 It is probably best when students switch to the native synthesis on 
22 Mac or Windows only when they have reached a basic level of tone perception. 
23 So, the prefered order is likely for students to start with the build-in 
24 %%eSpeak% voices or even the humming synthesis."
26 <entry> "Text-To-Speech synthesis in SpeakGoodChinese"
27 <normal> "SpeakGoodChinese uses the %%eSpeak% Text-To-Speech (%%TTS%) 
28 engine that is build into Praat. %%eSpeak% has several Mandarin voices. 
29 You cycle through them when you click on the %%Voice% button on the 
30 %%Settings% page. Voices that start with an %%F% are supposed to be 
31 ""female"" voices, those starting with an %%M% are supposed to be ""male"" voices. "
32 <normal> "The voice labled ""*"" is the system's default synthesizer. 
33 On a Macintosh computer, this is the %%Say% program. On Linux this will 
34 be the %%spd-say% speech dispatcher, if it is installed. The Macintosh %%Say% 
35 program has a rather good synthesis quality. The Linux %%spd-say% program 
36 is more like another %%eSpeak% instance."
38 <entry> "Installing Chinese voices on the Macintosh (OSX)"
39 <normal> "If the ""*"" voice does not work on your Macintosh computer, 
40 you probably do not have the correct Mandarin voice installed. 
41 To install Mandarin speech synthesis on you Macintosh, open 
42 %%System Preferences...%. Locate and open the %%Dictation & Speech% item. 
43 Select the %%Text to Speech% tab. Click on the %%System voice% menu. 
44 At the bottom of the %%System voice% menu, select %%Customize...% and 
45 scroll down until you find %%Chinese (China)% and tick the box for 
46 %%Ting-Ting%."
47 <normal> "Your computer will download and install the selected voices. 
48 This can take a lot of time."
50 <entry> "Installing Chinese voices on Windows"
51 <normal> "If the ""*"" voice does not work on your Windows computer, 
52 you probably do not have the correct Mandarin voice installed. The 
53 installation process is different for Windows 7, 8, and 10. Please refer 
54 to the procedure for your system. When you select a Mandarin Chinese 
55 voice, make sure you install the %%simplified characters% and a Chinese 
56 %%zh-CN% voice! %%SpeakGoodChinese% uses a female voice. 
57 %%SpeakGoodChinese% is known to work with the %%Huihui% voice."
59 <entry> "Changing to another speech synthesis program"
60 <normal> "%%SpeakGoodChinese% can use external Text-To-Speech synthesis 
61 programs as long as they have a %%command-line interface% (%%CLI%). 
62 The command to call this program on the computer must be stored in a 
63 text file in the %%TTS% folder in the %%Preferences% directory. "
64 <normal> "%%Note: This has not yet been tested on Windows.%"
66 <normal> "First, locate the %%Preferences% directory on the computer. "
68 <normal> "For a single user %%<User name>%, the local %%Preferences% directory is:"
69 <list_item> "\bu MS Windows: %%C:\bsDocuments and Settings\bs<User name>\bsSpeakGoodChinese2\bsTTS%"
70 <list_item> "\bu Mac OSX: %%/Users/<User name>/Library/Preferences/SpeakGoodChinese2/TTS%"
71 <list_item> "\bu Linux: %%/home/<User name>/.SpeakGoodChinese2/TTS%"
73 <normal> "To install this for all users, place them in the global %%Preferences% directory:"
74 <list_item> "\bu MS Windows: %%C:\bsDocuments and Settings\bsAll Users\bsApplication Data\bsSpeakGoodChinese2\bsTTS%"
75 <list_item> "\bu Mac OSX: %%/Library/Preferences/SpeakGoodChinese2/TTS%"
76 <list_item> "\bu Linux: %%/etc/SpeakGoodChinese2/TTS%"
78 <normal> "The name of the text file containing the %%TTS% command depends on the computer platform:"
79 <list_item> "\bu MS Windows: %%TTS_WINDOWS_eSpeak_command.txt%"
80 <list_item> "\bu Mac OSX: %%TTS_OSX_eSpeak_command.txt%"
81 <list_item> "\bu Linux: %%TTS_UNIX_eSpeak_command.txt%"
83 <normal> "The command file should only contain a single line of text 
84 with the command to speak the text. The commands to call the TTS synthesis 
85 should be constructed in such a way that a pinyin string can be appended at 
86 the end. Note that the neutral tone will be indicated by the numeral %%5%."
88 <normal> "Often the (pinyin) words need to be placed at another position 
89 in the command string or the command even needs Chinese characters or 
90 expanded pinyin. Then the place of the pinyin or text should be marked 
91 by a placeholder: "
92 <list_item> "\bu ##\& \& \& #: will be replaced by the pinyin string."
93 <list_item> "\bu ##\@ \@ \@ #: will be replaced by an expanded pinyin string 
94 (Windows style) %%ni3hao3% becomes %%ni 3 - hao 3%."
95 <list_item> "\bu ##\$ \$ \$ #: will be replaced by the Chinese characters (not recommended)."
97 <normal> "Examples of such commands are:"
98 <list_item> "\bu Mac OSX: $$say -vTing-Ting$"
99 <list_item> "\bu Windows: $$mshta.exe vbscript:Execute(""CreateObject(""""SAPI.SpVoice"""").Speak
100 """"<voice gender='female' xml:lang='zh-CN'><rate speed='-5'>
101 <pron sym='\@ \@ \@ '/></rate></voice>"""":Close"")$"
102 <list_item> "\bu Linux: $$spd-say -l zh -t female1 -r -60$"
104 <normal> "While such a file is present for the operating system running 
105 %%SpeakGoodChinese%, the program will only use that to synthesize speech. "