build_SHA$ = "6BE8899748 2015-09-18T01:00:40Z" # # SpeakGoodChinese 2.0 # # Master Praat script # # SpeakGoodChinese: sgc2.praat is the master GUI of SpeakGoodChinese # It is written in Praat script for the Demo window # # Copyright (C) 2007-2010 R.J.J.H. van Son and 2010 the Netherlands Cancer Institute # The SpeakGoodChinese team are: # Guangqin Chen, Zhonyan Chen, Stefan de Koning, Eveline van Hagen, # Rob van Son, Dennis Vierkant, David Weenink # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # The real application name sgc2.demoAppName$ = "SpeakGoodChinese2" # Define variable that might be reset in Initialise*.praat if not variableExists("build_SHA$") build_SHA$ = "-" endif # These are simply "useful" defaults # The local Table directory only exists when running SGC as a script if build_SHA$ = "-" localTableDir$ = "Data" else localTableDir$ = "" endif buttonsTableName$ = "MainPage" configTableName$ = "Config" buttons$ = "" config$ = "" recordedSound$ = "" sgc.recordedSound = 0 te.recordedPitch = 0 te.buttonPressValue = 0 samplingFrequency = 44100 recordingTime = 2 # Pop-Up window colors sgc2.popUp_bordercolor$ = "{0.5,0.5,1}" sgc2.popUp_backgroundcolor$ = "{0.9,0.9,1}" # If running in a packed script binary if index_regex(preferencesDirectory$, "(?i'sgc2.demoAppName$')$") preferencesAppDir$ = preferencesDirectory$ elsif index_regex(preferencesDirectory$, "[pP]raat(\-dir| Prefs)?$") # If running as a Praat script, create a new preferences directory if unix preferencesAppDir$ = "'preferencesDirectory$'/../.'sgc2.demoAppName$'" else preferencesAppDir$ = "'preferencesDirectory$'/../'sgc2.demoAppName$'" endif else # It has to go somewhere. Make a subdirectory in the current preferences directory preferencesAppDir$ = "'preferencesDirectory$'/'sgc2.demoAppName$'" endif # Parameters for isolating recorded speech from noise # Should be mostly left alone unless you are using ultra clean # or very noisy recordings noiseThresshold = -30 minimumPitch = 60 soundMargin = 0.25 minimumIntensity = 30 # Set up button height buttonbevel = 0 # Define canvas viewportMargin = 5 defaultFontSize = 12 defaultFont$ = "Helvetica" defaultLineWidth = 1 # Set up system call reset_viewport # Load supporting scripts # Load tables in script format # CreateTables.praat # # Automatically created code! # Any changes will be lost when this file is regenerated. # Adapt the original Tables instead of this code. # To regenerate the original Tables, run a Praat script # with the following code: # #: include tables2scripts.praat #: call Create #: Write to table file... .Table # # Where is the name of the table. # Move the Table file to the desired location (eg, Data/) # # Tables and this code are licensed under the GNU GPL version 2 # or later. # procCreateBackground$ = "Background" procedure CreateBackground Create Table with column names... Background 6 ... font size align colour text # Fill table values # Row 1 Set string value... 1 font Helvetica Set string value... 1 size 36 Set string value... 1 align centre Set string value... 1 colour {1,1,1} Set string value... 1 text # Row 2 Set string value... 2 font Helvetica Set string value... 2 size 36 Set string value... 2 align centre Set string value... 2 colour {0.95,0.93,0.80} Set string value... 2 text SPEAK GOOD CHINESE 2.0 # Row 3 Set string value... 3 font Helvetica Set string value... 3 size 36 Set string value... 3 align centre Set string value... 3 colour {0.95,0.93,0.80} Set string value... 3 text shuō​ hǎo​ Zhōng​wén​ # Row 4 Set string value... 4 font Helvetica Set string value... 4 size 36 Set string value... 4 align centre Set string value... 4 colour {0.95,0.93,0.80} Set string value... 4 text 说好中文 # Row 5 Set string value... 5 font Helvetica Set string value... 5 size 36 Set string value... 5 align centre Set string value... 5 colour {1,1,1} Set string value... 5 text # Row 6 Set string value... 6 font Helvetica Set string value... 6 size 36 Set string value... 6 align centre Set string value... 6 colour {1,1,1} Set string value... 6 text endproc procCreateConfig$ = "Config" procedure CreateConfig Create Table with column names... Config 55 ... Label LeftX RightX LowY HighY Color Draw # Fill table values # Row 1 Set string value... 1 Label !Author Set string value... 1 LeftX 0 Set string value... 1 RightX 0 Set string value... 1 LowY 0 Set string value... 1 HighY 0 Set string value... 1 Color Black Set string value... 1 Draw DrawNull # Row 2 Set string value... 2 Label !Copyright Set string value... 2 LeftX 0 Set string value... 2 RightX 0 Set string value... 2 LowY 0 Set string value... 2 HighY 0 Set string value... 2 Color Black Set string value... 2 Draw DrawNull # Row 3 Set string value... 3 Label !License Set string value... 3 LeftX 0 Set string value... 3 RightX 0 Set string value... 3 LowY 0 Set string value... 3 HighY 0 Set string value... 3 Color Black Set string value... 3 Draw DrawNull # Row 4 Set string value... 4 Label !WindowTitle Set string value... 4 LeftX 0 Set string value... 4 RightX 0 Set string value... 4 LowY 0 Set string value... 4 HighY 0 Set string value... 4 Color Black Set string value... 4 Draw DrawNull # Row 5 Set string value... 5 Label !WindowTitle Set string value... 5 LeftX 0 Set string value... 5 RightX 0 Set string value... 5 LowY 0 Set string value... 5 HighY 0 Set string value... 5 Color Black Set string value... 5 Draw DrawNull # Row 6 Set string value... 6 Label !Man Set string value... 6 LeftX 0 Set string value... 6 RightX 0 Set string value... 6 LowY 0 Set string value... 6 HighY 0 Set string value... 6 Color Black Set string value... 6 Draw DrawNull # Row 7 Set string value... 7 Label Help Set string value... 7 LeftX 90 Set string value... 7 RightX 100 Set string value... 7 LowY 90 Set string value... 7 HighY 100 Set string value... 7 Color Black Set string value... 7 Draw DrawHelp # Row 8 Set string value... 8 Label Return Set string value... 8 LeftX 90 Set string value... 8 RightX 100 Set string value... 8 LowY 77.5 Set string value... 8 HighY 87.5 Set string value... 8 Color Black Set string value... 8 Draw DrawReturn # Row 9 Set string value... 9 Label $Language Set string value... 9 LeftX 0 Set string value... 9 RightX 15 Set string value... 9 LowY 95 Set string value... 9 HighY 100 Set string value... 9 Color Black Set string value... 9 Draw DrawNull # Row 10 Set string value... 10 Label Language_ZH Set string value... 10 LeftX 0 Set string value... 10 RightX 15 Set string value... 10 LowY 90 Set string value... 10 HighY 95 Set string value... 10 Color Black Set string value... 10 Draw DrawNull # Row 11 Set string value... 11 Label Language_EN Set string value... 11 LeftX 0 Set string value... 11 RightX 15 Set string value... 11 LowY 84 Set string value... 11 HighY 89 Set string value... 11 Color Black Set string value... 11 Draw DrawNull # Row 12 Set string value... 12 Label Language_JA Set string value... 12 LeftX 0 Set string value... 12 RightX 15 Set string value... 12 LowY 78 Set string value... 12 HighY 83 Set string value... 12 Color Black Set string value... 12 Draw DrawNull # Row 13 Set string value... 13 Label Language_DE Set string value... 13 LeftX 0 Set string value... 13 RightX 15 Set string value... 13 LowY 72 Set string value... 13 HighY 77 Set string value... 13 Color Black Set string value... 13 Draw DrawNull # Row 14 Set string value... 14 Label Language_NL Set string value... 14 LeftX 0 Set string value... 14 RightX 15 Set string value... 14 LowY 66 Set string value... 14 HighY 71 Set string value... 14 Color Black Set string value... 14 Draw DrawNull # Row 15 Set string value... 15 Label !Language_??? Set string value... 15 LeftX 0 Set string value... 15 RightX 15 Set string value... 15 LowY 60 Set string value... 15 HighY 65 Set string value... 15 Color Black Set string value... 15 Draw DrawNull # Row 16 Set string value... 16 Label $Register Set string value... 16 LeftX 20 Set string value... 16 RightX 35 Set string value... 16 LowY 95 Set string value... 16 HighY 100 Set string value... 16 Color Black Set string value... 16 Draw DrawNull # Row 17 Set string value... 17 Label Register_350 Set string value... 17 LeftX 20 Set string value... 17 RightX 35 Set string value... 17 LowY 90 Set string value... 17 HighY 95 Set string value... 17 Color Black Set string value... 17 Draw DrawNull # Row 18 Set string value... 18 Label Register_300 Set string value... 18 LeftX 20 Set string value... 18 RightX 35 Set string value... 18 LowY 84 Set string value... 18 HighY 89 Set string value... 18 Color Black Set string value... 18 Draw DrawNull # Row 19 Set string value... 19 Label Register_250 Set string value... 19 LeftX 20 Set string value... 19 RightX 35 Set string value... 19 LowY 78 Set string value... 19 HighY 83 Set string value... 19 Color Black Set string value... 19 Draw DrawNull # Row 20 Set string value... 20 Label Register_249 Set string value... 20 LeftX 20 Set string value... 20 RightX 35 Set string value... 20 LowY 72 Set string value... 20 HighY 77 Set string value... 20 Color Black Set string value... 20 Draw DrawNull # Row 21 Set string value... 21 Label Register_180 Set string value... 21 LeftX 20 Set string value... 21 RightX 35 Set string value... 21 LowY 66 Set string value... 21 HighY 71 Set string value... 21 Color Black Set string value... 21 Draw DrawNull # Row 22 Set string value... 22 Label Register_150 Set string value... 22 LeftX 20 Set string value... 22 RightX 35 Set string value... 22 LowY 60 Set string value... 22 HighY 65 Set string value... 22 Color Black Set string value... 22 Draw DrawNull # Row 23 Set string value... 23 Label Register_125 Set string value... 23 LeftX 20 Set string value... 23 RightX 35 Set string value... 23 LowY 54 Set string value... 23 HighY 59 Set string value... 23 Color Black Set string value... 23 Draw DrawNull # Row 24 Set string value... 24 Label $Recognition Set string value... 24 LeftX 18 Set string value... 24 RightX 37 Set string value... 24 LowY 49 Set string value... 24 HighY 54 Set string value... 24 Color Black Set string value... 24 Draw DrawNull # Row 25 Set string value... 25 Label Strict Set string value... 25 LeftX 20 Set string value... 25 RightX 35 Set string value... 25 LowY 44 Set string value... 25 HighY 49 Set string value... 25 Color Black Set string value... 25 Draw DrawNull # Row 26 Set string value... 26 Label $Display Set string value... 26 LeftX 40 Set string value... 26 RightX 55 Set string value... 26 LowY 95 Set string value... 26 HighY 100 Set string value... 26 Color Black Set string value... 26 Draw DrawNull # Row 27 Set string value... 27 Label DisplayNumbers Set string value... 27 LeftX 40 Set string value... 27 RightX 55 Set string value... 27 LowY 90 Set string value... 27 HighY 95 Set string value... 27 Color Black Set string value... 27 Draw DrawNull # Row 28 Set string value... 28 Label DisplayPinyin Set string value... 28 LeftX 40 Set string value... 28 RightX 55 Set string value... 28 LowY 84 Set string value... 28 HighY 89 Set string value... 28 Color Black Set string value... 28 Draw DrawNull # Row 29 Set string value... 29 Label DisplayChar Set string value... 29 LeftX 40 Set string value... 29 RightX 55 Set string value... 29 LowY 78 Set string value... 29 HighY 83 Set string value... 29 Color Black Set string value... 29 Draw DrawNull # Row 30 Set string value... 30 Label DisplayTrans Set string value... 30 LeftX 40 Set string value... 30 RightX 55 Set string value... 30 LowY 72 Set string value... 30 HighY 77 Set string value... 30 Color Black Set string value... 30 Draw DrawNull # Row 31 Set string value... 31 Label UseSoundExample Set string value... 31 LeftX 40 Set string value... 31 RightX 55 Set string value... 31 LowY 66 Set string value... 31 HighY 71 Set string value... 31 Color Black Set string value... 31 Draw DrawNull # Row 32 Set string value... 32 Label Synthesis_eSpeak Set string value... 32 LeftX 40 Set string value... 32 RightX 55 Set string value... 32 LowY 60 Set string value... 32 HighY 65 Set string value... 32 Color Black Set string value... 32 Draw DrawNull # Row 33 Set string value... 33 Label Voice Set string value... 33 LeftX 40 Set string value... 33 RightX 55 Set string value... 33 LowY 54 Set string value... 33 HighY 59 Set string value... 33 Color Black Set string value... 33 Draw DrawNull # Row 34 Set string value... 34 Label ShuffleLists Set string value... 34 LeftX 40 Set string value... 34 RightX 55 Set string value... 34 LowY 48 Set string value... 34 HighY 53 Set string value... 34 Color Black Set string value... 34 Draw DrawNull # Row 35 Set string value... 35 Label AdaptiveLists Set string value... 35 LeftX 40 Set string value... 35 RightX 55 Set string value... 35 LowY 42 Set string value... 35 HighY 47 Set string value... 35 Color Black Set string value... 35 Draw DrawNull # Row 36 Set string value... 36 Label OpenWordlist Set string value... 36 LeftX 0 Set string value... 36 RightX 15 Set string value... 36 LowY 0 Set string value... 36 HighY 5 Set string value... 36 Color Black Set string value... 36 Draw DrawNull # Row 37 Set string value... 37 Label InstallWordlist Set string value... 37 LeftX 20 Set string value... 37 RightX 35 Set string value... 37 LowY 0 Set string value... 37 HighY 5 Set string value... 37 Color Black Set string value... 37 Draw DrawNull # Row 38 Set string value... 38 Label DeleteWordlist Set string value... 38 LeftX 40 Set string value... 38 RightX 55 Set string value... 38 LowY 0 Set string value... 38 HighY 5 Set string value... 38 Color Black Set string value... 38 Draw DrawDeleteList # Row 39 Set string value... 39 Label !DeleteWordlist Set string value... 39 LeftX -1 Set string value... 39 RightX -1 Set string value... 39 LowY -1 Set string value... 39 HighY -1 Set string value... 39 Color Red Set string value... 39 Draw DrawNull # Row 40 Set string value... 40 Label !NotAWordlist Set string value... 40 LeftX -1 Set string value... 40 RightX -1 Set string value... 40 LowY -1 Set string value... 40 HighY -1 Set string value... 40 Color Red Set string value... 40 Draw DrawNull # Row 41 Set string value... 41 Label ExportWordlist Set string value... 41 LeftX 60 Set string value... 41 RightX 75 Set string value... 41 LowY 0 Set string value... 41 HighY 5 Set string value... 41 Color Black Set string value... 41 Draw DrawNull # Row 42 Set string value... 42 Label Credits Set string value... 42 LeftX 90 Set string value... 42 RightX 100 Set string value... 42 LowY 65 Set string value... 42 HighY 75 Set string value... 42 Color Black Set string value... 42 Draw DrawCredits # Row 43 Set string value... 43 Label Manual Set string value... 43 LeftX 90 Set string value... 43 RightX 100 Set string value... 43 LowY 52.5 Set string value... 43 HighY 62.5 Set string value... 43 Color Black Set string value... 43 Draw DrawManual # Row 44 Set string value... 44 Label $AudioName Set string value... 44 LeftX 90 Set string value... 44 RightX 100 Set string value... 44 LowY 7.5 Set string value... 44 HighY 12.5 Set string value... 44 Color Blue Set string value... 44 Draw DrawNull # Row 45 Set string value... 45 Label SaveAudio Set string value... 45 LeftX 90 Set string value... 45 RightX 100 Set string value... 45 LowY 0 Set string value... 45 HighY 7.5 Set string value... 45 Color Blue Set string value... 45 Draw DrawSaveAudio # Row 46 Set string value... 46 Label $Statistics Set string value... 46 LeftX 60 Set string value... 46 RightX 75 Set string value... 46 LowY 95 Set string value... 46 HighY 100 Set string value... 46 Color Black Set string value... 46 Draw DrawNull # Row 47 Set string value... 47 Label ListPerf Set string value... 47 LeftX 60 Set string value... 47 RightX 75 Set string value... 47 LowY 90 Set string value... 47 HighY 95 Set string value... 47 Color Black Set string value... 47 Draw DrawNull # Row 48 Set string value... 48 Label SavePerf Set string value... 48 LeftX 60 Set string value... 48 RightX 75 Set string value... 48 LowY 84 Set string value... 48 HighY 89 Set string value... 48 Color Black Set string value... 48 Draw DrawNull # Row 49 Set string value... 49 Label OpenPerf Set string value... 49 LeftX 60 Set string value... 49 RightX 75 Set string value... 49 LowY 78 Set string value... 49 HighY 83 Set string value... 49 Color Black Set string value... 49 Draw DrawNull # Row 50 Set string value... 50 Label !OpenPerf Set string value... 50 LeftX -1 Set string value... 50 RightX -1 Set string value... 50 LowY -1 Set string value... 50 HighY -1 Set string value... 50 Color Red Set string value... 50 Draw DrawNull # Row 51 Set string value... 51 Label ClearSummary Set string value... 51 LeftX 60 Set string value... 51 RightX 75 Set string value... 51 LowY 72 Set string value... 51 HighY 77 Set string value... 51 Color Black Set string value... 51 Draw DrawNull # Row 52 Set string value... 52 Label !ClearSummary Set string value... 52 LeftX -1 Set string value... 52 RightX -1 Set string value... 52 LowY -1 Set string value... 52 HighY -1 Set string value... 52 Color Red Set string value... 52 Draw DrawNull # Row 53 Set string value... 53 Label $Recording Set string value... 53 LeftX 60 Set string value... 53 RightX 75 Set string value... 53 LowY 63 Set string value... 53 HighY 68 Set string value... 53 Color Black Set string value... 53 Draw DrawNull # Row 54 Set string value... 54 Label Input_Microphone Set string value... 54 LeftX 60 Set string value... 54 RightX 75 Set string value... 54 LowY 57 Set string value... 54 HighY 62 Set string value... 54 Color Black Set string value... 54 Draw DrawNull # Row 55 Set string value... 55 Label Input_Line Set string value... 55 LeftX 60 Set string value... 55 RightX 75 Set string value... 55 LowY 51 Set string value... 55 HighY 56 Set string value... 55 Color Black Set string value... 55 Draw DrawNull endproc procCreateConfig_DE$ = "Config_DE" procedure CreateConfig_DE Create Table with column names... Config_DE 50 ... Label Text Key Helptext # Fill table values # Row 1 Set string value... 1 Label !Author Set string value... 1 Text Autor Set string value... 1 Key Set string value... 1 Helptext R.J.J.H. van Son, \U"bersetzung: Irene Jacobi # Row 2 Set string value... 2 Label !Copyright Set string value... 2 Text Copyright Set string value... 2 Key Set string value... 2 Helptext Copyright 2010 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Label !License Set string value... 3 Text License Set string value... 3 Key Set string value... 3 Helptext GNU GPL version 2 or later # Row 4 Set string value... 4 Label !WindowTitle Set string value... 4 Text SpeakGoodChinese: Einstellungen \a"ndern Set string value... 4 Key Set string value... 4 Helptext SpeakGoodChinese: Einstellungen \a"ndern # Row 5 Set string value... 5 Label !Man Set string value... 5 Text Symbole Set string value... 5 Key Set string value... 5 Helptext Symbole: !- Inactive Taste; $- \U"berschrift; #- Unsichtbare Taste; $$$- Symbole durch Tekst ersetzen # Row 6 Set string value... 6 Label Return Set string value... 6 Text Zur\u"ck Set string value... 6 Key Z Set string value... 6 Helptext Zur\u"ck zur Hauptseite # Row 7 Set string value... 7 Label $Language Set string value... 7 Text Sprache Set string value... 7 Key Set string value... 7 Helptext W\a"hle die gew\u"nschte Sprache # Row 8 Set string value... 8 Label Language_DE Set string value... 8 Text Deutsch Set string value... 8 Key D Set string value... 8 Helptext Deutsche Version # Row 9 Set string value... 9 Label ShowBackground Set string value... 9 Text Hintergrund Set string value... 9 Key g Set string value... 9 Helptext Zeige Hintergrund # Row 10 Set string value... 10 Label $Recording Set string value... 10 Text Aufnahme Set string value... 10 Key Set string value... 10 Helptext Einstellungen f\u"r die Aufnahmen # Row 11 Set string value... 11 Label Input_Microphone Set string value... 11 Text Mikrofon Set string value... 11 Key M Set string value... 11 Helptext Aufnahme \u"ber den Mikrofoneingang # Row 12 Set string value... 12 Label Input_Line Set string value... 12 Text Line input | Set string value... 12 Key |\+ Set string value... 12 Helptext Aufnahme \u"ber "Line input" # Row 13 Set string value... 13 Label Credits Set string value... 13 Text \u"ber SGC2 Set string value... 13 Key 2i Set string value... 13 Helptext Informationen zur SpeakGoodChinese 2 # Row 14 Set string value... 14 Label Help Set string value... 14 Text Hilfe Set string value... 14 Key ?/ Set string value... 14 Helptext Dr\u"cken Sie auf den Knopf \u"ber den Sie Informationen m\o"chten. Dr\u"cken Sie danach auf "Hilfe". # Row 15 Set string value... 15 Label Manual Set string value... 15 Text Handbuch Set string value... 15 Key u Set string value... 15 Helptext Handbuch zum Programm # Row 16 Set string value... 16 Label $Register Set string value... 16 Text Ihre Stimme Set string value... 16 Key Set string value... 16 Helptext W\a"hle die Category die past bei Ihrer Stimme # Row 17 Set string value... 17 Label Register_350 Set string value... 17 Text Frau hoch Set string value... 17 Key F Set string value... 17 Helptext W\a"hle diesen Knopf wenn Sie eine Frau mit eine hohe Stimme sind # Row 18 Set string value... 18 Label Register_300 Set string value... 18 Text Frau mittel Set string value... 18 Key r Set string value... 18 Helptext W\a"hle diesen Knopf wenn Sie eine Frau mit eine mittel-hohe Stimme sind # Row 19 Set string value... 19 Label Register_250 Set string value... 19 Text Frau tief Set string value... 19 Key u Set string value... 19 Helptext W\a"hle diesen Knopf wenn Sie eine Frau mit eine tiefe Stimme sind # Row 20 Set string value... 20 Label Register_249 Set string value... 20 Text Man hoch Set string value... 20 Key h Set string value... 20 Helptext W\a"hle diesen Knopf wenn Sie ein Mann mit eine hohe Stimme sind # Row 21 Set string value... 21 Label Register_180 Set string value... 21 Text Man mittel Set string value... 21 Key a Set string value... 21 Helptext W\a"hle diesen Knopf wenn Sie ein Mann mit eine mittle-hohe Stimme sind # Row 22 Set string value... 22 Label Register_150 Set string value... 22 Text Man tief Set string value... 22 Key t Set string value... 22 Helptext W\a"hle diesen Knopf wenn Sie ein Mann mit eine tiefe Stimme sind # Row 23 Set string value... 23 Label Register_125 Set string value... 23 Text Man Xtr tief Set string value... 23 Key Set string value... 23 Helptext W\a"hle diesen Knopf wenn Sie ein Mann mit eine sehr tiefe Stimme sind # Row 24 Set string value... 24 Label $Display Set string value... 24 Text Wiedergabe Set string value... 24 Key Set string value... 24 Helptext Einstellungen der wiedergabe uzw # Row 25 Set string value... 25 Label DisplayNumbers Set string value... 25 Text Ton Zahlen Set string value... 25 Key u Set string value... 25 Helptext Wiedergabe Pinyin mit zahlen der T\o"ne (einn) oder symbole (aus) # Row 26 Set string value... 26 Label DisplayPinyin Set string value... 26 Text Pinyin Set string value... 26 Key P Set string value... 26 Helptext Wiedergabe Pinyin w\o"rte w\a"hrend der \U"bungen # Row 27 Set string value... 27 Label DisplayChar Set string value... 27 Text Schriftzeichen Set string value... 27 Key C Set string value... 27 Helptext Wiedergabe chinesische Schriftzeichen wenn anwesend # Row 28 Set string value... 28 Label DisplayTrans Set string value... 28 Text \U"bersetzung Set string value... 28 Key b Set string value... 28 Helptext \U"bersetzung wenn anwesend # Row 29 Set string value... 29 Label ShuffleLists Set string value... 29 Text Shuffle Set string value... 29 Key S Set string value... 29 Helptext Shuffle W\o"rter in Wortlisten (ein) oder eine feste Reihenvolge (aus) # Row 30 Set string value... 30 Label AdaptiveLists Set string value... 30 Text Adaptiv Set string value... 30 Key Set string value... 30 Helptext \U"ben Sie nur W\o"rter die mehr als zwei Versuchen erforderten # Row 31 Set string value... 31 Label UseSoundExample Set string value... 31 Text Audio Vorbild Set string value... 31 Key V Set string value... 31 Helptext Gebrauche echte Aufnahmen zum Vorbild wenn anwesend (ein) oder synthetische T\o"ne (aus) # Row 32 Set string value... 32 Label Synthesis_eSpeak Set string value... 32 Text Synthese Set string value... 32 Key y Set string value... 32 Helptext Gebrauche eine synthetische Stimme zum Vorbild (Sie brauche eSpeak: www.espeak.org) # Row 33 Set string value... 33 Label Voice Set string value... 33 Text Stimme> $$$ Set string value... 33 Key >. Set string value... 33 Helptext W\a"hle eine synthetische Stimme # Row 34 Set string value... 34 Label $Recognition Set string value... 34 Text Sprachkenntnisse Set string value... 34 Key Set string value... 34 Helptext Einstellung f\u"r fortgeschrittene Studenten # Row 35 Set string value... 35 Label Strict Set string value... 35 Text Stufe $$$ Set string value... 35 Key !1 Set string value... 35 Helptext Wie preziese die Aussprache der T\o"ne gepr\u"ft wird (Stufe 0-3). Die h\o"gste Stufe fordert eine preciese Aussprage # Row 36 Set string value... 36 Label OpenWordlist Set string value... 36 Text \O"fne Liste+ Set string value... 36 Key += Set string value... 36 Helptext W\a"hle und \o"fne eine wortliste # Row 37 Set string value... 37 Label InstallWordlist Set string value... 37 Text Installiere Listen Set string value... 37 Key r Set string value... 37 Helptext Installiere alle .sgc wortlisten in die Documents, Downloads, und Preferences Verzeichnisse # Row 38 Set string value... 38 Label DeleteWordlist Set string value... 38 Text L\o"ssche Liste X Set string value... 38 Key X Set string value... 38 Helptext L\o"ssche die Wortliste. Sie m\u"ssen die 'j' taste dr\u"cken um das L\o"sschen zu best\a"tigen. # Row 39 Set string value... 39 Label !DeleteWordlist Set string value... 39 Text Sicher? j/N Set string value... 39 Key j Set string value... 39 Helptext Sind Sie sicher? Best\a"tige diese Aktion mit der taste 'j' # Row 40 Set string value... 40 Label ExportWordlist Set string value... 40 Text Exportiere Set string value... 40 Key W Set string value... 40 Helptext Exportieren Sie die markierten W\o"rter in eine neue Wortliste # Row 41 Set string value... 41 Label $AudioName Set string value... 41 Text $$$ Set string value... 41 Key ! Set string value... 41 Helptext Name der aktieven Aufzeichnungssitzung # Row 42 Set string value... 42 Label SaveAudio Set string value... 42 Text Audio Set string value... 42 Key L Set string value... 42 Helptext Aufnahmen speichern in ein Verzeichnis (letste Aufnahme jedes pinyin Wort) # Row 43 Set string value... 43 Label !NotAWordlist Set string value... 43 Text Falsch Set string value... 43 Key Set string value... 43 Helptext Keine g\u"ltige Wordliste: # Row 44 Set string value... 44 Label $Statistics Set string value... 44 Text \U"bersicht Set string value... 44 Key Set string value... 44 Helptext Gebe einen \U"berblick der Ergebnisse # Row 45 Set string value... 45 Label ClearSummary Set string value... 45 Text Neuer* Set string value... 45 Key *8 Set string value... 45 Helptext Starten Sie einen neuen Bericht mit den Ergebnissen dieser Sitzung # Row 46 Set string value... 46 Label !ClearSummary Set string value... 46 Text Sicher? j/N Set string value... 46 Key j Set string value... 46 Helptext Alle Ergebnisse dieser Sitzung werden gel\o"scht. Best\a"tigen Sie diese Aktion mit der taste 'j' # Row 47 Set string value... 47 Label ListPerf Set string value... 47 Text Ergebnisse Set string value... 47 Key &7 Set string value... 47 Helptext Ergebnisse dieser Sitzung zeigen # Row 48 Set string value... 48 Label SavePerf Set string value... 48 Text Bewahre Set string value... 48 Key 9 Set string value... 48 Helptext Ergebnisse der \U"bungen aufbewahren in eine Datei (mit .tsv Dateierweiterung) # Row 49 Set string value... 49 Label OpenPerf Set string value... 49 Text Lese Set string value... 49 Key 7 Set string value... 49 Helptext L\o"sche Ergebnisse und lese aufbewahrte Ergebnisse von \U"bungen aus einer Datei # Row 50 Set string value... 50 Label !OpenPerf Set string value... 50 Text Lese Set string value... 50 Key § Set string value... 50 Helptext W\a"hle Datei mit aufbewahrte Ergebnisse von \U"bungen (mit .tsv Dateierweiterung) endproc procCreateConfig_EN$ = "Config_EN" procedure CreateConfig_EN Create Table with column names... Config_EN 50 ... Label Text Key Helptext # Fill table values # Row 1 Set string value... 1 Label !Author Set string value... 1 Text Author Set string value... 1 Key ! Set string value... 1 Helptext R.J.J.H. van Son # Row 2 Set string value... 2 Label !Copyright Set string value... 2 Text Copyright Set string value... 2 Key ! Set string value... 2 Helptext Copyright 2010 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Label !License Set string value... 3 Text License Set string value... 3 Key ! Set string value... 3 Helptext GNU GPL version 2 or later # Row 4 Set string value... 4 Label !WindowTitle Set string value... 4 Text SpeakGoodChinese: Change settings Set string value... 4 Key ! Set string value... 4 Helptext SpeakGoodChinese: Change settings # Row 5 Set string value... 5 Label !Man Set string value... 5 Text Symbols Set string value... 5 Key Set string value... 5 Helptext Symbol processing: !- Inactive button; $- Title text; #- Invisible button; $$$- Replace symbol with text # Row 6 Set string value... 6 Label Return Set string value... 6 Text Return Set string value... 6 Key R Set string value... 6 Helptext Go back to practise page # Row 7 Set string value... 7 Label $Language Set string value... 7 Text Language Set string value... 7 Key Set string value... 7 Helptext Select a language # Row 8 Set string value... 8 Label Language_EN Set string value... 8 Text English Set string value... 8 Key E Set string value... 8 Helptext English language version # Row 9 Set string value... 9 Label $Register Set string value... 9 Text Your Voice Set string value... 9 Key Set string value... 9 Helptext Select the category that fits your voice # Row 10 Set string value... 10 Label Register_350 Set string value... 10 Text Woman High Set string value... 10 Key W Set string value... 10 Helptext Pick this if you are a female with a high voice # Row 11 Set string value... 11 Label Register_300 Set string value... 11 Text Woman Mid Set string value... 11 Key i Set string value... 11 Helptext Pick this if you are a female with a mid-range voice # Row 12 Set string value... 12 Label Register_250 Set string value... 12 Text Woman Low Set string value... 12 Key o Set string value... 12 Helptext Pick this if you are a female with a low voice # Row 13 Set string value... 13 Label Register_249 Set string value... 13 Text Man High Set string value... 13 Key M Set string value... 13 Helptext Pick this if you are a male with a high voice # Row 14 Set string value... 14 Label Register_180 Set string value... 14 Text Man Mid Set string value... 14 Key a Set string value... 14 Helptext Pick this if you are a male with a mid-range voice # Row 15 Set string value... 15 Label Register_150 Set string value... 15 Text Man Low Set string value... 15 Key L Set string value... 15 Helptext Pick this if you are a male with a low voice # Row 16 Set string value... 16 Label Register_125 Set string value... 16 Text Man Xtr Low Set string value... 16 Key Set string value... 16 Helptext Pick this if you are a male with a very low voice # Row 17 Set string value... 17 Label $Display Set string value... 17 Text View and Sound Set string value... 17 Key Set string value... 17 Helptext Settings for display and sound # Row 18 Set string value... 18 Label DisplayNumbers Set string value... 18 Text Tone Numbers Set string value... 18 Key u Set string value... 18 Helptext Display pinyin with tone numbers (on) or tone symbols (off) # Row 19 Set string value... 19 Label DisplayPinyin Set string value... 19 Text Pinyin Set string value... 19 Key P Set string value... 19 Helptext Display pinyin word while practicing # Row 20 Set string value... 20 Label DisplayChar Set string value... 20 Text Characters Set string value... 20 Key C Set string value... 20 Helptext Display chinese characters if they are available # Row 21 Set string value... 21 Label DisplayTrans Set string value... 21 Text Translation Set string value... 21 Key T Set string value... 21 Helptext Display translation if available # Row 22 Set string value... 22 Label ShuffleLists Set string value... 22 Text Shuffle Set string value... 22 Key S Set string value... 22 Helptext Shuffle words in word lists (on) or use a fixed order (off) # Row 23 Set string value... 23 Label AdaptiveLists Set string value... 23 Text Adaptive Set string value... 23 Key Set string value... 23 Helptext Practice only words that required more than two attempts # Row 24 Set string value... 24 Label UseSoundExample Set string value... 24 Text Real example Set string value... 24 Key x Set string value... 24 Helptext Use a real sound recording (on) if available or synthesized tones (off) as examples # Row 25 Set string value... 25 Label Synthesis_eSpeak Set string value... 25 Text Synthesis Set string value... 25 Key y Set string value... 25 Helptext Use a synthetic voice as example (you need eSpeak: www.espeak.org) # Row 26 Set string value... 26 Label Voice Set string value... 26 Text Voice> $$$ Set string value... 26 Key >. Set string value... 26 Helptext Select a synthetic voice # Row 27 Set string value... 27 Label $Recognition Set string value... 27 Text Proficiency Set string value... 27 Key Set string value... 27 Helptext Set to recognize advanced or native speakers # Row 28 Set string value... 28 Label Strict Set string value... 28 Text Level $$$ Set string value... 28 Key !1 Set string value... 28 Helptext How strict tone pronunciation will be checked (Level 0-3). The highest level is quite strict. # Row 29 Set string value... 29 Label OpenWordlist Set string value... 29 Text Open List+ Set string value... 29 Key += Set string value... 29 Helptext Select and read a wordlist # Row 30 Set string value... 30 Label InstallWordlist Set string value... 30 Text Install Lists Set string value... 30 Key t Set string value... 30 Helptext Install all .sgc wordlist packages found in the Documents, Downloads, and Preferences directories # Row 31 Set string value... 31 Label DeleteWordlist Set string value... 31 Text Delete List Set string value... 31 Key D Set string value... 31 Helptext Permanently delete the word list. You have to confirm this by typing 'y' # Row 32 Set string value... 32 Label !DeleteWordlist Set string value... 32 Text Realy y/N Set string value... 32 Key y Set string value... 32 Helptext Are you sure you want to proceed? Confirm this option by typing 'y' # Row 33 Set string value... 33 Label ExportWordlist Set string value... 33 Text Export words Set string value... 33 Key ! Set string value... 33 Helptext Export the current active words to a new wordlist # Row 34 Set string value... 34 Label ShowBackground Set string value... 34 Text Background Set string value... 34 Key B Set string value... 34 Helptext Show background # Row 35 Set string value... 35 Label $Recording Set string value... 35 Text Recording Set string value... 35 Key Set string value... 35 Helptext Settings for recording speech # Row 36 Set string value... 36 Label Input_Microphone Set string value... 36 Text Microphone Set string value... 36 Key h Set string value... 36 Helptext Use the build in microphone for recording # Row 37 Set string value... 37 Label Input_Line Set string value... 37 Text Line input | Set string value... 37 Key |\+ Set string value... 37 Helptext Use the line input for recording # Row 38 Set string value... 38 Label Credits Set string value... 38 Text About SGC2 Set string value... 38 Key 2 Set string value... 38 Helptext Information about SpeakGoodChinese # Row 39 Set string value... 39 Label $AudioName Set string value... 39 Text $$$ Set string value... 39 Key ! Set string value... 39 Helptext Name of the active recording session # Row 40 Set string value... 40 Label SaveAudio Set string value... 40 Text Save Audio Set string value... 40 Key K Set string value... 40 Helptext Store the recordings in a directory (last version of each pinyin word is kept) # Row 41 Set string value... 41 Label Help Set string value... 41 Text Help Set string value... 41 Key ?/ Set string value... 41 Helptext Press on the button you want information on, "Help" to continue # Row 42 Set string value... 42 Label Manual Set string value... 42 Text Manual Set string value... 42 Key M Set string value... 42 Helptext Manual of the application # Row 43 Set string value... 43 Label !NotAWordlist Set string value... 43 Text Wrong Set string value... 43 Key Set string value... 43 Helptext Not a valid word list: # Row 44 Set string value... 44 Label $Statistics Set string value... 44 Text Overview Set string value... 44 Key Set string value... 44 Helptext Give overview of performance measures # Row 45 Set string value... 45 Label ClearSummary Set string value... 45 Text Clear* Set string value... 45 Key *8 Set string value... 45 Helptext Clear report and start a new performance report for this session # Row 46 Set string value... 46 Label !ClearSummary Set string value... 46 Text Realy y/N Set string value... 46 Key y Set string value... 46 Helptext All results for this session will be cleared. Confirm this action by typing 'y' # Row 47 Set string value... 47 Label ListPerf Set string value... 47 Text Performance Set string value... 47 Key &7 Set string value... 47 Helptext Show performance during this session # Row 48 Set string value... 48 Label SavePerf Set string value... 48 Text Save Set string value... 48 Key 9 Set string value... 48 Helptext Save performance report to file (with a .tsv extension) # Row 49 Set string value... 49 Label OpenPerf Set string value... 49 Text Read Set string value... 49 Key 7 Set string value... 49 Helptext Clear report and read stored performance report from file # Row 50 Set string value... 50 Label !OpenPerf Set string value... 50 Text Read Set string value... 50 Key ! Set string value... 50 Helptext Select file with stored results of practising (file with a .tsv extension) endproc procCreateConfig_JA$ = "Config_JA" procedure CreateConfig_JA Create Table with column names... Config_JA 50 ... Label Text Key Helptext # Fill table values # Row 1 Set string value... 1 Label !Author Set string value... 1 Text Author Set string value... 1 Key ! Set string value... 1 Helptext R.J.J.H. van Son, Translation: Takahiro Higashi (東孝拓) # Row 2 Set string value... 2 Label !Copyright Set string value... 2 Text Copyright Set string value... 2 Key ! Set string value... 2 Helptext Copyright 2010 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Label !License Set string value... 3 Text License Set string value... 3 Key ! Set string value... 3 Helptext GNU GPL version 2 or later # Row 4 Set string value... 4 Label !WindowTitle Set string value... 4 Text SpeakGoodChinese: 設定の変更 Set string value... 4 Key ! Set string value... 4 Helptext SpeakGoodChinese: 設定の変更 # Row 5 Set string value... 5 Label !Man Set string value... 5 Text Symbols Set string value... 5 Key Set string value... 5 Helptext Symbol processing: !- Inactive button; $- Title text; #- Invisible button; $$$- Replace symbol with text # Row 6 Set string value... 6 Label Return Set string value... 6 Text 戻る R Set string value... 6 Key R Set string value... 6 Helptext 練習画面に戻ります。 # Row 7 Set string value... 7 Label $Language Set string value... 7 Text 言語 Set string value... 7 Key Set string value... 7 Helptext 表示言語を設定します。 # Row 8 Set string value... 8 Label Language_JA Set string value... 8 Text 日本語 J Set string value... 8 Key J Set string value... 8 Helptext 日本語版 # Row 9 Set string value... 9 Label $Register Set string value... 9 Text 発話者の声 Set string value... 9 Key Set string value... 9 Helptext 発話者の声のカテゴリーを設定します。 # Row 10 Set string value... 10 Label Register_350 Set string value... 10 Text 女性 高め W Set string value... 10 Key W Set string value... 10 Helptext 発話者が女性でかつ声が高めのとき選択します。 # Row 11 Set string value... 11 Label Register_300 Set string value... 11 Text 女性 中間 i Set string value... 11 Key i Set string value... 11 Helptext 発話者が女性でかつ声が中間の高さのとき選択します。 # Row 12 Set string value... 12 Label Register_250 Set string value... 12 Text 女性 低め o Set string value... 12 Key o Set string value... 12 Helptext 発話者が女性でかつ声が低めのとき選択します。 # Row 13 Set string value... 13 Label Register_249 Set string value... 13 Text 男性 高め M Set string value... 13 Key M Set string value... 13 Helptext 発話者が男性でかつ声が高めのとき選択します。 # Row 14 Set string value... 14 Label Register_180 Set string value... 14 Text 男性 中間 a Set string value... 14 Key a Set string value... 14 Helptext 発話者が男性でかつ声が中間の高さのとき選択します。 # Row 15 Set string value... 15 Label Register_150 Set string value... 15 Text 男性 低め L Set string value... 15 Key L Set string value... 15 Helptext 発話者が男性でかつ声が低めのとき選択します。 # Row 16 Set string value... 16 Label Register_125 Set string value... 16 Text 男性 更に低め Set string value... 16 Key Set string value... 16 Helptext 発話者が男性でかつ声が更に低めのとき選択します。 # Row 17 Set string value... 17 Label $Display Set string value... 17 Text 画面表示と音声 Set string value... 17 Key Set string value... 17 Helptext 画面表示と音声に関する設定をします。 # Row 18 Set string value... 18 Label DisplayNumbers Set string value... 18 Text 声調番号 u Set string value... 18 Key u Set string value... 18 Helptext オンにすると練習画面で声調番号が表示され、オフにすると声調符号が表示されます。 # Row 19 Set string value... 19 Label DisplayPinyin Set string value... 19 Text ピンイン P Set string value... 19 Key P Set string value... 19 Helptext 練習画面でピンインを表示します。 # Row 20 Set string value... 20 Label DisplayChar Set string value... 20 Text 漢字 C Set string value... 20 Key C Set string value... 20 Helptext 可能ならば練習画面で漢字を表示します。 # Row 21 Set string value... 21 Label DisplayTrans Set string value... 21 Text 翻訳 T Set string value... 21 Key T Set string value... 21 Helptext 可能ならば練習画面で単語の意味を表示します。 # Row 22 Set string value... 22 Label ShuffleLists Set string value... 22 Text シャッフル S Set string value... 22 Key S Set string value... 22 Helptext オンにすると単語表はシャッフルされ、オフなら元の順序が維持されます。 # Row 23 Set string value... 23 Label AdaptiveLists Set string value... 23 Text 順応モード Set string value... 23 Key Set string value... 23 Helptext 二回以内で合格できなかった単語だけ表示されるようになります。 # Row 24 Set string value... 24 Label UseSoundExample Set string value... 24 Text 実音声 x Set string value... 24 Key x Set string value... 24 Helptext オンでかつ実音声が用意されていれば実音声を例として使用し、そうでないなら合成音声を使用します。 # Row 25 Set string value... 25 Label Synthesis_eSpeak Set string value... 25 Text 合成音声 y Set string value... 25 Key y Set string value... 25 Helptext 合成音声を例として使用します(eSpeakが必要です:www.espeak.org)。 # Row 26 Set string value... 26 Label Voice Set string value... 26 Text 合成音声選択> $$$ Set string value... 26 Key >. Set string value... 26 Helptext 合成音声のタイプを選択 # Row 27 Set string value... 27 Label $Recognition Set string value... 27 Text 中国語レベル Set string value... 27 Key Set string value... 27 Helptext 上級者や母語者レベルに設定できます。 # Row 28 Set string value... 28 Label Strict Set string value... 28 Text レベル $$$ Set string value... 28 Key !1 Set string value... 28 Helptext 発音チェックの厳しさを設定します(レベル0-3)。最高レベルでは非常に厳しい基準でチェックされます。 # Row 29 Set string value... 29 Label OpenWordlist Set string value... 29 Text 単語表読み込み+ Set string value... 29 Key += Set string value... 29 Helptext 単語表を選択し読み込みます # Row 30 Set string value... 30 Label InstallWordlist Set string value... 30 Text 単語表インストール t Set string value... 30 Key t Set string value... 30 Helptext Documents、Downloads、Preferencesディレクトリにある全ての.sgc形式の単語表をインストールします。 # Row 31 Set string value... 31 Label DeleteWordlist Set string value... 31 Text 単語表削除 D Set string value... 31 Key D Set string value... 31 Helptext 単語表を消去します。“y”キーを押して確定して下さい # Row 32 Set string value... 32 Label !DeleteWordlist Set string value... 32 Text 削除確認 y/N Set string value... 32 Key y Set string value... 32 Helptext 本当に削除しますか?“y”キーで確定します。 # Row 33 Set string value... 33 Label ExportWordlist Set string value... 33 Text 単語の保存 Set string value... 33 Key ! Set string value... 33 Helptext 現在選択されている単語を新しい単語表に保存します。 # Row 34 Set string value... 34 Label ShowBackground Set string value... 34 Text 壁紙 Set string value... 34 Key B Set string value... 34 Helptext 壁紙を表示します。 # Row 35 Set string value... 35 Label $Recording Set string value... 35 Text 録音 Set string value... 35 Key Set string value... 35 Helptext 録音の設定をします。 # Row 36 Set string value... 36 Label Input_Microphone Set string value... 36 Text マイク入力 h Set string value... 36 Key h Set string value... 36 Helptext 声をマイク入力で録音します。 # Row 37 Set string value... 37 Label Input_Line Set string value... 37 Text ライン入力 | Set string value... 37 Key |\+ Set string value... 37 Helptext 声をライン入力で録音します。 # Row 38 Set string value... 38 Label Credits Set string value... 38 Text SGC2について Set string value... 38 Key 2 Set string value... 38 Helptext SpeakGoodChineseについての基本情報を表示します。 # Row 39 Set string value... 39 Label $AudioName Set string value... 39 Text $$$ Set string value... 39 Key ! Set string value... 39 Helptext 現在の録音セッションの名前です。 # Row 40 Set string value... 40 Label SaveAudio Set string value... 40 Text 録音の保存 K Set string value... 40 Key K Set string value... 40 Helptext 録音データをディレクトリに保存します(各単語の最後の発音を保存)。 # Row 41 Set string value... 41 Label Help Set string value... 41 Text ヘルプ ? Set string value... 41 Key ?/ Set string value... 41 Helptext 詳しく知りたいボタンをクリックして下さい。もう一度ヘルプボタンを押すと解除されます。 # Row 42 Set string value... 42 Label Manual Set string value... 42 Text 説明書 M Set string value... 42 Key M Set string value... 42 Helptext 本ソフトの説明書を表示します。 # Row 43 Set string value... 43 Label !NotAWordlist Set string value... 43 Text エラー Set string value... 43 Key Set string value... 43 Helptext 有効な形式の単語表ではありません: # Row 44 Set string value... 44 Label $Statistics Set string value... 44 Text 結果 Set string value... 44 Key Set string value... 44 Helptext 発音練習の結果 # Row 45 Set string value... 45 Label ClearSummary Set string value... 45 Text 消去* Set string value... 45 Key *8 Set string value... 45 Helptext 発音練習の結果を消去し、新しく記録を開始します。 # Row 46 Set string value... 46 Label !ClearSummary Set string value... 46 Text 消去確認 y/N Set string value... 46 Key y Set string value... 46 Helptext このセッションにおける発音練習の記録は全部消去されます。“y”キーを押して確定して下さい。 # Row 47 Set string value... 47 Label ListPerf Set string value... 47 Text 発音練習結果 Set string value... 47 Key &7 Set string value... 47 Helptext 発音練習の結果を表示します。 # Row 48 Set string value... 48 Label SavePerf Set string value... 48 Text 保存 Set string value... 48 Key 9 Set string value... 48 Helptext 発音練習の結果をファイルに保存します(.tsv形式) # Row 49 Set string value... 49 Label OpenPerf Set string value... 49 Text 読み込み Set string value... 49 Key 7 Set string value... 49 Helptext 現在の発音練習の結果を消去し、以前の結果ファイルを読み込みます。 # Row 50 Set string value... 50 Label !OpenPerf Set string value... 50 Text 読み込み Set string value... 50 Key ! Set string value... 50 Helptext 発音練習結果ファイルを選択して下さい(.tsv形式) endproc procCreateConfig_NL$ = "Config_NL" procedure CreateConfig_NL Create Table with column names... Config_NL 51 ... Label Text Key Helptext # Fill table values # Row 1 Set string value... 1 Label !Author Set string value... 1 Text Auteur Set string value... 1 Key ! Set string value... 1 Helptext R.J.J.H. van Son # Row 2 Set string value... 2 Label !Copyright Set string value... 2 Text Copyright Set string value... 2 Key ! Set string value... 2 Helptext Copyright 2010 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Label !License Set string value... 3 Text Licentie Set string value... 3 Key ! Set string value... 3 Helptext GNU GPL version 2 or later # Row 4 Set string value... 4 Label !WindowTitle Set string value... 4 Text SpeakGoodChinese: Instellingen aanpassen Set string value... 4 Key ! Set string value... 4 Helptext SpeakGoodChinese: Instellingen aanpassen # Row 5 Set string value... 5 Label !Man Set string value... 5 Text Symbols Set string value... 5 Key Set string value... 5 Helptext Symbolen: !- Inactieve knop; $- Titel; #- Onzichtbare knop; $$$- Symbool vervangen door tekst # Row 6 Set string value... 6 Label Return Set string value... 6 Text Terug Set string value... 6 Key T Set string value... 6 Helptext Ga terug naar de oefen pagina # Row 7 Set string value... 7 Label $Language Set string value... 7 Text Taal Set string value... 7 Key Set string value... 7 Helptext Selecteer de gewenste taal # Row 8 Set string value... 8 Label Language_EN Set string value... 8 Text English Set string value... 8 Key E Set string value... 8 Helptext Gebruik Engels # Row 9 Set string value... 9 Label Language_NL Set string value... 9 Text Nederlands Set string value... 9 Key N Set string value... 9 Helptext Gebruik Nederlands # Row 10 Set string value... 10 Label $Register Set string value... 10 Text Uw Stem Set string value... 10 Key Set string value... 10 Helptext Kies de categorie die past bij uw stem # Row 11 Set string value... 11 Label Register_350 Set string value... 11 Text Vrouw Hoog Set string value... 11 Key V Set string value... 11 Helptext Kies dit als u een vrouw bent met een hoge stem # Row 12 Set string value... 12 Label Register_300 Set string value... 12 Text Vrouw Mid Set string value... 12 Key r Set string value... 12 Helptext Kies dit als u een vrouw bent met een middel-hoge stem # Row 13 Set string value... 13 Label Register_250 Set string value... 13 Text Vrouw Laag Set string value... 13 Key o Set string value... 13 Helptext Kies dit als u een vrouw bent met een lage stem # Row 14 Set string value... 14 Label Register_249 Set string value... 14 Text Man Hoog Set string value... 14 Key M Set string value... 14 Helptext Kies dit als u een man bent met een hoge stem # Row 15 Set string value... 15 Label Register_180 Set string value... 15 Text Man Mid Set string value... 15 Key a Set string value... 15 Helptext Kies dit als u een man bent met een middel-lage stem # Row 16 Set string value... 16 Label Register_150 Set string value... 16 Text Man Laag Set string value... 16 Key n Set string value... 16 Helptext Kies dit als u een man bent met een lage stem # Row 17 Set string value... 17 Label Register_125 Set string value... 17 Text Man Xtr Laag Set string value... 17 Key Set string value... 17 Helptext Kies dit als u een man bent met een zeer lage stem # Row 18 Set string value... 18 Label $Display Set string value... 18 Text Beeld en Geluid Set string value... 18 Key Set string value... 18 Helptext Instellingen voor beeld en geluid # Row 19 Set string value... 19 Label DisplayNumbers Set string value... 19 Text Toon Cijfers Set string value... 19 Key C Set string value... 19 Helptext Laat toon nummers (aan) of toon symbolen (uit) zien # Row 20 Set string value... 20 Label DisplayPinyin Set string value... 20 Text Pinyin Set string value... 20 Key P Set string value... 20 Helptext Laat pinyin zien # Row 21 Set string value... 21 Label DisplayChar Set string value... 21 Text Karakters Set string value... 21 Key K Set string value... 21 Helptext Laat Chinese karakters zien als ze beschikbaar zijn # Row 22 Set string value... 22 Label DisplayTrans Set string value... 22 Text Vertaling Set string value... 22 Key g Set string value... 22 Helptext Geef vertaling al die beschikbaar is # Row 23 Set string value... 23 Label ShuffleLists Set string value... 23 Text Woorden mixen Set string value... 23 Key x Set string value... 23 Helptext Gebruik elke keer een andere volgorde van de woorden # Row 24 Set string value... 24 Label AdaptiveLists Set string value... 24 Text Adaptief Set string value... 24 Key Set string value... 24 Helptext Oefen alleen woorden waarvoor meer dan twee pogingen nodig waren # Row 25 Set string value... 25 Label UseSoundExample Set string value... 25 Text Spraakvoorbeeld Set string value... 25 Key S Set string value... 25 Helptext Laat echte spraakopnamen (aan) of kunstmatige tonen (uit) horen als voorbeeld # Row 26 Set string value... 26 Label Synthesis_eSpeak Set string value... 26 Text Synthese Set string value... 26 Key y Set string value... 26 Helptext Gebruik een synthetische stem als voorbeeld (eSpeak is hiervoor nodig: www.espeak.org) # Row 27 Set string value... 27 Label Voice Set string value... 27 Text Stem> $$$ Set string value... 27 Key >. Set string value... 27 Helptext Kies een synthetische stem # Row 28 Set string value... 28 Label $Recognition Set string value... 28 Text Taalniveau Set string value... 28 Key Set string value... 28 Helptext Stel de herkenner in op gevorderde of moedertaal sprekers # Row 29 Set string value... 29 Label Strict Set string value... 29 Text Niveau $$$ Set string value... 29 Key !1 Set string value... 29 Helptext Hoe strikt de uitspraak van de tonen gecontroleerd wordt (Niveau 0-3). Het hoogste niveau is strikt. # Row 30 Set string value... 30 Label OpenWordlist Set string value... 30 Text Open Lijst+ Set string value... 30 Key += Set string value... 30 Helptext Selecteer en lees een woordlijst # Row 31 Set string value... 31 Label InstallWordlist Set string value... 31 Text Installeer Lijsten Set string value... 31 Key I Set string value... 31 Helptext Installeer alle .sgc woordpaketten uit de Downloads, Documents en Preferences mappen # Row 32 Set string value... 32 Label DeleteWordlist Set string value... 32 Text Verwijder Lijst Set string value... 32 Key d Set string value... 32 Helptext Verwijder de getoonde woordlijst permanent, u moet dit bevestigen door een 'j' te typen # Row 33 Set string value... 33 Label !DeleteWordlist Set string value... 33 Text Heel zeker j/N Set string value... 33 Key j Set string value... 33 Helptext Bent u zeker dat u door wilt gaan? Bevestig door een 'j' te typen # Row 34 Set string value... 34 Label ExportWordlist Set string value... 34 Text Exporteer Set string value... 34 Key ! Set string value... 34 Helptext Exporteer de actieve woorden naar een nieuwe woordenlijst # Row 35 Set string value... 35 Label ShowBackground Set string value... 35 Text Achtergrond Set string value... 35 Key & Set string value... 35 Helptext Toon achtergrond # Row 36 Set string value... 36 Label $Recording Set string value... 36 Text Opname Set string value... 36 Key Set string value... 36 Helptext Instellingen voor de opname van spraak # Row 37 Set string value... 37 Label Input_Microphone Set string value... 37 Text Microfoon Set string value... 37 Key f Set string value... 37 Helptext Gebruik de ingebouwde microfoon voor spraakopnamen # Row 38 Set string value... 38 Label Input_Line Set string value... 38 Text Lijn ingang | Set string value... 38 Key |\+ Set string value... 38 Helptext Gebruik de lijn-ingang voor de spraakopnamen # Row 39 Set string value... 39 Label Credits Set string value... 39 Text Over SGC2 Set string value... 39 Key 2 Set string value... 39 Helptext Informatie over SpeakGoodChinese # Row 40 Set string value... 40 Label $AudioName Set string value... 40 Text $$$ Set string value... 40 Key ! Set string value... 40 Helptext Naam van de actieve opnamesessie # Row 41 Set string value... 41 Label SaveAudio Set string value... 41 Text Bewaar Audio Set string value... 41 Key L Set string value... 41 Helptext Bewaar opnamen in een map (laatste versie van ieder pinyin woord) # Row 42 Set string value... 42 Label Help Set string value... 42 Text Help Set string value... 42 Key ?/ Set string value... 42 Helptext klik op de knop waar u informatie over wilt hebben, "Help" als u verder wilt # Row 43 Set string value... 43 Label Manual Set string value... 43 Text Handleiding Set string value... 43 Key H Set string value... 43 Helptext Handleiding van de applicatie # Row 44 Set string value... 44 Label !NotAWordlist Set string value... 44 Text Fout Set string value... 44 Key Set string value... 44 Helptext Geen geldige woordlijst: # Row 45 Set string value... 45 Label $Statistics Set string value... 45 Text Overzicht Set string value... 45 Key Set string value... 45 Helptext Geef een overzicht van de resultaten # Row 46 Set string value... 46 Label ClearSummary Set string value... 46 Text Initialiseer* Set string value... 46 Key *8 Set string value... 46 Helptext Wis verslag en start nieuwe resultatenverslag voor deze sessie # Row 47 Set string value... 47 Label !ClearSummary Set string value... 47 Text Heel zeker j/N Set string value... 47 Key j Set string value... 47 Helptext Alle resultaten van deze sessie worden gewist. Bevestig deze actie door een 'j' te typen # Row 48 Set string value... 48 Label ListPerf Set string value... 48 Text Resultaten Set string value... 48 Key &7 Set string value... 48 Helptext Toon de resultaten van deze sessie # Row 49 Set string value... 49 Label SavePerf Set string value... 49 Text Bewaar Set string value... 49 Key 9 Set string value... 49 Helptext Schrijf een verslag van de resultaten naar een bestand (met .tsv extensie) # Row 50 Set string value... 50 Label OpenPerf Set string value... 50 Text Lees Set string value... 50 Key 7 Set string value... 50 Helptext Wis verslag en lees resultaten van gedane oefeningen uit een bestand # Row 51 Set string value... 51 Label !OpenPerf Set string value... 51 Text Lees Set string value... 51 Key ! Set string value... 51 Helptext Kies bestand met bewaarde resultaten van gedane oefeningen (bestand met .tsv extensie) endproc procCreateConfig_ZH$ = "Config_ZH" procedure CreateConfig_ZH Create Table with column names... Config_ZH 50 ... Label Text Key Helptext # Fill table values # Row 1 Set string value... 1 Label !Author Set string value... 1 Text Author Set string value... 1 Key ! Set string value... 1 Helptext R.J.J.H. van Son, Translation: Takahiro Higashi (東孝拓) and Wang Huiting(王慧婷) # Row 2 Set string value... 2 Label !Copyright Set string value... 2 Text Copyright Set string value... 2 Key ! Set string value... 2 Helptext Copyright 2010 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Label !License Set string value... 3 Text License Set string value... 3 Key ! Set string value... 3 Helptext GNU GPL version 2 or later # Row 4 Set string value... 4 Label !WindowTitle Set string value... 4 Text SpeakGoodChinese: 修改设置 Set string value... 4 Key ! Set string value... 4 Helptext SpeakGoodChinese: 修改设置 # Row 5 Set string value... 5 Label !Man Set string value... 5 Text Symbols Set string value... 5 Key Set string value... 5 Helptext Symbol processing: !- Inactive button; $- Title text; #- Invisible button; $$$- Replace symbol with text # Row 6 Set string value... 6 Label Return Set string value... 6 Text 返回 R Set string value... 6 Key R Set string value... 6 Helptext 返回练习主页面。 # Row 7 Set string value... 7 Label $Language Set string value... 7 Text 语言 Set string value... 7 Key Set string value... 7 Helptext 选择页面的显示语言。 # Row 8 Set string value... 8 Label Language_ZH Set string value... 8 Text 汉语 Z Set string value... 8 Key Z Set string value... 8 Helptext 汉语版 # Row 9 Set string value... 9 Label $Register Set string value... 9 Text 您的声音 Set string value... 9 Key Set string value... 9 Helptext 设置您的声音类型。 # Row 10 Set string value... 10 Label Register_350 Set string value... 10 Text 女性 高 W Set string value... 10 Key W Set string value... 10 Helptext 如果发音人为女性且声音较高,那么选择此项。 # Row 11 Set string value... 11 Label Register_300 Set string value... 11 Text 女性 中 i Set string value... 11 Key i Set string value... 11 Helptext 如果发音人为女性且声音高度适中,那么选择此项。 # Row 12 Set string value... 12 Label Register_250 Set string value... 12 Text 女性 低 o Set string value... 12 Key o Set string value... 12 Helptext 如果发音人为女性且声音较低,那么选择此项。 # Row 13 Set string value... 13 Label Register_249 Set string value... 13 Text 男性 高 M Set string value... 13 Key M Set string value... 13 Helptext 如果发音人为男性且声音较高,那么选择此项。 # Row 14 Set string value... 14 Label Register_180 Set string value... 14 Text 男性 中 a Set string value... 14 Key a Set string value... 14 Helptext 如果发音人为男性且声音高度适中,那么选择此项。 # Row 15 Set string value... 15 Label Register_150 Set string value... 15 Text 男性 低 L Set string value... 15 Key L Set string value... 15 Helptext 如果发音人为男性且声音较低,那么选择此项。 # Row 16 Set string value... 16 Label Register_125 Set string value... 16 Text 男性 超低 Set string value... 16 Key Set string value... 16 Helptext 如果发音人为男性且声音很低,那么选择此项。 # Row 17 Set string value... 17 Label $Display Set string value... 17 Text 显示和声音 Set string value... 17 Key Set string value... 17 Helptext 调整页面显示情况和声音情况。 # Row 18 Set string value... 18 Label DisplayNumbers Set string value... 18 Text 声调编码 u Set string value... 18 Key u Set string value... 18 Helptext 选择用数字显示声调,否则用声调符号显示。 # Row 19 Set string value... 19 Label DisplayPinyin Set string value... 19 Text 拼音 P Set string value... 19 Key P Set string value... 19 Helptext 练习发音的过程中显示拼音。 # Row 20 Set string value... 20 Label DisplayChar Set string value... 20 Text 汉字 C Set string value... 20 Key C Set string value... 20 Helptext 如果单词表提供了汉字,则显示汉字。 # Row 21 Set string value... 21 Label DisplayTrans Set string value... 21 Text 翻译 T Set string value... 21 Key T Set string value... 21 Helptext 如果单词表提供了翻译,则显示翻译。 # Row 22 Set string value... 22 Label ShuffleLists Set string value... 22 Text 随机播放 S Set string value... 22 Key S Set string value... 22 Helptext 随机打乱单词表中的词,否则按顺序播放。 # Row 23 Set string value... 23 Label AdaptiveLists Set string value... 23 Text 适应性 Set string value... 23 Key Set string value... 23 Helptext 只练习有难度的词,即发音错误两次以上的单词。 # Row 24 Set string value... 24 Label UseSoundExample Set string value... 24 Text 实际发音 x Set string value... 24 Key x Set string value... 24 Helptext 如果提供了真人发音,选择此按键后,则播放真人发音,否则播放合成发音。 # Row 25 Set string value... 25 Label Synthesis_eSpeak Set string value... 25 Text 合成音 y Set string value... 25 Key y Set string value... 25 Helptext 使用合成发音(需要eSpeak:www.espeak.org)。 # Row 26 Set string value... 26 Label Voice Set string value... 26 Text 合成音选择> $$$ Set string value... 26 Key >. Set string value... 26 Helptext 选择合成音的种类 # Row 27 Set string value... 27 Label $Recognition Set string value... 27 Text 汉语水平 Set string value... 27 Key Set string value... 27 Helptext 可设置为高级汉语水平或母语者水平。 # Row 28 Set string value... 28 Label Strict Set string value... 28 Text 水平 $$$ Set string value... 28 Key !1 Set string value... 28 Helptext 进行审查发音时所使用的严格度(水平0-3)。水平最高时对发音的要求会非常严格。 # Row 29 Set string value... 29 Label OpenWordlist Set string value... 29 Text 打开单词表+ Set string value... 29 Key += Set string value... 29 Helptext 选择并打开单词表 # Row 30 Set string value... 30 Label InstallWordlist Set string value... 30 Text 安装单词表 t Set string value... 30 Key t Set string value... 30 Helptext 从Documents、Downloads以及Preferences文件夹中选择全部.sgc格式的单词表文件 # Row 31 Set string value... 31 Label DeleteWordlist Set string value... 31 Text 删除单词表 D Set string value... 31 Key D Set string value... 31 Helptext 删除单词表,需要按下'y'键确认 # Row 32 Set string value... 32 Label !DeleteWordlist Set string value... 32 Text 确认 y/N Set string value... 32 Key y Set string value... 32 Helptext 确定要删除吗?按下“y”键确定。 # Row 33 Set string value... 33 Label ExportWordlist Set string value... 33 Text 导出单词 Set string value... 33 Key ! Set string value... 33 Helptext 将选择的单词导出到新的单词表。 # Row 34 Set string value... 34 Label ShowBackground Set string value... 34 Text 背景图片 Set string value... 34 Key B Set string value... 34 Helptext 显示背景图片。 # Row 35 Set string value... 35 Label $Recording Set string value... 35 Text 录音 Set string value... 35 Key Set string value... 35 Helptext 调整录音方法。 # Row 36 Set string value... 36 Label Input_Microphone Set string value... 36 Text 麦克风输入 h Set string value... 36 Key h Set string value... 36 Helptext 使用麦克风输入录音数据。 # Row 37 Set string value... 37 Label Input_Line Set string value... 37 Text 线路输入 | Set string value... 37 Key |\+ Set string value... 37 Helptext 使用线路输入录音数据。 # Row 38 Set string value... 38 Label Credits Set string value... 38 Text 关于SGC2 Set string value... 38 Key 2 Set string value... 38 Helptext 关于SpeakGoodChinese。 # Row 39 Set string value... 39 Label $AudioName Set string value... 39 Text $$$ Set string value... 39 Key ! Set string value... 39 Helptext 录音保存的位置。 # Row 40 Set string value... 40 Label SaveAudio Set string value... 40 Text 保存录音 K Set string value... 40 Key K Set string value... 40 Helptext 将录音保存到文件夹(只保存每个单词的最后一次发音)。 # Row 41 Set string value... 41 Label Help Set string value... 41 Text 帮助 ? Set string value... 41 Key ?/ Set string value... 41 Helptext 点击‘帮助’键后,用鼠标点击您想了解的按钮,则显示提示内容。如需解除帮助,请再按下‘帮助’键。 # Row 42 Set string value... 42 Label Manual Set string value... 42 Text 使用手册 M Set string value... 42 Key M Set string value... 42 Helptext 本软件的使用说明。 # Row 43 Set string value... 43 Label !NotAWordlist Set string value... 43 Text 错误 Set string value... 43 Key Set string value... 43 Helptext 不是有效的单词表文件格式: # Row 44 Set string value... 44 Label $Statistics Set string value... 44 Text 结果 Set string value... 44 Key Set string value... 44 Helptext 显示发音练习的结果。 # Row 45 Set string value... 45 Label ClearSummary Set string value... 45 Text 清空* Set string value... 45 Key *8 Set string value... 45 Helptext 清空以前的练习结果,开始记录新的练习结果。 # Row 46 Set string value... 46 Label !ClearSummary Set string value... 46 Text 确认 y/N Set string value... 46 Key y Set string value... 46 Helptext 确定要删除全部发音练习的结果吗?按下“y”键进行确定。 # Row 47 Set string value... 47 Label ListPerf Set string value... 47 Text 发音练习的结果 Set string value... 47 Key &7 Set string value... 47 Helptext 显示全部发音练习的结果。 # Row 48 Set string value... 48 Label SavePerf Set string value... 48 Text 保存 Set string value... 48 Key 9 Set string value... 48 Helptext 将发音练习的结果保存到文件(.tsv格式) # Row 49 Set string value... 49 Label OpenPerf Set string value... 49 Text 打开 Set string value... 49 Key 7 Set string value... 49 Helptext 删除当前结果,从文件夹中读取以前的练习结果。 # Row 50 Set string value... 50 Label !OpenPerf Set string value... 50 Text 打开 Set string value... 50 Key ! Set string value... 50 Helptext 选择以前保存的练习结果文件(.tsv格式的文件) endproc procCreateCredits_DE$ = "Credits_DE" procedure CreateCredits_DE Create Table with column names... Credits_DE 41 ... font size text # Fill table values # Row 1 Set string value... 1 font Helvetica Set string value... 1 size 12 Set string value... 1 text # Row 2 Set string value... 2 font Helvetica Set string value... 2 size 16 Set string value... 2 text SpeakGoodChinese version 2.0 # Row 3 Set string value... 3 font Helvetica Set string value... 3 size 10 Set string value... 3 text %%Dedicated to the memory of Guanqin Chen% # Row 4 Set string value... 4 font Helvetica Set string value... 4 size 12 Set string value... 4 text # Row 5 Set string value... 5 font Helvetica Set string value... 5 size 12 Set string value... 5 text For more information, visit our website: http://www.speakgoodchinese.org # Row 6 Set string value... 6 font Helvetica Set string value... 6 size 12 Set string value... 6 text Based on Praat 'praatVersion$' (http://www.praat.org) # Row 7 Set string value... 7 font Helvetica Set string value... 7 size 12 Set string value... 7 text # Row 8 Set string value... 8 font Helvetica Set string value... 8 size 12 Set string value... 8 text SpeakGoodChinese was supported by grant 6046 from the Digitale Universiteit # Row 9 Set string value... 9 font Helvetica Set string value... 9 size 12 Set string value... 9 text The SpeakGoodChinese Team # Row 10 Set string value... 10 font Helvetica Set string value... 10 size 12 Set string value... 10 text * ##Guanqin Chen# (HRO) - Founder and project manager, Language and Teaching # Row 11 Set string value... 11 font Helvetica Set string value... 11 size 12 Set string value... 11 text * ##Zongyan Chen# (HvA) - Language and Teaching # Row 12 Set string value... 12 font Helvetica Set string value... 12 size 12 Set string value... 12 text * ##Eveline van Hagen# (Fontys) - Language and Teaching # Row 13 Set string value... 13 font Helvetica Set string value... 13 size 12 Set string value... 13 text * ##Stefan de Konink# (UvA) - Lead programmer, User Interface # Row 14 Set string value... 14 font Helvetica Set string value... 14 size 12 Set string value... 14 text * ##Lifeng Liu# (HRO) - Language assistant # Row 15 Set string value... 15 font Helvetica Set string value... 15 size 12 Set string value... 15 text * ##Rob van Son# (UvA) - Coordinator technical work, Speech technology, GUI # Row 16 Set string value... 16 font Helvetica Set string value... 16 size 12 Set string value... 16 text * ##Dennis Vierkant# (UT) - User Interface and Language # Row 17 Set string value... 17 font Helvetica Set string value... 17 size 12 Set string value... 17 text * ##David Weenink# (UvA) - Praat programming, Algorithms # Row 18 Set string value... 18 font Helvetica Set string value... 18 size 12 Set string value... 18 text # Row 19 Set string value... 19 font Helvetica Set string value... 19 size 12 Set string value... 19 text We would like to thank Paul Boersma (UvA) for his extensive help with integrating SGC in Praat, # Row 20 Set string value... 20 font Helvetica Set string value... 20 size 12 Set string value... 20 text and Zhao Ran (赵冉) and Yitna Firdyiwek of the University of Virginia for their help in integrating # Row 21 Set string value... 21 font Helvetica Set string value... 21 size 12 Set string value... 21 text SGC in the classroom and their many suggestions and tests. # Row 22 Set string value... 22 font Helvetica Set string value... 22 size 12 Set string value... 22 text We also want to thank Tristian van Berkom, J.E. Raaijmakers, R. van Rijsselt and S. Verhagen. # Row 23 Set string value... 23 font Helvetica Set string value... 23 size 12 Set string value... 23 text # Row 24 Set string value... 24 font Helvetica Set string value... 24 size 12 Set string value... 24 text Translations: Japanese - Takahiro Higashi (東孝拓); Chinese - Takahiro Higashi (東孝拓) and Wang Huiting(王慧婷) # Row 25 Set string value... 25 font Helvetica Set string value... 25 size 12 Set string value... 25 text # Row 26 Set string value... 26 font Helvetica Set string value... 26 size 12 Set string value... 26 text Copyrights \co 2007-'dateYear$' by Hogeschool Rotterdam, Rob van Son (ACLC/UvA/NKI) - R.J.J.H.vanSon@gmail.com # Row 27 Set string value... 27 font Helvetica Set string value... 27 size 12 Set string value... 27 text # Row 28 Set string value... 28 font Courier Set string value... 28 size 12 Set string value... 28 text This program is free software: you can redistribute it and/or modify # Row 29 Set string value... 29 font Courier Set string value... 29 size 12 Set string value... 29 text it under the terms of the GNU General Public License as published by # Row 30 Set string value... 30 font Courier Set string value... 30 size 12 Set string value... 30 text the Free Software Foundation, either version 2 of the License, or # Row 31 Set string value... 31 font Courier Set string value... 31 size 12 Set string value... 31 text (at your option) any later version. # Row 32 Set string value... 32 font Courier Set string value... 32 size 12 Set string value... 32 text # Row 33 Set string value... 33 font Courier Set string value... 33 size 12 Set string value... 33 text This program is distributed in the hope that it will be useful, # Row 34 Set string value... 34 font Courier Set string value... 34 size 12 Set string value... 34 text but WITHOUT ANY WARRANTY; without even the implied warranty of # Row 35 Set string value... 35 font Courier Set string value... 35 size 12 Set string value... 35 text MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Row 36 Set string value... 36 font Courier Set string value... 36 size 12 Set string value... 36 text GNU General Public License for more details. # Row 37 Set string value... 37 font Courier Set string value... 37 size 12 Set string value... 37 text # Row 38 Set string value... 38 font Courier Set string value... 38 size 12 Set string value... 38 text You should have received a copy of the GNU General Public License # Row 39 Set string value... 39 font Courier Set string value... 39 size 12 Set string value... 39 text along with this program. If not, see . # Row 40 Set string value... 40 font Courier Set string value... 40 size 12 Set string value... 40 text # Row 41 Set string value... 41 font Helvetica Set string value... 41 size 8 Set string value... 41 text %%V: 'build_SHA$'% endproc procCreateCredits_EN$ = "Credits_EN" procedure CreateCredits_EN Create Table with column names... Credits_EN 41 ... font size text # Fill table values # Row 1 Set string value... 1 font Helvetica Set string value... 1 size 12 Set string value... 1 text # Row 2 Set string value... 2 font Helvetica Set string value... 2 size 16 Set string value... 2 text SpeakGoodChinese version 2.0 # Row 3 Set string value... 3 font Helvetica Set string value... 3 size 10 Set string value... 3 text %%Dedicated to the memory of Guanqin Chen% # Row 4 Set string value... 4 font Helvetica Set string value... 4 size 12 Set string value... 4 text # Row 5 Set string value... 5 font Helvetica Set string value... 5 size 12 Set string value... 5 text For more information, visit our website: http://www.speakgoodchinese.org # Row 6 Set string value... 6 font Helvetica Set string value... 6 size 12 Set string value... 6 text Based on Praat 'praatVersion$' (http://www.praat.org) # Row 7 Set string value... 7 font Helvetica Set string value... 7 size 12 Set string value... 7 text # Row 8 Set string value... 8 font Helvetica Set string value... 8 size 12 Set string value... 8 text SpeakGoodChinese was supported by grant 6046 from the Digitale Universiteit # Row 9 Set string value... 9 font Helvetica Set string value... 9 size 12 Set string value... 9 text The SpeakGoodChinese Team # Row 10 Set string value... 10 font Helvetica Set string value... 10 size 12 Set string value... 10 text * ##Guanqin Chen# (HRO) - Founder and project manager, Language and Teaching # Row 11 Set string value... 11 font Helvetica Set string value... 11 size 12 Set string value... 11 text * ##Zongyan Chen# (HvA) - Language and Teaching # Row 12 Set string value... 12 font Helvetica Set string value... 12 size 12 Set string value... 12 text * ##Eveline van Hagen# (Fontys) - Language and Teaching # Row 13 Set string value... 13 font Helvetica Set string value... 13 size 12 Set string value... 13 text * ##Stefan de Konink# (UvA) - Lead programmer, User Interface # Row 14 Set string value... 14 font Helvetica Set string value... 14 size 12 Set string value... 14 text * ##Lifeng Liu# (HRO) - Language assistant # Row 15 Set string value... 15 font Helvetica Set string value... 15 size 12 Set string value... 15 text * ##Rob van Son# (UvA) - Coordinator technical work, Speech technology, GUI # Row 16 Set string value... 16 font Helvetica Set string value... 16 size 12 Set string value... 16 text * ##Dennis Vierkant# (UT) - User Interface and Language # Row 17 Set string value... 17 font Helvetica Set string value... 17 size 12 Set string value... 17 text * ##David Weenink# (UvA) - Praat programming, Algorithms # Row 18 Set string value... 18 font Helvetica Set string value... 18 size 12 Set string value... 18 text # Row 19 Set string value... 19 font Helvetica Set string value... 19 size 12 Set string value... 19 text We would like to thank Paul Boersma (UvA) for his extensive help with integrating SGC in Praat, # Row 20 Set string value... 20 font Helvetica Set string value... 20 size 12 Set string value... 20 text and Zhao Ran (赵冉) and Yitna Firdyiwek of the University of Virginia for their help in integrating # Row 21 Set string value... 21 font Helvetica Set string value... 21 size 12 Set string value... 21 text SGC in the classroom and their many suggestions and tests. # Row 22 Set string value... 22 font Helvetica Set string value... 22 size 12 Set string value... 22 text We also want to thank Tristian van Berkom, J.E. Raaijmakers, R. van Rijsselt and S. Verhagen. # Row 23 Set string value... 23 font Helvetica Set string value... 23 size 12 Set string value... 23 text # Row 24 Set string value... 24 font Helvetica Set string value... 24 size 12 Set string value... 24 text Translations: Japanese - Takahiro Higashi (東孝拓); Chinese - Takahiro Higashi (東孝拓) and Wang Huiting(王慧婷) # Row 25 Set string value... 25 font Helvetica Set string value... 25 size 12 Set string value... 25 text # Row 26 Set string value... 26 font Helvetica Set string value... 26 size 12 Set string value... 26 text Copyrights \co 2007-'dateYear$' by Hogeschool Rotterdam, Rob van Son (ACLC/UvA/NKI) - R.J.J.H.vanSon@gmail.com # Row 27 Set string value... 27 font Helvetica Set string value... 27 size 12 Set string value... 27 text # Row 28 Set string value... 28 font Courier Set string value... 28 size 12 Set string value... 28 text This program is free software: you can redistribute it and/or modify # Row 29 Set string value... 29 font Courier Set string value... 29 size 12 Set string value... 29 text it under the terms of the GNU General Public License as published by # Row 30 Set string value... 30 font Courier Set string value... 30 size 12 Set string value... 30 text the Free Software Foundation, either version 2 of the License, or # Row 31 Set string value... 31 font Courier Set string value... 31 size 12 Set string value... 31 text (at your option) any later version. # Row 32 Set string value... 32 font Courier Set string value... 32 size 12 Set string value... 32 text # Row 33 Set string value... 33 font Courier Set string value... 33 size 12 Set string value... 33 text This program is distributed in the hope that it will be useful, # Row 34 Set string value... 34 font Courier Set string value... 34 size 12 Set string value... 34 text but WITHOUT ANY WARRANTY; without even the implied warranty of # Row 35 Set string value... 35 font Courier Set string value... 35 size 12 Set string value... 35 text MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Row 36 Set string value... 36 font Courier Set string value... 36 size 12 Set string value... 36 text GNU General Public License for more details. # Row 37 Set string value... 37 font Courier Set string value... 37 size 12 Set string value... 37 text # Row 38 Set string value... 38 font Courier Set string value... 38 size 12 Set string value... 38 text You should have received a copy of the GNU General Public License # Row 39 Set string value... 39 font Courier Set string value... 39 size 12 Set string value... 39 text along with this program. If not, see . # Row 40 Set string value... 40 font Courier Set string value... 40 size 12 Set string value... 40 text # Row 41 Set string value... 41 font Helvetica Set string value... 41 size 8 Set string value... 41 text %%V: 'build_SHA$'% endproc procCreateCredits_JA$ = "Credits_JA" procedure CreateCredits_JA Create Table with column names... Credits_JA 41 ... font size text # Fill table values # Row 1 Set string value... 1 font Helvetica Set string value... 1 size 12 Set string value... 1 text # Row 2 Set string value... 2 font Helvetica Set string value... 2 size 16 Set string value... 2 text SpeakGoodChinese version 2.0 # Row 3 Set string value... 3 font Helvetica Set string value... 3 size 10 Set string value... 3 text %%Dedicated to the memory of Guanqin Chen% # Row 4 Set string value... 4 font Helvetica Set string value... 4 size 12 Set string value... 4 text # Row 5 Set string value... 5 font Helvetica Set string value... 5 size 12 Set string value... 5 text For more information, visit our website: http://www.speakgoodchinese.org # Row 6 Set string value... 6 font Helvetica Set string value... 6 size 12 Set string value... 6 text Based on Praat 'praatVersion$' (http://www.praat.org) # Row 7 Set string value... 7 font Helvetica Set string value... 7 size 12 Set string value... 7 text # Row 8 Set string value... 8 font Helvetica Set string value... 8 size 12 Set string value... 8 text SpeakGoodChinese was supported by grant 6046 from the Digitale Universiteit # Row 9 Set string value... 9 font Helvetica Set string value... 9 size 12 Set string value... 9 text The SpeakGoodChinese Team # Row 10 Set string value... 10 font Helvetica Set string value... 10 size 12 Set string value... 10 text * ##Guanqin Chen# (HRO) - Founder and project manager, Language and Teaching # Row 11 Set string value... 11 font Helvetica Set string value... 11 size 12 Set string value... 11 text * ##Zongyan Chen# (HvA) - Language and Teaching # Row 12 Set string value... 12 font Helvetica Set string value... 12 size 12 Set string value... 12 text * ##Eveline van Hagen# (Fontys) - Language and Teaching # Row 13 Set string value... 13 font Helvetica Set string value... 13 size 12 Set string value... 13 text * ##Stefan de Konink# (UvA) - Lead programmer, User Interface # Row 14 Set string value... 14 font Helvetica Set string value... 14 size 12 Set string value... 14 text * ##Lifeng Liu# (HRO) - Language assistant # Row 15 Set string value... 15 font Helvetica Set string value... 15 size 12 Set string value... 15 text * ##Rob van Son# (UvA) - Coordinator technical work, Speech technology, GUI # Row 16 Set string value... 16 font Helvetica Set string value... 16 size 12 Set string value... 16 text * ##Dennis Vierkant# (UT) - User Interface and Language # Row 17 Set string value... 17 font Helvetica Set string value... 17 size 12 Set string value... 17 text * ##David Weenink# (UvA) - Praat programming, Algorithms # Row 18 Set string value... 18 font Helvetica Set string value... 18 size 12 Set string value... 18 text # Row 19 Set string value... 19 font Helvetica Set string value... 19 size 12 Set string value... 19 text We would like to thank Paul Boersma (UvA) for his extensive help with integrating SGC in Praat, # Row 20 Set string value... 20 font Helvetica Set string value... 20 size 12 Set string value... 20 text and Zhao Ran (赵冉) and Yitna Firdyiwek of the University of Virginia for their help in integrating # Row 21 Set string value... 21 font Helvetica Set string value... 21 size 12 Set string value... 21 text SGC in the classroom and their many suggestions and tests. # Row 22 Set string value... 22 font Helvetica Set string value... 22 size 12 Set string value... 22 text We also want to thank Tristian van Berkom, J.E. Raaijmakers, R. van Rijsselt and S. Verhagen. # Row 23 Set string value... 23 font Helvetica Set string value... 23 size 12 Set string value... 23 text # Row 24 Set string value... 24 font Helvetica Set string value... 24 size 12 Set string value... 24 text Translations: Japanese - Takahiro Higashi (東孝拓); Chinese - Takahiro Higashi (東孝拓) and Wang Huiting(王慧婷) # Row 25 Set string value... 25 font Helvetica Set string value... 25 size 12 Set string value... 25 text # Row 26 Set string value... 26 font Helvetica Set string value... 26 size 12 Set string value... 26 text Copyrights \co 2007-'dateYear$' by Hogeschool Rotterdam, Rob van Son (ACLC/UvA/NKI) - R.J.J.H.vanSon@gmail.com # Row 27 Set string value... 27 font Helvetica Set string value... 27 size 12 Set string value... 27 text # Row 28 Set string value... 28 font Courier Set string value... 28 size 12 Set string value... 28 text This program is free software: you can redistribute it and/or modify # Row 29 Set string value... 29 font Courier Set string value... 29 size 12 Set string value... 29 text it under the terms of the GNU General Public License as published by # Row 30 Set string value... 30 font Courier Set string value... 30 size 12 Set string value... 30 text the Free Software Foundation, either version 2 of the License, or # Row 31 Set string value... 31 font Courier Set string value... 31 size 12 Set string value... 31 text (at your option) any later version. # Row 32 Set string value... 32 font Courier Set string value... 32 size 12 Set string value... 32 text # Row 33 Set string value... 33 font Courier Set string value... 33 size 12 Set string value... 33 text This program is distributed in the hope that it will be useful, # Row 34 Set string value... 34 font Courier Set string value... 34 size 12 Set string value... 34 text but WITHOUT ANY WARRANTY; without even the implied warranty of # Row 35 Set string value... 35 font Courier Set string value... 35 size 12 Set string value... 35 text MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Row 36 Set string value... 36 font Courier Set string value... 36 size 12 Set string value... 36 text GNU General Public License for more details. # Row 37 Set string value... 37 font Courier Set string value... 37 size 12 Set string value... 37 text # Row 38 Set string value... 38 font Courier Set string value... 38 size 12 Set string value... 38 text You should have received a copy of the GNU General Public License # Row 39 Set string value... 39 font Courier Set string value... 39 size 12 Set string value... 39 text along with this program. If not, see . # Row 40 Set string value... 40 font Courier Set string value... 40 size 12 Set string value... 40 text # Row 41 Set string value... 41 font Helvetica Set string value... 41 size 8 Set string value... 41 text %%V: 'build_SHA$'% endproc procCreateCredits_NL$ = "Credits_NL" procedure CreateCredits_NL Create Table with column names... Credits_NL 41 ... font size text # Fill table values # Row 1 Set string value... 1 font Helvetica Set string value... 1 size 12 Set string value... 1 text # Row 2 Set string value... 2 font Helvetica Set string value... 2 size 16 Set string value... 2 text SpeakGoodChinese version 2.0 # Row 3 Set string value... 3 font Helvetica Set string value... 3 size 10 Set string value... 3 text %%Dedicated to the memory of Guanqin Chen% # Row 4 Set string value... 4 font Helvetica Set string value... 4 size 12 Set string value... 4 text # Row 5 Set string value... 5 font Helvetica Set string value... 5 size 12 Set string value... 5 text For more information, visit our website: http://www.speakgoodchinese.org # Row 6 Set string value... 6 font Helvetica Set string value... 6 size 12 Set string value... 6 text Based on Praat 'praatVersion$' (http://www.praat.org) # Row 7 Set string value... 7 font Helvetica Set string value... 7 size 12 Set string value... 7 text # Row 8 Set string value... 8 font Helvetica Set string value... 8 size 12 Set string value... 8 text SpeakGoodChinese was supported by grant 6046 from the Digitale Universiteit # Row 9 Set string value... 9 font Helvetica Set string value... 9 size 12 Set string value... 9 text The SpeakGoodChinese Team # Row 10 Set string value... 10 font Helvetica Set string value... 10 size 12 Set string value... 10 text * ##Guanqin Chen# (HRO) - Founder and project manager, Language and Teaching # Row 11 Set string value... 11 font Helvetica Set string value... 11 size 12 Set string value... 11 text * ##Zongyan Chen# (HvA) - Language and Teaching # Row 12 Set string value... 12 font Helvetica Set string value... 12 size 12 Set string value... 12 text * ##Eveline van Hagen# (Fontys) - Language and Teaching # Row 13 Set string value... 13 font Helvetica Set string value... 13 size 12 Set string value... 13 text * ##Stefan de Konink# (UvA) - Lead programmer, User Interface # Row 14 Set string value... 14 font Helvetica Set string value... 14 size 12 Set string value... 14 text * ##Lifeng Liu# (HRO) - Language assistant # Row 15 Set string value... 15 font Helvetica Set string value... 15 size 12 Set string value... 15 text * ##Rob van Son# (UvA) - Coordinator technical work, Speech technology, GUI # Row 16 Set string value... 16 font Helvetica Set string value... 16 size 12 Set string value... 16 text * ##Dennis Vierkant# (UT) - User Interface and Language # Row 17 Set string value... 17 font Helvetica Set string value... 17 size 12 Set string value... 17 text * ##David Weenink# (UvA) - Praat programming, Algorithms # Row 18 Set string value... 18 font Helvetica Set string value... 18 size 12 Set string value... 18 text # Row 19 Set string value... 19 font Helvetica Set string value... 19 size 12 Set string value... 19 text We would like to thank Paul Boersma (UvA) for his extensive help with integrating SGC in Praat, # Row 20 Set string value... 20 font Helvetica Set string value... 20 size 12 Set string value... 20 text and Zhao Ran (赵冉) and Yitna Firdyiwek of the University of Virginia for their help in integrating # Row 21 Set string value... 21 font Helvetica Set string value... 21 size 12 Set string value... 21 text SGC in the classroom and their many suggestions and tests. # Row 22 Set string value... 22 font Helvetica Set string value... 22 size 12 Set string value... 22 text We also want to thank Tristian van Berkom, J.E. Raaijmakers, R. van Rijsselt and S. Verhagen. # Row 23 Set string value... 23 font Helvetica Set string value... 23 size 12 Set string value... 23 text # Row 24 Set string value... 24 font Helvetica Set string value... 24 size 12 Set string value... 24 text Translations: Japanese - Takahiro Higashi (東孝拓); Chinese - Takahiro Higashi (東孝拓) and Wang Huiting(王慧婷) # Row 25 Set string value... 25 font Helvetica Set string value... 25 size 12 Set string value... 25 text # Row 26 Set string value... 26 font Helvetica Set string value... 26 size 12 Set string value... 26 text Copyrights \co 2007-'dateYear$' by Hogeschool Rotterdam, Rob van Son (ACLC/UvA/NKI) - R.J.J.H.vanSon@gmail.com # Row 27 Set string value... 27 font Helvetica Set string value... 27 size 12 Set string value... 27 text # Row 28 Set string value... 28 font Courier Set string value... 28 size 12 Set string value... 28 text This program is free software: you can redistribute it and/or modify # Row 29 Set string value... 29 font Courier Set string value... 29 size 12 Set string value... 29 text it under the terms of the GNU General Public License as published by # Row 30 Set string value... 30 font Courier Set string value... 30 size 12 Set string value... 30 text the Free Software Foundation, either version 2 of the License, or # Row 31 Set string value... 31 font Courier Set string value... 31 size 12 Set string value... 31 text (at your option) any later version. # Row 32 Set string value... 32 font Courier Set string value... 32 size 12 Set string value... 32 text # Row 33 Set string value... 33 font Courier Set string value... 33 size 12 Set string value... 33 text This program is distributed in the hope that it will be useful, # Row 34 Set string value... 34 font Courier Set string value... 34 size 12 Set string value... 34 text but WITHOUT ANY WARRANTY; without even the implied warranty of # Row 35 Set string value... 35 font Courier Set string value... 35 size 12 Set string value... 35 text MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Row 36 Set string value... 36 font Courier Set string value... 36 size 12 Set string value... 36 text GNU General Public License for more details. # Row 37 Set string value... 37 font Courier Set string value... 37 size 12 Set string value... 37 text # Row 38 Set string value... 38 font Courier Set string value... 38 size 12 Set string value... 38 text You should have received a copy of the GNU General Public License # Row 39 Set string value... 39 font Courier Set string value... 39 size 12 Set string value... 39 text along with this program. If not, see . # Row 40 Set string value... 40 font Courier Set string value... 40 size 12 Set string value... 40 text # Row 41 Set string value... 41 font Helvetica Set string value... 41 size 8 Set string value... 41 text %%V: 'build_SHA$'% endproc procCreateCredits_ZH$ = "Credits_ZH" procedure CreateCredits_ZH Create Table with column names... Credits_ZH 41 ... font size text # Fill table values # Row 1 Set string value... 1 font Helvetica Set string value... 1 size 12 Set string value... 1 text # Row 2 Set string value... 2 font Helvetica Set string value... 2 size 16 Set string value... 2 text SpeakGoodChinese version 2.0 # Row 3 Set string value... 3 font Helvetica Set string value... 3 size 10 Set string value... 3 text %%Dedicated to the memory of Guanqin Chen% # Row 4 Set string value... 4 font Helvetica Set string value... 4 size 12 Set string value... 4 text # Row 5 Set string value... 5 font Helvetica Set string value... 5 size 12 Set string value... 5 text For more information, visit our website: http://www.speakgoodchinese.org # Row 6 Set string value... 6 font Helvetica Set string value... 6 size 12 Set string value... 6 text Based on Praat 'praatVersion$' (http://www.praat.org) # Row 7 Set string value... 7 font Helvetica Set string value... 7 size 12 Set string value... 7 text # Row 8 Set string value... 8 font Helvetica Set string value... 8 size 12 Set string value... 8 text SpeakGoodChinese was supported by grant 6046 from the Digitale Universiteit # Row 9 Set string value... 9 font Helvetica Set string value... 9 size 12 Set string value... 9 text The SpeakGoodChinese Team # Row 10 Set string value... 10 font Helvetica Set string value... 10 size 12 Set string value... 10 text * ##Guanqin Chen# (HRO) - Founder and project manager, Language and Teaching # Row 11 Set string value... 11 font Helvetica Set string value... 11 size 12 Set string value... 11 text * ##Zongyan Chen# (HvA) - Language and Teaching # Row 12 Set string value... 12 font Helvetica Set string value... 12 size 12 Set string value... 12 text * ##Eveline van Hagen# (Fontys) - Language and Teaching # Row 13 Set string value... 13 font Helvetica Set string value... 13 size 12 Set string value... 13 text * ##Stefan de Konink# (UvA) - Lead programmer, User Interface # Row 14 Set string value... 14 font Helvetica Set string value... 14 size 12 Set string value... 14 text * ##Lifeng Liu# (HRO) - Language assistant # Row 15 Set string value... 15 font Helvetica Set string value... 15 size 12 Set string value... 15 text * ##Rob van Son# (UvA) - Coordinator technical work, Speech technology, GUI # Row 16 Set string value... 16 font Helvetica Set string value... 16 size 12 Set string value... 16 text * ##Dennis Vierkant# (UT) - User Interface and Language # Row 17 Set string value... 17 font Helvetica Set string value... 17 size 12 Set string value... 17 text * ##David Weenink# (UvA) - Praat programming, Algorithms # Row 18 Set string value... 18 font Helvetica Set string value... 18 size 12 Set string value... 18 text # Row 19 Set string value... 19 font Helvetica Set string value... 19 size 12 Set string value... 19 text SpeakGoodChinese 2 would not have been possible without the extensive help of Paul Boersma. # Row 20 Set string value... 20 font Helvetica Set string value... 20 size 12 Set string value... 20 text and Zhao Ran (赵冉) and Yitna Firdyiwek of the University of Virginia for their help in integrating # Row 21 Set string value... 21 font Helvetica Set string value... 21 size 12 Set string value... 21 text SGC in the classroom and their many suggestions and tests. # Row 22 Set string value... 22 font Helvetica Set string value... 22 size 12 Set string value... 22 text We also want to thank Tristian van Berkom, J.E. Raaijmakers, R. van Rijsselt and S. Verhagen. # Row 23 Set string value... 23 font Helvetica Set string value... 23 size 12 Set string value... 23 text # Row 24 Set string value... 24 font Helvetica Set string value... 24 size 12 Set string value... 24 text Translations: Japanese - Takahiro Higashi (東孝拓); Chinese - Takahiro Higashi (東孝拓) and Wang Huiting(王慧婷) # Row 25 Set string value... 25 font Helvetica Set string value... 25 size 12 Set string value... 25 text # Row 26 Set string value... 26 font Helvetica Set string value... 26 size 12 Set string value... 26 text Copyrights \co 2007-'dateYear$' by Hogeschool Rotterdam, Rob van Son (ACLC/UvA/NKI) - R.J.J.H.vanSon@gmail.com # Row 27 Set string value... 27 font Helvetica Set string value... 27 size 12 Set string value... 27 text # Row 28 Set string value... 28 font Courier Set string value... 28 size 12 Set string value... 28 text This program is free software: you can redistribute it and/or modify # Row 29 Set string value... 29 font Courier Set string value... 29 size 12 Set string value... 29 text it under the terms of the GNU General Public License as published by # Row 30 Set string value... 30 font Courier Set string value... 30 size 12 Set string value... 30 text the Free Software Foundation, either version 2 of the License, or # Row 31 Set string value... 31 font Courier Set string value... 31 size 12 Set string value... 31 text (at your option) any later version. # Row 32 Set string value... 32 font Courier Set string value... 32 size 12 Set string value... 32 text # Row 33 Set string value... 33 font Courier Set string value... 33 size 12 Set string value... 33 text This program is distributed in the hope that it will be useful, # Row 34 Set string value... 34 font Courier Set string value... 34 size 12 Set string value... 34 text but WITHOUT ANY WARRANTY; without even the implied warranty of # Row 35 Set string value... 35 font Courier Set string value... 35 size 12 Set string value... 35 text MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Row 36 Set string value... 36 font Courier Set string value... 36 size 12 Set string value... 36 text GNU General Public License for more details. # Row 37 Set string value... 37 font Courier Set string value... 37 size 12 Set string value... 37 text # Row 38 Set string value... 38 font Courier Set string value... 38 size 12 Set string value... 38 text You should have received a copy of the GNU General Public License # Row 39 Set string value... 39 font Courier Set string value... 39 size 12 Set string value... 39 text along with this program. If not, see . # Row 40 Set string value... 40 font Courier Set string value... 40 size 12 Set string value... 40 text # Row 41 Set string value... 41 font Helvetica Set string value... 41 size 8 Set string value... 41 text %%V: 'build_SHA$'% endproc procCreateEvaluation_DE$ = "Evaluation_DE" procedure CreateEvaluation_DE Create Table with column names... Evaluation_DE 20 ... Label Text # Fill table values # Row 1 Set string value... 1 Label Pinyin Set string value... 1 Text Pinyin # Row 2 Set string value... 2 Label Level Set string value... 2 Text Stufe # Row 3 Set string value... 3 Label Total Set string value... 3 Text Total # Row 4 Set string value... 4 Label Correct Set string value... 4 Text Richtig # Row 5 Set string value... 5 Label Problematic Set string value... 5 Text Anmerkungen # Row 6 Set string value... 6 Label Tones Set string value... 6 Text T\o"ne # Row 7 Set string value... 7 Label Wrong Set string value... 7 Text Falsch # Row 8 Set string value... 8 Label High Set string value... 8 Text Hoch # Row 9 Set string value... 9 Label Low Set string value... 9 Text Niedrich # Row 10 Set string value... 10 Label Wide Set string value... 10 Text Weidl\a"ufig # Row 11 Set string value... 11 Label Narrow Set string value... 11 Text Flach # Row 12 Set string value... 12 Label Unknown Set string value... 12 Text Unbekannt # Row 13 Set string value... 13 Label Commented Set string value... 13 Text Comm. # Row 14 Set string value... 14 Label Time Set string value... 14 Text Zeit # Row 15 Set string value... 15 Label Wordlist Set string value... 15 Text Wordliste # Row 16 Set string value... 16 Label Performance Set string value... 16 Text \U"bungsergebnisse # Row 17 Set string value... 17 Label Character Set string value... 17 Text Schriftzeichen # Row 18 Set string value... 18 Label ManualEntry Set string value... 18 Text Manuelle Eingabe # Row 19 Set string value... 19 Label Example Set string value... 19 Text Vorbild # Row 20 Set string value... 20 Label Translation Set string value... 20 Text \U"bersetzung endproc procCreateEvaluation_EN$ = "Evaluation_EN" procedure CreateEvaluation_EN Create Table with column names... Evaluation_EN 20 ... Label Text # Fill table values # Row 1 Set string value... 1 Label Pinyin Set string value... 1 Text Pinyin # Row 2 Set string value... 2 Label Level Set string value... 2 Text Level # Row 3 Set string value... 3 Label Total Set string value... 3 Text Total # Row 4 Set string value... 4 Label Correct Set string value... 4 Text Correct # Row 5 Set string value... 5 Label Problematic Set string value... 5 Text Problematic # Row 6 Set string value... 6 Label Tones Set string value... 6 Text Tones # Row 7 Set string value... 7 Label Wrong Set string value... 7 Text Wrong # Row 8 Set string value... 8 Label High Set string value... 8 Text High # Row 9 Set string value... 9 Label Low Set string value... 9 Text Low # Row 10 Set string value... 10 Label Wide Set string value... 10 Text Wide # Row 11 Set string value... 11 Label Narrow Set string value... 11 Text Narrow # Row 12 Set string value... 12 Label Unknown Set string value... 12 Text Unknown # Row 13 Set string value... 13 Label Commented Set string value... 13 Text Comm. # Row 14 Set string value... 14 Label Time Set string value... 14 Text Time # Row 15 Set string value... 15 Label Wordlist Set string value... 15 Text Wordlist # Row 16 Set string value... 16 Label Performance Set string value... 16 Text Pronunciation practice results # Row 17 Set string value... 17 Label Character Set string value... 17 Text Character # Row 18 Set string value... 18 Label ManualEntry Set string value... 18 Text Manual entry # Row 19 Set string value... 19 Label Example Set string value... 19 Text Example # Row 20 Set string value... 20 Label Translation Set string value... 20 Text Translation endproc procCreateEvaluation_JA$ = "Evaluation_JA" procedure CreateEvaluation_JA Create Table with column names... Evaluation_JA 20 ... Label Text # Fill table values # Row 1 Set string value... 1 Label Pinyin Set string value... 1 Text ピンイン # Row 2 Set string value... 2 Label Level Set string value... 2 Text レベル # Row 3 Set string value... 3 Label Total Set string value... 3 Text 合計 # Row 4 Set string value... 4 Label Correct Set string value... 4 Text 正解 # Row 5 Set string value... 5 Label Problematic Set string value... 5 Text 問題あり # Row 6 Set string value... 6 Label Tones Set string value... 6 Text 声調 # Row 7 Set string value... 7 Label Wrong Set string value... 7 Text 間違い # Row 8 Set string value... 8 Label High Set string value... 8 Text 高い # Row 9 Set string value... 9 Label Low Set string value... 9 Text 低い # Row 10 Set string value... 10 Label Wide Set string value... 10 Text 広い # Row 11 Set string value... 11 Label Narrow Set string value... 11 Text 狭い # Row 12 Set string value... 12 Label Unknown Set string value... 12 Text 未知 # Row 13 Set string value... 13 Label Commented Set string value... 13 Text コメント # Row 14 Set string value... 14 Label Time Set string value... 14 Text 日時 # Row 15 Set string value... 15 Label Wordlist Set string value... 15 Text 単語表 # Row 16 Set string value... 16 Label Performance Set string value... 16 Text 発音練習結果 # Row 17 Set string value... 17 Label Character Set string value... 17 Text 漢字 # Row 18 Set string value... 18 Label ManualEntry Set string value... 18 Text 単語の手動入力 # Row 19 Set string value... 19 Label Example Set string value... 19 Text 発音例 # Row 20 Set string value... 20 Label Translation Set string value... 20 Text 翻訳 endproc procCreateEvaluation_NL$ = "Evaluation_NL" procedure CreateEvaluation_NL Create Table with column names... Evaluation_NL 20 ... Label Text # Fill table values # Row 1 Set string value... 1 Label Pinyin Set string value... 1 Text Pinyin # Row 2 Set string value... 2 Label Level Set string value... 2 Text Niveau # Row 3 Set string value... 3 Label Total Set string value... 3 Text Totaal # Row 4 Set string value... 4 Label Correct Set string value... 4 Text Goed # Row 5 Set string value... 5 Label Problematic Set string value... 5 Text Aanmerkingen # Row 6 Set string value... 6 Label Tones Set string value... 6 Text Tonen # Row 7 Set string value... 7 Label Wrong Set string value... 7 Text Fout # Row 8 Set string value... 8 Label High Set string value... 8 Text Hoog # Row 9 Set string value... 9 Label Low Set string value... 9 Text Laag # Row 10 Set string value... 10 Label Wide Set string value... 10 Text Overdreven # Row 11 Set string value... 11 Label Narrow Set string value... 11 Text Vlak # Row 12 Set string value... 12 Label Unknown Set string value... 12 Text Onbekend # Row 13 Set string value... 13 Label Commented Set string value... 13 Text Opmerk. # Row 14 Set string value... 14 Label Time Set string value... 14 Text Tijd # Row 15 Set string value... 15 Label Wordlist Set string value... 15 Text Woordenlijst # Row 16 Set string value... 16 Label Performance Set string value... 16 Text Oefenresultaten # Row 17 Set string value... 17 Label Character Set string value... 17 Text Karakter # Row 18 Set string value... 18 Label ManualEntry Set string value... 18 Text Handmatige invoer # Row 19 Set string value... 19 Label Example Set string value... 19 Text Voorbeeld # Row 20 Set string value... 20 Label Translation Set string value... 20 Text Vertaling endproc procCreateEvaluation_ZH$ = "Evaluation_ZH" procedure CreateEvaluation_ZH Create Table with column names... Evaluation_ZH 20 ... Label Text # Fill table values # Row 1 Set string value... 1 Label Pinyin Set string value... 1 Text 拼音 # Row 2 Set string value... 2 Label Level Set string value... 2 Text 水平 # Row 3 Set string value... 3 Label Total Set string value... 3 Text 总计 # Row 4 Set string value... 4 Label Correct Set string value... 4 Text 正确 # Row 5 Set string value... 5 Label Problematic Set string value... 5 Text 存在问题 # Row 6 Set string value... 6 Label Tones Set string value... 6 Text 声调 # Row 7 Set string value... 7 Label Wrong Set string value... 7 Text 错误 # Row 8 Set string value... 8 Label High Set string value... 8 Text 高 # Row 9 Set string value... 9 Label Low Set string value... 9 Text 低 # Row 10 Set string value... 10 Label Wide Set string value... 10 Text 宽 # Row 11 Set string value... 11 Label Narrow Set string value... 11 Text 窄 # Row 12 Set string value... 12 Label Unknown Set string value... 12 Text 未知 # Row 13 Set string value... 13 Label Commented Set string value... 13 Text 评语 # Row 14 Set string value... 14 Label Time Set string value... 14 Text 时间 # Row 15 Set string value... 15 Label Wordlist Set string value... 15 Text 单词表 # Row 16 Set string value... 16 Label Performance Set string value... 16 Text 发音练习的结果 # Row 17 Set string value... 17 Label Character Set string value... 17 Text 汉字 # Row 18 Set string value... 18 Label ManualEntry Set string value... 18 Text 手工输入要添加的单词 # Row 19 Set string value... 19 Label Example Set string value... 19 Text 参考发音 # Row 20 Set string value... 20 Label Translation Set string value... 20 Text 翻译 endproc procCreateFeedback_DE$ = "Feedback_DE" procedure CreateFeedback_DE Create Table with column names... Feedback_DE 14 ... Key Text # Fill table values # Row 1 Set string value... 1 Key !Author Set string value... 1 Text Autor R.J.J.H. van Son # Row 2 Set string value... 2 Key !Copyright Set string value... 2 Text Copyright \co 2010-2012 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Key !License Set string value... 3 Text Lizens GNU GPL version 2 or later # Row 4 Set string value... 4 Key Cancel Set string value... 4 Text Zurück # Row 5 Set string value... 5 Key Continue Set string value... 5 Text Weiter # Row 6 Set string value... 6 Key Next Set string value... 6 Text > # Row 7 Set string value... 7 Key Previous Set string value... 7 Text < # Row 8 Set string value... 8 Key Clear Set string value... 8 Text L\o"schen # Row 9 Set string value... 9 Key All Set string value... 9 Text Alles # Row 10 Set string value... 10 Key Show Set string value... 10 Text Zeige Wort # Row 11 Set string value... 11 Key Part Set string value... 11 Text Teil # Row 12 Set string value... 12 Key Tones Set string value... 12 Text T\o"ne # Row 13 Set string value... 13 Key InstallUnzip Set string value... 13 Text Dateien mit der .sgc und .zip Erweiterung k\o"nnen nur gebraucht werden wenn sie das 7-Zip Programm installiert haben (7-zip.org) # Row 14 Set string value... 14 Key AddWordlist Set string value... 14 Text W\o"rter aus Wordliste hinzuf\u"gen endproc procCreateFeedback_EN$ = "Feedback_EN" procedure CreateFeedback_EN Create Table with column names... Feedback_EN 14 ... Key Text # Fill table values # Row 1 Set string value... 1 Key !Author Set string value... 1 Text Author R.J.J.H. van Son # Row 2 Set string value... 2 Key !Copyright Set string value... 2 Text Copyright \co 2010-2012 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Key !License Set string value... 3 Text License GNU GPL version 2 or later # Row 4 Set string value... 4 Key Cancel Set string value... 4 Text Cancel # Row 5 Set string value... 5 Key Continue Set string value... 5 Text Continue # Row 6 Set string value... 6 Key Next Set string value... 6 Text > # Row 7 Set string value... 7 Key Previous Set string value... 7 Text < # Row 8 Set string value... 8 Key Clear Set string value... 8 Text Clear # Row 9 Set string value... 9 Key All Set string value... 9 Text All # Row 10 Set string value... 10 Key Show Set string value... 10 Text Show word # Row 11 Set string value... 11 Key Part Set string value... 11 Text Part # Row 12 Set string value... 12 Key Tones Set string value... 12 Text Tones # Row 13 Set string value... 13 Key InstallUnzip Set string value... 13 Text Files with .sgc en .zip extensions can only be read when you have installed the 7-Zip application (7-zip.org) # Row 14 Set string value... 14 Key AddWordlist Set string value... 14 Text Add words from wordlist endproc procCreateFeedback_JA$ = "Feedback_JA" procedure CreateFeedback_JA Create Table with column names... Feedback_JA 14 ... Key Text # Fill table values # Row 1 Set string value... 1 Key !Author Set string value... 1 Text Author R.J.J.H. van Son # Row 2 Set string value... 2 Key !Copyright Set string value... 2 Text Copyright \co 2010-2012 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Key !License Set string value... 3 Text License GNU GPL version 2 or later # Row 4 Set string value... 4 Key Cancel Set string value... 4 Text 取り消し # Row 5 Set string value... 5 Key Continue Set string value... 5 Text 継続 # Row 6 Set string value... 6 Key Next Set string value... 6 Text > # Row 7 Set string value... 7 Key Previous Set string value... 7 Text < # Row 8 Set string value... 8 Key Clear Set string value... 8 Text クリア # Row 9 Set string value... 9 Key All Set string value... 9 Text 全部 # Row 10 Set string value... 10 Key Show Set string value... 10 Text 単語を表示 # Row 11 Set string value... 11 Key Part Set string value... 11 Text 部分 # Row 12 Set string value... 12 Key Tones Set string value... 12 Text 声調 # Row 13 Set string value... 13 Key InstallUnzip Set string value... 13 Text zipで圧縮されている.sgc形式のファイルは7-zip(7-zip.org)がインストールされているときにだけ読み込みことができます。 # Row 14 Set string value... 14 Key AddWordlist Set string value... 14 Text 単語表から単語を追加します endproc procCreateFeedback_NL$ = "Feedback_NL" procedure CreateFeedback_NL Create Table with column names... Feedback_NL 14 ... Key Text # Fill table values # Row 1 Set string value... 1 Key !Author Set string value... 1 Text Auteur R.J.J.H. van Son # Row 2 Set string value... 2 Key !Copyright Set string value... 2 Text Copyright \co 2010-2012 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Key !License Set string value... 3 Text License GNU GPL version 2 or later # Row 4 Set string value... 4 Key Cancel Set string value... 4 Text Terug # Row 5 Set string value... 5 Key Continue Set string value... 5 Text Verder # Row 6 Set string value... 6 Key Next Set string value... 6 Text > # Row 7 Set string value... 7 Key Previous Set string value... 7 Text < # Row 8 Set string value... 8 Key Clear Set string value... 8 Text Wissen # Row 9 Set string value... 9 Key All Set string value... 9 Text Alles # Row 10 Set string value... 10 Key Show Set string value... 10 Text Woord laten zien # Row 11 Set string value... 11 Key Part Set string value... 11 Text Onderdeel # Row 12 Set string value... 12 Key Tones Set string value... 12 Text Tonen # Row 13 Set string value... 13 Key InstallUnzip Set string value... 13 Text Files met .sgc en .zip kunt u alleen lezen als u de 7-Zip applicatie geinstalleerd hebt (7-zip.org) # Row 14 Set string value... 14 Key AddWordlist Set string value... 14 Text Woorden uit woordenlijst toevoegen endproc procCreateFeedback_ZH$ = "Feedback_ZH" procedure CreateFeedback_ZH Create Table with column names... Feedback_ZH 14 ... Key Text # Fill table values # Row 1 Set string value... 1 Key !Author Set string value... 1 Text Author R.J.J.H. van Son, Translation: Takahiro Higashi (東孝拓) and Wang Huiting(王慧婷) # Row 2 Set string value... 2 Key !Copyright Set string value... 2 Text Copyright \co 2010-2012 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Key !License Set string value... 3 Text License GNU GPL version 2 or later # Row 4 Set string value... 4 Key Cancel Set string value... 4 Text 取消 # Row 5 Set string value... 5 Key Continue Set string value... 5 Text 继续 # Row 6 Set string value... 6 Key Next Set string value... 6 Text > # Row 7 Set string value... 7 Key Previous Set string value... 7 Text < # Row 8 Set string value... 8 Key Clear Set string value... 8 Text 清空 # Row 9 Set string value... 9 Key All Set string value... 9 Text 全部 # Row 10 Set string value... 10 Key Show Set string value... 10 Text 显示单词 # Row 11 Set string value... 11 Key Part Set string value... 11 Text 部分 # Row 12 Set string value... 12 Key Tones Set string value... 12 Text 声调 # Row 13 Set string value... 13 Key InstallUnzip Set string value... 13 Text 只有安装了7-zip(7-zip.org)软件后,才可以读出zip压缩形式的.sgc文件。 # Row 14 Set string value... 14 Key AddWordlist Set string value... 14 Text 导入单词表 endproc procCreateMainPage$ = "MainPage" procedure CreateMainPage Create Table with column names... MainPage 21 ... Label LeftX RightX LowY HighY Color Draw # Fill table values # Row 1 Set string value... 1 Label !Author Set string value... 1 LeftX 0 Set string value... 1 RightX 0 Set string value... 1 LowY 0 Set string value... 1 HighY 0 Set string value... 1 Color Black Set string value... 1 Draw DrawNull # Row 2 Set string value... 2 Label !Copyright Set string value... 2 LeftX 0 Set string value... 2 RightX 0 Set string value... 2 LowY 0 Set string value... 2 HighY 0 Set string value... 2 Color Black Set string value... 2 Draw DrawNull # Row 3 Set string value... 3 Label !License Set string value... 3 LeftX 0 Set string value... 3 RightX 0 Set string value... 3 LowY 0 Set string value... 3 HighY 0 Set string value... 3 Color Black Set string value... 3 Draw DrawNull # Row 4 Set string value... 4 Label !WindowTitle Set string value... 4 LeftX 0 Set string value... 4 RightX 0 Set string value... 4 LowY 0 Set string value... 4 HighY 0 Set string value... 4 Color Black Set string value... 4 Draw DrawNull # Row 5 Set string value... 5 Label !Man Set string value... 5 LeftX 0 Set string value... 5 RightX 0 Set string value... 5 LowY 0 Set string value... 5 HighY 0 Set string value... 5 Color Black Set string value... 5 Draw DrawNull # Row 6 Set string value... 6 Label Record Set string value... 6 LeftX 15 Set string value... 6 RightX 25 Set string value... 6 LowY 0 Set string value... 6 HighY 10 Set string value... 6 Color Red Set string value... 6 Draw DrawRecord # Row 7 Set string value... 7 Label Play Set string value... 7 LeftX 30 Set string value... 7 RightX 40 Set string value... 7 LowY 0 Set string value... 7 HighY 10 Set string value... 7 Color Red Set string value... 7 Draw DrawPlay # Row 8 Set string value... 8 Label Example Set string value... 8 LeftX 45 Set string value... 8 RightX 55 Set string value... 8 LowY 0 Set string value... 8 HighY 10 Set string value... 8 Color Black Set string value... 8 Draw DrawPlay # Row 9 Set string value... 9 Label Previous Set string value... 9 LeftX 60 Set string value... 9 RightX 70 Set string value... 9 LowY 0 Set string value... 9 HighY 10 Set string value... 9 Color Black Set string value... 9 Draw DrawPrevious # Row 10 Set string value... 10 Label Next Set string value... 10 LeftX 75 Set string value... 10 RightX 85 Set string value... 10 LowY 0 Set string value... 10 HighY 10 Set string value... 10 Color Black Set string value... 10 Draw DrawNext # Row 11 Set string value... 11 Label Quit Set string value... 11 LeftX 90 Set string value... 11 RightX 100 Set string value... 11 LowY 90 Set string value... 11 HighY 100 Set string value... 11 Color Red Set string value... 11 Draw DrawQuit # Row 12 Set string value... 12 Label Config Set string value... 12 LeftX 90 Set string value... 12 RightX 100 Set string value... 12 LowY 77.5 Set string value... 12 HighY 87.5 Set string value... 12 Color Black Set string value... 12 Draw DrawConfig # Row 13 Set string value... 13 Label $WordlistCaption Set string value... 13 LeftX 88 Set string value... 13 RightX 102 Set string value... 13 LowY 70 Set string value... 13 HighY 75 Set string value... 13 Color Black Set string value... 13 Draw DrawNull # Row 14 Set string value... 14 Label WordlistUp Set string value... 14 LeftX 90 Set string value... 14 RightX 100 Set string value... 14 LowY 65 Set string value... 14 HighY 70 Set string value... 14 Color Black Set string value... 14 Draw DrawWordListUp # Row 15 Set string value... 15 Label SelectWords Set string value... 15 LeftX 90 Set string value... 15 RightX 100 Set string value... 15 LowY 58 Set string value... 15 HighY 63 Set string value... 15 Color Black Set string value... 15 Draw DrawSelectWords # Row 16 Set string value... 16 Label WordlistDown Set string value... 16 LeftX 90 Set string value... 16 RightX 100 Set string value... 16 LowY 51 Set string value... 16 HighY 56 Set string value... 16 Color Black Set string value... 16 Draw DrawWordListDown # Row 17 Set string value... 17 Label Refresh Set string value... 17 LeftX 0 Set string value... 17 RightX 10 Set string value... 17 LowY 80 Set string value... 17 HighY 90 Set string value... 17 Color Black Set string value... 17 Draw DrawRefresh # Row 18 Set string value... 18 Label Help Set string value... 18 LeftX 0 Set string value... 18 RightX 10 Set string value... 18 LowY 67.5 Set string value... 18 HighY 77.5 Set string value... 18 Color Black Set string value... 18 Draw DrawHelp # Row 19 Set string value... 19 Label $SaveAudio Set string value... 19 LeftX 90 Set string value... 19 RightX 100 Set string value... 19 LowY 0 Set string value... 19 HighY 7.5 Set string value... 19 Color Blue Set string value... 19 Draw DrawNull # Row 20 Set string value... 20 Label GRADE Set string value... 20 LeftX -1 Set string value... 20 RightX -1 Set string value... 20 LowY -1 Set string value... 20 HighY -1 Set string value... 20 Color Black Set string value... 20 Draw DrawNull # Row 21 Set string value... 21 Label #PinYinArea Set string value... 21 LeftX 20 Set string value... 21 RightX 80 Set string value... 21 LowY 25 Set string value... 21 HighY 35 Set string value... 21 Color Black Set string value... 21 Draw DrawNull endproc procCreateMainPage_DE$ = "MainPage_DE" procedure CreateMainPage_DE Create Table with column names... MainPage_DE 21 ... Label Text Key Helptext # Fill table values # Row 1 Set string value... 1 Label !Author Set string value... 1 Text Autor Set string value... 1 Key Set string value... 1 Helptext R.J.J.H. van Son, \U"bersetzung: Irene Jacobi # Row 2 Set string value... 2 Label !Copyright Set string value... 2 Text Copyright Set string value... 2 Key Set string value... 2 Helptext Copyright 2010 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Label !License Set string value... 3 Text License Set string value... 3 Key Set string value... 3 Helptext GNU GPL version 2 or later # Row 4 Set string value... 4 Label !WindowTitle Set string value... 4 Text Speak Good Chinese: \u"ben sie ihre T\o"ne mit Set string value... 4 Key Set string value... 4 Helptext Speak Good Chinese: \u"ben sie ihre T\o"ne mit # Row 5 Set string value... 5 Label !Man Set string value... 5 Text Symbole Set string value... 5 Key Set string value... 5 Helptext Symbole: !- Inactive Taste; $- \U"berschrift; #- Unsichtbare Taste; $$$- Symbole durch Tekst ersetzen # Row 6 Set string value... 6 Label Record Set string value... 6 Text Aufnahme Set string value... 6 Key A Set string value... 6 Helptext Machen Sie eine Sprachaufnahme. Sie haben 4 Sekunden bevor die Aufnahme beginnt; achten Sie auf das rote Licht. # Row 7 Set string value... 7 Label Play Set string value... 7 Text Wiedergabe Set string value... 7 Key W Set string value... 7 Helptext Abspielen der Aufnahme # Row 8 Set string value... 8 Label Example Set string value... 8 Text Vorbild Set string value... 8 Key V Set string value... 8 Helptext Vorbild abspielen # Row 9 Set string value... 9 Label Quit Set string value... 9 Text Ende Set string value... 9 Key E Set string value... 9 Helptext Das Programm beenden # Row 10 Set string value... 10 Label Config Set string value... 10 Text Einstellungen Set string value... 10 Key g Set string value... 10 Helptext Zur Seite "Einstellungen" # Row 11 Set string value... 11 Label Refresh Set string value... 11 Text Aktualisieren Set string value... 11 Key u Set string value... 11 Helptext Der aktuelle Bildschirm wird abgebildet. Mit der Leertaste kann der Bildschirm aktualisiert werden. # Row 12 Set string value... 12 Label Help Set string value... 12 Text Hilfe Set string value... 12 Key ?/ Set string value... 12 Helptext Dr\u"cken Sie auf den Knopf \u"ber den Sie Informationen m\o"chten. Dr\u"cken Sie danach auf "Hilfe". # Row 13 Set string value... 13 Label $WordlistCaption Set string value... 13 Text Wordliste Set string value... 13 Key Set string value... 13 Helptext \A"ndere Wordliste # Row 14 Set string value... 14 Label SelectWords Set string value... 14 Text W\o"rter Set string value... 14 Key W Set string value... 14 Helptext W\a"hle die W\o"rter zum \u"ben # Row 15 Set string value... 15 Label WordlistUp Set string value... 15 Text -vorige Set string value... 15 Key \-_ Set string value... 15 Helptext Zur voriger Liste # Row 16 Set string value... 16 Label WordlistDown Set string value... 16 Text +n\a"chste Set string value... 16 Key += Set string value... 16 Helptext Zur n\a"chster Liste # Row 17 Set string value... 17 Label Previous Set string value... 17 Text Set string value... 18 Key \>\. Set string value... 18 Helptext zum n\a"chsten Abschnitt # Row 19 Set string value... 19 Label $SaveAudio Set string value... 19 Text $$$ Set string value... 19 Key Set string value... 19 Helptext Blauer Punkt: Aufnahmen aufbewahren (letste Aufnahme jedes pinyin Wort) # Row 20 Set string value... 20 Label GRADE Set string value... 20 Text Beurteilung Set string value... 20 Key 0123456789 Set string value... 20 Helptext Beurteilung Aussprache 0-9 # Row 21 Set string value... 21 Label #PinYinArea Set string value... 21 Text $$$ Set string value... 21 Key Set string value... 21 Helptext Tekstfeld: Klicken f\u"r Wiedergabe von verborgene Pinyin, Schriftzeigen und \U"bersetzung (rot) endproc procCreateMainPage_EN$ = "MainPage_EN" procedure CreateMainPage_EN Create Table with column names... MainPage_EN 21 ... Label Text Key Helptext # Fill table values # Row 1 Set string value... 1 Label !Author Set string value... 1 Text Author Set string value... 1 Key ! Set string value... 1 Helptext R.J.J.H. van Son # Row 2 Set string value... 2 Label !Copyright Set string value... 2 Text Copyright Set string value... 2 Key ! Set string value... 2 Helptext Copyright 2010 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Label !License Set string value... 3 Text License Set string value... 3 Key ! Set string value... 3 Helptext GNU GPL version 2 or later # Row 4 Set string value... 4 Label !WindowTitle Set string value... 4 Text Speak Good Chinese: Practise your tones with Set string value... 4 Key ! Set string value... 4 Helptext Speak Good Chinese: Practise your tones with # Row 5 Set string value... 5 Label !Man Set string value... 5 Text Symbols Set string value... 5 Key Set string value... 5 Helptext Symbol processing: !- Inactive button; $- Title text; #- Invisible button; $$$- Replace symbol with text # Row 6 Set string value... 6 Label Record Set string value... 6 Text Record Set string value... 6 Key R Set string value... 6 Helptext Record your pronunciation. You have 4 seconds, watch the recording "light" # Row 7 Set string value... 7 Label Play Set string value... 7 Text Play Set string value... 7 Key P Set string value... 7 Helptext Play back of your recorded pronunciation # Row 8 Set string value... 8 Label Example Set string value... 8 Text Example Set string value... 8 Key E Set string value... 8 Helptext Play example tone pronunciation # Row 9 Set string value... 9 Label Previous Set string value... 9 Text < Previous Set string value... 9 Key <, Set string value... 9 Helptext Previous word # Row 10 Set string value... 10 Label Next Set string value... 10 Text Next > Set string value... 10 Key >. Set string value... 10 Helptext Next word # Row 11 Set string value... 11 Label Quit Set string value... 11 Text Quit Set string value... 11 Key Q Set string value... 11 Helptext Quit SpeakGoodChinese # Row 12 Set string value... 12 Label Config Set string value... 12 Text Settings Set string value... 12 Key S Set string value... 12 Helptext Go to settings page # Row 13 Set string value... 13 Label $WordlistCaption Set string value... 13 Text Word List Set string value... 13 Key Set string value... 13 Helptext Change word list # Row 14 Set string value... 14 Label SelectWords Set string value... 14 Text Words Set string value... 14 Key W Set string value... 14 Helptext Select words to practise # Row 15 Set string value... 15 Label WordlistUp Set string value... 15 Text Previous- Set string value... 15 Key v\-_ Set string value... 15 Helptext Previous word list # Row 16 Set string value... 16 Label WordlistDown Set string value... 16 Text Next+ Set string value... 16 Key N+= Set string value... 16 Helptext Next word list # Row 17 Set string value... 17 Label Refresh Set string value... 17 Text Refresh Set string value... 17 Key h Set string value... 17 Helptext Redraw the current screen, the space-bar always refreshes screen # Row 18 Set string value... 18 Label Help Set string value... 18 Text Help Set string value... 18 Key ?/ Set string value... 18 Helptext Press on the button you want information on, "Help" to continue # Row 19 Set string value... 19 Label $SaveAudio Set string value... 19 Text $$$ Set string value... 19 Key Set string value... 19 Helptext Blue dot: Keep the recordings (last version of each pinyin word is kept) # Row 20 Set string value... 20 Label GRADE Set string value... 20 Text Grading Set string value... 20 Key 0123456789 Set string value... 20 Helptext Grading of pronunciation 0-9 # Row 21 Set string value... 21 Label #PinYinArea Set string value... 21 Text $$$ Set string value... 21 Key Set string value... 21 Helptext Display area: Click for revealing hidden pinyin, characters and translation (red) endproc procCreateMainPage_JA$ = "MainPage_JA" procedure CreateMainPage_JA Create Table with column names... MainPage_JA 21 ... Label Text Key Helptext # Fill table values # Row 1 Set string value... 1 Label !Author Set string value... 1 Text Author Set string value... 1 Key ! Set string value... 1 Helptext R.J.J.H. van Son, Translation: Takahiro Higashi (東孝拓) # Row 2 Set string value... 2 Label !Copyright Set string value... 2 Text Copyright Set string value... 2 Key ! Set string value... 2 Helptext Copyright 2010 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Label !License Set string value... 3 Text License Set string value... 3 Key ! Set string value... 3 Helptext GNU GPL version 2 or later # Row 4 Set string value... 4 Label !WindowTitle Set string value... 4 Text SpeakGoodChinese: 単語表『$$$』で声調を練習しよう Set string value... 4 Key ! Set string value... 4 Helptext SpeakGoodChinese: 単語表『$$$』で声調を練習しよう # Row 5 Set string value... 5 Label !Man Set string value... 5 Text Symbols Set string value... 5 Key Set string value... 5 Helptext Symbol processing: !- Inactive button; $- Title text; #- Invisible button; $$$- Replace symbol with text # Row 6 Set string value... 6 Label Record Set string value... 6 Text 録音 R Set string value... 6 Key R Set string value... 6 Helptext 声を録音します。録音されるのは4秒間です。録音中“録音ライト”が表示されます。 # Row 7 Set string value... 7 Label Play Set string value... 7 Text 再生 P Set string value... 7 Key P Set string value... 7 Helptext 録音した声を再生します。 # Row 8 Set string value... 8 Label Example Set string value... 8 Text 発音例 E Set string value... 8 Key E Set string value... 8 Helptext 発音例を再生します。 # Row 9 Set string value... 9 Label Previous Set string value... 9 Text < 戻る Set string value... 9 Key <, Set string value... 9 Helptext 一つ前の単語に戻ります。 # Row 10 Set string value... 10 Label Next Set string value... 10 Text 次へ > Set string value... 10 Key >. Set string value... 10 Helptext 次の単語に進みます。 # Row 11 Set string value... 11 Label Quit Set string value... 11 Text 終了 Q Set string value... 11 Key Q Set string value... 11 Helptext SpeakGoodChineseを終了します。 # Row 12 Set string value... 12 Label Config Set string value... 12 Text 設定 S Set string value... 12 Key S Set string value... 12 Helptext 設定画面に進みます。 # Row 13 Set string value... 13 Label $WordlistCaption Set string value... 13 Text 単語表 Set string value... 13 Key Set string value... 13 Helptext 単語表を変更します。 # Row 14 Set string value... 14 Label SelectWords Set string value... 14 Text 単語の選択 Set string value... 14 Key W Set string value... 14 Helptext 練習で使う単語を選択します # Row 15 Set string value... 15 Label WordlistUp Set string value... 15 Text 戻る- Set string value... 15 Key v\-_ Set string value... 15 Helptext 一つ前の単語表に戻ります。 # Row 16 Set string value... 16 Label WordlistDown Set string value... 16 Text 次へ+ Set string value... 16 Key N+= Set string value... 16 Helptext 次の単語表に進みます。 # Row 17 Set string value... 17 Label Refresh Set string value... 17 Text 再描画 h Set string value... 17 Key h Set string value... 17 Helptext 画面を再描画します。スペースキーを押しても再描画できます。 # Row 18 Set string value... 18 Label Help Set string value... 18 Text ヘルプ ? Set string value... 18 Key ?/ Set string value... 18 Helptext 詳しく知りたいボタンをクリックして下さい。もう一度ヘルプボタンを押すと解除されます。 # Row 19 Set string value... 19 Label $SaveAudio Set string value... 19 Text $$$ Set string value... 19 Key Set string value... 19 Helptext 青丸: 録音データをファイルに保存するモードです(各単語の最後の発音を保存) # Row 20 Set string value... 20 Label GRADE Set string value... 20 Text 評価 Set string value... 20 Key 123456789 Set string value... 20 Helptext 発音を0-9の値で評価します。 # Row 21 Set string value... 21 Label #PinYinArea Set string value... 21 Text $$$ Set string value... 21 Key Set string value... 21 Helptext 表示エリア:クリックすると非表示状態のピンイン、漢字、翻訳が表示されます(赤文字)。 endproc procCreateMainPage_NL$ = "MainPage_NL" procedure CreateMainPage_NL Create Table with column names... MainPage_NL 21 ... Label Text Key Helptext # Fill table values # Row 1 Set string value... 1 Label !Author Set string value... 1 Text Auteur Set string value... 1 Key ! Set string value... 1 Helptext R.J.J.H. van Son # Row 2 Set string value... 2 Label !Copyright Set string value... 2 Text Copyright Set string value... 2 Key ! Set string value... 2 Helptext Copyright 2010 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Label !License Set string value... 3 Text Licentie Set string value... 3 Key ! Set string value... 3 Helptext GNU GPL version 2 or later # Row 4 Set string value... 4 Label !WindowTitle Set string value... 4 Text SpeakGoodChinese: Tonen oefenen met Set string value... 4 Key ! Set string value... 4 Helptext SpeakGoodChinese: Tonen oefenen met # Row 5 Set string value... 5 Label !Man Set string value... 5 Text Symbols Set string value... 5 Key Set string value... 5 Helptext Symbolen: !- Inactieve knop; $- Titel; #- Onzichtbare knop; $$$- Symbool vervangen door tekst # Row 6 Set string value... 6 Label Record Set string value... 6 Text Opnemen Set string value... 6 Key O Set string value... 6 Helptext Neem je uitspraak op. Je hebt 4 seconden, let op het rode "lampje" # Row 7 Set string value... 7 Label Play Set string value... 7 Text Afspelen Set string value... 7 Key A Set string value... 7 Helptext Speel je opgenomen uitspraak af # Row 8 Set string value... 8 Label Example Set string value... 8 Text Voorbeeld Set string value... 8 Key V Set string value... 8 Helptext Speel een voorbeeld van deze toon af # Row 9 Set string value... 9 Label Previous Set string value... 9 Text < Terug Set string value... 9 Key <, Set string value... 9 Helptext Vorige woord # Row 10 Set string value... 10 Label Next Set string value... 10 Text Vooruit > Set string value... 10 Key >. Set string value... 10 Helptext Volgende woord # Row 11 Set string value... 11 Label Quit Set string value... 11 Text Stop Set string value... 11 Key S Set string value... 11 Helptext Stop SpeakGoodChinese # Row 12 Set string value... 12 Label Config Set string value... 12 Text Instellingen Set string value... 12 Key I Set string value... 12 Helptext Ga naar de pagina met instellingen # Row 13 Set string value... 13 Label $WordlistCaption Set string value... 13 Text Woordenlijst Set string value... 13 Key Set string value... 13 Helptext Andere woordenlijst # Row 14 Set string value... 14 Label SelectWords Set string value... 14 Text Woorden Set string value... 14 Key W Set string value... 14 Helptext Kies de woorden om te oefenen # Row 15 Set string value... 15 Label WordlistUp Set string value... 15 Text Vorige Set string value... 15 Key g\-_ Set string value... 15 Helptext Vorige woordenlijst # Row 16 Set string value... 16 Label WordlistDown Set string value... 16 Text Volgende Set string value... 16 Key l+= Set string value... 16 Helptext Volgende woordenlijst # Row 17 Set string value... 17 Label Refresh Set string value... 17 Text Ververs Set string value... 17 Key r Set string value... 17 Helptext Ververs de huidige pagina, de spatiebalk ververst altijd de pagina # Row 18 Set string value... 18 Label Help Set string value... 18 Text Help Set string value... 18 Key ?/ Set string value... 18 Helptext Druk op de knop waar u informatie over wilt hebben, "Help" als u verder wilt # Row 19 Set string value... 19 Label $SaveAudio Set string value... 19 Text $$$ Set string value... 19 Key Set string value... 19 Helptext Blauwe stip: Bewaar opnamen (laatste versie van ieder pinyin woord) # Row 20 Set string value... 20 Label GRADE Set string value... 20 Text Beoordeling Set string value... 20 Key 0123456789 Set string value... 20 Helptext Beoordeling uitspraak 0-9 # Row 21 Set string value... 21 Label #PinYinArea Set string value... 21 Text $$$ Set string value... 21 Key Set string value... 21 Helptext Tekstweergave: Klik hier om verborgen pinyin, karakters en vertaling zichtbaar te maken (rood) endproc procCreateMainPage_ZH$ = "MainPage_ZH" procedure CreateMainPage_ZH Create Table with column names... MainPage_ZH 21 ... Label Text Key Helptext # Fill table values # Row 1 Set string value... 1 Label !Author Set string value... 1 Text Author Set string value... 1 Key ! Set string value... 1 Helptext R.J.J.H. van Son, Translation: Takahiro Higashi (東孝拓) and Wang Huiting(王慧婷) # Row 2 Set string value... 2 Label !Copyright Set string value... 2 Text Copyright Set string value... 2 Key ! Set string value... 2 Helptext Copyright 2010 R.J.J.H. van Son \& the NKI # Row 3 Set string value... 3 Label !License Set string value... 3 Text License Set string value... 3 Key ! Set string value... 3 Helptext GNU GPL version 2 or later # Row 4 Set string value... 4 Label !WindowTitle Set string value... 4 Text SpeakGoodChinese: 通过单词表《$$$》练习声调 Set string value... 4 Key ! Set string value... 4 Helptext SpeakGoodChinese: 通过单词表《$$$》练习声调 # Row 5 Set string value... 5 Label !Man Set string value... 5 Text Symbols Set string value... 5 Key Set string value... 5 Helptext Symbol processing: !- Inactive button; $- Title text; #- Invisible button; $$$- Replace symbol with text # Row 6 Set string value... 6 Label Record Set string value... 6 Text 录音 R Set string value... 6 Key R Set string value... 6 Helptext 录音。录音时间为4秒钟,注意“录音指示灯”。 # Row 7 Set string value... 7 Label Play Set string value... 7 Text 播放 P Set string value... 7 Key P Set string value... 7 Helptext 播放您的发音。 # Row 8 Set string value... 8 Label Example Set string value... 8 Text 参考发音 E Set string value... 8 Key E Set string value... 8 Helptext 播放软件提供的参考发音。 # Row 9 Set string value... 9 Label Previous Set string value... 9 Text < 上一个 Set string value... 9 Key <, Set string value... 9 Helptext 切换到上一个单词。 # Row 10 Set string value... 10 Label Next Set string value... 10 Text 下一个 > Set string value... 10 Key >. Set string value... 10 Helptext 切换到下一个单词。 # Row 11 Set string value... 11 Label Quit Set string value... 11 Text 结束 Q Set string value... 11 Key Q Set string value... 11 Helptext 结束SpeakGoodChinese。 # Row 12 Set string value... 12 Label Config Set string value... 12 Text 设置 S Set string value... 12 Key S Set string value... 12 Helptext 切换到设置页面。 # Row 13 Set string value... 13 Label $WordlistCaption Set string value... 13 Text 单词表 Set string value... 13 Key Set string value... 13 Helptext 更换单词表。 # Row 14 Set string value... 14 Label WordlistUp Set string value... 14 Text 上一个- Set string value... 14 Key v\-_ Set string value... 14 Helptext 切换到上一个单词表。 # Row 15 Set string value... 15 Label SelectWords Set string value... 15 Text 选择单词 Set string value... 15 Key W Set string value... 15 Helptext 选择要练习的单词 # Row 16 Set string value... 16 Label WordlistDown Set string value... 16 Text 下一个+ Set string value... 16 Key N+= Set string value... 16 Helptext 切换到下一个单词表。 # Row 17 Set string value... 17 Label Refresh Set string value... 17 Text 刷新 h Set string value... 17 Key h Set string value... 17 Helptext 刷新页面。也可以按下“空格”键进行刷新。 # Row 18 Set string value... 18 Label Help Set string value... 18 Text 帮助 ? Set string value... 18 Key ?/ Set string value... 18 Helptext 用鼠标点击您想了解的按钮,则显示提示内容。如需解除帮助,请再按下‘帮助’键。 # Row 19 Set string value... 19 Label $SaveAudio Set string value... 19 Text $$$ Set string value... 19 Key Set string value... 19 Helptext 蓝色圆点亮起:正在保存录音(只保存每个单词的最后一次发音)。 # Row 20 Set string value... 20 Label GRADE Set string value... 20 Text 评分 Set string value... 20 Key 123456789 Set string value... 20 Helptext 选择数字0-9给出评分。 # Row 21 Set string value... 21 Label #PinYinArea Set string value... 21 Text $$$ Set string value... 21 Key Set string value... 21 Helptext 显示区:点击此处可以显示隐藏着的拼音、汉字以及翻译(红色字体)。 endproc procCreateToneFeedback_DE$ = "ToneFeedback_DE" procedure CreateToneFeedback_DE Create Table with column names... ToneFeedback_DE 37 ... T1 T2 Feedback # Fill table values # Row 1 Set string value... 1 T1 !Author Set string value... 1 T2 Author Set string value... 1 Feedback R.J.J.H. van Son # Row 2 Set string value... 2 T1 !Copyright Set string value... 2 T2 Copyright Set string value... 2 Feedback 2007-2010 R.J.J.H. van Son and 2010 the Netherlands Cancer Institute # Row 3 Set string value... 3 T1 !License Set string value... 3 T2 License Set string value... 3 Feedback GNU GPL version 2 or later # Row 4 Set string value... 4 T1 Correct Set string value... 4 T2 - Set string value... 4 Feedback Richtig # Row 5 Set string value... 5 T1 Wrong Set string value... 5 T2 - Set string value... 5 Feedback Falsch # Row 6 Set string value... 6 T1 Long Set string value... 6 T2 - Set string value... 6 Feedback %%(erste zwei T\o"ne)% # Row 7 Set string value... 7 T1 NoSound Set string value... 7 T2 - Set string value... 7 Feedback Kein Ton aufgezeichnet # Row 8 Set string value... 8 T1 Low Set string value... 8 T2 - Set string value... 8 Feedback Ihre T\o"ne waren zu niedrig, um erkennt zu werden (ist ihre Stimme richtig eingestellt?) # Row 9 Set string value... 9 T1 High Set string value... 9 T2 - Set string value... 9 Feedback Ihre T\o"ne waren zu hoch, aber vielleicht zu erkennen (ist ihre Stimme richtig eingestellt?) # Row 10 Set string value... 10 T1 Narrow Set string value... 10 T2 - Set string value... 10 Feedback Ihre Tonbewegungen waren zu flach, um erkennt werden # Row 11 Set string value... 11 T1 Wide Set string value... 11 T2 - Set string value... 11 Feedback Ihre Tonbewegungen waren zu weidl\a"ufig, aber vielleicht erkennbar # Row 12 Set string value... 12 T1 6 Set string value... 12 T2 - Set string value... 12 Feedback kein erkennbarer Ton # Row 13 Set string value... 13 T1 1 Set string value... 13 T2 - Set string value... 13 Feedback Der erster Ton ist hoch und flach # Row 14 Set string value... 14 T1 2 Set string value... 14 T2 - Set string value... 14 Feedback Der zweiter Ton beginnt mittel-hoch und geht nach oben # Row 15 Set string value... 15 T1 3 Set string value... 15 T2 - Set string value... 15 Feedback Der dritter Ton beginnt mittel-hoch geht nach unten und dann nach oben # Row 16 Set string value... 16 T1 4 Set string value... 16 T2 - Set string value... 16 Feedback Der vierter Ton beginnt hoch und geht den ganzen Weg # Row 17 Set string value... 17 T1 0 Set string value... 17 T2 - Set string value... 17 Feedback Der neutraler Ton geht weiter, wo der voriger Ton aufh\o"rt # Row 18 Set string value... 18 T1 1 Set string value... 18 T2 1 Set string value... 18 Feedback Halten Sie die T\o"ne hoch und flach # Row 19 Set string value... 19 T1 1 Set string value... 19 T2 2 Set string value... 19 Feedback Der zweiter Ton beginnt mittel-hoch und geht nach oben # Row 20 Set string value... 20 T1 1 Set string value... 20 T2 3 Set string value... 20 Feedback Der dritter Ton beginnt mittel-hoch geht nach unten und dann nach oben # Row 21 Set string value... 21 T1 1 Set string value... 21 T2 4 Set string value... 21 Feedback Der vierter Ton beginnt hoch und geht gans nach unten # Row 22 Set string value... 22 T1 1 Set string value... 22 T2 0 Set string value... 22 Feedback Der neutraler Ton weiter, wo der voriger Ton aufh\o"rt # Row 23 Set string value... 23 T1 2 Set string value... 23 T2 1 Set string value... 23 Feedback Halten Sie den ersten Ton hoch und flach # Row 24 Set string value... 24 T1 2 Set string value... 24 T2 2 Set string value... 24 Feedback Der zweiter Ton beginnt mittel-hoch und geht nach oben # Row 25 Set string value... 25 T1 2 Set string value... 25 T2 3 Set string value... 25 Feedback Der dritter Ton beginnt mittel-hoch geht nach unten und dann nach oben # Row 26 Set string value... 26 T1 2 Set string value... 26 T2 4 Set string value... 26 Feedback Der vierter Ton beginnt hoch und geht gans nach unten # Row 27 Set string value... 27 T1 2 Set string value... 27 T2 0 Set string value... 27 Feedback Der neutraler Ton weiter, wo der voriger Ton aufh\o"rt # Row 28 Set string value... 28 T1 3 Set string value... 28 T2 1 Set string value... 28 Feedback Halten Sie den ersten Ton hoch und flach # Row 29 Set string value... 29 T1 3 Set string value... 29 T2 2 Set string value... 29 Feedback Der zweiter Ton beginnt mittel-hoch und geht nach oben # Row 30 Set string value... 30 T1 3 Set string value... 30 T2 3 Set string value... 30 Feedback Sprechen wie eine 2-3 Kombination # Row 31 Set string value... 31 T1 3 Set string value... 31 T2 4 Set string value... 31 Feedback Der vierte Ton beginnt hoch und geht gans nach unten # Row 32 Set string value... 32 T1 3 Set string value... 32 T2 0 Set string value... 32 Feedback Der neutraler Ton weiter, wo der voriger Ton aufh\o"rt # Row 33 Set string value... 33 T1 4 Set string value... 33 T2 1 Set string value... 33 Feedback Halten Sie den ersten Ton hoch und flach # Row 34 Set string value... 34 T1 4 Set string value... 34 T2 2 Set string value... 34 Feedback Der zweiter Ton beginnt mittel-hoch und geht nach oben # Row 35 Set string value... 35 T1 4 Set string value... 35 T2 3 Set string value... 35 Feedback Der dritter Ton beginnt mittel-hoch geht nach unten und dann nach oben # Row 36 Set string value... 36 T1 4 Set string value... 36 T2 4 Set string value... 36 Feedback Der vierter Ton beginnt hoch und geht ganz nach unten, # Row 37 Set string value... 37 T1 4 Set string value... 37 T2 0 Set string value... 37 Feedback Der neutraler Ton weiter, wo der voriger Ton aufh\o"rt endproc procCreateToneFeedback_EN$ = "ToneFeedback_EN" procedure CreateToneFeedback_EN Create Table with column names... ToneFeedback_EN 37 ... T1 T2 Feedback # Fill table values # Row 1 Set string value... 1 T1 !Author Set string value... 1 T2 Author Set string value... 1 Feedback R.J.J.H. van Son # Row 2 Set string value... 2 T1 !Copyright Set string value... 2 T2 Copyright Set string value... 2 Feedback 2007-2010 R.J.J.H. van Son and 2010 the Netherlands Cancer Institute # Row 3 Set string value... 3 T1 !License Set string value... 3 T2 License Set string value... 3 Feedback GNU GPL version 2 or later # Row 4 Set string value... 4 T1 Correct Set string value... 4 T2 - Set string value... 4 Feedback Correct # Row 5 Set string value... 5 T1 Wrong Set string value... 5 T2 - Set string value... 5 Feedback Wrong # Row 6 Set string value... 6 T1 Long Set string value... 6 T2 - Set string value... 6 Feedback %%(first two tones)% # Row 7 Set string value... 7 T1 NoSound Set string value... 7 T2 - Set string value... 7 Feedback No sound recorded # Row 8 Set string value... 8 T1 Low Set string value... 8 T2 - Set string value... 8 Feedback Your tones were too low to be recognized (is you voice setting correct?) # Row 9 Set string value... 9 T1 High Set string value... 9 T2 - Set string value... 9 Feedback Your tones were too high but might be recognizable (is you voice setting correct?) # Row 10 Set string value... 10 T1 Narrow Set string value... 10 T2 - Set string value... 10 Feedback Your tone movements were too flat to be recognized # Row 11 Set string value... 11 T1 Wide Set string value... 11 T2 - Set string value... 11 Feedback Your tone movements were too wide but might be recognizable # Row 12 Set string value... 12 T1 6 Set string value... 12 T2 - Set string value... 12 Feedback Not a recognizable tone # Row 13 Set string value... 13 T1 1 Set string value... 13 T2 - Set string value... 13 Feedback The first tone is high and flat # Row 14 Set string value... 14 T1 2 Set string value... 14 T2 - Set string value... 14 Feedback The second tone starts mid-range and goes up # Row 15 Set string value... 15 T1 3 Set string value... 15 T2 - Set string value... 15 Feedback The third tone starts mid-range goes down and then up # Row 16 Set string value... 16 T1 4 Set string value... 16 T2 - Set string value... 16 Feedback The fourth tone starts high and goes down all the way # Row 17 Set string value... 17 T1 0 Set string value... 17 T2 - Set string value... 17 Feedback The neutral tone continues where the previous tone stops # Row 18 Set string value... 18 T1 1 Set string value... 18 T2 1 Set string value... 18 Feedback Keep the tones high and flat # Row 19 Set string value... 19 T1 1 Set string value... 19 T2 2 Set string value... 19 Feedback The second tone starts mid-range and goes up # Row 20 Set string value... 20 T1 1 Set string value... 20 T2 3 Set string value... 20 Feedback The third tone starts mid-range goes down and then up # Row 21 Set string value... 21 T1 1 Set string value... 21 T2 4 Set string value... 21 Feedback The fourth tone starts high and goes down all the way # Row 22 Set string value... 22 T1 1 Set string value... 22 T2 0 Set string value... 22 Feedback The neutral tone continues where the previous tone stops # Row 23 Set string value... 23 T1 2 Set string value... 23 T2 1 Set string value... 23 Feedback Keep the first tone high and flat # Row 24 Set string value... 24 T1 2 Set string value... 24 T2 2 Set string value... 24 Feedback The second tone starts mid-range and goes up # Row 25 Set string value... 25 T1 2 Set string value... 25 T2 3 Set string value... 25 Feedback The third tone starts mid-range goes down and then up # Row 26 Set string value... 26 T1 2 Set string value... 26 T2 4 Set string value... 26 Feedback The fourth tone starts high and goes down all the way # Row 27 Set string value... 27 T1 2 Set string value... 27 T2 0 Set string value... 27 Feedback The neutral tone continues where the previous tone stops # Row 28 Set string value... 28 T1 3 Set string value... 28 T2 1 Set string value... 28 Feedback Keep the first tone high and flat # Row 29 Set string value... 29 T1 3 Set string value... 29 T2 2 Set string value... 29 Feedback The second tone starts mid-range and goes up # Row 30 Set string value... 30 T1 3 Set string value... 30 T2 3 Set string value... 30 Feedback Pronounce as a 2-3 combination # Row 31 Set string value... 31 T1 3 Set string value... 31 T2 4 Set string value... 31 Feedback The fourth tone starts high and goes down all the way # Row 32 Set string value... 32 T1 3 Set string value... 32 T2 0 Set string value... 32 Feedback The neutral tone continues where the previous tone stops # Row 33 Set string value... 33 T1 4 Set string value... 33 T2 1 Set string value... 33 Feedback Keep the first tone high and flat # Row 34 Set string value... 34 T1 4 Set string value... 34 T2 2 Set string value... 34 Feedback The second tone starts mid-range and goes up # Row 35 Set string value... 35 T1 4 Set string value... 35 T2 3 Set string value... 35 Feedback The third tone starts mid-range goes down and then up # Row 36 Set string value... 36 T1 4 Set string value... 36 T2 4 Set string value... 36 Feedback The fourth tone starts high and goes down all the way # Row 37 Set string value... 37 T1 4 Set string value... 37 T2 0 Set string value... 37 Feedback The neutral tone continues where the previous tone stops endproc procCreateToneFeedback_JA$ = "ToneFeedback_JA" procedure CreateToneFeedback_JA Create Table with column names... ToneFeedback_JA 37 ... T1 T2 Feedback # Fill table values # Row 1 Set string value... 1 T1 !Author Set string value... 1 T2 Author Set string value... 1 Feedback R.J.J.H. van Son, Translation: Takahiro Higashi (東孝拓) # Row 2 Set string value... 2 T1 !Copyright Set string value... 2 T2 Copyright Set string value... 2 Feedback 2007-2010 R.J.J.H. van Son and 2010 the Netherlands Cancer Institute # Row 3 Set string value... 3 T1 !License Set string value... 3 T2 License Set string value... 3 Feedback GNU GPL version 2 or later # Row 4 Set string value... 4 T1 Correct Set string value... 4 T2 - Set string value... 4 Feedback 正しい # Row 5 Set string value... 5 T1 Wrong Set string value... 5 T2 - Set string value... 5 Feedback 間違い # Row 6 Set string value... 6 T1 Long Set string value... 6 T2 - Set string value... 6 Feedback %%(first two tones)% # Row 7 Set string value... 7 T1 NoSound Set string value... 7 T2 - Set string value... 7 Feedback 音が録音されませんでした。 # Row 8 Set string value... 8 T1 Low Set string value... 8 T2 - Set string value... 8 Feedback 声が低すぎるため認識できません(声の高さ設定が正しいか確認して下さい)。 # Row 9 Set string value... 9 T1 High Set string value... 9 T2 - Set string value... 9 Feedback 認識は可能ですが、声が高すぎます(声の高さ設定が正しいか確認して下さい)。 # Row 10 Set string value... 10 T1 Narrow Set string value... 10 T2 - Set string value... 10 Feedback 声の高さの変化がほとんどないため認識できません。 # Row 11 Set string value... 11 T1 Wide Set string value... 11 T2 - Set string value... 11 Feedback 認識は可能ですが、声の変化の幅が大きすぎます。 # Row 12 Set string value... 12 T1 6 Set string value... 12 T2 - Set string value... 12 Feedback 認識可能な声調ではありません。 # Row 13 Set string value... 13 T1 1 Set string value... 13 T2 - Set string value... 13 Feedback 一声は高くかつ平らです。 # Row 14 Set string value... 14 T1 2 Set string value... 14 T2 - Set string value... 14 Feedback 二声は真ん中の高さから始まり上昇します。 # Row 15 Set string value... 15 T1 3 Set string value... 15 T2 - Set string value... 15 Feedback 三声は真ん中の高さから始まり一度下がってまた上昇します。 # Row 16 Set string value... 16 T1 4 Set string value... 16 T2 - Set string value... 16 Feedback 四声は高めから始まり下がり続けます。 # Row 17 Set string value... 17 T1 0 Set string value... 17 T2 - Set string value... 17 Feedback 軽声は一つ前の声調の終了点から継続されます。 # Row 18 Set string value... 18 T1 1 Set string value... 18 T2 1 Set string value... 18 Feedback 一声ではピッチを高くかつ平らに維持して下さい。 # Row 19 Set string value... 19 T1 1 Set string value... 19 T2 2 Set string value... 19 Feedback 二声は真ん中の高さから始まり上昇します。 # Row 20 Set string value... 20 T1 1 Set string value... 20 T2 3 Set string value... 20 Feedback 三声は真ん中の高さから始まり一度下がってまた上昇します。 # Row 21 Set string value... 21 T1 1 Set string value... 21 T2 4 Set string value... 21 Feedback 四声は高めから始まり下がり続けます。 # Row 22 Set string value... 22 T1 1 Set string value... 22 T2 0 Set string value... 22 Feedback 軽声は一つ前の声調の終了点から継続されます。 # Row 23 Set string value... 23 T1 2 Set string value... 23 T2 1 Set string value... 23 Feedback 一声ではピッチを高くかつ平らに維持して下さい。 # Row 24 Set string value... 24 T1 2 Set string value... 24 T2 2 Set string value... 24 Feedback 二声は真ん中の高さから始まり上昇します。 # Row 25 Set string value... 25 T1 2 Set string value... 25 T2 3 Set string value... 25 Feedback 三声は真ん中の高さから始まり一度下がってまた上昇します。 # Row 26 Set string value... 26 T1 2 Set string value... 26 T2 4 Set string value... 26 Feedback 四声は高めから始まり下がり続けます。 # Row 27 Set string value... 27 T1 2 Set string value... 27 T2 0 Set string value... 27 Feedback 軽声は一つ前の声調の終了点から継続されます。 # Row 28 Set string value... 28 T1 3 Set string value... 28 T2 1 Set string value... 28 Feedback 一声ではピッチを高くかつ平らに維持して下さい。 # Row 29 Set string value... 29 T1 3 Set string value... 29 T2 2 Set string value... 29 Feedback 二声は真ん中の高さから始まり上昇します。 # Row 30 Set string value... 30 T1 3 Set string value... 30 T2 3 Set string value... 30 Feedback 二声+三声のように発音します。 # Row 31 Set string value... 31 T1 3 Set string value... 31 T2 4 Set string value... 31 Feedback 四声は高めから始まり下がり続けます。 # Row 32 Set string value... 32 T1 3 Set string value... 32 T2 0 Set string value... 32 Feedback 軽声は一つ前の声調の終了点から継続されます。 # Row 33 Set string value... 33 T1 4 Set string value... 33 T2 1 Set string value... 33 Feedback 一声ではピッチを高くかつ平らに維持して下さい。 # Row 34 Set string value... 34 T1 4 Set string value... 34 T2 2 Set string value... 34 Feedback 二声は真ん中の高さから始まり上昇します。 # Row 35 Set string value... 35 T1 4 Set string value... 35 T2 3 Set string value... 35 Feedback 三声は真ん中の高さから始まり一度下がってまた上昇します。 # Row 36 Set string value... 36 T1 4 Set string value... 36 T2 4 Set string value... 36 Feedback 四声は高めから始まり下がり続けます。 # Row 37 Set string value... 37 T1 4 Set string value... 37 T2 0 Set string value... 37 Feedback 軽声は一つ前の声調の終了点から継続されます。 endproc procCreateToneFeedback_NL$ = "ToneFeedback_NL" procedure CreateToneFeedback_NL Create Table with column names... ToneFeedback_NL 37 ... T1 T2 Feedback # Fill table values # Row 1 Set string value... 1 T1 !Author Set string value... 1 T2 Auteur Set string value... 1 Feedback R.J.J.H. van Son # Row 2 Set string value... 2 T1 !Copyright Set string value... 2 T2 Copyright Set string value... 2 Feedback 2007-2010 R.J.J.H. van Son and 2010 the Netherlands Cancer Institute # Row 3 Set string value... 3 T1 !License Set string value... 3 T2 License Set string value... 3 Feedback GNU GPL version 2 or later # Row 4 Set string value... 4 T1 Correct Set string value... 4 T2 - Set string value... 4 Feedback Goed # Row 5 Set string value... 5 T1 Wrong Set string value... 5 T2 - Set string value... 5 Feedback Fout # Row 6 Set string value... 6 T1 Long Set string value... 6 T2 - Set string value... 6 Feedback %%(eerste twee tonen)% # Row 7 Set string value... 7 T1 NoSound Set string value... 7 T2 - Set string value... 7 Feedback Geen geluid opgenomen # Row 8 Set string value... 8 T1 Low Set string value... 8 T2 - Set string value... 8 Feedback Uw tonen waren te laag uitgesproken om herkend te worden (is uw stem juist ingesteld?) # Row 9 Set string value... 9 T1 High Set string value... 9 T2 - Set string value... 9 Feedback Uw tonen waren te hoog uitgesproken maar misschien toch herkenbaar (is uw stem juist ingesteld?) # Row 10 Set string value... 10 T1 Narrow Set string value... 10 T2 - Set string value... 10 Feedback Uw toonbewegingen ware te vlak om herkend te worden # Row 11 Set string value... 11 T1 Wide Set string value... 11 T2 - Set string value... 11 Feedback Uw toonbewegingen waren overdreven maar misschien toch herkenbaar # Row 12 Set string value... 12 T1 6 Set string value... 12 T2 - Set string value... 12 Feedback Geen herkenbare toon # Row 13 Set string value... 13 T1 1 Set string value... 13 T2 - Set string value... 13 Feedback De eerste toon is hoog en vlak # Row 14 Set string value... 14 T1 2 Set string value... 14 T2 - Set string value... 14 Feedback De tweede toon begint in het midden en gaat omhoog # Row 15 Set string value... 15 T1 3 Set string value... 15 T2 - Set string value... 15 Feedback De derde toon begin in het midden, gaat helemaal omlaag en dan omhoog # Row 16 Set string value... 16 T1 4 Set string value... 16 T2 - Set string value... 16 Feedback De vierde toon begint hoog en gaat helemaal naar beneden # Row 17 Set string value... 17 T1 0 Set string value... 17 T2 - Set string value... 17 Feedback De neutrale toon gaat ongeveer verder waar de vorige toon stopt # Row 18 Set string value... 18 T1 1 Set string value... 18 T2 1 Set string value... 18 Feedback Houd de tonen hoog en vlak # Row 19 Set string value... 19 T1 1 Set string value... 19 T2 2 Set string value... 19 Feedback De tweede toon begint in het midden en gaat omhoog # Row 20 Set string value... 20 T1 1 Set string value... 20 T2 3 Set string value... 20 Feedback De derde toon begin in het midden, gaat helemaal omlaag en dan omhoog # Row 21 Set string value... 21 T1 1 Set string value... 21 T2 4 Set string value... 21 Feedback De vierde toon begint hoog en gaat helemaal naar beneden # Row 22 Set string value... 22 T1 1 Set string value... 22 T2 0 Set string value... 22 Feedback De neutrale toon gaat ongeveer verder waar de vorige toon stopt # Row 23 Set string value... 23 T1 2 Set string value... 23 T2 1 Set string value... 23 Feedback De eerste toon is hoog en vlak # Row 24 Set string value... 24 T1 2 Set string value... 24 T2 2 Set string value... 24 Feedback De tweede toon begint in het midden en gaat omhoog # Row 25 Set string value... 25 T1 2 Set string value... 25 T2 3 Set string value... 25 Feedback De derde toon begin in het midden, gaat helemaal omlaag en dan omhoog # Row 26 Set string value... 26 T1 2 Set string value... 26 T2 4 Set string value... 26 Feedback De vierde toon begint hoog en gaat helemaal naar beneden # Row 27 Set string value... 27 T1 2 Set string value... 27 T2 0 Set string value... 27 Feedback De neutrale toon gaat ongeveer verder waar de vorige toon stopt # Row 28 Set string value... 28 T1 3 Set string value... 28 T2 1 Set string value... 28 Feedback Houd de tonen hoog en vlak # Row 29 Set string value... 29 T1 3 Set string value... 29 T2 2 Set string value... 29 Feedback De tweede toon begint in het midden en gaat omhoog # Row 30 Set string value... 30 T1 3 Set string value... 30 T2 3 Set string value... 30 Feedback Spreek twee derde tonen uit als een tweede toon gevolgd door een derde # Row 31 Set string value... 31 T1 3 Set string value... 31 T2 4 Set string value... 31 Feedback De vierde toon begint hoog en gaat helemaal naar beneden # Row 32 Set string value... 32 T1 3 Set string value... 32 T2 0 Set string value... 32 Feedback De neutrale toon gaat ongeveer verder waar de vorige toon stopt # Row 33 Set string value... 33 T1 4 Set string value... 33 T2 1 Set string value... 33 Feedback Houd de tonen hoog en vlak # Row 34 Set string value... 34 T1 4 Set string value... 34 T2 2 Set string value... 34 Feedback De tweede toon begint in het midden en gaat omhoog # Row 35 Set string value... 35 T1 4 Set string value... 35 T2 3 Set string value... 35 Feedback De derde toon begin in het midden, gaat helemaal omlaag en dan omhoog # Row 36 Set string value... 36 T1 4 Set string value... 36 T2 4 Set string value... 36 Feedback De vierde toon begint hoog en gaat helemaal naar beneden # Row 37 Set string value... 37 T1 4 Set string value... 37 T2 0 Set string value... 37 Feedback De neutrale toon gaat ongeveer verder waar de vorige toon stopt endproc procCreateToneFeedback_ZH$ = "ToneFeedback_ZH" procedure CreateToneFeedback_ZH Create Table with column names... ToneFeedback_ZH 37 ... T1 T2 Feedback # Fill table values # Row 1 Set string value... 1 T1 !Author Set string value... 1 T2 Author Set string value... 1 Feedback R.J.J.H. van Son, Translation: Takahiro Higashi (東孝拓) and Wang Huiting(王慧婷) # Row 2 Set string value... 2 T1 !Copyright Set string value... 2 T2 Copyright Set string value... 2 Feedback 2007-2010 R.J.J.H. van Son and 2010 the Netherlands Cancer Institute # Row 3 Set string value... 3 T1 !License Set string value... 3 T2 License Set string value... 3 Feedback GNU GPL version 2 or later # Row 4 Set string value... 4 T1 Correct Set string value... 4 T2 - Set string value... 4 Feedback 正确 # Row 5 Set string value... 5 T1 Wrong Set string value... 5 T2 - Set string value... 5 Feedback 错误 # Row 6 Set string value... 6 T1 Long Set string value... 6 T2 - Set string value... 6 Feedback %%(first two tones)% # Row 7 Set string value... 7 T1 NoSound Set string value... 7 T2 - Set string value... 7 Feedback 没有录到任何声音。 # Row 8 Set string value... 8 T1 Low Set string value... 8 T2 - Set string value... 8 Feedback 声音过低,无法识别(请检查声音设置是否准确)。 # Row 9 Set string value... 9 T1 High Set string value... 9 T2 - Set string value... 9 Feedback 声音过高,但仍能识别(请检查声音设置是否准确)。 # Row 10 Set string value... 10 T1 Narrow Set string value... 10 T2 - Set string value... 10 Feedback 音高变化太小,无法识别。 # Row 11 Set string value... 11 T1 Wide Set string value... 11 T2 - Set string value... 11 Feedback 音高变化太大,但仍能识别。 # Row 12 Set string value... 12 T1 6 Set string value... 12 T2 - Set string value... 12 Feedback 无法识别此类声调。 # Row 13 Set string value... 13 T1 1 Set string value... 13 T2 - Set string value... 13 Feedback 一声是即高又平的声调。 # Row 14 Set string value... 14 T1 2 Set string value... 14 T2 - Set string value... 14 Feedback 二声是从中间高度开始一直上升的声调。 # Row 15 Set string value... 15 T1 3 Set string value... 15 T2 - Set string value... 15 Feedback 三声是从中间高度开始先降后升的声调。 # Row 16 Set string value... 16 T1 4 Set string value... 16 T2 - Set string value... 16 Feedback 四声是从高处一直下降的声调。 # Row 17 Set string value... 17 T1 0 Set string value... 17 T2 - Set string value... 17 Feedback 轻声是从前一个声调的结尾处开始延续。 # Row 18 Set string value... 18 T1 1 Set string value... 18 T2 1 Set string value... 18 Feedback 读一声时,注意让声调保持既高又平。 # Row 19 Set string value... 19 T1 1 Set string value... 19 T2 2 Set string value... 19 Feedback 二声是从中间高度开始一直上升的声调。 # Row 20 Set string value... 20 T1 1 Set string value... 20 T2 3 Set string value... 20 Feedback 三声是从中间高度开始先降后升的声调。 # Row 21 Set string value... 21 T1 1 Set string value... 21 T2 4 Set string value... 21 Feedback 四声是从高处一直下降的声调。 # Row 22 Set string value... 22 T1 1 Set string value... 22 T2 0 Set string value... 22 Feedback 轻声是从前一个声调的结尾处开始延续。 # Row 23 Set string value... 23 T1 2 Set string value... 23 T2 1 Set string value... 23 Feedback 读一声时,注意让声调保持既高又平。 # Row 24 Set string value... 24 T1 2 Set string value... 24 T2 2 Set string value... 24 Feedback 二声是从中间高度开始一直上升的声调。 # Row 25 Set string value... 25 T1 2 Set string value... 25 T2 3 Set string value... 25 Feedback 三声是从中间高度开始先降后升的声调。 # Row 26 Set string value... 26 T1 2 Set string value... 26 T2 4 Set string value... 26 Feedback 四声是从高处一直下降的声调。 # Row 27 Set string value... 27 T1 2 Set string value... 27 T2 0 Set string value... 27 Feedback 轻声是从前一个声调的结尾处开始延续。 # Row 28 Set string value... 28 T1 3 Set string value... 28 T2 1 Set string value... 28 Feedback 读一声时,注意让声调保持既高又平。 # Row 29 Set string value... 29 T1 3 Set string value... 29 T2 2 Set string value... 29 Feedback 二声是从中间高度开始一直上升的声调。 # Row 30 Set string value... 30 T1 3 Set string value... 30 T2 3 Set string value... 30 Feedback 应该读成类似二声+三声组合的发音。 # Row 31 Set string value... 31 T1 3 Set string value... 31 T2 4 Set string value... 31 Feedback 四声是从高处一直下降的声调。 # Row 32 Set string value... 32 T1 3 Set string value... 32 T2 0 Set string value... 32 Feedback 轻声是从前一个声调的结尾处开始延续。 # Row 33 Set string value... 33 T1 4 Set string value... 33 T2 1 Set string value... 33 Feedback 读一声时,注意让声调保持既高又平。 # Row 34 Set string value... 34 T1 4 Set string value... 34 T2 2 Set string value... 34 Feedback 二声是从中间高度开始一直上升的声调。 # Row 35 Set string value... 35 T1 4 Set string value... 35 T2 3 Set string value... 35 Feedback 三声是从中间高度开始先降后升的声调。 # Row 36 Set string value... 36 T1 4 Set string value... 36 T2 4 Set string value... 36 Feedback 四声是从高处一直下降的声调。 # Row 37 Set string value... 37 T1 4 Set string value... 37 T2 0 Set string value... 37 Feedback 轻声是从前一个声调的结尾处开始延续。 endproc procCreateCreateTables$ = "CreateTables" procedure CreateCreateTables Create Table with column names... CreateTables 33 ... Name # Fill table values # Row 1 Set string value... 1 Name Background # Row 2 Set string value... 2 Name Config # Row 3 Set string value... 3 Name Config_DE # Row 4 Set string value... 4 Name Config_EN # Row 5 Set string value... 5 Name Config_JA # Row 6 Set string value... 6 Name Config_NL # Row 7 Set string value... 7 Name Config_ZH # Row 8 Set string value... 8 Name Credits_DE # Row 9 Set string value... 9 Name Credits_EN # Row 10 Set string value... 10 Name Credits_JA # Row 11 Set string value... 11 Name Credits_NL # Row 12 Set string value... 12 Name Credits_ZH # Row 13 Set string value... 13 Name Evaluation_DE # Row 14 Set string value... 14 Name Evaluation_EN # Row 15 Set string value... 15 Name Evaluation_JA # Row 16 Set string value... 16 Name Evaluation_NL # Row 17 Set string value... 17 Name Evaluation_ZH # Row 18 Set string value... 18 Name Feedback_DE # Row 19 Set string value... 19 Name Feedback_EN # Row 20 Set string value... 20 Name Feedback_JA # Row 21 Set string value... 21 Name Feedback_NL # Row 22 Set string value... 22 Name Feedback_ZH # Row 23 Set string value... 23 Name MainPage # Row 24 Set string value... 24 Name MainPage_DE # Row 25 Set string value... 25 Name MainPage_EN # Row 26 Set string value... 26 Name MainPage_JA # Row 27 Set string value... 27 Name MainPage_NL # Row 28 Set string value... 28 Name MainPage_ZH # Row 29 Set string value... 29 Name ToneFeedback_DE # Row 30 Set string value... 30 Name ToneFeedback_EN # Row 31 Set string value... 31 Name ToneFeedback_JA # Row 32 Set string value... 32 Name ToneFeedback_NL # Row 33 Set string value... 33 Name ToneFeedback_ZH endproc # CreateWordlists.praat # # Automatically created code! # Any changes will be lost when this file is regenerated. # Adapt the original Tables instead of this code. # To regenerate the original Tables, run a Praat script # with the following code: # #: include tables2scripts.praat #: call Create #: Write to table file... .Table # # Where is the name of the table. # Move the Table file to the desired location (eg, Data/) # # Tables and this code are licensed under the GNU GPL version 2 # or later. # procCreate20_basic_tone_combinations$ = "20_basic_tone_combinations" procedure Create20_basic_tone_combinations Create Table with column names... 20_basic_tone_combinations 20 ... Pinyin Character Translation Sound # Fill table values # Row 1 Set string value... 1 Pinyin yi1sheng1 Set string value... 1 Character 医生 Set string value... 1 Translation doctor Set string value... 1 Sound - # Row 2 Set string value... 2 Pinyin zhong1guo2 Set string value... 2 Character 中国 Set string value... 2 Translation China Set string value... 2 Sound - # Row 3 Set string value... 3 Pinyin zhong1wu3 Set string value... 3 Character 中午 Set string value... 3 Translation noon Set string value... 3 Sound - # Row 4 Set string value... 4 Pinyin zhi1dao4 Set string value... 4 Character 知道 Set string value... 4 Translation to know Set string value... 4 Sound - # Row 5 Set string value... 5 Pinyin ma1ma Set string value... 5 Character 妈妈 Set string value... 5 Translation mother Set string value... 5 Sound - # Row 6 Set string value... 6 Pinyin xue2sheng1 Set string value... 6 Character 学生 Set string value... 6 Translation student Set string value... 6 Sound - # Row 7 Set string value... 7 Pinyin chang2chang2 Set string value... 7 Character 常常 Set string value... 7 Translation often Set string value... 7 Sound - # Row 8 Set string value... 8 Pinyin peng2you3 Set string value... 8 Character 朋友 Set string value... 8 Translation friend Set string value... 8 Sound - # Row 9 Set string value... 9 Pinyin bu2shi4 Set string value... 9 Character 不是 Set string value... 9 Translation be not Set string value... 9 Sound - # Row 10 Set string value... 10 Pinyin shen2me Set string value... 10 Character 什么 Set string value... 10 Translation what Set string value... 10 Sound - # Row 11 Set string value... 11 Pinyin lao3shi1 Set string value... 11 Character 老师 Set string value... 11 Translation teacher Set string value... 11 Sound - # Row 12 Set string value... 12 Pinyin mei3guo2 Set string value... 12 Character 美国 Set string value... 12 Translation USA Set string value... 12 Sound - # Row 13 Set string value... 13 Pinyin ni3hao3 Set string value... 13 Character 你好 Set string value... 13 Translation hello! Set string value... 13 Sound - # Row 14 Set string value... 14 Pinyin qing3wen4 Set string value... 14 Character 请问 Set string value... 14 Translation May I ask..? Set string value... 14 Sound - # Row 15 Set string value... 15 Pinyin dong3le Set string value... 15 Character 懂了 Set string value... 15 Translation understood Set string value... 15 Sound # Row 16 Set string value... 16 Pinyin da4jia1 Set string value... 16 Character 大家 Set string value... 16 Translation everyone Set string value... 16 Sound # Row 17 Set string value... 17 Pinyin da4xue2 Set string value... 17 Character 大学 Set string value... 17 Translation university Set string value... 17 Sound # Row 18 Set string value... 18 Pinyin tiao4wu3 Set string value... 18 Character 跳舞 Set string value... 18 Translation to dance Set string value... 18 Sound # Row 19 Set string value... 19 Pinyin zai4jian4 Set string value... 19 Character 再见 Set string value... 19 Translation Good bye! Set string value... 19 Sound # Row 20 Set string value... 20 Pinyin xie4xie Set string value... 20 Character 谢谢 Set string value... 20 Translation Thanks! Set string value... 20 Sound endproc procCreateAn_example_wordlist$ = "An_example_wordlist" procedure CreateAn_example_wordlist Create Table with column names... An_example_wordlist 62 ... Pinyin Character Sound Translation # Fill table values # Row 1 Set string value... 1 Pinyin chi1 Set string value... 1 Character 吃 Set string value... 1 Sound - Set string value... 1 Translation to eat # Row 2 Set string value... 2 Pinyin ta1 Set string value... 2 Character 他,她,它 Set string value... 2 Sound - Set string value... 2 Translation he, she, it # Row 3 Set string value... 3 Pinyin jin1tian1 Set string value... 3 Character 今天 Set string value... 3 Sound - Set string value... 3 Translation today # Row 4 Set string value... 4 Pinyin can1ting1 Set string value... 4 Character 餐厅 Set string value... 4 Sound - Set string value... 4 Translation restaurant # Row 5 Set string value... 5 Pinyin huan1ying2 Set string value... 5 Character 欢迎 Set string value... 5 Sound - Set string value... 5 Translation to welcome # Row 6 Set string value... 6 Pinyin zhong1guo2 Set string value... 6 Character 中国 Set string value... 6 Sound - Set string value... 6 Translation China # Row 7 Set string value... 7 Pinyin duo1shao3 Set string value... 7 Character 多少 Set string value... 7 Sound - Set string value... 7 Translation how many # Row 8 Set string value... 8 Pinyin zhi3you3 Set string value... 8 Character 只有 Set string value... 8 Sound - Set string value... 8 Translation only # Row 9 Set string value... 9 Pinyin sheng1ri4 Set string value... 9 Character 生日 Set string value... 9 Sound - Set string value... 9 Translation birthday # Row 10 Set string value... 10 Pinyin gao1xing4 Set string value... 10 Character 高兴 Set string value... 10 Sound - Set string value... 10 Translation happy # Row 11 Set string value... 11 Pinyin ma1ma0 Set string value... 11 Character 妈妈 Set string value... 11 Sound - Set string value... 11 Translation mama # Row 12 Set string value... 12 Pinyin ge1ge0 Set string value... 12 Character 哥哥 Set string value... 12 Sound - Set string value... 12 Translation older brother # Row 13 Set string value... 13 Pinyin ren2 Set string value... 13 Character 人 Set string value... 13 Sound - Set string value... 13 Translation person # Row 14 Set string value... 14 Pinyin qian2 Set string value... 14 Character 前 Set string value... 14 Sound - Set string value... 14 Translation front # Row 15 Set string value... 15 Pinyin shi2jian1 Set string value... 15 Character 时间 Set string value... 15 Sound - Set string value... 15 Translation time # Row 16 Set string value... 16 Pinyin jie2hun1 Set string value... 16 Character 结婚 Set string value... 16 Sound - Set string value... 16 Translation to marry # Row 17 Set string value... 17 Pinyin chang2cheng2 Set string value... 17 Character 长城 Set string value... 17 Sound - Set string value... 17 Translation the Great Wall # Row 18 Set string value... 18 Pinyin xue2xi2 Set string value... 18 Character 学习 Set string value... 18 Sound - Set string value... 18 Translation to study # Row 19 Set string value... 19 Pinyin mei2you3 Set string value... 19 Character 没有 Set string value... 19 Sound - Set string value... 19 Translation haven't # Row 20 Set string value... 20 Pinyin you2yong3 Set string value... 20 Character 游泳 Set string value... 20 Sound - Set string value... 20 Translation to swim # Row 21 Set string value... 21 Pinyin fo2jiao4 Set string value... 21 Character 佛教 Set string value... 21 Sound - Set string value... 21 Translation Buddhism # Row 22 Set string value... 22 Pinyin hai2shi4 Set string value... 22 Character 还是 Set string value... 22 Sound - Set string value... 22 Translation or # Row 23 Set string value... 23 Pinyin shen2me0 Set string value... 23 Character 什么 Set string value... 23 Sound - Set string value... 23 Translation what # Row 24 Set string value... 24 Pinyin peng2you0 Set string value... 24 Character 朋友 Set string value... 24 Sound - Set string value... 24 Translation friend # Row 25 Set string value... 25 Pinyin wo3 Set string value... 25 Character 我 Set string value... 25 Sound - Set string value... 25 Translation I, me # Row 26 Set string value... 26 Pinyin xiang3 Set string value... 26 Character 享 Set string value... 26 Sound - Set string value... 26 Translation to enjoy # Row 27 Set string value... 27 Pinyin xiang3 Set string value... 27 Character 想 Set string value... 27 Sound - Set string value... 27 Translation to think # Row 28 Set string value... 28 Pinyin xi3huan0 Set string value... 28 Character 喜欢 Set string value... 28 Sound - Set string value... 28 Translation to like # Row 29 Set string value... 29 Pinyin yi3jing1 Set string value... 29 Character 已经 Set string value... 29 Sound - Set string value... 29 Translation already # Row 30 Set string value... 30 Pinyin lv3xing2 Set string value... 30 Character 旅行 Set string value... 30 Sound - Set string value... 30 Translation to travel # Row 31 Set string value... 31 Pinyin qi3chuang2 Set string value... 31 Character 起床 Set string value... 31 Sound - Set string value... 31 Translation to get up # Row 32 Set string value... 32 Pinyin ni3hao3 Set string value... 32 Character 你好 Set string value... 32 Sound - Set string value... 32 Translation hello # Row 33 Set string value... 33 Pinyin mei3li4 Set string value... 33 Character 美丽 Set string value... 33 Sound - Set string value... 33 Translation beautiful # Row 34 Set string value... 34 Pinyin nv3shi4 Set string value... 34 Character 女士 Set string value... 34 Sound - Set string value... 34 Translation lady # Row 35 Set string value... 35 Pinyin xiao3jie3 Set string value... 35 Character 小姐 Set string value... 35 Sound - Set string value... 35 Translation miss # Row 36 Set string value... 36 Pinyin na3li3 Set string value... 36 Character 哪里 Set string value... 36 Sound - Set string value... 36 Translation where # Row 37 Set string value... 37 Pinyin yi1 Set string value... 37 Character 一 Set string value... 37 Sound - Set string value... 37 Translation one # Row 38 Set string value... 38 Pinyin er4 Set string value... 38 Character 二 Set string value... 38 Sound - Set string value... 38 Translation two # Row 39 Set string value... 39 Pinyin san1 Set string value... 39 Character 三 Set string value... 39 Sound - Set string value... 39 Translation three # Row 40 Set string value... 40 Pinyin si4 Set string value... 40 Character 四 Set string value... 40 Sound - Set string value... 40 Translation four # Row 41 Set string value... 41 Pinyin wu3 Set string value... 41 Character 五 Set string value... 41 Sound - Set string value... 41 Translation five # Row 42 Set string value... 42 Pinyin liu4 Set string value... 42 Character 六 Set string value... 42 Sound - Set string value... 42 Translation six # Row 43 Set string value... 43 Pinyin qi1 Set string value... 43 Character 七 Set string value... 43 Sound - Set string value... 43 Translation seven # Row 44 Set string value... 44 Pinyin ba1 Set string value... 44 Character 八 Set string value... 44 Sound - Set string value... 44 Translation eight # Row 45 Set string value... 45 Pinyin jiu3 Set string value... 45 Character 九 Set string value... 45 Sound - Set string value... 45 Translation nine # Row 46 Set string value... 46 Pinyin shi2 Set string value... 46 Character 十 Set string value... 46 Sound - Set string value... 46 Translation ten # Row 47 Set string value... 47 Pinyin bai3 Set string value... 47 Character 百 Set string value... 47 Sound - Set string value... 47 Translation hundred # Row 48 Set string value... 48 Pinyin qian1 Set string value... 48 Character 千 Set string value... 48 Sound - Set string value... 48 Translation thousand # Row 49 Set string value... 49 Pinyin shi4 Set string value... 49 Character 是 Set string value... 49 Sound - Set string value... 49 Translation is # Row 50 Set string value... 50 Pinyin tui4xiu1 Set string value... 50 Character 退休 Set string value... 50 Sound - Set string value... 50 Translation retirement # Row 51 Set string value... 51 Pinyin hou4tian1 Set string value... 51 Character 后天 Set string value... 51 Sound - Set string value... 51 Translation day after tomorrow # Row 52 Set string value... 52 Pinyin shang4xue2 Set string value... 52 Character 上学 Set string value... 52 Sound - Set string value... 52 Translation to attend school # Row 53 Set string value... 53 Pinyin ji4jie2 Set string value... 53 Character 季节 Set string value... 53 Sound - Set string value... 53 Translation season # Row 54 Set string value... 54 Pinyin zi4ji3 Set string value... 54 Character 自己 Set string value... 54 Sound - Set string value... 54 Translation self # Row 55 Set string value... 55 Pinyin xia4wu3 Set string value... 55 Character 下午 Set string value... 55 Sound - Set string value... 55 Translation afternoon # Row 56 Set string value... 56 Pinyin dian4hua4 Set string value... 56 Character 电话 Set string value... 56 Sound - Set string value... 56 Translation telephone # Row 57 Set string value... 57 Pinyin zai4jian4 Set string value... 57 Character 再见 Set string value... 57 Sound - Set string value... 57 Translation goodbye # Row 58 Set string value... 58 Pinyin xie4xie0 Set string value... 58 Character 谢谢 Set string value... 58 Sound - Set string value... 58 Translation thanks # Row 59 Set string value... 59 Pinyin mei4mei0 Set string value... 59 Character 妹妹 Set string value... 59 Sound - Set string value... 59 Translation younger sister # Row 60 Set string value... 60 Pinyin re4ma0 Set string value... 60 Character 热吗 Set string value... 60 Sound - Set string value... 60 Translation is it hot? (吗: yes/no question particle) # Row 61 Set string value... 61 Pinyin ni3ne0 Set string value... 61 Character 你呢 Set string value... 61 Sound - Set string value... 61 Translation how about you? (呢: question particle) # Row 62 Set string value... 62 Pinyin re4 Set string value... 62 Character 热 Set string value... 62 Sound - Set string value... 62 Translation hot endproc procCreateChinees_een_Makkie_chapters_1___2$ = "Chinees_een_Makkie_chapters_1_+_2" procedure CreateChinees_een_Makkie_chapters_1___2 Create Table with column names... Chinees_een_Makkie_chapters_1_+_2 26 ... Pinyin Character Translation Sound # Fill table values # Row 1 Set string value... 1 Pinyin ni3hao3 Set string value... 1 Character 你好 Set string value... 1 Translation hello, how are you Set string value... 1 Sound - # Row 2 Set string value... 2 Pinyin ni3 Set string value... 2 Character 你 Set string value... 2 Translation you (singular) Set string value... 2 Sound - # Row 3 Set string value... 3 Pinyin hao3 Set string value... 3 Character 好 Set string value... 3 Translation good, fine Set string value... 3 Sound - # Row 4 Set string value... 4 Pinyin wo3 Set string value... 4 Character 我 Set string value... 4 Translation I, me, my Set string value... 4 Sound - # Row 5 Set string value... 5 Pinyin jiao4 Set string value... 5 Character 叫 Set string value... 5 Translation to be called, to shout Set string value... 5 Sound - # Row 6 Set string value... 6 Pinyin shi4 Set string value... 6 Character 是 Set string value... 6 Translation is, to be Set string value... 6 Sound - # Row 7 Set string value... 7 Pinyin he2lan2 Set string value... 7 Character 荷兰 Set string value... 7 Translation Holland, the Netherlands Set string value... 7 Sound - # Row 8 Set string value... 8 Pinyin ren2 Set string value... 8 Character 人 Set string value... 8 Translation man, person, people Set string value... 8 Sound - # Row 9 Set string value... 9 Pinyin hen3 Set string value... 9 Character 很 Set string value... 9 Translation very, quite Set string value... 9 Sound - # Row 10 Set string value... 10 Pinyin re4ma0 Set string value... 10 Character 热吗 Set string value... 10 Translation is it hot? (吗: yes/no question particle) Set string value... 10 Sound - # Row 11 Set string value... 11 Pinyin ye3 Set string value... 11 Character 也 Set string value... 11 Translation also, too Set string value... 11 Sound - # Row 12 Set string value... 12 Pinyin xie4xie0 Set string value... 12 Character 谢谢 Set string value... 12 Translation thank you Set string value... 12 Sound - # Row 13 Set string value... 13 Pinyin zai4jian4 Set string value... 13 Character 再见 Set string value... 13 Translation goodbye Set string value... 13 Sound - # Row 14 Set string value... 14 Pinyin ni3ne0 Set string value... 14 Character 你呢 Set string value... 14 Translation how about you? (呢: particle indicating a question) Set string value... 14 Sound - # Row 15 Set string value... 15 Pinyin zhong1guo2 Set string value... 15 Character 中国 Set string value... 15 Translation China Set string value... 15 Sound - # Row 16 Set string value... 16 Pinyin de2guo2 Set string value... 16 Character 德国 Set string value... 16 Translation Germany Set string value... 16 Sound - # Row 17 Set string value... 17 Pinyin fa3guo2 Set string value... 17 Character 法国 Set string value... 17 Translation France Set string value... 17 Sound - # Row 18 Set string value... 18 Pinyin ming2tian1 Set string value... 18 Character 明天 Set string value... 18 Translation tomorrow Set string value... 18 Sound - # Row 19 Set string value... 19 Pinyin xia4wu3 Set string value... 19 Character 下午 Set string value... 19 Translation afternoon Set string value... 19 Sound - # Row 20 Set string value... 20 Pinyin wan3an1 Set string value... 20 Character 晚安 Set string value... 20 Translation good evening, good night Set string value... 20 Sound - # Row 21 Set string value... 21 Pinyin jian4 Set string value... 21 Character 见 Set string value... 21 Translation to see, to meet Set string value... 21 Sound - # Row 22 Set string value... 22 Pinyin shen2me0 Set string value... 22 Character 什么 Set string value... 22 Translation what, who? Set string value... 22 Sound - # Row 23 Set string value... 23 Pinyin zhu4 Set string value... 23 Character 住 Set string value... 23 Translation to live, to stay Set string value... 23 Sound - # Row 24 Set string value... 24 Pinyin zai4 Set string value... 24 Character 在 Set string value... 24 Translation at, in Set string value... 24 Sound - # Row 25 Set string value... 25 Pinyin nar3 Set string value... 25 Character 哪儿 Set string value... 25 Translation where? Set string value... 25 Sound - # Row 26 Set string value... 26 Pinyin re4 Set string value... 26 Character 热 Set string value... 26 Translation hot Set string value... 26 Sound - endproc procCreateChinese_for_Today_chapters_1___2$ = "Chinese_for_Today_chapters_1_+_2" procedure CreateChinese_for_Today_chapters_1___2 Create Table with column names... Chinese_for_Today_chapters_1_+_2 52 ... Pinyin Character Translation Sound # Fill table values # Row 1 Set string value... 1 Pinyin huan1ying2 Set string value... 1 Character 欢迎 Set string value... 1 Translation to welcome, welcome Set string value... 1 Sound - # Row 2 Set string value... 2 Pinyin nin2 Set string value... 2 Character 您 Set string value... 2 Translation you (courteous) Set string value... 2 Sound - # Row 3 Set string value... 3 Pinyin hao3 Set string value... 3 Character 好 Set string value... 3 Translation good, fine Set string value... 3 Sound - # Row 4 Set string value... 4 Pinyin nin2hao3 Set string value... 4 Character 您好 Set string value... 4 Translation hello (polite) Set string value... 4 Sound - # Row 5 Set string value... 5 Pinyin hua2qiao2 Set string value... 5 Character 华侨 Set string value... 5 Translation overseas Chinese (emigrant) Set string value... 5 Sound - # Row 6 Set string value... 6 Pinyin ni3 Set string value... 6 Character 你 Set string value... 6 Translation you Set string value... 6 Sound - # Row 7 Set string value... 7 Pinyin qing3wen4 Set string value... 7 Character 请问 Set string value... 7 Translation excuse me, may I ask...? Set string value... 7 Sound - # Row 8 Set string value... 8 Pinyin shi4 Set string value... 8 Character 是 Set string value... 8 Translation is, to be Set string value... 8 Sound - # Row 9 Set string value... 9 Pinyin xian1sheng0 Set string value... 9 Character 先生 Set string value... 9 Translation mister (mr.) Set string value... 9 Sound - # Row 10 Set string value... 10 Pinyin re4 Set string value... 10 Character 热 Set string value... 10 Translation hot Set string value... 10 Sound - # Row 11 Set string value... 11 Pinyin re4ma0 Set string value... 11 Character 热吗 Set string value... 11 Translation is it hot? (吗: yes/no question particle) Set string value... 11 Sound - # Row 12 Set string value... 12 Pinyin wo3 Set string value... 12 Character 我 Set string value... 12 Translation I, me Set string value... 12 Sound - # Row 13 Set string value... 13 Pinyin bu4 Set string value... 13 Character 不 Set string value... 13 Translation not, no Set string value... 13 Sound - # Row 14 Set string value... 14 Pinyin mei2 Set string value... 14 Character 没 Set string value... 14 Translation have not, not (prefix for verbs) Set string value... 14 Sound - # Row 15 Set string value... 15 Pinyin guan1xi0 Set string value... 15 Character 关系 Set string value... 15 Translation relation, to concern Set string value... 15 Sound - # Row 16 Set string value... 16 Pinyin zai4jian4 Set string value... 16 Character 再见 Set string value... 16 Translation goodbye Set string value... 16 Sound - # Row 17 Set string value... 17 Pinyin dui4 Set string value... 17 Character 对 Set string value... 17 Translation right, correct Set string value... 17 Sound - # Row 18 Set string value... 18 Pinyin ni3de0 Set string value... 18 Character 你的 Set string value... 18 Translation your (的: possessive particle) Set string value... 18 Sound - # Row 19 Set string value... 19 Pinyin jiao4 Set string value... 19 Character 叫 Set string value... 19 Translation to shout, to be called Set string value... 19 Sound - # Row 20 Set string value... 20 Pinyin xie4xie0 Set string value... 20 Character 谢谢 Set string value... 20 Translation thanks Set string value... 20 Sound - # Row 21 Set string value... 21 Pinyin xiao3jie3 Set string value... 21 Character 小姐 Set string value... 21 Translation miss Set string value... 21 Sound - # Row 22 Set string value... 22 Pinyin lv3you2 Set string value... 22 Character 旅游 Set string value... 22 Translation trip, journey, travel Set string value... 22 Sound - # Row 23 Set string value... 23 Pinyin na4me0 Set string value... 23 Character 那么 Set string value... 23 Translation like that, so Set string value... 23 Sound - # Row 24 Set string value... 24 Pinyin yi2ding4 Set string value... 24 Character 一定 Set string value... 24 Translation surely, certainly Set string value... 24 Sound - # Row 25 Set string value... 25 Pinyin jie4shao4 Set string value... 25 Character 介绍 Set string value... 25 Translation to introduce, to present Set string value... 25 Sound - # Row 26 Set string value... 26 Pinyin qing3 Set string value... 26 Character 请 Set string value... 26 Translation to ask, to invite Set string value... 26 Sound - # Row 27 Set string value... 27 Pinyin jin4 Set string value... 27 Character 进 Set string value... 27 Translation to enter, to advance Set string value... 27 Sound - # Row 28 Set string value... 28 Pinyin qing3jin4 Set string value... 28 Character 请进 Set string value... 28 Translation please come in Set string value... 28 Sound - # Row 29 Set string value... 29 Pinyin a4 Set string value... 29 Character 啊 Set string value... 29 Translation uhm, Ah OK Set string value... 29 Sound - # Row 30 Set string value... 30 Pinyin lao3 Set string value... 30 Character 老 Set string value... 30 Translation old, venerable (of people) Set string value... 30 Sound - # Row 31 Set string value... 31 Pinyin zuo4 Set string value... 31 Character 坐 Set string value... 31 Translation to sit, to take a seat (also a bus, airplane etc) Set string value... 31 Sound - # Row 32 Set string value... 32 Pinyin chou1yan1 Set string value... 32 Character 抽烟 Set string value... 32 Translation to smoke (tobacco) Set string value... 32 Sound - # Row 33 Set string value... 33 Pinyin hui4 Set string value... 33 Character 会 Set string value... 33 Translation can, to be possible Set string value... 33 Sound - # Row 34 Set string value... 34 Pinyin lai2 Set string value... 34 Character 来 Set string value... 34 Translation to come, to arrive Set string value... 34 Sound - # Row 35 Set string value... 35 Pinyin yi2xia4 Set string value... 35 Character 一下 Set string value... 35 Translation give it a go, one time Set string value... 35 Sound - # Row 36 Set string value... 36 Pinyin zhe4 Set string value... 36 Character 这 Set string value... 36 Translation this Set string value... 36 Sound - # Row 37 Set string value... 37 Pinyin tai4tai0 Set string value... 37 Character 太太 Set string value... 37 Translation mrs., madam, wife Set string value... 37 Sound - # Row 38 Set string value... 38 Pinyin bo2bo0 Set string value... 38 Character 伯伯 Set string value... 38 Translation father's elder brother, uncle Set string value... 38 Sound - # Row 39 Set string value... 39 Pinyin nv3er2 Set string value... 39 Character 女儿 Set string value... 39 Translation daughter Set string value... 39 Sound - # Row 40 Set string value... 40 Pinyin na4 Set string value... 40 Character 那 Set string value... 40 Translation that, those Set string value... 40 Sound - # Row 41 Set string value... 41 Pinyin er2zi0 Set string value... 41 Character 儿子 Set string value... 41 Translation son Set string value... 41 Sound - # Row 42 Set string value... 42 Pinyin ni3men0 Set string value... 42 Character 你们 Set string value... 42 Translation you (plural, 们: plural marker) Set string value... 42 Sound - # Row 43 Set string value... 43 Pinyin he1 Set string value... 43 Character 喝 Set string value... 43 Translation to drink Set string value... 43 Sound - # Row 44 Set string value... 44 Pinyin cha2 Set string value... 44 Character 茶 Set string value... 44 Translation tea Set string value... 44 Sound - # Row 45 Set string value... 45 Pinyin ye2ye0 Set string value... 45 Character 爷爷 Set string value... 45 Translation grandfather (father's father) Set string value... 45 Sound - # Row 46 Set string value... 46 Pinyin nai3nai0 Set string value... 46 Character 奶奶 Set string value... 46 Translation grandma (father's mother) Set string value... 46 Sound - # Row 47 Set string value... 47 Pinyin shu1shu0 Set string value... 47 Character 叔叔 Set string value... 47 Translation uncle (father's younger brother) Set string value... 47 Sound - # Row 48 Set string value... 48 Pinyin pi2jiu3 Set string value... 48 Character 啤酒 Set string value... 48 Translation beer Set string value... 48 Sound - # Row 49 Set string value... 49 Pinyin ka1fei1 Set string value... 49 Character 咖啡 Set string value... 49 Translation coffee Set string value... 49 Sound - # Row 50 Set string value... 50 Pinyin a2 Set string value... 50 Character 啊 Set string value... 50 Translation eh? what? (interjection) Set string value... 50 Sound - # Row 51 Set string value... 51 Pinyin hao3a0 Set string value... 51 Character 好啊 Set string value... 51 Translation Good! (啊: affirmative, approval, consent) Set string value... 51 Sound - # Row 52 Set string value... 52 Pinyin ha1 Set string value... 52 Character 哈 Set string value... 52 Translation laughter, yawn Set string value... 52 Sound - endproc procCreateColloquial_Chinese_chapters_1___2$ = "Colloquial_Chinese_chapters_1_+_2" procedure CreateColloquial_Chinese_chapters_1___2 Create Table with column names... Colloquial_Chinese_chapters_1_+_2 75 ... Pinyin Character Translation Sound # Fill table values # Row 1 Set string value... 1 Pinyin chu1 Set string value... 1 Character 出 Set string value... 1 Translation to go out Set string value... 1 Sound - # Row 2 Set string value... 2 Pinyin ci4 Set string value... 2 Character 次 Set string value... 2 Translation secondary, next (classifier) Set string value... 2 Sound - # Row 3 Set string value... 3 Pinyin jian4mian4 Set string value... 3 Character 见面 Set string value... 3 Translation to meet Set string value... 3 Sound - # Row 4 Set string value... 4 Pinyin ni3 Set string value... 4 Character 你 Set string value... 4 Translation you Set string value... 4 Sound - # Row 5 Set string value... 5 Pinyin shi4 Set string value... 5 Character 是 Set string value... 5 Translation is, to be Set string value... 5 Sound - # Row 6 Set string value... 6 Pinyin xian1sheng0 Set string value... 6 Character 先生 Set string value... 6 Translation mister (mr.) Set string value... 6 Sound - # Row 7 Set string value... 7 Pinyin re4ma0 Set string value... 7 Character 热吗 Set string value... 7 Translation is it hot? (吗: yes/no question particle) Set string value... 7 Sound - # Row 8 Set string value... 8 Pinyin shi4de0 Set string value... 8 Character 是的 Set string value... 8 Translation yes, that's right Set string value... 8 Sound - # Row 9 Set string value... 9 Pinyin wo3 Set string value... 9 Character 我 Set string value... 9 Translation I, me, my Set string value... 9 Sound - # Row 10 Set string value... 10 Pinyin hao3 Set string value... 10 Character 好 Set string value... 10 Translation good, fine Set string value... 10 Sound - # Row 11 Set string value... 11 Pinyin ni3hao3 Set string value... 11 Character 你好 Set string value... 11 Translation hello, how are you Set string value... 11 Sound - # Row 12 Set string value... 12 Pinyin hen3 Set string value... 12 Character 很 Set string value... 12 Translation very, quite Set string value... 12 Sound - # Row 13 Set string value... 13 Pinyin gao1xing4 Set string value... 13 Character 高兴 Set string value... 13 Translation happy Set string value... 13 Sound - # Row 14 Set string value... 14 Pinyin jian4dao4 Set string value... 14 Character 见到 Set string value... 14 Translation to see Set string value... 14 Sound - # Row 15 Set string value... 15 Pinyin ye3 Set string value... 15 Character 也 Set string value... 15 Translation also, too Set string value... 15 Sound - # Row 16 Set string value... 16 Pinyin jiao4 Set string value... 16 Character 叫 Set string value... 16 Translation to be called, to shout Set string value... 16 Sound - # Row 17 Set string value... 17 Pinyin lao3 Set string value... 17 Character 老 Set string value... 17 Translation old, venerable (of people) Set string value... 17 Sound - # Row 18 Set string value... 18 Pinyin dui4ba0 Set string value... 18 Character 对吧 Set string value... 18 Translation isn't it? (吧: modal particle) Set string value... 18 Sound - # Row 19 Set string value... 19 Pinyin hao3de0 Set string value... 19 Character 好的 Set string value... 19 Translation Ok Set string value... 19 Sound - # Row 20 Set string value... 20 Pinyin qing3 Set string value... 20 Character 请 Set string value... 20 Translation to ask, to invite Set string value... 20 Sound - # Row 21 Set string value... 21 Pinyin huan1ying2 Set string value... 21 Character 欢迎 Set string value... 21 Translation to welcome, welcome Set string value... 21 Sound - # Row 22 Set string value... 22 Pinyin lai2 Set string value... 22 Character 来 Set string value... 22 Translation to come, to arrive Set string value... 22 Sound - # Row 23 Set string value... 23 Pinyin zhong1guo2 Set string value... 23 Character 中国 Set string value... 23 Translation China Set string value... 23 Sound - # Row 24 Set string value... 24 Pinyin ni3de0 Set string value... 24 Character 你的 Set string value... 24 Translation your (的: possessive particle) Set string value... 24 Sound - # Row 25 Set string value... 25 Pinyin yi1lu4 Set string value... 25 Character 一路 Set string value... 25 Translation all the way Set string value... 25 Sound - # Row 26 Set string value... 26 Pinyin shun4li4 Set string value... 26 Character 顺利 Set string value... 26 Translation smoothly Set string value... 26 Sound - # Row 27 Set string value... 27 Pinyin xie4xie0 Set string value... 27 Character 谢谢 Set string value... 27 Translation thank you Set string value... 27 Sound - # Row 28 Set string value... 28 Pinyin lei4 Set string value... 28 Character 类 Set string value... 28 Translation kind, type, class Set string value... 28 Sound - # Row 29 Set string value... 29 Pinyin you3 Set string value... 29 Character 有 Set string value... 29 Translation to have, there is Set string value... 29 Sound - # Row 30 Set string value... 30 Pinyin yi1dian3 Set string value... 30 Character 一点 Set string value... 30 Translation a bit, a little Set string value... 30 Sound - # Row 31 Set string value... 31 Pinyin xiang3 Set string value... 31 Character 享 Set string value... 31 Translation to enjoy Set string value... 31 Sound - # Row 32 Set string value... 32 Pinyin he1 Set string value... 32 Character 喝 Set string value... 32 Translation to drink Set string value... 32 Sound - # Row 33 Set string value... 33 Pinyin yi1 Set string value... 33 Character 一 Set string value... 33 Translation one Set string value... 33 Sound - # Row 34 Set string value... 34 Pinyin yi1bei1 Set string value... 34 Character 一杯 Set string value... 34 Translation cup Set string value... 34 Sound - # Row 35 Set string value... 35 Pinyin ka1fei1 Set string value... 35 Character 咖啡 Set string value... 35 Translation coffee Set string value... 35 Sound - # Row 36 Set string value... 36 Pinyin tai4 Set string value... 36 Character 太 Set string value... 36 Translation too, very, highest, greatest Set string value... 36 Sound - # Row 37 Set string value... 37 Pinyin chi1 Set string value... 37 Character 吃 Set string value... 37 Translation to eat Set string value... 37 Sound - # Row 38 Set string value... 38 Pinyin chi1le0 Set string value... 38 Character 吃了 Set string value... 38 Translation ate (了: completed action marker) Set string value... 38 Sound - # Row 39 Set string value... 39 Pinyin zhe4 Set string value... 39 Character 这 Set string value... 39 Translation this Set string value... 39 Sound - # Row 40 Set string value... 40 Pinyin bu4 Set string value... 40 Character 不 Set string value... 40 Translation not, no Set string value... 40 Sound - # Row 41 Set string value... 41 Pinyin ke4qi0 Set string value... 41 Character 客气 Set string value... 41 Translation polite, courteous Set string value... 41 Sound - # Row 42 Set string value... 42 Pinyin xing4ming2 Set string value... 42 Character 姓名 Set string value... 42 Translation name and surname Set string value... 42 Sound - # Row 43 Set string value... 43 Pinyin guo2ji2 Set string value... 43 Character 国籍 Set string value... 43 Translation nationality Set string value... 43 Sound - # Row 44 Set string value... 44 Pinyin he2 Set string value... 44 Character 和 Set string value... 44 Translation and, with Set string value... 44 Sound - # Row 45 Set string value... 45 Pinyin nian2ling2 Set string value... 45 Character 年龄 Set string value... 45 Translation (a person's) age Set string value... 45 Sound - # Row 46 Set string value... 46 Pinyin hui4 Set string value... 46 Character 会 Set string value... 46 Translation can, to be possible Set string value... 46 Sound - # Row 47 Set string value... 47 Pinyin shuo1 Set string value... 47 Character 说 Set string value... 47 Translation to speak, to say Set string value... 47 Sound - # Row 48 Set string value... 48 Pinyin zhong1wen2 Set string value... 48 Character 中文 Set string value... 48 Translation Chinese (written language) Set string value... 48 Sound - # Row 49 Set string value... 49 Pinyin xiao3 Set string value... 49 Character 小 Set string value... 49 Translation small, tiny, few Set string value... 49 Sound - # Row 50 Set string value... 50 Pinyin shen2me0 Set string value... 50 Character 什么 Set string value... 50 Translation what, who? Set string value... 50 Sound - # Row 51 Set string value... 51 Pinyin ying1guo2 Set string value... 51 Character 英国 Set string value... 51 Translation England (UK) Set string value... 51 Sound - # Row 52 Set string value... 52 Pinyin ren2 Set string value... 52 Character 人 Set string value... 52 Translation man, person, people Set string value... 52 Sound - # Row 53 Set string value... 53 Pinyin na3 Set string value... 53 Character 哪 Set string value... 53 Translation how, which Set string value... 53 Sound - # Row 54 Set string value... 54 Pinyin guo2 Set string value... 54 Character 国 Set string value... 54 Translation country Set string value... 54 Sound - # Row 55 Set string value... 55 Pinyin cai1 Set string value... 55 Character 猜 Set string value... 55 Translation to guess Set string value... 55 Sound - # Row 56 Set string value... 56 Pinyin zhi1dao4 Set string value... 56 Character 知道 Set string value... 56 Translation to know Set string value... 56 Sound - # Row 57 Set string value... 57 Pinyin mei3guo2 Set string value... 57 Character 美国 Set string value... 57 Translation USA Set string value... 57 Sound - # Row 58 Set string value... 58 Pinyin na3li3 Set string value... 58 Character 哪里 Set string value... 58 Translation where Set string value... 58 Sound - # Row 59 Set string value... 59 Pinyin Bei3jing1 Set string value... 59 Character 北京 Set string value... 59 Translation Beijing Set string value... 59 Sound - # Row 60 Set string value... 60 Pinyin jin1nian2 Set string value... 60 Character 今年 Set string value... 60 Translation this year Set string value... 60 Sound - # Row 61 Set string value... 61 Pinyin duo1 Set string value... 61 Character 多 Set string value... 61 Translation many, much Set string value... 61 Sound - # Row 62 Set string value... 62 Pinyin da4 Set string value... 62 Character 大 Set string value... 62 Translation big Set string value... 62 Sound - # Row 63 Set string value... 63 Pinyin sui4 Set string value... 63 Character 岁 Set string value... 63 Translation years of age (classifier) Set string value... 63 Sound - # Row 64 Set string value... 64 Pinyin zhen1de0 Set string value... 64 Character 真的 Set string value... 64 Translation really Set string value... 64 Sound - # Row 65 Set string value... 65 Pinyin zhi3you3 Set string value... 65 Character 只有 Set string value... 65 Translation only Set string value... 65 Sound - # Row 66 Set string value... 66 Pinyin zuo3you4 Set string value... 66 Character 左右 Set string value... 66 Translation left and right, nearby Set string value... 66 Sound - # Row 67 Set string value... 67 Pinyin guo4jiang3 Set string value... 67 Character 过奖 Set string value... 67 Translation flatter Set string value... 67 Sound - # Row 68 Set string value... 68 Pinyin zhen1 Set string value... 68 Character 真 Set string value... 68 Translation really Set string value... 68 Sound - # Row 69 Set string value... 69 Pinyin nian2qing1 Set string value... 69 Character 年轻 Set string value... 69 Translation young Set string value... 69 Sound - # Row 70 Set string value... 70 Pinyin zhe4me0 Set string value... 70 Character 这么 Set string value... 70 Translation so much, how much? Set string value... 70 Sound - # Row 71 Set string value... 71 Pinyin ying1gai1 Set string value... 71 Character 应该 Set string value... 71 Translation ought to, should Set string value... 71 Sound - # Row 72 Set string value... 72 Pinyin dui4 Set string value... 72 Character 对 Set string value... 72 Translation right, correct Set string value... 72 Sound - # Row 73 Set string value... 73 Pinyin ren4shi0 Set string value... 73 Character 认识 Set string value... 73 Translation to know, to recognize Set string value... 73 Sound - # Row 74 Set string value... 74 Pinyin zai4jian4 Set string value... 74 Character 再见 Set string value... 74 Translation goodbye Set string value... 74 Sound - # Row 75 Set string value... 75 Pinyin re4 Set string value... 75 Character 热 Set string value... 75 Translation hot Set string value... 75 Sound - endproc procCreateContemporary_Chinese_chapters_1___2$ = "Contemporary_Chinese_chapters_1_+_2" procedure CreateContemporary_Chinese_chapters_1___2 Create Table with column names... Contemporary_Chinese_chapters_1_+_2 30 ... Pinyin Character Translation Sound # Fill table values # Row 1 Set string value... 1 Pinyin ming2zi4 Set string value... 1 Character 名字 Set string value... 1 Translation name (of a person or thing) Set string value... 1 Sound - # Row 2 Set string value... 2 Pinyin guo2 Set string value... 2 Character 国 Set string value... 2 Translation country Set string value... 2 Sound - # Row 3 Set string value... 3 Pinyin dou1 Set string value... 3 Character 都 Set string value... 3 Translation all Set string value... 3 Sound - # Row 4 Set string value... 4 Pinyin shuo1 Set string value... 4 Character 说 Set string value... 4 Translation to speak, to say Set string value... 4 Sound - # Row 5 Set string value... 5 Pinyin han4yu3 Set string value... 5 Character 汉语 Set string value... 5 Translation Chinese language Set string value... 5 Sound - # Row 6 Set string value... 6 Pinyin zhong1guo2 Set string value... 6 Character 中国 Set string value... 6 Translation China Set string value... 6 Sound - # Row 7 Set string value... 7 Pinyin na3 Set string value... 7 Character 哪 Set string value... 7 Translation how, which Set string value... 7 Sound - # Row 8 Set string value... 8 Pinyin lao3shi1 Set string value... 8 Character 老师 Set string value... 8 Translation teacher Set string value... 8 Sound - # Row 9 Set string value... 9 Pinyin ying1yu3 Set string value... 9 Character 英语 Set string value... 9 Translation English (language) Set string value... 9 Sound - # Row 10 Set string value... 10 Pinyin fa3yu3 Set string value... 10 Character 法语 Set string value... 10 Translation French (language) Set string value... 10 Sound - # Row 11 Set string value... 11 Pinyin hai2shi4 Set string value... 11 Character 还是 Set string value... 11 Translation or, still, nevertheless Set string value... 11 Sound - # Row 12 Set string value... 12 Pinyin xing4 Set string value... 12 Character 兴 Set string value... 12 Translation interest in something Set string value... 12 Sound - # Row 13 Set string value... 13 Pinyin tong2xue2 Set string value... 13 Character 同学 Set string value... 13 Translation classmate Set string value... 13 Sound - # Row 14 Set string value... 14 Pinyin zhi3 Set string value... 14 Character 只 Set string value... 14 Translation only, but Set string value... 14 Sound - # Row 15 Set string value... 15 Pinyin yi1dian3 Set string value... 15 Character 一点 Set string value... 15 Translation a bit, a little Set string value... 15 Sound - # Row 16 Set string value... 16 Pinyin peng2you0 Set string value... 16 Character 朋友 Set string value... 16 Translation friend Set string value... 16 Sound - # Row 17 Set string value... 17 Pinyin qing3 Set string value... 17 Character 请 Set string value... 17 Translation to ask, to invite Set string value... 17 Sound - # Row 18 Set string value... 18 Pinyin xue2xi2 Set string value... 18 Character 学习 Set string value... 18 Translation to learn, to study Set string value... 18 Sound - # Row 19 Set string value... 19 Pinyin zai4 Set string value... 19 Character 在 Set string value... 19 Translation at, in Set string value... 19 Sound - # Row 20 Set string value... 20 Pinyin dian4hua4 Set string value... 20 Character 电话 Set string value... 20 Translation telephone Set string value... 20 Sound - # Row 21 Set string value... 21 Pinyin dian4zi3 Set string value... 21 Character 电子 Set string value... 21 Translation electronic, electron Set string value... 21 Sound - # Row 22 Set string value... 22 Pinyin you2jian4 Set string value... 22 Character 邮件 Set string value... 22 Translation mail, post Set string value... 22 Sound - # Row 23 Set string value... 23 Pinyin zen3me0 Set string value... 23 Character 怎么 Set string value... 23 Translation how? what? Set string value... 23 Sound - # Row 24 Set string value... 24 Pinyin da4xue2 Set string value... 24 Character 大学 Set string value... 24 Translation university Set string value... 24 Sound - # Row 25 Set string value... 25 Pinyin ke3yi3 Set string value... 25 Character 可以 Set string value... 25 Translation can, may, possible Set string value... 25 Sound - # Row 26 Set string value... 26 Pinyin dong1fang1 Set string value... 26 Character 东方 Set string value... 26 Translation east Set string value... 26 Sound - # Row 27 Set string value... 27 Pinyin xue2yuan4 Set string value... 27 Character 学院 Set string value... 27 Translation college, school Set string value... 27 Sound - # Row 28 Set string value... 28 Pinyin zhe4 Set string value... 28 Character 这 Set string value... 28 Translation this Set string value... 28 Sound - # Row 29 Set string value... 29 Pinyin gong1zuo4 Set string value... 29 Character 工作 Set string value... 29 Translation to work Set string value... 29 Sound - # Row 30 Set string value... 30 Pinyin xi3huan1 Set string value... 30 Character 喜欢 Set string value... 30 Translation to like, to be fond of Set string value... 30 Sound - endproc procCreateElementary_Chinese$ = "Elementary_Chinese" procedure CreateElementary_Chinese Create Table with column names... Elementary_Chinese 129 ... Pinyin Translation Character Lesson Sound # Fill table values # Row 1 Set string value... 1 Pinyin bao4 Set string value... 1 Translation newspaper Set string value... 1 Character 报 Set string value... 1 Lesson 3 Set string value... 1 Sound - # Row 2 Set string value... 2 Pinyin da4 Set string value... 2 Translation big Set string value... 2 Character 大 Set string value... 2 Lesson 3 Set string value... 2 Sound - # Row 3 Set string value... 3 Pinyin duo1 Set string value... 3 Translation many, much Set string value... 3 Character 多 Set string value... 3 Lesson 3 Set string value... 3 Sound - # Row 4 Set string value... 4 Pinyin guo2 Set string value... 4 Translation country Set string value... 4 Character 国 Set string value... 4 Lesson 3 Set string value... 4 Sound - # Row 5 Set string value... 5 Pinyin mai3 Set string value... 5 Translation to buy Set string value... 5 Character 卖 Set string value... 5 Lesson 3 Set string value... 5 Sound - # Row 6 Set string value... 6 Pinyin ni3 Set string value... 6 Translation you Set string value... 6 Character 你 Set string value... 6 Lesson 3 Set string value... 6 Sound - # Row 7 Set string value... 7 Pinyin shi2 Set string value... 7 Translation 10 Set string value... 7 Character 十 Set string value... 7 Lesson 3 Set string value... 7 Sound - # Row 8 Set string value... 8 Pinyin ta1 Set string value... 8 Translation he, him Set string value... 8 Character 他 Set string value... 8 Lesson 3 Set string value... 8 Sound - # Row 9 Set string value... 9 Pinyin wo3 Set string value... 9 Translation I, me Set string value... 9 Character 我 Set string value... 9 Lesson 3 Set string value... 9 Sound - # Row 10 Set string value... 10 Pinyin yue4 Set string value... 10 Translation month Set string value... 10 Character 月 Set string value... 10 Lesson 3 Set string value... 10 Sound - # Row 11 Set string value... 11 Pinyin chang2 Set string value... 11 Translation long Set string value... 11 Character 长 Set string value... 11 Lesson 4 Set string value... 11 Sound - # Row 12 Set string value... 12 Pinyin chi1 Set string value... 12 Translation to eat Set string value... 12 Character 吃 Set string value... 12 Lesson 4 Set string value... 12 Sound - # Row 13 Set string value... 13 Pinyin qu4 Set string value... 13 Translation to go Set string value... 13 Character 去 Set string value... 13 Lesson 4 Set string value... 13 Sound - # Row 14 Set string value... 14 Pinyin shui3 Set string value... 14 Translation water Set string value... 14 Character 水 Set string value... 14 Lesson 4 Set string value... 14 Sound - # Row 15 Set string value... 15 Pinyin xi3 Set string value... 15 Translation to wash Set string value... 15 Character 洗 Set string value... 15 Lesson 4 Set string value... 15 Sound - # Row 16 Set string value... 16 Pinyin xin1 Set string value... 16 Translation new Set string value... 16 Character 新 Set string value... 16 Lesson 4 Set string value... 16 Sound - # Row 17 Set string value... 17 Pinyin xin4 Set string value... 17 Translation letter Set string value... 17 Character 信 Set string value... 17 Lesson 4 Set string value... 17 Sound - # Row 18 Set string value... 18 Pinyin yuan2 Set string value... 18 Translation round Set string value... 18 Character 圆 Set string value... 18 Lesson 4 Set string value... 18 Sound - # Row 19 Set string value... 19 Pinyin zao3 Set string value... 19 Translation early Set string value... 19 Character 早 Set string value... 19 Lesson 4 Set string value... 19 Sound - # Row 20 Set string value... 20 Pinyin zhi3 Set string value... 20 Translation paper Set string value... 20 Character 纸 Set string value... 20 Lesson 4 Set string value... 20 Sound - # Row 21 Set string value... 21 Pinyin cheng2gong1 Set string value... 21 Translation success Set string value... 21 Character 成功 Set string value... 21 Lesson 5 Set string value... 21 Sound - # Row 22 Set string value... 22 Pinyin di4tu2 Set string value... 22 Translation map Set string value... 22 Character 地图 Set string value... 22 Lesson 5 Set string value... 22 Sound - # Row 23 Set string value... 23 Pinyin dian4deng1 Set string value... 23 Translation electric light Set string value... 23 Character 电灯 Set string value... 23 Lesson 5 Set string value... 23 Sound - # Row 24 Set string value... 24 Pinyin gong1zuo4 Set string value... 24 Translation work Set string value... 24 Character 工作 Set string value... 24 Lesson 5 Set string value... 24 Sound - # Row 25 Set string value... 25 Pinyin jin4bu4 Set string value... 25 Translation progress Set string value... 25 Character 进度 Set string value... 25 Lesson 5 Set string value... 25 Sound - # Row 26 Set string value... 26 Pinyin lao2dong4 Set string value... 26 Translation to do physical labor Set string value... 26 Character 劳动 Set string value... 26 Lesson 5 Set string value... 26 Sound - # Row 27 Set string value... 27 Pinyin qian1bi3 Set string value... 27 Translation pencil Set string value... 27 Character 铅笔 Set string value... 27 Lesson 5 Set string value... 27 Sound - # Row 28 Set string value... 28 Pinyin shi2tang2 Set string value... 28 Translation dining hall Set string value... 28 Character 食堂 Set string value... 28 Lesson 5 Set string value... 28 Sound - # Row 29 Set string value... 29 Pinyin wo4shou3 Set string value... 29 Translation to shake hands Set string value... 29 Character 握手 Set string value... 29 Lesson 5 Set string value... 29 Sound - # Row 30 Set string value... 30 Pinyin zong1wen2 Set string value... 30 Translation Chinese language Set string value... 30 Character 中文 Set string value... 30 Lesson 5 Set string value... 30 Sound - # Row 31 Set string value... 31 Pinyin bei1zi0 Set string value... 31 Translation cup Set string value... 31 Character 杯子 Set string value... 31 Lesson 6 Set string value... 31 Sound - # Row 32 Set string value... 32 Pinyin Bei3jing1 Set string value... 32 Translation Beijing Set string value... 32 Character 北京 Set string value... 32 Lesson 6 Set string value... 32 Sound - # Row 33 Set string value... 33 Pinyin ben3zi0 Set string value... 33 Translation note-book, exercise book Set string value... 33 Character 本子 Set string value... 33 Lesson 6 Set string value... 33 Sound - # Row 34 Set string value... 34 Pinyin dai4fu0 Set string value... 34 Translation doctor Set string value... 34 Character 大夫 Set string value... 34 Lesson 6 Set string value... 34 Sound - # Row 35 Set string value... 35 Pinyin fu3dao3 Set string value... 35 Translation to coach Set string value... 35 Character 辅导 Set string value... 35 Lesson 6 Set string value... 35 Sound - # Row 36 Set string value... 36 Pinyin gong3gu4 Set string value... 36 Translation to consolidate Set string value... 36 Character 巩固 Set string value... 36 Lesson 6 Set string value... 36 Sound - # Row 37 Set string value... 37 Pinyin lao3shi1 Set string value... 37 Translation teacher Set string value... 37 Character 老师 Set string value... 37 Lesson 6 Set string value... 37 Sound - # Row 38 Set string value... 38 Pinyin ti2mu4 Set string value... 38 Translation problem, title Set string value... 38 Character 题目 Set string value... 38 Lesson 6 Set string value... 38 Sound - # Row 39 Set string value... 39 Pinyin xiao3zu3 Set string value... 39 Translation group Set string value... 39 Character 小组 Set string value... 39 Lesson 6 Set string value... 39 Sound - # Row 40 Set string value... 40 Pinyin yu3yan2 Set string value... 40 Translation language Set string value... 40 Character 语言 Set string value... 40 Lesson 6 Set string value... 40 Sound - # Row 41 Set string value... 41 Pinyin kao3shi4 Set string value... 41 Translation examination Set string value... 41 Character 考试 Set string value... 41 Lesson 7 Set string value... 41 Sound - # Row 42 Set string value... 42 Pinyin lian4xi2 Set string value... 42 Translation exercise Set string value... 42 Character 练习 Set string value... 42 Lesson 7 Set string value... 42 Sound - # Row 43 Set string value... 43 Pinyin qing1chu0 Set string value... 43 Translation clear Set string value... 43 Character 清楚 Set string value... 43 Lesson 7 Set string value... 43 Sound - # Row 44 Set string value... 44 Pinyin sheng1diao4 Set string value... 44 Translation tone Set string value... 44 Character 声调 Set string value... 44 Lesson 7 Set string value... 44 Sound - # Row 45 Set string value... 45 Pinyin xue2xiao4 Set string value... 45 Translation school Set string value... 45 Character 学校 Set string value... 45 Lesson 7 Set string value... 45 Sound - # Row 46 Set string value... 46 Pinyin xue2sheng0 Set string value... 46 Translation student Set string value... 46 Character 学生 Set string value... 46 Lesson 7 Set string value... 46 Sound - # Row 47 Set string value... 47 Pinyin yu3fa3 Set string value... 47 Translation grammar Set string value... 47 Character 语法 Set string value... 47 Lesson 7 Set string value... 47 Sound - # Row 48 Set string value... 48 Pinyin zao3shang0 Set string value... 48 Translation morning Set string value... 48 Character 早上 Set string value... 48 Lesson 7 Set string value... 48 Sound - # Row 49 Set string value... 49 Pinyin wen4ti2 Set string value... 49 Translation question, problem Set string value... 49 Character 问题 Set string value... 49 Lesson 7 Set string value... 49 Sound - # Row 50 Set string value... 50 Pinyin zhu4yi4 Set string value... 50 Translation to pay attention to Set string value... 50 Character 注意 Set string value... 50 Lesson 7 Set string value... 50 Sound - # Row 51 Set string value... 51 Pinyin cao1chang3 Set string value... 51 Translation playground Set string value... 51 Character 操场 Set string value... 51 Lesson 8 Set string value... 51 Sound - # Row 52 Set string value... 52 Pinyin ce4yan4 Set string value... 52 Translation test Set string value... 52 Character 测验 Set string value... 52 Lesson 8 Set string value... 52 Sound - # Row 53 Set string value... 53 Pinyin jian3cha2 Set string value... 53 Translation to examine Set string value... 53 Character 检查 Set string value... 53 Lesson 8 Set string value... 53 Sound - # Row 54 Set string value... 54 Pinyin kun4nan2 Set string value... 54 Translation difficulty Set string value... 54 Character 困难 Set string value... 54 Lesson 8 Set string value... 54 Sound - # Row 55 Set string value... 55 Pinyin qi4che1 Set string value... 55 Translation automobile Set string value... 55 Character 汽车 Set string value... 55 Lesson 8 Set string value... 55 Sound - # Row 56 Set string value... 56 Pinyin shui4jiao4 Set string value... 56 Translation to sleep Set string value... 56 Character 睡觉 Set string value... 56 Lesson 8 Set string value... 56 Sound - # Row 57 Set string value... 57 Pinyin su4she4 Set string value... 57 Translation dormitory Set string value... 57 Character 宿舍 Set string value... 57 Lesson 8 Set string value... 57 Sound - # Row 58 Set string value... 58 Pinyin zai4jian4 Set string value... 58 Translation good-bye Set string value... 58 Character 再见 Set string value... 58 Lesson 8 Set string value... 58 Sound - # Row 59 Set string value... 59 Pinyin zheng3qi2 Set string value... 59 Translation orderly, neat Set string value... 59 Character 整齐 Set string value... 59 Lesson 8 Set string value... 59 Sound - # Row 60 Set string value... 60 Pinyin zhun3bei4 Set string value... 60 Translation to prepare Set string value... 60 Character 准备 Set string value... 60 Lesson 8 Set string value... 60 Sound - # Row 61 Set string value... 61 Pinyin hao3 Set string value... 61 Translation well, good Set string value... 61 Character 好 Set string value... 61 Lesson 9 Set string value... 61 Sound - # Row 62 Set string value... 62 Pinyin qing3 Set string value... 62 Translation please Set string value... 62 Character 请 Set string value... 62 Lesson 9 Set string value... 62 Sound - # Row 63 Set string value... 63 Pinyin jin4 Set string value... 63 Translation to come in, enter Set string value... 63 Character 进 Set string value... 63 Lesson 9 Set string value... 63 Sound - # Row 64 Set string value... 64 Pinyin zuo4 Set string value... 64 Translation to sit Set string value... 64 Character 坐 Set string value... 64 Lesson 9 Set string value... 64 Sound - # Row 65 Set string value... 65 Pinyin xie4xie0 Set string value... 65 Translation thanks Set string value... 65 Character 谢谢 Set string value... 65 Lesson 9 Set string value... 65 Sound - # Row 66 Set string value... 66 Pinyin shi4 Set string value... 66 Translation to be Set string value... 66 Character 是 Set string value... 66 Lesson 9 Set string value... 66 Sound - # Row 67 Set string value... 67 Pinyin na3 Set string value... 67 Translation which Set string value... 67 Character 哪 Set string value... 67 Lesson 9 Set string value... 67 Sound - # Row 68 Set string value... 68 Pinyin ren2 Set string value... 68 Translation person, man Set string value... 68 Character 人 Set string value... 68 Lesson 9 Set string value... 68 Sound - # Row 69 Set string value... 69 Pinyin jiao4 Set string value... 69 Translation to call Set string value... 69 Character 叫 Set string value... 69 Lesson 9 Set string value... 69 Sound - # Row 70 Set string value... 70 Pinyin shen2me0 Set string value... 70 Translation what Set string value... 70 Character 什么 Set string value... 70 Lesson 9 Set string value... 70 Sound - # Row 71 Set string value... 71 Pinyin ming2zi0 Set string value... 71 Translation name Set string value... 71 Character 名字 Set string value... 71 Lesson 9 Set string value... 71 Sound - # Row 72 Set string value... 72 Pinyin hui4 Set string value... 72 Translation to know (a language), to know how to Set string value... 72 Character 会 Set string value... 72 Lesson 9 Set string value... 72 Sound - # Row 73 Set string value... 73 Pinyin re4ma0 Set string value... 73 Translation is it hot? (吗: yes/no interrogative particle) Set string value... 73 Character 热吗 Set string value... 73 Lesson 9 Set string value... 73 Sound - # Row 74 Set string value... 74 Pinyin bu4 Set string value... 74 Translation not, no Set string value... 74 Character 不 Set string value... 74 Lesson 9 Set string value... 74 Sound - # Row 75 Set string value... 75 Pinyin ying1wen2 Set string value... 75 Translation English language Set string value... 75 Character 英文 Set string value... 75 Lesson 9 Set string value... 75 Sound - # Row 76 Set string value... 76 Pinyin xue2xi2 Set string value... 76 Translation to study Set string value... 76 Character 学习 Set string value... 76 Lesson 9 Set string value... 76 Sound - # Row 77 Set string value... 77 Pinyin zai4 Set string value... 77 Translation to be (in, on, at, etc.) Set string value... 77 Character 在 Set string value... 77 Lesson 9 Set string value... 77 Sound - # Row 78 Set string value... 78 Pinyin nar3 Set string value... 78 Translation where Set string value... 78 Character 哪儿 Set string value... 78 Lesson 9 Set string value... 78 Sound - # Row 79 Set string value... 79 Pinyin re4 Set string value... 79 Translation hot Set string value... 79 Character 热 Set string value... 79 Lesson 9 Set string value... 79 Sound - # Row 80 Set string value... 80 Pinyin shang4wu3 Set string value... 80 Translation morning Set string value... 80 Character 上午 Set string value... 80 Lesson 10 Set string value... 80 Sound - # Row 81 Set string value... 81 Pinyin you3 Set string value... 81 Translation to have, there be Set string value... 81 Character 有 Set string value... 81 Lesson 10 Set string value... 81 Sound - # Row 82 Set string value... 82 Pinyin ke4 Set string value... 82 Translation class, lesson Set string value... 82 Character 课 Set string value... 82 Lesson 10 Set string value... 82 Sound - # Row 83 Set string value... 83 Pinyin xia4wu3 Set string value... 83 Translation afternoon Set string value... 83 Character 下午 Set string value... 83 Lesson 10 Set string value... 83 Sound - # Row 84 Set string value... 84 Pinyin ye3 Set string value... 84 Translation also Set string value... 84 Character 也 Set string value... 84 Lesson 10 Set string value... 84 Sound - # Row 85 Set string value... 85 Pinyin dui4le0 Set string value... 85 Translation yes, right Set string value... 85 Character 对了 Set string value... 85 Lesson 10 Set string value... 85 Sound - # Row 86 Set string value... 86 Pinyin wan3shang0 Set string value... 86 Translation evening Set string value... 86 Character 晚上 Set string value... 86 Lesson 10 Set string value... 86 Sound - # Row 87 Set string value... 87 Pinyin mei2 Set string value... 87 Translation not (with 有) Set string value... 87 Character 没 Set string value... 87 Lesson 10 Set string value... 87 Sound - # Row 88 Set string value... 88 Pinyin mei2you3 Set string value... 88 Translation to not have, there isn't Set string value... 88 Character 没有 Set string value... 88 Lesson 10 Set string value... 88 Sound - # Row 89 Set string value... 89 Pinyin jiao4shi4 Set string value... 89 Translation classroom Set string value... 89 Character 教室 Set string value... 89 Lesson 10 Set string value... 89 Sound - # Row 90 Set string value... 90 Pinyin fu4xi2 Set string value... 90 Translation to review Set string value... 90 Character 复习 Set string value... 90 Lesson 10 Set string value... 90 Sound - # Row 91 Set string value... 91 Pinyin fa1yin1 Set string value... 91 Translation pronunciation Set string value... 91 Character 发音 Set string value... 91 Lesson 10 Set string value... 91 Sound - # Row 92 Set string value... 92 Pinyin xie3 Set string value... 92 Translation to write Set string value... 92 Character 写 Set string value... 92 Lesson 10 Set string value... 92 Sound - # Row 93 Set string value... 93 Pinyin han4zi4 Set string value... 93 Translation Chinese character Set string value... 93 Character 汉字 Set string value... 93 Lesson 10 Set string value... 93 Sound - # Row 94 Set string value... 94 Pinyin sheng1ci2 Set string value... 94 Translation new word Set string value... 94 Character 生词 Set string value... 94 Lesson 10 Set string value... 94 Sound - # Row 95 Set string value... 95 Pinyin zhe4 Set string value... 95 Translation this Set string value... 95 Character 这 Set string value... 95 Lesson 11 Set string value... 95 Sound - # Row 96 Set string value... 96 Pinyin di4fang0 Set string value... 96 Translation place Set string value... 96 Character 地方 Set string value... 96 Lesson 11 Set string value... 96 Sound - # Row 97 Set string value... 97 Pinyin li3tang2 Set string value... 97 Translation auditorium Set string value... 97 Character 礼堂 Set string value... 97 Lesson 11 Set string value... 97 Sound - # Row 98 Set string value... 98 Pinyin na4 Set string value... 98 Translation that Set string value... 98 Character 那 Set string value... 98 Lesson 11 Set string value... 98 Sound - # Row 99 Set string value... 99 Pinyin shang1dian4 Set string value... 99 Translation shop Set string value... 99 Character 商店 Set string value... 99 Lesson 11 Set string value... 99 Sound - # Row 100 Set string value... 100 Pinyin tu2shu1guan3 Set string value... 100 Translation library Set string value... 100 Character 图书馆 Set string value... 100 Lesson 11 Set string value... 100 Sound - # Row 101 Set string value... 101 Pinyin zher4 Set string value... 101 Translation here Set string value... 101 Character 这儿 Set string value... 101 Lesson 11 Set string value... 101 Sound - # Row 102 Set string value... 102 Pinyin nar4 Set string value... 102 Translation there Set string value... 102 Character 那儿 Set string value... 102 Lesson 11 Set string value... 102 Sound - # Row 103 Set string value... 103 Pinyin xian4zai4 Set string value... 103 Translation now Set string value... 103 Character 现在 Set string value... 103 Lesson 11 Set string value... 103 Sound - # Row 104 Set string value... 104 Pinyin duan4lian4 Set string value... 104 Translation to do physical training Set string value... 104 Character 锻炼 Set string value... 104 Lesson 11 Set string value... 104 Sound - # Row 105 Set string value... 105 Pinyin da3 Set string value... 105 Translation to play, to beat, to hit Set string value... 105 Character 打 Set string value... 105 Lesson 11 Set string value... 105 Sound - # Row 106 Set string value... 106 Pinyin qiu2 Set string value... 106 Translation ball Set string value... 106 Character 球 Set string value... 106 Lesson 11 Set string value... 106 Sound - # Row 107 Set string value... 107 Pinyin dong1xi0 Set string value... 107 Translation thing Set string value... 107 Character 东西 Set string value... 107 Lesson 11 Set string value... 107 Sound - # Row 108 Set string value... 108 Pinyin shu1dian4 Set string value... 108 Translation bookstore Set string value... 108 Character 书店 Set string value... 108 Lesson 11 Set string value... 108 Sound - # Row 109 Set string value... 109 Pinyin shu1 Set string value... 109 Translation book Set string value... 109 Character 书 Set string value... 109 Lesson 11 Set string value... 109 Sound - # Row 110 Set string value... 110 Pinyin da3 Set string value... 110 Translation to make (a telephone call) Set string value... 110 Character 打 Set string value... 110 Lesson 12 Set string value... 110 Sound - # Row 111 Set string value... 111 Pinyin dian4hua4 Set string value... 111 Translation telephone Set string value... 111 Character 电话 Set string value... 111 Lesson 12 Set string value... 111 Sound - # Row 112 Set string value... 112 Pinyin wei4 Set string value... 112 Translation hallo Set string value... 112 Character 喂 Set string value... 112 Lesson 12 Set string value... 112 Sound - # Row 113 Set string value... 113 Pinyin deng3 Set string value... 113 Translation to wait Set string value... 113 Character 等 Set string value... 113 Lesson 12 Set string value... 113 Sound - # Row 114 Set string value... 114 Pinyin kan4 Set string value... 114 Translation to see, to have a look, to look Set string value... 114 Character 看 Set string value... 114 Lesson 12 Set string value... 114 Sound - # Row 115 Set string value... 115 Pinyin chu1qu0 Set string value... 115 Translation to go out Set string value... 115 Character 出去 Set string value... 115 Lesson 12 Set string value... 115 Sound - # Row 116 Set string value... 116 Pinyin shi4qing0 Set string value... 116 Translation thing business Set string value... 116 Character 事情 Set string value... 116 Lesson 12 Set string value... 116 Sound - # Row 117 Set string value... 117 Pinyin xiang3 Set string value... 117 Translation to think Set string value... 117 Character 想 Set string value... 117 Lesson 12 Set string value... 117 Sound - # Row 118 Set string value... 118 Pinyin gen1 Set string value... 118 Translation with, and Set string value... 118 Character 跟 Set string value... 118 Lesson 12 Set string value... 118 Sound - # Row 119 Set string value... 119 Pinyin tan2 Set string value... 119 Translation to talk Set string value... 119 Character 谈 Set string value... 119 Lesson 12 Set string value... 119 Sound - # Row 120 Set string value... 120 Pinyin shi2hour0 Set string value... 120 Translation time Set string value... 120 Character 时候 Set string value... 120 Lesson 12 Set string value... 120 Sound - # Row 121 Set string value... 121 Pinyin hui2lai0 Set string value... 121 Translation to come back Set string value... 121 Character 回来 Set string value... 121 Lesson 12 Set string value... 121 Sound - # Row 122 Set string value... 122 Pinyin yi3hou4 Set string value... 122 Translation later, after Set string value... 122 Character 以后 Set string value... 122 Lesson 12 Set string value... 122 Sound - # Row 123 Set string value... 123 Pinyin gei3 Set string value... 123 Translation to give, for Set string value... 123 Character 给 Set string value... 123 Lesson 12 Set string value... 123 Sound - # Row 124 Set string value... 124 Pinyin dui4ba0 Set string value... 124 Translation isn't it? (吧: modal particle) Set string value... 124 Character 对吧 Set string value... 124 Lesson 12 Set string value... 124 Sound - # Row 125 Set string value... 125 Pinyin duo1shao0 Set string value... 125 Translation how many, how much Set string value... 125 Character 多少 Set string value... 125 Lesson 12 Set string value... 125 Sound - # Row 126 Set string value... 126 Pinyin hai2 Set string value... 126 Translation else, any other, still Set string value... 126 Character 还 Set string value... 126 Lesson 12 Set string value... 126 Sound - # Row 127 Set string value... 127 Pinyin ta1 Set string value... 127 Translation she, her Set string value... 127 Character 她 Set string value... 127 Lesson 13 Set string value... 127 Sound - # Row 128 Set string value... 128 Pinyin ta1 Set string value... 128 Translation he, she, it Set string value... 128 Character 他,她,它 Set string value... 128 Lesson 3 Set string value... 128 Sound - # Row 129 Set string value... 129 Pinyin nin2 Set string value... 129 Translation you (polite form) Set string value... 129 Character 您 Set string value... 129 Lesson 13 Set string value... 129 Sound - endproc procCreateCreateWordlists$ = "CreateWordlists" procedure CreateCreateWordlists Create Table with column names... CreateWordlists 7 ... Name # Fill table values # Row 1 Set string value... 1 Name 20_basic_tone_combinations # Row 2 Set string value... 2 Name An_example_wordlist # Row 3 Set string value... 3 Name Chinees_een_Makkie_chapters_1_+_2 # Row 4 Set string value... 4 Name Chinese_for_Today_chapters_1_+_2 # Row 5 Set string value... 5 Name Colloquial_Chinese_chapters_1_+_2 # Row 6 Set string value... 6 Name Contemporary_Chinese_chapters_1_+_2 # Row 7 Set string value... 7 Name Elementary_Chinese endproc # Set up system and load preferences # # SpeakGoodChinese 2.0 # # Intializing Praat script # # SpeakGoodChinese: InitializeSGC2.praat defines and sets the global variables # and loads general SGC2 code # # Copyright (C) 2007-2010 R.J.J.H. van Son and 2010 the Netherlands Cancer Institute # The SpeakGoodChinese team are: # Guangqin Chen, Zhonyan Chen, Stefan de Koning, Eveline van Hagen, # Rob van Son, Dennis Vierkant, David Weenink # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Do not store these variables as preferences sgc.nonPreferences$ = " config.savePerf config.openPerf config.clearSummary config.audioName " # Information for logging activity currentDate$ = date$() dateYear$ = right$(currentDate$, length(currentDate$) - rindex(currentDate$, " ")) logtimeStamp$ = replace_regex$(currentDate$, "[^a-zA-Z0-9\-_]", "-", 0) currentLogDirectory$ = "" feedbackTablePrefix$ = "Feedback" feedbackTableName$ = "" evaluationTablePrefix$ = "Evaluation" evaluationTableName$ = "" performanceTableName$ = "Performance" # Define canvas viewportMargin = 5 yWordlist = 11 yFeedback = yWordlist + 5 yPinyin = yFeedback + 10 yContour = yPinyin + 15 wipeContourArea$ = "demo Paint rectangle... White 20 80 'yContour' 100" wipePinyinArea$ = "demo Paint rectangle... White 20 80 'yPinyin' 'yContour'" wipeFeedbackArea$ = "demo Paint rectangle... White 0 100 'yFeedback' 'yPinyin'" wipeWordlistArea$ = "demo Paint rectangle... White 20 80 'yWordlist' 'yFeedback'" # Pop-Up window colors sgc2.popUp_bordercolor$ = "{0.5,0.5,1}" sgc2.popUp_backgroundcolor$ = "{0.9,0.9,1}" # Initialize parameters alertText$ = "" sgc.currentWord = 1 sgc.currentWordlist = -1 sgc.numberOfWords = 0 sgc.currentWordNum = 1 sgc.numberOfDisplayedWords = 0 sgc.recordedSound = 0 sgc.saveAudioOn = 0 sgc.writeAll = 0 sgc.customLanguage$ = "" pinyin$ = "" sgc.pinyin$ = "" character$ = "" buttons$ = "" config$ = "" wordlistNum = 1 wordlistName$ = "" wordlist$ = "" sgc.failedAttempts = 0 mainPage.play = -1 config.deleteWordlist = -1 config.displayNumbers = 1 config.displayPinyin = 1 config.displayChar = 0 config.displayTrans = 1 config.useSoundExample = 1 config.synthesis$ = "_DISABLED_" config.input$ = "Microphone" config.showBackground = 1 sgc2.noiseThresshold = -30 config.strict$ = "1" sgc.highestLevel = 3 config.voice = 4 config.voice$ = "f4" config.voicesTTS$ = "default f1 f2 f3 f4 f5 m1 m2 m3 m4 m5 m6 m7" sgc.lastVoice = 12 sgc.nativeOSXTTScommand$ = "say -vTing-Ting --rate=95" sgc.nativeLinuxTTScommand$ = "spd-say -l zh -t female1 -r -60" sgc.nativeTTScommand$ = "" config.savePerf = 0 config.openPerf = 0 config.clearSummary = 0 config.audioName$ = "" sgc.savePerf$ = "" sgc.saveAudio$ = "" mainPage.saveAudio$ = "" sgc.allWordLists = -1 sgc_ToneProt.minimumPitch = 40 sgc_ToneProt.maximumPitch = 600 # Platform dependent settings if macintosh or windows config.displayChar = 1 config.displayNumbers = 0 endif if windows and endsWith(build_SHA$, " XP") config.displayChar = 0 config.displayNumbers = 0 endif if unix config.displayChar = 0 config.displayNumbers = 0 endif if unix samplingFrequency = 44100 elsif macintosh samplingFrequency = 44100 elsif windows samplingFrequency = 44100 endif recordingTime = 2 # Be careful: Logging and Replaying can have side-effects # sgc2.logging$ = "call saveLogOfActivity" sgc2.logging$ = "# " # When this is not "# ", the command 'replaySGC2Log$' will be run! if not variableExists("replaySGC2Log$") replaySGC2Log$ = "# " endif config.language$ = "EN" config.register = 249 preferencesAppFile$ = preferencesAppDir$+"/sgc2rc.txt" preferencesLogDir$ = "'preferencesAppDir$'/log" preferencesTableDir$ = "'preferencesAppDir$'/GUI" sgc2wordlists$ = "'preferencesAppDir$'/wordlists" localWordlistDir$ = sgc2wordlists$ # Global word lists must be installed BY THE ADMINISTRATOR # This means, create the directory 'globalwordlists$' and # fill it with wordlist directories containing wordlist.Table # and audio files. They can be copied from a local directory. globalwordlists$ = "" globaltablelists$ = "" globalTTSdir$ = "" if unix globalwordlists$ = "/etc/'sgc2.demoAppName$'/wordlists" globaltablelists$ = "/etc/'sgc2.demoAppName$'/GUI" globalTTSdir$ = "/etc/'sgc2.demoAppName$'/TTS" elsif macintosh globalwordlists$ = "/Library/Preferences/'sgc2.demoAppName$'/wordlists" globaltablelists$ = "/Library/Preferences/'sgc2.demoAppName$'/GUI" globalTTSdir$ = "/Library/Preferences/'sgc2.demoAppName$'/TTS" elsif windows globalwordlists$ = "C:/Documents and Settings/All Users/Application Data/'sgc2.demoAppName$'/wordlists" globaltablelists$ = "C:/Documents and Settings/All Users/Application Data/'sgc2.demoAppName$'/GUI" globalTTSdir$ = "C:/Documents and Settings/All Users/Application Data/'sgc2.demoAppName$'/TTS" endif sgc2.synthesizer = -1 sgc.alignedTextGrid = -1 ############################################################## config.shuffleLists = 1 config.adaptiveLists = 0 defaultFontSize = 12 defaultFont$ = "Helvetica" defaultLineWidth = 1 # Set up directories if they do not exist already call set_up_directories # Get saved preferences call read_preferences "" # Set up TTS system speakCommandDir$ = "'preferencesAppDir$'/TTS" speakCommandFile$ = "" # Define a Praat TTS command that will set sgc2.synthesizer call set_TTS_parameters call set_up_TTS sgc.recordCommandFile$ = "" sgc.playCommandFile$ = "" if windows sgc.scratchAudioDir$ = "'preferencesAppDir$'\audio\" else sgc.scratchAudioDir$ = "/tmp/SpeakGoodChinese/" endif sgc.useAlternativeRecorder = 0 call set_up_recorder sgc.useAlternativePlayer = 0 call set_up_player # Set inital language call set_language 'config.language$' # Get the word-list call load_word_list "'localWordlistDir$'" 0 # Set up evaluation table initialiseSGC2.toneevaluation_table$ = "" call initialize_toneevaluation_tables # Draw inital window call init_window ############################################################### # # Obligatory procedures # ############################################################### # Initialize Demo Window procedure init_window demo Erase all demo Line width... 'defaultLineWidth' demo 'defaultFont$' call set_font_size 'defaultFontSize' demo Black # If there is no recorded sound, try to read stored recording if recordedSound$ = "" and sgc.saveAudio$ <> "" sgc.pinyin$ = "" select sgc.currentWordlist if sgc.currentWord > 0 and sgc.currentWord <= sgc.numberOfWords call readPinyin 'sgc.currentWord' sgc.pinyin$ = readPinyin.pinyin$ .outputName$ = "'sgc.saveAudio$'/'sgc.pinyin$'.wav" if fileReadable(.outputName$) sgc.recordedSound = Read from file: .outputName$ recordedSound$ = selected$("Sound") call recognizeTone # See feedback on earl;ier recorded words if fileReadable("'sgc.saveAudio$'/TestSpeakGoodChinese2.txt") call write_feedback Feedback endif select Table Feedback Remove # Set config.audioName .tmp$ = replace_regex$(sgc.saveAudio$, "[^/\\]+[/\\]?$", "", 0) config.audioName$ = replace$(sgc.saveAudio$, .tmp$, "", 0) endif endif endif # Set mainPage.saveAudio$ grade call set_grade_display 'sgc.pinyin$' # Update screen call reset_viewport .windowTitle$ = replace$(wordlistName$, "_", " ", 0) call set_window_title 'buttons$' '.windowTitle$' # Display the word-list call write_word_list # Wipe screen and draw background call wipeArea 'wipeContourArea$' if config.showBackground call draw_background Background endif # Define buttons in a table call init_buttons # Set Play button call Set_Play_Button # Draw the contour call draw_tone_contour # SaveAudio light call paint_saveAudio_light # Set play button sgc.failedAttempts = 0 endproc # Make sure all Preferences directories are available procedure set_up_directories .dirPath$ = "'preferencesAppDir$'" createDirectory(.dirPath$) .dirPath$ > '.dirPath$'/directory.txt createDirectory("'.dirPath$'/wordlists") .dirPath$ > '.dirPath$'/wordlists/directory.txt createDirectory("'.dirPath$'/pitchmodels") .dirPath$ > '.dirPath$'/pitchmodels/directory.txt createDirectory("'.dirPath$'/log") .dirPath$ > '.dirPath$'/log/directory.txt createDirectory("'.dirPath$'/TTS") .dirPath$ > '.dirPath$'/TTS/directory.txt endproc # # Retrieve and store setting between sessions # procedure read_preferences .preferencesFile$ if not fileReadable(.preferencesFile$) .preferencesFile$ = preferencesAppFile$ endif if fileReadable(.preferencesFile$) Read from file... 'preferencesAppFile$' .preferenceTable$ = selected$("Table") .numPrefKeys = Get number of rows for .row to .numPrefKeys .variableName$ = Get value... '.row' Key if variableExists(.variableName$) .variableValue = Get value... '.row' Value if .variableValue <> undefined '.variableName$' = '.variableValue' endif elsif variableExists(.variableName$+"$") .variableValue$ = Get value... '.row' Value .variableName$ = .variableName$+"$" '.variableName$' = "'.variableValue$'" endif endfor select Table '.preferenceTable$' Remove endif endproc procedure write_preferences .preferencesFile$ Create Table with column names... Preferences 0 Key Value if index_regex(.preferencesFile$, "[a-zA-Z0-9]") <= 0 .preferencesFile$ = preferencesAppFile$ endif .row = 0 for .tableNum from 1 to 2 if .tableNum = 1 .table$ = "Config" elsif .tableNum = 2 .table$ = "MainPage" endif .varPrefix$ = replace_regex$(.table$, "^(.)", "\l\1", 0) select Table '.table$' .numTableRows = Get number of rows for .tablerow to .numTableRows select Table '.table$' .label$ = Get value... '.tablerow' Label .variableName$ = .varPrefix$+"."+(replace_regex$(.label$, "^(.)", "\l\1", 0)) .keyName$ = .variableName$ .value$ = "" if sgc.nonPreferences$ <> "" and index(sgc.nonPreferences$, " '.variableName$' ") .value$ = "" elsif variableExists(.variableName$) .value = '.variableName$' .value$ = "'.value'" elsif variableExists(.variableName$ + "$") .variableName$ = .variableName$ + "$" .value$ = '.variableName$' elsif index(.variableName$, "_") > 0 .variableName$ = left$(.variableName$, rindex(.variableName$, "_") - 1) .keyName$ = .variableName$ select Table Preferences .prefRow = Search column... Key '.keyName$' if .prefRow <= 0 if variableExists(.variableName$) .value = '.variableName$' .value$ = "'.value'" elsif variableExists(.variableName$ + "$") .variableName$ = .variableName$ + "$" .value$ = '.variableName$' endif endif endif if .value$ <> "" select Table Preferences Append row .row += 1 Set string value... '.row' Key '.keyName$' Set string value... '.row' Value '.value$' endif endfor endfor # Some extra settings select Table Preferences Append row .row += 1 Set string value... '.row' Key wordlistDir Set string value... '.row' Value 'localWordlistDir$' select Table Preferences Append row .row += 1 Set string value... '.row' Key wordlistName Set string value... '.row' Value 'wordlistName$' select Table Preferences Write to table file... '.preferencesFile$' Remove endproc ############################################################### # # TTS (speech synthesis). Place commands in user info # # Prerequisites # speakCommandDir$ = "'preferencesAppDir$'/TTS" # speakCommandFile$ = "" # Make sure sgc2.synthesizer is set! procedure create_default_TTS .language$ .voice$ .samplefreq .gap .pitch_adj .pitch_range .words_per_minute .use_data$ .espeak_phones$ sgc2.synthesizer = Create SpeechSynthesizer... '.language$' '.voice$' Set speech output settings... .samplefreq .gap .pitch_adj .pitch_range .words_per_minute '.use_data$' '.espeak_phones$' endproc procedure set_up_TTS if sgc2.synthesizer > 0 select sgc2.synthesizer Remove sgc2.synthesizer = -1 endif # Note, the TTScommand must set sgc2.synthesizer! if config.strict$ = "'sgc.highestLevel'" 'sgc2.advancedTTScommand$' else 'sgc2.normalTTScommand$' endif if macintosh .ttscommand$ = "speak" .osName$ = "OSX" .quote$ = "" elsif unix .ttscommand$ = "espeak" .osName$ = "UNIX" .quote$ = "" elsif windows .ttscommand$ = "C:/Program Files/eSpeak/command_line/espeak.exe" .osName$ = "WIN" .quote$ = """" endif # Global TTS command has precedence if fileReadable("'globalTTSdir$'/TTS_'.osName$'_command.txt") speakCommandFile$ = "'globalTTSdir$'/TTS_'.osName$'_command.txt" if config.synthesis$ = "_DISABLED_" # Default is ON config.synthesis$ = "eSpeak" endif endif # Local TTS command, if there is no global one # Command does not exist yet, create it if eSpeak is installed # Make sure to quote the path! if speakCommandFile$ = "" # Autodetect synthesizer command # if not fileReadable("'speakCommandDir$'/TTS_'.osName$'_eSpeak_command.txt") # .command_path$ = "" # if macintosh # system_nocheck PATH=${PATH}:/opt/local/bin; bash -c -- 'which '.ttscommand$' > "'speakCommandDir$'/command_path.txt"' # .command_path$ < 'speakCommandDir$'/command_path.txt # elsif unix # system_nocheck PATH=${PATH};bash -c -- 'which '.ttscommand$' > "'speakCommandDir$'/command_path.txt"' # .command_path$ < 'speakCommandDir$'/command_path.txt # elsif windows # if fileReadable(.ttscommand$) # .command_path$ = .ttscommand$ # endif # endif # # Remove any newlines # .command_path$ = replace$(.command_path$, "'newline$'", "", 0) # # # Command path found # if sgc2.synthesizer <= 0 and .command_path$ <> "" and fileReadable(.command_path$) # deleteFile("'speakCommandDir$'/TTS_'.osName$'_eSpeak_command.txt") # fileappend "'speakCommandDir$'/TTS_'.osName$'_eSpeak_command.txt" # ...'.quote$''.ttscommand$''.quote$' -v zh+f4 -s 100 'newline$' # speakCommandFile$ = "'speakCommandDir$'/TTS_'.osName$'_eSpeak_command.txt" # endif # endif if fileReadable("'speakCommandDir$'/TTS_'.osName$'_eSpeak_command.txt") speakCommandFile$ = "'speakCommandDir$'/TTS_'.osName$'_eSpeak_command.txt" endif deleteFile("'speakCommandDir$'/command_path.txt") endif # Close off (other TTS maybe a later option) if sgc2.synthesizer > 0 or (speakCommandFile$ <> "" and fileReadable(speakCommandFile$)) config.synthesis$ = "eSpeak" endif endproc procedure set_TTS_parameters if config.voice > 0 .voice$ = replace_regex$(config.voicesTTS$, "^(\S+\s+){'config.voice'}(\S+)(\s+.*)?$", "\2", 0) else .voice$ = replace_regex$(config.voicesTTS$, "^(\S+)(\s+.*)?$", "\1", 0) endif if .voice$ <> "" and index_regex(.voice$, "\s") <= 0 if .voice$ = "default" config.voice$ = "*" else config.voice$ = replace_regex$(.voice$, ".", "\u&", 0) endif sgc2.normalTTScommand$ = "call create_default_TTS Mandarin '.voice$' 10000 0.01 50 100 95 no IPA" sgc2.advancedTTScommand$ = "call create_default_TTS Mandarin '.voice$' 10000 0.01 50 70 125 no IPA" endif if macintosh and fileReadable("/usr/bin/say") sgc.nativeTTScommand$ = sgc.nativeOSXTTScommand$ elsif unix and fileReadable("/usr/bin/spd-say") sgc.nativeTTScommand$ = sgc.nativeLinuxTTScommand$ endif endproc # Alternative audio recorder procedure set_up_recorder if macintosh .osName$ = "OSX" .quote$ = "" elsif unix .osName$ = "UNIX" .quote$ = "" elsif windows .osName$ = "WIN" .quote$ = """" endif # Global TTS command has precedence sgc.useAlternativeRecorder = 0 if fileReadable("'globalTTSdir$'/TTS_'.osName$'_record_command.txt") createDirectory(sgc.scratchAudioDir$) sgc.recordCommandFile$ = "'globalTTSdir$'/TTS_'.osName$'_record_command.txt" sgc.useAlternativeRecorder = 1 elsif fileReadable("'speakCommandDir$'/TTS_'.osName$'_record_command.txt") createDirectory(sgc.scratchAudioDir$) sgc.recordCommandFile$ = "'speakCommandDir$'/TTS_'.osName$'_record_command.txt" sgc.useAlternativeRecorder = 1 endif endproc # Alternative audio player procedure set_up_player if macintosh .osName$ = "OSX" .quote$ = "" elsif unix .osName$ = "UNIX" .quote$ = "" elsif windows .osName$ = "WIN" .quote$ = """" endif # Global TTS command has precedence sgc.useAlternativePlayer = 0 if fileReadable("'globalTTSdir$'/TTS_'.osName$'_play_command.txt") createDirectory(sgc.scratchAudioDir$) sgc.playCommandFile$ = "'globalTTSdir$'/TTS_'.osName$'_play_command.txt" sgc.useAlternativePlayer = 1 elsif fileReadable("'speakCommandDir$'/TTS_'.osName$'_play_command.txt") createDirectory(sgc.scratchAudioDir$) sgc.playCommandFile$ = "'speakCommandDir$'/TTS_'.osName$'_play_command.txt" sgc.useAlternativePlayer = 1 endif endproc ############################################################### # # Evaluation tables # # Prerequisites # initialiseSGC2.toneevaluation_table$ = "" procedure initialize_toneevaluation_tables # Remove old table if initialiseSGC2.toneevaluation_table$ != "" select sgc2.performanceTable Remove endif initialiseSGC2.toneevaluation_table$ = "" # Get the name of the table call get_evaluation_table_labels 'config.language$' performanceTableName$ = eval.performance$ if sgc.savePerf$ <> "" and fileReadable(sgc.savePerf$) sgc2.performanceTable = Read Table from tab-separated file: sgc.savePerf$ Rename: performanceTableName$ # Check to make sure all columns are initialized, but only if Pinyin exists! select sgc2.performanceTable .column = Get column index: eval.pinyin$ if .column <= 0 select sgc2.performanceTable Remove sgc2.performanceTable = Create Table with column names... "'performanceTableName$'" 0 'eval.pinyin$' 'eval.correct$' 'eval.wrong$' 'eval.total$' 'eval.high$' 'eval.low$' 'eval.wide$' 'eval.narrow$' 'eval.unknown$' 'eval.commented$' 'eval.level$' 'eval.time$' 'eval.wordlist$' endif .columnNameList$ = "'eval.correct$' 'eval.wrong$' 'eval.total$' 'eval.high$' 'eval.low$' 'eval.wide$' 'eval.narrow$' 'eval.unknown$' 'eval.commented$' 'eval.level$' 'eval.time$' 'eval.wordlist$'" while index_regex(.columnNameList$, "\S") .columnNameList$ = replace_regex$(.columnNameList$, "^\s+", "", 1) .columnHeader$ = extractWord$(.columnNameList$, "") .columnNameList$ = replace_regex$(.columnNameList$, "^\s*'.columnHeader$'\s*", "", 1) # Initialize header select sgc2.performanceTable .column = Get column index: .columnHeader$ if .column <= 0 select sgc2.performanceTable Append column: .columnHeader$ endif endwhile # Performance table has been read. Set the wordlist to the first row select sgc2.performanceTable wordlistName$ = Get value: 1, eval.wordlist$ call load_word_list: localWordlistDir$, 0 else # Create new table sgc2.performanceTable = Create Table with column names... "'performanceTableName$'" 0 'eval.pinyin$' 'eval.correct$' 'eval.wrong$' 'eval.total$' 'eval.high$' 'eval.low$' 'eval.wide$' 'eval.narrow$' 'eval.unknown$' 'eval.commented$' 'eval.level$' 'eval.time$' 'eval.wordlist$' endif initialiseSGC2.toneevaluation_table$ = performanceTableName$ call get_toneevaluation_row 'eval.total$' endproc procedure get_toneevaluation_row .pinyin$ select sgc2.performanceTable .row = Search column... "'eval.pinyin$'" '.pinyin$' if .row < 1 Append row .row = Get number of rows Set string value... '.row' "'eval.pinyin$'" '.pinyin$' Set numeric value... '.row' 'eval.correct$' 0 Set numeric value... '.row' 'eval.wrong$' 0 Set numeric value... '.row' 'eval.total$' 0 Set numeric value... '.row' 'eval.high$' 0 Set numeric value... '.row' 'eval.low$' 0 Set numeric value... '.row' 'eval.wide$' 0 Set numeric value... '.row' 'eval.narrow$' 0 Set numeric value... '.row' 'eval.unknown$' 0 Set numeric value... '.row' 'eval.commented$' 0 Set numeric value... '.row' 'eval.level$' 0 Set numeric value... '.row' 'eval.time$' 0 Set string value... '.row' 'eval.wordlist$' 'wordlistName$' Sort rows... 'eval.pinyin$' .row = Search column... "'eval.pinyin$'" '.pinyin$' endif endproc procedure increment_toneevaluation_in_row .row .column$ select sgc2.performanceTable .tmp = Get value... '.row' '.column$' if .tmp = undefined .tmp = 0 endif .tmp += 1 Set numeric value... '.row' '.column$' '.tmp' # Set Level Set string value: .row, eval.level$, config.strict$ # Set time stamp and wordlist .dateTime$ = date$() Set string value: .row, eval.time$, .dateTime$ Set string value: .row, eval.wordlist$, wordlistName$ endproc # Update existing performance file with toneevaluation procedure update_toneevaluation_file if sgc.savePerf$ <> "" and fileReadable(sgc.savePerf$) and initialiseSGC2.toneevaluation_table$ <> "" select sgc2.performanceTable Write to table file... 'sgc.savePerf$' endif endproc procedure increment_toneevaluation_value .pinyin$ .column$ call get_toneevaluation_row '.pinyin$' .row = get_toneevaluation_row.row call increment_toneevaluation_in_row '.row' '.column$' call get_toneevaluation_row 'eval.total$' .row = get_toneevaluation_row.row call increment_toneevaluation_in_row '.row' '.column$' endproc procedure add_feedback_to_toneevaluation .table$ select Table '.table$' .line1$ = Get value... 1 Text .line2$ = Get value... 2 Text .label$ = Get value... 3 Text if .label$ = "6" .label$ = "'eval.unknown$'" endif .tones$ = replace_regex$(left$(.line1$, rindex(.line1$, ":")), "[^0-9]", "", 0) .recognized$ = replace_regex$(right$(.line1$, length(.line1$)-rindex(.line1$, ":")), "[^0-9]", "", 0) # Set evaluation call increment_toneevaluation_value 'sgc.pinyin$' 'eval.total$' if .tones$ = .recognized$ call increment_toneevaluation_value 'sgc.pinyin$' 'eval.correct$' .result = 1 else call increment_toneevaluation_value 'sgc.pinyin$' 'eval.wrong$' .result = 0 endif if index_regex(.label$, "(Correct|Wrong)") <= 0 if .label$ = "Correct" .label$ = eval.correct$ else .label$ = eval.wrong$ endif call increment_toneevaluation_value 'sgc.pinyin$' '.label$' call increment_toneevaluation_value 'sgc.pinyin$' 'eval.commented$' .result = 0 endif # Update performance table when SaveAudio is on if sgc.saveAudioOn call update_toneevaluation_file endif endproc procedure setGrade .grade$ select sgc.currentWordlist if recordedSound$ <> "" and sgc.pinyin$ <> "" call get_toneevaluation_row 'sgc.pinyin$' .row = get_toneevaluation_row.row select sgc2.performanceTable .col = Get column index... Grade if .col <= 0 Insert column... 2 Grade endif Set numeric value: .row, "Grade", '.grade$' .numRows = Get number of rows .sumGrade = 0 .sumN = 0 for .r from 2 to .numRows .tmp = Get value: .r, "Grade" if .tmp <> undefined .sumGrade += .tmp .sumN += 1 endif endfor .meanGrade = -1 if .sumN > 0 .meanGrade = .sumGrade / .sumN endif Set numeric value: 1, "Grade", .meanGrade # Store current performance table call update_toneevaluation_file endif endproc # Set mainPage.saveAudio$ to Grade procedure set_grade_display .pinyin$ mainPage.saveAudio$ = "" select sgc2.performanceTable .grade$ = "" .col = Get column index: "Grade" if .pinyin$ <> "" and .col > 0 call get_toneevaluation_row '.pinyin$' .row = get_toneevaluation_row.row if .row > 0 .grade$ = Get value: .row, "Grade" if index_regex(.grade$, "[0-9]") <= 0 .grade$ = "" endif endif endif if .grade$ <> "" mainPage.saveAudio$ = .grade$ endif endproc ############################################################### # # Miscelaneous procedures # ############################################################### # TTS synthesis procedure synthesize_sound .pinyin$ .command$ = "" if speakCommandFile$ <> "" and fileReadable(speakCommandFile$) .command$ < 'speakCommandFile$' .command$ = replace$(.command$, "'newline$'", " ", 0) if macintosh system_nocheck PATH=${PATH}:/usr/local/bin:/opt/local/bin; bash -rc -- ''.command$' "'.pinyin$'"' elsif unix system_nocheck bash -rc -- ''.command$' "'.pinyin$'"' elsif windows system_nocheck call '.command$' "'.pinyin$'" endif elsif sgc.nativeTTScommand$ <> "" and config.voice <= 0 .text$ = replace_regex$(.pinyin$, "0$", "''", 0) system_nocheck 'sgc.nativeTTScommand$' "'.text$'" elsif sgc2.synthesizer > 0 select sgc2.synthesizer Play text... '.pinyin$' endif endproc procedure align_recordedSound .pinyin$ if 0 and sgc2.synthesizer > 0 and recordedSound$ <> "" select Sound 'recordedSound$' .recordedTextGrid = To TextGrid... pinyin Set interval text... 1 1 '.pinyin$' select sgc2.synthesizer plus Sound 'recordedSound$' plus .recordedTextGrid sgc.alignedTextGrid = nowarn noprogress To TextGrid (align,trim)... 1 1 1 -35 0.1 0.1 0.08 Rename... AlignedTextGrid select .recordedTextGrid Remove endif endproc # Include the main page buttons and procedures # # SpeakGoodChinese 2.0 # # Praat script handling buttons page # # SpeakGoodChinese: MainPage.praat loads the code needed for the # main, practice, page of SGC2 and the sound handling and recognition. # # Copyright (C) 2007-2010 R.J.J.H. van Son and 2010 the Netherlands Cancer Institute # The SpeakGoodChinese team are: # Guangqin Chen, Zhonyan Chen, Stefan de Koning, Eveline van Hagen, # Rob van Son, Dennis Vierkant, David Weenink # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Includes at the bottom # ############################################################### # # Button Drawing Routines # ############################################################### procedure DrawPrevious .color$ .x .y .size demo '.color$' .size *= 2/3 .fraction = 0 if sgc.numberOfDisplayedWords > 0 .fraction = sgc.currentWordNum/sgc.numberOfDisplayedWords endif call drawProgressTriangle -1 .x .y .size .fraction '.color$' Green .currentX = drawProgressTriangle.currentX .endX = .currentX - 0.5 .lowY = .y - .size .highY = .y + .size .displayColor$ = .color$ if sgc.currentWordNum >= sgc.numberOfDisplayedWords .displayColor$ = "Green" endif demo Paint rectangle... '.displayColor$' '.currentX' '.endX' '.lowY' '.highY' endproc procedure DrawNext .color$ .x .y .size demo '.color$' .size *= 2/3 .fraction = 0 if sgc.numberOfDisplayedWords > 0 .fraction = sgc.currentWordNum/sgc.numberOfDisplayedWords endif call drawProgressTriangle 1 .x .y .size .fraction '.color$' Green .currentX = drawProgressTriangle.currentX .endX = .currentX + 0.5 .lowY = .y - .size .highY = .y + .size .displayColor$ = .color$ if sgc.currentWordNum >= sgc.numberOfDisplayedWords .displayColor$ = "Green" endif demo Paint rectangle... '.displayColor$' '.currentX' '.endX' '.lowY' '.highY' endproc procedure DrawSelectWords .color$ .x .y .size .currentFontSize = 48 .y -= .size/2 + 0.5 .maxHeight = 2*.size call adjustFontSizeOnHeight 'defaultFont$' '.currentFontSize' '.maxHeight' .currentFontSize = adjustFontSizeOnHeight.currentFontSize call set_font_size '.currentFontSize' demo Colour... '.color$' demo Text... '.x' Centre '.y' Bottom \bu\bu\bu call set_font_size 'defaultFontSize' endproc procedure DrawWordListUp .color$ .x .y .size .xleft = .x - .size .xright = .x + .size .xmidleft = .x + 0.1 .xmidright = .x - 0.1 .ylow = .y .yhigh = .y + .size demo '.color$' demo Line width... 3 demo Draw line... .xleft .ylow .xmidleft .yhigh demo Draw line... .xright .ylow .xmidright .yhigh demo Line width... 'defaultLineWidth' demo Black endproc procedure DrawWordListDown .color$ .x .y .size .xleft = .x - .size .xright = .x + .size .xmidleft = .x + 0.1 .xmidright = .x - 0.1 .yhigh = .y + .size .ylow = .y demo '.color$' demo Line width... 3 demo Draw line... .xleft .yhigh .xmidleft .ylow demo Draw line... .xright .yhigh .xmidright .ylow demo Line width... 'defaultLineWidth' demo Black endproc procedure drawTriangle .direction .x .y .size # Make sure direction = +/- 1 if .direction = 0 .direction = 1 endif .direction /= abs(.direction) .offset = 0.01 .currentHeight = .size .currentX = .x - .direction*.size demo Line width... 2.0 while .currentHeight> 0 .ystart = .y + .currentHeight .yend = .y - .currentHeight demo Draw line... .currentX .ystart .currentX .yend .currentHeight -= .offset *3/4 .currentX += .direction*.offset * 1.5 endwhile demo Line width... 'defaultLineWidth' endproc procedure drawProgressTriangle .direction .x .y .size .fraction .color1$ .color2$ # Make sure direction = +/- 1 if .direction = 0 .direction = 1 endif .direction /= abs(.direction) .offset = 0.01 .currentHeight = .size .startX = .x - .direction*.size .currentX = .startX demo Line width... 2.0 while .currentHeight> 0 # Implement progress bar in .color2$ if .direction*(.currentX - .startX)/.size <= 2*.fraction demo '.color2$' else demo '.color1$' endif .ystart = .y + .currentHeight .yend = .y - .currentHeight demo Draw line... .currentX .ystart .currentX .yend .currentHeight -= .offset *3/4 .currentX += .direction*.offset * 1.5 endwhile demo Line width... 'defaultLineWidth' demo '.color1$' endproc ############################################################### # # Obligatory button Drawing Routines # # These MUST be defined # ############################################################### procedure DrawRecord .color$ .x .y .size .size /= 2 demo Paint circle... '.color$' '.x' '.y' '.size' endproc procedure DrawPlay .color$ .x .y .size demo '.color$' call drawTriangle 1 .x .y .size endproc procedure DrawQuit .color$ .x .y .size demo Colour... '.color$' .lineWidth = 0.5*.size**2 demo Line width... '.lineWidth' .xstart = .x - .size .ystart = .y + .size .xend = .x + .size .yend = .y - .size demo Draw line... .xstart .ystart .xend .yend .xstart = .x - .size .ystart = .y - .size .xend = .x + .size .yend = .y + .size demo Draw line... .xstart .ystart .xend .yend demo Line width... 'defaultLineWidth' demo Colour... Black endproc procedure DrawConfig .color$ .x .y .size .size *= 1 .lineWidth = 0.4*.size demo Arrow size... '.lineWidth' .lineWidth = 0.4*.size**2 demo Line width... '.lineWidth' .y += .size/2 .xstart = .x - .size .xend = .x + .size demo Draw arrow... .xstart .y .xend .y demo Line width... 'defaultLineWidth' endproc procedure DrawRefresh .color$ .x .y .size .lineWidth = 0.5*.size**2 .size /= 2 demo Line width... '.lineWidth' demo Draw arc... '.x' '.y' '.size' 0 270 demo Line width... 'defaultLineWidth' endproc ############################################################### # # Button Processing Routines # ############################################################### procedure processMainPageExample .clickX .clickY .pressed$ call generate_example endproc procedure processMainPagePrevious .clickX .clickY .pressed$ call clean_up_sound call display_text Grey call previous_word # Draw the contour call wipeArea 'wipeFeedbackArea$' call init_window call display_text Black sgc.failedAttempts = 0 endproc procedure processMainPageNext .clickX .clickY .pressed$ call clean_up_sound call display_text Grey call next_word call wipeArea 'wipeFeedbackArea$' call init_window # Draw the contour call display_text Black endproc procedure processMainPageWordlistUp .clickX .clickY .pressed$ call wipeArea 'wipeFeedbackArea$' call load_word_list "'localWordlistDir$'" -1 call init_window call display_text Black endproc procedure processMainPageWordlistDown .clickX .clickY .pressed$ call wipeArea 'wipeFeedbackArea$' call load_word_list "'localWordlistDir$'" 1 call init_window call display_text Black endproc procedure processMainPageGRADE .clickX .clickY .pressed$ call setGrade '.pressed$' # Redraw window call init_window endproc procedure processMainPagePinYinArea .clickX .clickY .pressed$ # Redraw window sgc.writeAll = 1 call display_text Red sgc.writeAll = 0 endproc # Select the words to practise. This is quite a complex piece of code procedure processMainPageSelectWords .clickX .clickY .pressed$ .table$ = "MainPage" .label$ = "SelectWords" call Draw_button '.table$' '.label$' 1 # Get help text call findLabel '.table$' '.label$' .row = findLabel.row select Table '.table$' .helpText$ = Get value... '.row' Helptext call convert_praat_to_latin1 '.helpText$' .helpText$ = convert_praat_to_latin1.text$ # Implement Cancel select sgc.currentWordlist .tmpOriginalWordlist = Copy: "Original_'wordlist$'" # Remove current list from All wordlists table select sgc.allWordLists .rowNum = Search column: "Name", wordlistName$ if .rowNum > 0 .numRows = Get number of rows if .numRows > 1 Remove row: .rowNum else Set string value: 1, "Name", "---" endif endif # Set current word select sgc.currentWordlist sgc.numberOfWords = Get number of rows .currentWord = sgc.currentWord if .currentWord <= 0 or .currentWord > sgc.numberOfWords or config.shuffleLists .currentWord = 1 endif # The texts call get_feedback_text 'config.language$' AddWordlist call convert_praat_to_latin1 'get_feedback_text.text$' .wordlistText$ = convert_praat_to_latin1.text$ call get_feedback_text 'config.language$' Part call convert_praat_to_latin1 'get_feedback_text.text$' .partText$ = convert_praat_to_latin1.text$ call get_feedback_text 'config.language$' Tones call convert_praat_to_latin1 'get_feedback_text.text$' .toneText$ = convert_praat_to_latin1.text$ call get_feedback_text 'config.language$' Cancel call convert_praat_to_latin1 'get_feedback_text.text$' .cancelText$ = convert_praat_to_latin1.text$ call get_feedback_text 'config.language$' Clear call convert_praat_to_latin1 'get_feedback_text.text$' .clearText$ = convert_praat_to_latin1.text$ call get_feedback_text 'config.language$' All call convert_praat_to_latin1 'get_feedback_text.text$' .allText$ = convert_praat_to_latin1.text$ call get_feedback_text 'config.language$' Previous call convert_praat_to_latin1 'get_feedback_text.text$' .prevWord$ = convert_praat_to_latin1.text$ call get_feedback_text 'config.language$' Next call convert_praat_to_latin1 'get_feedback_text.text$' .nextWord$ = convert_praat_to_latin1.text$ call get_feedback_text 'config.language$' Continue call convert_praat_to_latin1 'get_feedback_text.text$' .continueText$ = convert_praat_to_latin1.text$ call get_feedback_text 'config.language$' Show call convert_praat_to_latin1 'get_feedback_text.text$' .showText$ = convert_praat_to_latin1.text$ call get_evaluation_text 'config.language$' Pinyin .pinyinText$ = get_evaluation_text.text$ call get_evaluation_text 'config.language$' Character .characterText$ = get_evaluation_text.text$ call get_evaluation_text 'config.language$' Example .exampleText$ = get_evaluation_text.text$ call get_evaluation_text 'config.language$' Translation .translationText$ = get_evaluation_text.text$ call get_evaluation_text 'config.language$' ManualEntry .manualEntryText$ = get_evaluation_text.text$ # Get lesson names select sgc.currentWordlist .lessonCol = Get column index: "Lesson" if .lessonCol <= 0 Append column: "Lesson" .lessonCol = Get column index: "Lesson" .numRows = Get number of rows for .w to .numRows Set string value: .w, "Lesson", "-" endfor endif .lessonList$ = tab$ .numLessons = 0 .lessonName$ = "" # All shown keeps track whether all words are shown # If so, selecting a lesson is preceded by a Clear All .allShown = 0 # Sort words for consistent selection interface if config.shuffleLists # Allow subdivision in lessons if .lessonCol > 0 Sort rows... Lesson Pinyin else Sort rows... Pinyin endif endif if .lessonCol > 0 for .i to sgc.numberOfWords .currentLesson$ = Get value: .i, "Lesson" .matchLesson$ = tab$+.currentLesson$+tab$ if .currentLesson$ <> "" and .currentLesson$ <> "-" and .currentLesson$ <> "?" and index(.lessonList$, .matchLesson$) <= 0 .lessonList$ = .lessonList$ + .currentLesson$ + tab$ .numLessons += 1 .lessonName$['.numLessons'] = .currentLesson$ endif .shown$ = Get value: .i, "Show" if .shown$ = "-" .allShown = 0 endif endfor endif clicked = -1 .numWordsPerScreen = 15 while clicked <> 6 and clicked <> 1 .lessonSelected = -1 .toneSelected = -1 .firstShown = -1 select sgc.currentWordlist .lessonCol = Get column index: "Lesson" # Sort words for consistent selection interface if config.shuffleLists # Allow subdivision in lessons if .numLessons > 1 Sort rows... Lesson Pinyin else Sort rows... Pinyin endif endif .max = .numWordsPerScreen - 1 if .currentWord + .max > sgc.numberOfWords .max = sgc.numberOfWords - .currentWord endif for .i from 0 to .numWordsPerScreen - 1 if .i <= .max .currentPinyin$ = Get value: .currentWord+.i, "Pinyin" if index_regex(.currentPinyin$, "[0-9]") <= 0 call pinyin2numbers '.currentPinyin$' .currentPinyin$ = replace_regex$(pinyin2numbers.intermediatePinyin$, ".+", "\l&", 0) .currentPinyin$ = replace_regex$(.currentPinyin$, "[^a-zA-Z0-9]", "", 0) endif .pinyin$[.i] = .currentPinyin$ .character$[.i] = Get value: .currentWord+.i, "Character" .lessonNum$[.i] = "" if .numLessons > 1 .lessonNum$[.i] = Get value: .currentWord+.i, "Lesson" .lessonNum$[.i] = " : " + .lessonNum$[.i] endif .showText$[.i] = .pinyin$['.i'] if .character$['.i'] <> "-" .showText$[.i] = .pinyin$['.i']+" ("+.character$['.i']+.lessonNum$['.i']+")" elsif .lessonNum$['.i'] <> "" .showText$[.i] = .pinyin$['.i']+" ( -"+.lessonNum$['.i']+")" endif .showValueText$[.i] = Get value: .currentWord+.i, "Show" if .showValueText$[.i] = "-" .showValue[.i] = 0 else .showValue[.i] = 1 endif .showVariable$[.i] = .pinyin$[.i] # This prevents some nasty attempts to use language elements as variabels if index_regex(.showVariable$[.i], "[^0-9]$") .showVariable$[.i] = .pinyin$[.i]+"0" endif .tmp$ = replace_regex$(.showVariable$[.i], "^(.+)$", "\l\1", 0) .tmp$ = replace_regex$(.tmp$, "[^\w]", "_", 0) '.tmp$' = .showValue[.i] else .showText$[.i] = "-" .showValue[.i] = 0 endif endfor # The user text input window (beginPause .... endPause) beginPause(.helpText$) if sgc.allWordLists > 0 select sgc.allWordLists .numWordlists = Get number of rows optionMenu: .wordlistText$, 1 option: "---" for .w to .numWordlists select sgc.allWordLists .wordListName$ = Get value: .w, "Name" option: .wordListName$ endfor option: "*"+.manualEntryText$+"*" endif boolean (.showText$[0], .showValue[0]) boolean (.showText$[1], .showValue[1]) boolean (.showText$[2], .showValue[2]) boolean (.showText$[3], .showValue[3]) boolean (.showText$[4], .showValue[4]) boolean (.showText$[5], .showValue[5]) boolean (.showText$[6], .showValue[6]) boolean (.showText$[7], .showValue[7]) boolean (.showText$[8], .showValue[8]) boolean (.showText$[9], .showValue[9]) boolean (.showText$[10], .showValue[10]) boolean (.showText$[11], .showValue[11]) boolean (.showText$[12], .showValue[12]) boolean (.showText$[13], .showValue[13]) boolean (.showText$[14], .showValue[14]) if .numLessons > 0 optionMenu: .partText$, 1 option: "---" .j = 0 for .j to .numLessons option: .lessonName$['.j'] endfor endif optionMenu: .toneText$, 1 option: "---" option: "0" option: "1" option: "2" option: "3" option: "4" clicked = endPause ("'.cancelText$'", "'.clearText$'", "'.allText$'", "'.prevWord$'", "'.nextWord$'", "'.continueText$'", 6, 1) select sgc.currentWordlist if clicked = 2 for .i to sgc.numberOfWords Set string value: .i, "Show", "-" endfor .allShown = 0 elsif clicked = 3 for .i to sgc.numberOfWords Set string value: .i, "Show", "+" endfor .allShown = 1 elsif clicked != 1 # Handle added word lists .wordlistText$ = replace_regex$(.wordlistText$, "^(.)", "\l\1", 0) .wordlistText$ = replace_regex$(.wordlistText$, "[^\w]", "_", 0) .tmp$ = '.wordlistText$'$ if .tmp$ <> "---" and sgc.allWordLists > 0 select sgc.currentWordlist # Add current wordlist name as a lesson name .originalWordList = -1 .numRows = Get number of rows for .w to .numRows select sgc.currentWordlist .currentLesson$ = Get value: .w, "Lesson" if .currentLesson$ = "" or .currentLesson$ = "-" Set string value: .w, "Lesson", wordlist$ endif endfor # Get and merge the selected list # Enter words by hand if .tmp$ = "*"+.manualEntryText$+"*" .man_clicked = 3 .currentFilePath$ = .exampleText$ .manualText$ = .manualEntryText$ .manPinyin$ = .pinyinText$ .manCharacter$ = .characterText$ .manTranslation$ = .translationText$ .manSound$ = .currentFilePath$ .manLesson$ = .manualText$ while .man_clicked > 1 beginPause: .manualEntryText$ text: .pinyinText$, .manPinyin$ text: .characterText$, .manCharacter$ text: .translationText$, .manTranslation$ text: .exampleText$, .manSound$ text: .manualText$, .manualText$ .man_clicked = endPause("'.cancelText$'", "'.exampleText$'", "'.continueText$'", 3, 1) if .man_clicked > 1 .tmp$ = replace_regex$(.pinyinText$, "[^\w]", "_", 0) .tmp$ = replace_regex$(.tmp$, "^(.+)$", "\l\1", 0) if '.tmp$'$ <> .pinyinText$ .manPinyin$ = '.tmp$'$ else # Quit .man_clicked = 0 endif .tmp$ = replace_regex$(.characterText$, "[^\w]", "_", 0) .tmp$ = replace_regex$(.tmp$, "^(.+)$", "\l\1", 0) if '.tmp$'$ <> .characterText$ .manCharacter$ = '.tmp$'$ else .manCharacter$ = "" endif .tmp$ = replace_regex$(.translationText$, "[^\w]", "_", 0) .tmp$ = replace_regex$(.tmp$, "^(.+)$", "\l\1", 0) if '.tmp$'$ <> .translationText$ .manTranslation$ = '.tmp$'$ else .manTranslation$ = "" endif .tmp$ = replace_regex$(.exampleText$, "[^\w]", "_", 0) .tmp$ = replace_regex$(.tmp$, "^(.+)$", "\l\1", 0) if '.tmp$'$ <> .characterText$ and '.tmp$'$ <> "" .manSound$ = '.tmp$'$ endif .tmp$ = replace_regex$(.manualText$, "[^\w]", "_", 0) .tmp$ = replace_regex$(.tmp$, "^(.+)$", "\l\1", 0) .manLesson$ = '.tmp$'$ if .man_clicked = 2 .manSound$ = chooseReadFile$(.exampleText$); elsif .man_clicked = 3 # Clean up input string .manPinyin$ = replace_regex$(.manPinyin$, "^[^a-z]+", "", 0) .manPinyin$ = replace_regex$(.manPinyin$, "[^\w']", "", 0) select sgc.currentWordlist Append row .numRows = Get number of rows if .manPinyin$ <> "" Set string value: .numRows, "Pinyin", .manPinyin$ Set string value: .numRows, "Character", .manCharacter$ Set string value: .numRows, "Translation", .manTranslation$ Set string value: .numRows, "Sound", .manSound$ Set string value: .numRows, "Lesson", .manLesson$ Set string value: .numRows, "Show", "+" endif .manualText$ = .manualEntryText$ .manPinyin$ = .pinyinText$ .manCharacter$ = .characterText$ .manTranslation$ = .translationText$ .manSound$ = .currentFilePath$ .manLesson$ = .manualText$ endif endif endwhile else # Existing lessons select sgc.allWordLists .wordlistNum = Search column: "Name", .tmp$ if .wordlistNum > 0 .wordlistPath$ = Get value: .wordlistNum, "Directory" .wordlistPath$ = replace_regex$(.wordlistPath$, "[ ]", "&", 0) call read_wordlist "'.tmp$'" '.wordlistPath$' .newList = read_wordlist.wordlistID call merge_into_wordlist '.newList' '.tmp$' select .newList Remove # Add wordlistname to Lesson column select sgc.allWordLists .numRows = Get number of rows if .numRows > 1 Remove row: .wordlistNum else Set string value: 1, "Name", "---" endif endif endif # Gather Lesson names select sgc.currentWordlist Sort rows... Lesson Pinyin if .lessonCol > 0 sgc.numberOfWords = Get number of rows .lessonList$ = tab$ .numLessons = 0 .lessonName$ = "" for .i to sgc.numberOfWords .currentLesson$ = Get value: .i, "Lesson" .matchLesson$ = tab$+.currentLesson$+tab$ if .currentLesson$ <> "" and .currentLesson$ <> "-" and .currentLesson$ <> "?" and index(.lessonList$, .matchLesson$) <= 0 .lessonList$ = .lessonList$ + .currentLesson$ + tab$ .numLessons += 1 .lessonName$['.numLessons'] = .currentLesson$ endif .shown$ = Get value: .i, "Show" if .shown$ = "-" .allShown = 0 endif endfor endif else select sgc.currentWordlist # Get selected Part BEFORE we do anything else if .numLessons > 0 .tmp$ = replace_regex$(.partText$, "^(.)", "\l\1", 0) .lessonSelected = '.tmp$' - 1 endif if .lessonSelected > 0 .allShown = 1 .firstShown = -1 select sgc.currentWordlist for .i to sgc.numberOfWords # Keep track of whether all are shown .shown$ = Get value: .i, "Show" if .shown$ = "-" .allShown = 0 endif endfor for .i to sgc.numberOfWords # Lessons .currentLesson$ = Get value: .i, "Lesson" if .currentLesson$ = .lessonName$['.lessonSelected'] Set string value: .i, "Show", "+" elsif .allShown = 1 Set string value: .i, "Show", "-" endif endfor for .i to sgc.numberOfWords # Keep track of whether all are shown .shown$ = Get value: .i, "Show" if .firstShown <=0 and .shown$ <> "-" .firstShown = .i endif endfor else for .i from 0 to .max .tmp$ = replace_regex$(.showVariable$['.i'], "^(.*)$", "\l\1", 0) .tmp$ = replace_regex$(.tmp$, "[^\w]", "_", 0) .showValue['.i'] = '.tmp$' .showWord$['.i'] = "-" if .showValue['.i'] <> 0 .showWord$['.i'] = "+" endif Set string value: .currentWord+.i, "Show", .showWord$['.i'] endfor endif endif select sgc.currentWordlist .tmp$ = replace_regex$(.toneText$, "^(.)", "\l\1", 0) .tmp$ = replace_regex$(.tmp$, "[^\w]", "_", 0) .toneSelected = '.tmp$' - 2 if .toneSelected >= 0 select sgc.currentWordlist for .i to sgc.numberOfWords .currentPinyin$ = Get value: .i, "Pinyin" if index_regex(.currentPinyin$, "[0-9]") <= 0 call pinyin2numbers '.currentPinyin$' .currentPinyin$ = replace_regex$(pinyin2numbers.intermediatePinyin$, ".+", "\l&", 0) .currentPinyin$ = replace_regex$(.currentPinyin$, "[^a-zA-Z0-9]", "", 0) endif .tmp$ = Get value: .i, "Show" if .tmp$ <> "-" and index(.currentPinyin$, "'.toneSelected'") > 0 Set string value: .i, "Show", "+" else Set string value: .i, "Show", "-" .allShown = 0 endif endfor endif if clicked = 4 if .firstShown > 0 .currentWord = (.firstShown div .numWordsPerScreen) * .numWordsPerScreen + 1 elsif .toneSelected < 0 .currentWord -= .numWordsPerScreen endif if .currentWord <= 0 .currentWord = (sgc.numberOfWords div .numWordsPerScreen) * .numWordsPerScreen + 1 endif elsif clicked = 5 if .firstShown > 0 .currentWord = (.firstShown div .numWordsPerScreen) * .numWordsPerScreen + 1 elsif .toneSelected < 0 .currentWord += .numWordsPerScreen endif if .currentWord > sgc.numberOfWords .currentWord = 1 endif endif endif # Reset and go to the first selected word (can shuffle list) if clicked = 6 sgc.currentWord = -1 call next_word call init_window endif endwhile # Implement Cancel if clicked = 1 select sgc.currentWordlist Remove select .tmpOriginalWordlist Copy: wordlist$ sgc.currentWordlist = selected() else # Set the values of the number of words shown select sgc.currentWordlist .numWords = Get number of rows sgc.currentWordNum = 1 sgc.numberOfDisplayedWords = 0 sgc.currentWord = 0 for .i to .numWords .show$ = Get value: .i, "Show" if .show$ = "+" if sgc.currentWord < 1 sgc.currentWord = .i endif sgc.numberOfDisplayedWords += 1 endif endfor endif select .tmpOriginalWordlist Remove call Draw_button '.table$' '.label$' 0 endproc ############################################################### # # Obligatory button Processing Routines # # These MUST be defined # ############################################################### procedure processMainPageQuit .clickX .clickY .pressed$ call end_program endproc procedure processMainPageRefresh .clickX .clickY .pressed$ call clean_up_sound call init_window endproc procedure processMainPageConfig .clickX .clickY .pressed$ call config_page endproc procedure processMainPageHelp .clickX .clickY .pressed$ call help_loop 'buttons$' init_window endproc procedure processMainPagePlay .clickX .clickY .pressed$ .table$ = "MainPage" .label$ = "Play" if recordedSound$ <> "" call play_sound 'sgc.recordedSound' mainPage.play = 0 endif te.buttonPressValue = mainPage.play endproc procedure Set_Play_Button mainPage.play = -1 if recordedSound$ <> "" mainPage.play = 0 endif call Draw_button MainPage Play 'mainPage.play' endproc procedure processMainPageRecord .clickX .clickY .pressed$ call count_syllables .recordingTime = recordingTime if count_syllables.number > 2 .recordingTime = recordingTime + 1.0*ceiling((count_syllables.number - 2)/2) endif call record_sound '.recordingTime' call recognizeTone mainPage.play = 0 call Set_Play_Button # Wipe screen call wipeArea 'wipeContourArea$' call draw_tone_contour # Write text (again) call display_word_list_name call display_text Black call add_feedback_to_toneevaluation Feedback call write_feedback Feedback select Table Feedback Remove # Do not exercise words that are going well (autoSelect) if add_feedback_to_toneevaluation.result > 0 if config.adaptiveLists > 0 and sgc.failedAttempts < 2 # Deselect current word select sgc.currentWordlist .i = Search column: "Pinyin", sgc.pinyin$ if .i > 0 Set string value: .i, "Show", "-" endif endif sgc.failedAttempts = 0 else sgc.failedAttempts += 1 endif endproc ############################################################### # # Miscelaneous supporting code # ############################################################### # The example procedure generate_example select sgc.currentWordlist if sgc.currentWord > 0 and sgc.currentWord <= sgc.numberOfWords select sgc.currentWordlist .sound$ = Get value... 'sgc.currentWord' Sound call readPinyin 'sgc.currentWord' sgc.pinyin$ = readPinyin.pinyin$ if .sound$ = "-" or .sound$ = "" .sound$ = sgc.pinyin$+".wav" endif if index_regex(.sound$, "^(/|~/|[A-Z]:\\)") > 0 .soundFilePath$ = .sound$ else .soundFilePath$ = localWordlistDir$+"/"+wordlistName$+"/"+.sound$ .wordlistDirectory$ = "" if localWordlistDir$ <> "" and fileReadable("'localWordlistDir$'/'wordlistName$'") .wordlistDirectory$ = "'localWordlistDir$'/'wordlistName$'" elsif sgc2wordlists$ <> "" and fileReadable("'sgc2wordlists$'/'wordlistName$'") .wordlistDirectory$ = "'sgc2wordlists$'/'wordlistName$'" elsif globalwordlists$ <> "" and fileReadable("'globalwordlists$'/'wordlistName$'") .wordlistDirectory$ = "'globalwordlists$'/'wordlistName$'" endif if .wordlistDirectory$ <> "" .audioExampleList = Create Strings as file list... AudioList '.wordlistDirectory$'/'sgc.pinyin$'.* .number_of_examples = Get number of strings if .number_of_examples > 0 Randomize .sound$ = Get string... 1 .soundFilePath$ = "'.wordlistDirectory$'/'.sound$'" endif Remove endif endif if fileReadable(.soundFilePath$) and config.useSoundExample .tmp = -1 .tmp = nocheck Read from file... '.soundFilePath$' if .tmp != undefined and .tmp > 0 call play_sound '.tmp' select .tmp Remove endif elsif config.synthesis$ <> "" and config.synthesis$ <> "_DISABLED_" call synthesize_sound 'sgc.pinyin$' else call humToneContour 'sgc.pinyin$' 'config.register' call reset_viewport endif endif demoShow() endproc # Draw a tone contour procedure draw_tone_contour select sgc.currentWordlist if sgc.currentWord > 0 and sgc.currentWord <= sgc.numberOfWords .sound$ = Get value... 'sgc.currentWord' Sound call readPinyin 'sgc.currentWord' sgc.pinyin$ = readPinyin.pinyin$ call drawToneContour 'sgc.pinyin$' 'config.register' call reset_viewport if te.recordedPitch > 0 call drawSourceToneContour te.recordedPitch endif endif endproc procedure recognizeTone select sgc.currentWordlist if sgc.currentWord > 0 and sgc.currentWord <= sgc.numberOfWords .strict = 0 if index_regex(config.strict$, "[^0-9]") <= 0 .strict = ('config.strict$' >= sgc.highestLevel) endif .sound$ = Get value... 'sgc.currentWord' Sound call readPinyin 'sgc.currentWord' sgc.pinyin$ = readPinyin.pinyin$ call align_recordedSound 'sgc.pinyin$' call sgc_ToneProt 'recordedSound$' 'sgc.pinyin$' 'config.register' '.strict' 'config.language$' # sgc_ToneProt manipulates the sound given. Reconnect select Sound 'recordedSound$' sgc.recordedSound = selected("Sound") call reset_viewport endif endproc procedure write_feedback .table$ select Table '.table$' .line1$ = Get value... 1 Text .line2$ = Get value... 2 Text .label$ = Get value... 3 Text # convert numbers to Pinyin if needed if not config.displayNumbers call numbers2pinyin '.line1$' .line1$ = numbers2pinyin.pinyin$ endif .color$ = "Red" if index(.line1$, "???") > 0 .color$ = "Black" elsif .label$ = "Correct" .color$ = "Green" elsif config.strict$ = "'sgc.highestLevel'" .line2$ = .line2$ + " *" endif .currentFeedbackFontSize = 14 .maxHeight = 21 - 17 call adjustFontSizeOnHeight 'defaultFont$' '.currentFeedbackFontSize' '.maxHeight' .currentFeedbackFontSize = adjustFontSizeOnHeight.newFontSize call wipeArea 'wipeFeedbackArea$' call set_font_size '.currentFeedbackFontSize' demo '.color$' demo Text... 50 Centre 21 Bottom '.line1$' demo Text... 50 Centre 17 Bottom '.line2$' demoShow() demo 'defaultFont$' call set_font_size 'defaultFontSize' endproc # Text display procedure display_text .color$ select sgc.currentWordlist if sgc.currentWord < 0 or sgc.currentWord > sgc.numberOfWords+1 call clean_up_sound if config.shuffleLists Randomize rows endif if sgc.currentWord < 0 sgc.currentWord = sgc.numberOfWords else sgc.currentWord = 1 endif endif .changeCJKstyle = 0 if sgc.currentWord > 0 and sgc.currentWord <= sgc.numberOfWords .displayText$ = "" call readDisplayPinyin 'sgc.currentWord' .displayPinyin$ = readDisplayPinyin.pinyin$ .displayChar$ = Get value... 'sgc.currentWord' Character .displayTrans$ = Get value... 'sgc.currentWord' Translation if .displayPinyin$ <> "-" and (config.displayPinyin or sgc.writeAll) if not config.displayNumbers call numbers2pinyin '.displayPinyin$' .displayPinyin$ = numbers2pinyin.pinyin$ endif # Insert u umlaut .displayPinyin$ = replace_regex$(.displayPinyin$, "v", "\\u\X22", 0) .displayText$ = .displayText$ + .displayPinyin$ endif if .displayChar$ <> "-" and (config.displayChar or sgc.writeAll) .displayText$ = .displayText$ + " "+ .displayChar$ .changeCJKstyle = 1 endif if .displayTrans$ <> "-" and (config.displayTrans or sgc.writeAll) .displayText$ = .displayText$ + " \s{%%"+ .displayTrans$ + "%}" endif elsif sgc.currentWord = 0 or sgc.currentWord = sgc.numberOfWords+1 call clean_up_sound .displayText$ = "---" endif # Adapt font size call adjustFontSizeOnHeight 'defaultFont$' 24 15 .currentFontSize = adjustFontSizeOnHeight.newFontSize call adjustFontSizeOnWidth 'defaultFont$' '.currentFontSize' 95 '.displayText$' .currentFontSize = adjustFontSizeOnWidth.newFontSize # Clear the writing area call wipeArea 'wipePinyinArea$' # Switch back to Chinese style CJK when in Japanese language mode if .changeCJKstyle and config.language$ = "JA" CJK font style preferences: "Chinese" endif # Actually display text demo '.color$' call set_font_size '.currentFontSize' demo Text... 50 Centre 26 Bottom '.displayText$' demoShow() demo Black demo 'defaultFont$' call set_font_size 'defaultFontSize' if .changeCJKstyle and config.language$ = "JA" if config.language$ = "JA" CJK font style preferences: "Japanese" elsif config.language$ = "ZH" CJK font style preferences: "Chinese" endif endif # Switch back to Japanese style CJK when in Japanese language mode if .changeCJKstyle and config.language$ = "JA" CJK font style preferences: "Japanese" endif endproc procedure numbers2pinyin .numberstext$ .intermediatePinyin$ = .numberstext$ # Add a `-quote between vowels .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "([aeuiov])([0-9])([aeuiov])", "\1\2'\3", 0) # Move numbers to the nucleus vowel # To the vowel .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "([aeuiov])([^aeuiov0-9]*)([0-9])", "\1\3\2", 0) # Either a/e .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "([ae])([aeuiov]*)([0-9])", "\1\3\2", 0) # Or the Oo in /ou/ .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(ou)([0-9])", "o\2u", 0) # or the second vowel .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "([uiov][aeuiov])([uiov])([0-9])", "\1\3\2", 0) # Convert all tones to special characters # Tone 1 .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "a1", "ā", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "e1", "ē", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "u1", "ū", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "i1", "ī", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "o1", "ō", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "v1", "ǖ", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "1", "\\-^", 0) # Tone 2 .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "v2", "ǘ", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "([iaeou])2", "\\\1'", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "2", "\\'^", 0) # Tone 3 .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "a3", "ǎ", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "e3", "ě", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "u3", "ǔ", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "i3", "ǐ", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "o3", "ǒ", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "v3", "ǚ", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "3", "\\N^", 0) # Tone 4 .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "v4", "ǜ", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "([iaeou])4", "\\\1`", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "4", "\\`^", 0) # Tone 0 # Remove tone 0 symbol completely .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "0", "", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "a0", "å", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "e0", "e̊", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "u0", "ů", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "i0", "i̊", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "o0", "o̊", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "v0", "ü̊", 0) #.intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "0", "\\0^", 0) # Pick best vowel symbols available in cases not caught before # Ugly clutch to get the 1, 3, 0 tone diacritics at least in the neighbourhood .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "i(\\[-N0]\^)", "i\\s{_ }\1", 0) # Insert u umlaut .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "v", "\\u\X22", 0) .pinyin$ = .intermediatePinyin$ endproc # NEEDS WORK AND TESTING!! # Convert unicode Pinyin into tone numbers procedure pinyin2numbers .pinyin$ .intermediatePinyin$ = .pinyin$ # Convert all special characters to numbers # Tone 1 .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iā)([iaeouü]*)", "a\11", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iē)([iaeouü]*)", "e\11", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iū)([iaeouü]*)", "u\11", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iī)([iaeouü]*)", "i\11", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iō)([iaeouü]*)", "o\11", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iǖ)([iaeouü]*)", "v\11", 0) # Tone 2 .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iá)([iaeouü]*)", "a\12", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?ié)([iaeouü]*)", "e\12", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iú)([iaeouü]*)", "u\12", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?ií)([iaeouü]*)", "i\12", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?ió)([iaeouü]*)", "o\12", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iǘ)([iaeouü]*)", "v\12", 0) # Tone 3 .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iǎ)([iaeouü]*)", "a\13", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iě)([iaeouü]*)", "e\13", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iǔ)([iaeouü]*)", "u\13", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iǐ)([iaeouü]*)", "i\13", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iǒ)([iaeouü]*)", "o\13", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iǚ)([iaeouü]*)", "v\13", 0) # Tone 4 .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?ià)([iaeouü]*)", "a\14", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iè)([iaeouü]*)", "e\14", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iù)([iaeouü]*)", "u\14", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iì)([iaeouü]*)", "i\14", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iò)([iaeouü]*)", "o\14", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iǜ)([iaeouü]*)", "v\14", 0) # Tone 0 # Add tone 0 .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iå)([iaeouü]*)", "a\10", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "e̊([iaeouü]*)", "e\10", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "(?iů)([iaeouü]*)", "u\10", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "i̊([iaeouü]*)", "i\10", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "o̊([iaeouü]*)", "o\10", 0) .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "ü̊([iaeouü]*)", "v\10", 0) # Syllables without a tone symbol are tone 0 .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "([aeuiov]+)([^0-9aeuiov]|\W|$)", "\10\2", 0) # Move numbers to the end of the syllable. # Syllables ending in n and start with g. Note that a syllable cannot start with an u or i .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "([aeuiov])([0-9])(n)(g[aeuiov])", "\1\3\2\4", 0) # Syllables ending in (ng?) followed by something that is not a valid vowel .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "([aeuiov])([0-9])(ng?)([^aeuiov]|\W|$)", "\1\3\2\4", 0) # Syllables ending in r .intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "([aeuiov])([0-9])(r)([^aeuiov]|\W|$)", "\1\3\2\4", 0) # Remove quotes etc #.intermediatePinyin$ = replace_regex$(.intermediatePinyin$, "[\\'\\`]", "", 0) .numberstext$ = .intermediatePinyin$ endproc procedure readDisplayPinyin .currentWord select sgc.currentWordlist .pinyin$ = Get value... '.currentWord' Pinyin # Everything to lowercase if index_regex(.pinyin$, "[0-9]") <= 0 call pinyin2numbers '.pinyin$' .pinyin$ = pinyin2numbers.numberstext$ endif endproc procedure readPinyin .currentWord call readDisplayPinyin '.currentWord' .pinyin$ = replace_regex$(readDisplayPinyin.pinyin$, ".+", "\L&", 0) .pinyin$ = replace_regex$(.pinyin$, "[\\'\\` ]", "", 0) # Remove anything that is objectionable .pinyin$ = replace_regex$(.pinyin$, "[^\w']", "", 0) endproc # Includes #! praat # # SpeakGoodChinese: SGC_ToneRecognizer.praat processes student utterances # and generates a report on their tone production # # Copyright (C) 2007-2010 R.J.J.H. van Son # The SpeakGoodChinese team are: # Guangqin Chen, Zhonyan Chen, Stefan de Koning, Eveline van Hagen, # Rob van Son, Dennis Vierkant, David Weenink # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Needs: # include ToneRecognition.praat # include ToneScript.praat # procedure loadTable # procedure sgc_ToneProt sgc_ToneProt.currentSound$ sgc_ToneProt.pinyin$ sgc_ToneProt.register sgc_ToneProt.proficiency sgc_ToneProt.language$ # Remove if included in main program! sgc_ToneProt.viewportMargin = 5 sgc_ToneProt.precision = 3 if sgc_ToneProt.proficiency sgc_ToneProt.precision = 1.5 endif # Stick to the raw recognition results or not sgc_ToneProt.ultraStrict = sgc_ToneProt.proficiency # Read and select the feedbacktext call testLoadTable ToneFeedback_'sgc_ToneProt.language$' if testLoadTable.table > 0 call loadTable ToneFeedback_'sgc_ToneProt.language$' else call loadTable ToneFeedback_EN endif Rename... ToneFeedback numberOfFeedbackRows = Get number of rows # Clean up input if sgc_ToneProt.pinyin$ <> "" sgc_ToneProt.pinyin$ = replace_regex$(sgc_ToneProt.pinyin$, "^\s*(.+)\s*$", "\1", 1) sgc_ToneProt.pinyin$ = replace_regex$(sgc_ToneProt.pinyin$, "5", "0", 0) # Missing neutral tones call add_missing_neutral_tones 'sgc_ToneProt.pinyin$' sgc_ToneProt.pinyin$ = add_missing_neutral_tones.pinyin$ endif # Reduction (lower sgc_ToneProt.register and narrow range) means errors # The oposite mostly not. Asymmetry alows more room upward # than downward (asymmetry = 2 => highBoundaryFactor ^ 2) asymmetry = 2 # Kill octave jumps: DANGEROUS killOctaveJumps = 0 # Limit pitch range sgc_ToneProt.minimumPitch = 50 sgc_ToneProt.maximumPitch = 500 if sgc_ToneProt.register > 400 sgc_ToneProt.minimumPitch = 60 sgc_ToneProt.maximumPitch = 600 elsif sgc_ToneProt.register > 250 sgc_ToneProt.minimumPitch = 50 sgc_ToneProt.maximumPitch = 500 else sgc_ToneProt.minimumPitch = 40 sgc_ToneProt.maximumPitch = 400 endif sgc_ToneProt.currentTestWord$ = sgc_ToneProt.pinyin$ spacing = 0.5 sgc_ToneProt.precisionFactor = 2^(sgc_ToneProt.precision/12) highBoundaryFactor = sgc_ToneProt.precisionFactor ^ asymmetry lowBoundaryFactor = 1/sgc_ToneProt.precisionFactor # Generate reference example # Start with a range of 1 octave and a speed factor of 1 toneRange = 1.0 speedFactor = 1.0 sgc_ToneProt.upperRegisterInput = sgc_ToneProt.register call toneScript 'sgc_ToneProt.currentTestWord$' 'sgc_ToneProt.upperRegisterInput' 1 1 CorrectPitch # Get range and top select Pitch 'sgc_ToneProt.currentTestWord$' sgc_ToneProt.durationModel = Get total duration maximumModelFzero = Get quantile... 0 0 0.95 Hertz minimumModelFzero = Get quantile... 0 0 0.05 Hertz if maximumModelFzero = undefined maximumModelFzero = 0 endif if minimumModelFzero = undefined minimumModelFzero = 0 endif sgc_ToneProt.modelPitchRange = 2 if minimumModelFzero > 0 sgc_ToneProt.modelPitchRange = maximumModelFzero / minimumModelFzero else sgc_ToneProt.modelPitchRange = 0 endif # Get the sounds if fileReadable(sgc_ToneProt.currentSound$) Read from file... 'sgc_ToneProt.currentSound$' Rename... Source else select Sound 'sgc_ToneProt.currentSound$' Copy... Source endif # Calculate pitch select Sound Source durationSource = Get total duration call convert2Pitch 'sgc_ToneProt.minimumPitch' 'sgc_ToneProt.maximumPitch' te.recordedPitch = convert2Pitch.object Rename... SourcePitch # It is rather dangerous to kill Octave errors, so be careful if killOctaveJumps > 0 Rename... OldSource Kill octave jumps Rename... SourcePitch te.recordedPitch = selected("Pitch") select Pitch OldSource Remove endif # Remove all pitch points outside a band around the upper sgc_ToneProt.register select te.recordedPitch upperCutOff = 1.7*sgc_ToneProt.upperRegisterInput lowerCutOff = sgc_ToneProt.upperRegisterInput/4 Formula... if self > 'upperCutOff' then -1 else self endif Formula... if self < 'lowerCutOff' then -1 else self endif # Get range and top select te.recordedPitch maximumRecFzero = Get quantile... 0 0 0.95 Hertz timeMaximum = Get time of maximum... 0 0 Hertz Parabolic minimumRecFzero = Get quantile... 0 0 0.05 Hertz timeMinimum = Get time of minimum... 0 0 Hertz Parabolic if maximumRecFzero = undefined # Determine what should be told to the student .recognitionText$ = "'sgc_ToneProt.currentTestWord$': ???" for i from 1 to numberOfFeedbackRows select Table ToneFeedback .toneOne$ = Get value... 'i' T1 .toneTwo$ = Get value... 'i' T2 .toneText$ = Get value... 'i' Feedback .label$ = "Unknown" if .toneOne$ = "NoSound" .feedbackText$ = .toneText$ endif endfor #exit Error, nothing recorded goto END endif recPitchRange = 2 if minimumRecFzero > 0 recPitchRange = maximumRecFzero / minimumRecFzero endif sgc_ToneProt.newUpperRegister = maximumRecFzero / maximumModelFzero * sgc_ToneProt.upperRegisterInput sgc_ToneProt.newToneRange = recPitchRange / sgc_ToneProt.modelPitchRange if sgc_ToneProt.newUpperRegister = undefined sgc_ToneProt.newUpperRegister = sgc_ToneProt.upperRegisterInput endif if sgc_ToneProt.newToneRange = undefined sgc_ToneProt.newToneRange = 1 endif sgc_ToneProt.registerUsed$ = "OK" rangeUsed$ = "OK" # Advanced speakers must not speak too High, or too "Dramatic" # Beginning speakers also not too Low or too Narrow ranges if sgc_ToneProt.newUpperRegister > highBoundaryFactor * sgc_ToneProt.upperRegisterInput sgc_ToneProt.newUpperRegister = highBoundaryFactor * sgc_ToneProt.upperRegisterInput sgc_ToneProt.registerUsed$ = "High" elsif not sgc_ToneProt.proficiency and sgc_ToneProt.newUpperRegister < lowBoundaryFactor * sgc_ToneProt.upperRegisterInput sgc_ToneProt.newUpperRegister = lowBoundaryFactor * sgc_ToneProt.upperRegisterInput sgc_ToneProt.registerUsed$ = "Low" endif if sgc_ToneProt.newToneRange > highBoundaryFactor sgc_ToneProt.newToneRange = highBoundaryFactor rangeUsed$ = "Wide" elsif not sgc_ToneProt.proficiency and sgc_ToneProt.newToneRange < lowBoundaryFactor and not sgc_ToneProt.proficiency # Don't do this for advanced speakers sgc_ToneProt.newToneRange = lowBoundaryFactor rangeUsed$ = "Narrow" endif # Duration if sgc_ToneProt.durationModel > spacing speedFactor = (durationSource - spacing) / (sgc_ToneProt.durationModel - spacing) endif # Round values sgc_ToneProt.newUpperRegister = round(sgc_ToneProt.newUpperRegister) # Remove all pitch points outside a band around the upper sgc_ToneProt.register select te.recordedPitch upperCutOff = 1.5*sgc_ToneProt.newUpperRegister lowerCutOff = sgc_ToneProt.newUpperRegister/3 Formula... if self > 'upperCutOff' then -1 else self endif Formula... if self < 'lowerCutOff' then -1 else self endif if killOctaveJumps > 0 Rename... OldSourcePitch Kill octave jumps Rename... SourcePitch te.recordedPitch = selected("Pitch") select Pitch OldSourcePitch Remove endif # It is good to have the lowest and highest pitch frequencies select te.recordedPitch timeMaximum = Get time of maximum... 0 0 Hertz Parabolic timeMinimum = Get time of minimum... 0 0 Hertz Parabolic # Clean up the old example pitch select Pitch 'sgc_ToneProt.currentTestWord$' Remove # Do the tone recognition .numSyllables = toneScript.syllableCount sgc_ToneProt.choiceReference$ = sgc_ToneProt.currentTestWord$ .skipSyllables = 0 while sgc_ToneProt.choiceReference$ = sgc_ToneProt.currentTestWord$ and .skipSyllables < .numSyllables call FreeToneRecognition 'sgc_ToneProt.choiceReference$' "REUSEPITCH" "" 'sgc_ToneProt.newUpperRegister' 'sgc_ToneProt.newToneRange' 'speedFactor' '.skipSyllables' .skipSyllables += 1 endwhile call toneScript 'sgc_ToneProt.currentTestWord$' 'sgc_ToneProt.upperRegisterInput' 'sgc_ToneProt.newToneRange' 'speedFactor' CorrectPitch # Special cases originalRecognizedWord$ = sgc_ToneProt.choiceReference$ if sgc_ToneProt.ultraStrict = 0 # [23]3 is often misidentified as 23, 20 or 30 if rindex_regex(sgc_ToneProt.currentTestWord$, "[23][^0-9]+3") > 0 if rindex_regex(sgc_ToneProt.currentTestWord$, "3[^0-9]+3") > 0 .c = rindex_regex(sgc_ToneProt.currentTestWord$, "3[^0-9]+3") - 1 if rindex_regex(sgc_ToneProt.choiceReference$, "^(.{'.c'})[23][^0-9]+[023]") > 0 sgc_ToneProt.choiceReference$ = replace_regex$(sgc_ToneProt.choiceReference$, "^(.{'.c'})[23]([^0-9]+)[023]", "\13\23", 1) endif endif if rindex_regex(sgc_ToneProt.currentTestWord$, "2[^0-9]+3") > 0 .c = rindex_regex(sgc_ToneProt.currentTestWord$, "2[^0-9]+3") - 1 if rindex_regex(sgc_ToneProt.choiceReference$, "^(.{'.c'})[23][^0-9]+[023]") > 0 sgc_ToneProt.choiceReference$ = replace_regex$(sgc_ToneProt.choiceReference$, "([^0-9]+)[23]([^0-9]+)[023]", "\12\23", 1) endif endif endif # First syllable: 2<->3 exchanges if rindex_regex(sgc_ToneProt.currentTestWord$, "^[^0-9]+2") > 0 if rindex_regex(sgc_ToneProt.choiceReference$, "^[^0-9]+3") > 0 sgc_ToneProt.choiceReference$ = replace_regex$(sgc_ToneProt.choiceReference$, "^([^0-9]+)[36]", "\12", 0) endif elsif rindex_regex(sgc_ToneProt.currentTestWord$, "^[^0-9]+3") > 0 if rindex_regex(sgc_ToneProt.choiceReference$, "^[^0-9]+2") > 0 sgc_ToneProt.choiceReference$ = replace_regex$(sgc_ToneProt.choiceReference$, "^([^0-9]+)2", "\13", 0) endif # A single second tone is often misidentified as a neutral tone, # A real neutral tone would be too low or too narrow and be discarded elsif rindex_regex(sgc_ToneProt.currentTestWord$, "^[^0-9]+2$") > 0 if rindex_regex(sgc_ToneProt.choiceReference$, "^[^0-9]+0$") > 0 and timeMinimum < timeMaximum sgc_ToneProt.choiceReference$ = replace_regex$(sgc_ToneProt.choiceReference$, "0", "2", 0) endif # A single fourth tone is often misidentified as a neutral tone, # A real neutral tone would be too low or too narrow and be discarded elsif rindex_regex(sgc_ToneProt.currentTestWord$, "^[^0-9]+4$") > 0 if rindex_regex(sgc_ToneProt.choiceReference$, "^[^0-9]+0$") > 0 and timeMaximum < timeMinimum sgc_ToneProt.choiceReference$ = replace_regex$(sgc_ToneProt.choiceReference$, "0", "4", 0) endif endif # 40 <-> 42 # A recognized 0 after a 4 can be a 2: 4-0 => 4-2 if rindex_regex(sgc_ToneProt.currentTestWord$, "4[^0-9]+2") > 0 .c = rindex_regex(sgc_ToneProt.currentTestWord$, "4[^0-9]+2") - 1 if rindex_regex(sgc_ToneProt.choiceReference$, "^(.{'.c'})4[^0-9]+0") > 0 sgc_ToneProt.choiceReference$ = replace_regex$(sgc_ToneProt.choiceReference$, "^(.{'.c'}4[^0-9]+)0", "\12", 0) endif endif # 404 <-> 414 # A recognized 0 between two tones 4 can be a 1 if rindex_regex(sgc_ToneProt.currentTestWord$, "4[^0-9]+1[^0-9]+4") > 0 .c = rindex_regex(sgc_ToneProt.currentTestWord$, "4[^0-9]+1[^0-9]+4") - 1 if rindex_regex(sgc_ToneProt.choiceReference$, "^(.{'.c'})4[^0-9]+0[^0-9]+4") > 0 sgc_ToneProt.choiceReference$ = replace_regex$(sgc_ToneProt.choiceReference$, "^(.{'.c'}4[^0-9]+)0([^0-9]+4)", "\11\2", 0) endif endif endif # If wrong, then undo all changes if sgc_ToneProt.currentTestWord$ != sgc_ToneProt.choiceReference$ sgc_ToneProt.choiceReference$ = originalRecognizedWord$ endif sgc_ToneProt.toneChoiceReference$ = sgc_ToneProt.choiceReference$ ############################################### # # Report # ############################################### result$ = "'tab$''sgc_ToneProt.currentTestWord$''tab$''sgc_ToneProt.choiceReference$''tab$''sgc_ToneProt.newUpperRegister''tab$''sgc_ToneProt.newToneRange''tab$''speedFactor''tab$''sgc_ToneProt.registerUsed$''tab$''rangeUsed$'" if sgc_ToneProt.currentTestWord$ = sgc_ToneProt.toneChoiceReference$ result$ = "Correct:"+result$ else result$ = "Wrong:"+result$ endif # Initialize result texts .recognitionText$ = "'sgc_ToneProt.currentTestWord$': " .choiceText$ = replace_regex$(sgc_ToneProt.choiceReference$, "6", "\?", 0) .feedbackText$ = "----" # Separate tone from pronunciation errors currentToneWord$ = replace_regex$(sgc_ToneProt.currentTestWord$, "[a-z]+", "\*", 0) choiceToneReference$ = replace_regex$(sgc_ToneProt.choiceReference$, "[a-z]+", "\*", 0) # Determine what should be told to the student if sgc_ToneProt.registerUsed$ = "Low" .recognitionText$ = .recognitionText$ + "???" for i from 1 to numberOfFeedbackRows select Table ToneFeedback .toneOne$ = Get value... 'i' T1 .toneTwo$ = Get value... 'i' T2 .toneText$ = Get value... 'i' Feedback if .toneOne$ = "Low" .feedbackText$ = .toneText$ .label$ = .toneOne$ endif endfor elsif rangeUsed$ = "Narrow" .recognitionText$ = .recognitionText$ + "???" for i from 1 to numberOfFeedbackRows select Table ToneFeedback .toneOne$ = Get value... 'i' T1 .toneTwo$ = Get value... 'i' T2 .toneText$ = Get value... 'i' Feedback if .toneOne$ = "Narrow" .feedbackText$ = .toneText$ .label$ = .toneOne$ endif endfor elsif sgc_ToneProt.registerUsed$ = "High" .recognitionText$ = .recognitionText$ + .choiceText$ for i from 1 to numberOfFeedbackRows select Table ToneFeedback .toneOne$ = Get value... 'i' T1 .toneTwo$ = Get value... 'i' T2 .toneText$ = Get value... 'i' Feedback if .toneOne$ = "High" .feedbackText$ = .toneText$ .label$ = .toneOne$ endif endfor elsif rangeUsed$ = "Wide" .recognitionText$ = .recognitionText$ + .choiceText$ for i from 1 to numberOfFeedbackRows select Table ToneFeedback .toneOne$ = Get value... 'i' T1 .toneTwo$ = Get value... 'i' T2 .toneText$ = Get value... 'i' Feedback if .toneOne$ = "Wide" .feedbackText$ = .toneText$ .label$ = .toneOne$ endif endfor # Bad tones, first handle first syllable elsif rindex_regex(sgc_ToneProt.choiceReference$, "^[a-zA-Z]+6") > 0 .recognitionText$ = .recognitionText$ + .choiceText$ # First syllable for i from 1 to numberOfFeedbackRows select Table ToneFeedback .toneOne$ = Get value... 'i' T1 .toneTwo$ = Get value... 'i' T2 .toneText$ = Get value... 'i' Feedback # .feedbackText$ = "" if .toneOne$ = "6" .recognitionText$ = .recognitionText$ + " ('.toneText$')" .label$ = .toneOne$ elsif rindex_regex(sgc_ToneProt.currentTestWord$, "^[a-zA-Z]+'.toneOne$'") > 0 and .toneTwo$ = "-" .feedbackText$ = .feedbackText$ + .toneText$ + " " endif endfor # Bad tones, then handle second syllable elsif rindex_regex(sgc_ToneProt.choiceReference$, "[a-zA-Z]+6$") > 0 .recognitionText$ = .recognitionText$ + .choiceText$ # Last syllable for i from 1 to numberOfFeedbackRows select Table ToneFeedback .toneOne$ = Get value... 'i' T1 .toneTwo$ = Get value... 'i' T2 .toneText$ = Get value... 'i' Feedback # .feedbackText$ = "" if .toneOne$ = "6" .recognitionText$ = .recognitionText$ + " ('.toneText$')" .label$ = .toneOne$ elsif rindex_regex(sgc_ToneProt.currentTestWord$, "[a-zA-Z]+'.toneOne$'$") > 0 and .toneTwo$ = "-" .feedbackText$ = .feedbackText$ + .toneText$ + " " endif endfor # Just plain wrong tones elsif currentToneWord$ <> choiceToneReference$ .recognitionText$ = .recognitionText$ + .choiceText$ for i from 1 to numberOfFeedbackRows select Table ToneFeedback .toneOne$ = Get value... 'i' T1 .toneTwo$ = Get value... 'i' T2 .toneText$ = Get value... 'i' Feedback if rindex_regex(sgc_ToneProt.currentTestWord$, "^[a-zA-Z]+'.toneOne$'$") > 0 and .toneTwo$ = "-" .feedbackText$ = .toneText$ elsif rindex_regex(sgc_ToneProt.currentTestWord$, "^[a-zA-Z]+'.toneOne$'[a-zA-Z]+'.toneTwo$'$") > 0 .feedbackText$ = .toneText$ elsif .toneOne$ = "Wrong" .recognitionText$ = .recognitionText$ + " ('.toneText$')" .label$ = .toneOne$ endif endfor # Correct else .recognitionText$ = .recognitionText$ + .choiceText$ for i from 1 to numberOfFeedbackRows select Table ToneFeedback .toneOne$ = Get value... 'i' T1 .toneTwo$ = Get value... 'i' T2 .toneText$ = Get value... 'i' Feedback if .toneOne$ = "Correct" .feedbackText$ = .toneText$ .label$ = .toneOne$ endif endfor endif label END # Write out result Create Table with column names... Feedback 3 Text Set string value... 1 Text '.recognitionText$' Set string value... 2 Text '.feedbackText$' Set string value... 3 Text '.label$' # Clean up select Table ToneFeedback Remove # Show pitch tracks freqTop = 1.5 * sgc_ToneProt.upperRegisterInput # Replace recorded sound with new sound if not fileReadable(sgc_ToneProt.currentSound$) select Sound 'sgc_ToneProt.currentSound$' Remove select Sound Source Copy... 'sgc_ToneProt.currentSound$' endif # Clean up select Sound Source plus Pitch 'sgc_ToneProt.currentTestWord$' Remove endproc #! praat # # # Draw the correct tone tracks # # Needs # include ToneScript.praat # procedure drawToneContour drawToneContour.pinyin$ drawToneContour.register # Clean up input if drawToneContour.pinyin$ <> "" drawToneContour.pinyin$ = replace_regex$(drawToneContour.pinyin$, "^\s*(.+)\s*$", "\1", 1) drawToneContour.pinyin$ = replace_regex$(drawToneContour.pinyin$, "5", "0", 0) call add_missing_neutral_tones 'drawToneContour.pinyin$' drawToneContour.pinyin$ = add_missing_neutral_tones.pinyin$ endif # Generate reference example # Start with a range of 1 octave and a speed factor of 1 drawToneContour.toneRange = 1.0 drawToneContour.speedFactor = 1.0 call toneScript 'drawToneContour.pinyin$' 'drawToneContour.register' 1 1 CorrectPitch drawToneContour.freqTop = 1.5 * drawToneContour.register # Draw Pitch track select Pitch 'drawToneContour.pinyin$' demo Select outer viewport... 20 80 40 100 demo Axes... 0 100 0 100 demo Line width... 1 demo Green demo Draw... 0 0 0 'drawToneContour.freqTop' 0 demo Line width... 3 demo Green demo Draw... 0 0 0 'drawToneContour.freqTop' 0 demo Select outer viewport... 0 100 0 100 demo Axes... 0 100 0 100 # Clean up select Pitch 'drawToneContour.pinyin$' Remove endproc procedure drawSourceToneContour drawToneContour.sourcePitch if drawToneContour.sourcePitch > 0 call reset_viewport demo Select inner viewport... 20 80 40 100 demo Axes... 0 100 0 100 select drawToneContour.sourcePitch demo Red demo Line width... 3 demo Draw... 0 0 0 'freqTop' 0 demo Line width... 1 call reset_viewport endif endproc #! praat # # # Hum the correct tone tracks # # Needs # include ToneScript.praat # procedure humToneContour humToneContour.pinyin$ humToneContour.register # Clean up input if humToneContour.pinyin$ <> "" humToneContour.pinyin$ = replace_regex$(humToneContour.pinyin$, "^\s*(.+)\s*$", "\1", 1) humToneContour.pinyin$ = replace_regex$(humToneContour.pinyin$, "5", "0", 0) call add_missing_neutral_tones 'humToneContour.pinyin$' humToneContour.pinyin$ = add_missing_neutral_tones.pinyin$ endif # Generate reference example # Start with a range of 1 octave and a speed factor of 1 humToneContour.toneRange = 1.0 humToneContour.speedFactor = 1.0 call toneScript 'humToneContour.pinyin$' 'humToneContour.register' 'humToneContour.toneRange' 'humToneContour.speedFactor' CorrectPitch # Hum Pitch track select Pitch 'humToneContour.pinyin$' Hum # Clean up select Pitch 'humToneContour.pinyin$' Remove endproc #! praat # # Construct all tone patterns and look for the one closest to the given one # procedure FreeToneRecognition .pinyin$ .test_word$ .exclude$ .upperRegister .freqRange .durScale .startSyllable # Clean up input if .pinyin$ <> "" .pinyin$ = replace_regex$(.pinyin$, "^\s*(.+)\s*$", "\1", 1) .pinyin$ = replace_regex$(.pinyin$, "5", "0", 0) # Missing neutral tones call add_missing_neutral_tones '.pinyin$' .pinyin$ = add_missing_neutral_tones.pinyin$ endif .referenceFrequency = 300 .frequencyFactor = .referenceFrequency / .upperRegister .referenceExt$ = "pitch" # Bias Z-normalized value of the distance difference between smallest and correct .biasDistance = 1.1 if index_regex(config.strict$, "[^0-9]") <= 0 .tmp = 'config.strict$' if .tmp = 0 .biasDistance = 1.7 elsif .tmp = 1 .biasDistance = 1.1 elsif .tmp = 2 .biasDistance = 0.6 elsif .tmp = 3 .biasDistance = 0.3 endif endif # Debugging .keepIntermediates = 0 .debug = 0 # Generate reference tones call toneScript '.pinyin$' '.upperRegister' '.freqRange' '.durScale' Pitch_'.startSyllable' # Convert input to Pitch if .test_word$ <> "" and .test_word$ <> "REUSEPITCH" Read from file... '.test_word$' Rename... Source endif if .test_word$ <> "REUSEPITCH" select Sound Source call convert2Pitch 'sgc_ToneProt.minimumPitch' 'sgc_ToneProt.maximumPitch' .sourcePitch = convert2Pitch.object Formula... self*'.frequencyFactor'; Normalize Pitch Rename... SourcePitch endif select Pitch SourcePitch .countDistance = 0 .sumDistance = 0 .sumSqrDistance = 0 .correctDistance = -1 .smallestDistance=999999 sgc_ToneProt.choiceReference$ = "empty" select Table ToneList .listLength = Get number of rows for .i from 1 to .listLength select Table ToneList .inFile$ = Get value... '.i' Word # Broken third tones are still third tones if (.exclude$ = "" or rindex_regex(.inFile$, .exclude$) <= 0) and rindex_regex(.inFile$, "[\d]") > 0 referenceName$ = .inFile$ select Pitch '.inFile$' plus Pitch SourcePitch .dtw = noprogress To DTW... 24 10 yes yes no restriction Rename... DTW'.inFile$' distance = Get distance (weighted) # Clean up select DTW DTW'.inFile$' .countDistance = .countDistance + 1 .sumDistance = .sumDistance + distance .sumSqrDistance = .sumSqrDistance + distance^2 .inFile$ = replace$(.inFile$, "9", "3", 0) if .pinyin$ = .inFile$ .correctDistance = distance endif if .debug > 0 # printline 'distance' - '.inFile$' endif if distance < .smallestDistance .smallestDistance = distance sgc_ToneProt.choiceReference$ = "'.inFile$'" endif if .keepIntermediates = 0 Remove endif endif endfor if .countDistance > 1 .meanDistance = .sumDistance / .countDistance .varDistance = (.sumSqrDistance - .sumDistance^2/.countDistance)/(.countDistance - 1) .stdDistance = sqrt(.varDistance) .diffDistance = .correctDistance - .smallestDistance .zDistance = .diffDistance/.stdDistance if .debug > 0 printline Match: '.pinyin$' <== 'sgc_ToneProt.choiceReference$' small='.smallestDistance' Z='.zDistance' endif if .zDistance < .biasDistance sgc_ToneProt.choiceReference$ = .pinyin$ .smallestDistance = .correctDistance endif endif # Clean up for .i from 1 to .listLength select Table ToneList .inFile$ = Get value... '.i' Word if (.exclude$ = "" or rindex_regex(.inFile$, .exclude$) <= 0) and rindex_regex(.inFile$, "[\d]") > 0 # Clean up select Pitch '.inFile$' if .keepIntermediates = 0 Remove endif endif endfor select Table ToneList if .test_word$ <> "" and .test_word$ <> "REUSEPITCH" plus Sound Source endif if .test_word$ <> "" and .test_word$ <> "REUSEPITCH" plus Pitch SourcePitch endif if .keepIntermediates = 0 Remove endif endproc #! praat # # SpeakGoodChinese: toneScript.praat generates synthetic tone contours # for Mandarin Chinese # Copyright (C) 2007 R.J.J.H. van Son # The SpeakGoodChinese team are: # Guangqin Chen, Zhonyan Chen, Stefan de Konink, Eveline van Hagen, # Rob van Son, Dennis Vierkant, David Weenink # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # form Enter pinyin and tone 1 frequency # word toneScript.inputWord ba1ba1 # positive toneScript.upperRegister_(Hz) 300 # real toneScript.range_Factor 1 # real toneScript.durationScale 1 # optionmenu toneScript.generate 1 # option Pitch # option Sound # option CorrectPitch # option CorrectSound # endform # Get the rules of the tones # include ToneRules.praat #call toneScript 'toneScript.inputWord$' 'toneScript.upperRegister' 'toneScript.range_Factor' 'toneScript.durationScale' 'toneScript.generate$' procedure toneScript toneScript.inputWord$ toneScript.upperRegister toneScript.range_Factor toneScript.durationScale toneScript.generate$ # To supress the ToneList, change to 0 toneScript.createToneList = 1 if rindex_regex(toneScript.generate$, "Correct") > 0 toneScript.createToneList = 0 endif # First tone to check .skipSyll$ = "()" .startSyll = 0 if index_regex(toneScript.generate$, "_[\d]+$") > 0 .pos = index_regex(toneScript.generate$, "_[\d]+$") .left$ = left$(toneScript.generate$, .pos) .startSyll = extractNumber(toneScript.generate$, .left$) - 1 if .startSyll <> undefined and .startSyll > 0 .skipSyll$ = "([^\d]+[\d]+){'.startSyll'}" else .startSyll = 0 endif endif # Limit lowest tone toneScript.absoluteMinimum = 80 toneScript.prevTone = -1 toneScript.nextTone = -1 toneScript.point = 0 toneScript.lastFrequency = 0 # Clean up input if toneScript.inputWord$ <> "" toneScript.inputWord$ = replace_regex$(toneScript.inputWord$, "^\s*(.+)\s*$", "\1", 1) endif # Add a tone movement. The current time toneScript.point is 'toneScript.point' toneScript.delta = 0.0000001 if toneScript.durationScale <= 0 toneScript.durationScale = 1.0 endif toneScript.segmentDuration = 0.150 toneScript.fixedDuration = 0.12 # # Movements # start * ?Semit is a fall # start / ?Semit is a rise # 1/(12 semitones) toneScript.octave = 0.5 # 1/(9 semitones) toneScript.nineSemit = 0.594603557501361 # 1/(6 semitones) toneScript.sixSemit = 0.707106781186547 # 1/(3 semitones) down toneScript.threeSemit = 0.840896415253715 # 1/(2 semitones) down toneScript.twoSemit = 0.890898718140339 # 1/(1 semitones) down toneScript.oneSemit = 0.943874313 # 1/(4 semitones) down toneScript.fourSemit = toneScript.twoSemit * toneScript.twoSemit # 1/(5 semitones) down toneScript.fiveSemit = toneScript.threeSemit * toneScript.twoSemit toneScript.frequency_Range = toneScript.octave if toneScript.range_Factor > 0 toneScript.frequency_Range = toneScript.frequency_Range * toneScript.range_Factor endif # Previous end frequency toneScript.lastFrequency = 0 # Split input into syllables toneScript.margin = 0.25 # Get a list of items if toneScript.createToneList = 1 Create Table with column names... ToneList 36 Word for .i from 1 to 36 select Table ToneList Set string value... '.i' Word ------EMPTY endfor endif toneScript.syllableCount = length(replace_regex$(toneScript.inputWord$, "[^\d]+([\d]+)", "1", 0)) if toneScript.syllableCount < .startSyll + 1 .skipSyll$ = "()" endif toneScript.wordNumber = 0 toneScript.lowerBound = 0 if rindex(toneScript.generate$, "Correct") <= 0 for toneScript.first from toneScript.lowerBound to 4 toneScript.currentWord$ = replace_regex$(toneScript.inputWord$, "^('.skipSyll$')([^\d]+)([\d]+)(.*)$", "\1\3'toneScript.first'\5", 1) for toneScript.second from 0 to 4 if (toneScript.first <> 5 and toneScript.second <> 5) and (toneScript.syllableCount > 1 or toneScript.second == 1) toneScript.currentWord$ = replace_regex$(toneScript.currentWord$, "^('.skipSyll$')([^\d]+)([\d]+)([^\d]+)([\d]+)(.*)$", "\1\3'toneScript.first'\5'toneScript.second'\7", 1) # Write name in list toneScript.wordNumber = toneScript.wordNumber+1 if toneScript.createToneList = 1 select Table ToneList toneScript.listLength = Get number of rows toneScript.listLength = toneScript.listLength + 1 for toneScript.currLength from toneScript.listLength to toneScript.wordNumber Append row Set string value... 'toneScript.currLength' Word ------EMPTY endfor Set string value... 'toneScript.wordNumber' Word 'toneScript.currentWord$' endif # Actually, generate something call generateWord 'toneScript.generate$' 'toneScript.currentWord$' 'toneScript.upperRegister' endif endfor endfor # 6,6 #toneScript.first = 6 #toneScript.currentWord$ = replace_regex$(toneScript.inputWord$, "^('.skipSyll$')([^\d]+)([\d]+)(.*)$", "\1\3'toneScript.first'\5", 1) #toneScript.second = 6 #if toneScript.syllableCount > 1 # toneScript.currentWord$ = replace_regex$(toneScript.currentWord$, "^('.skipSyll$')([^\d]+)([\d]+)([^\d]+)([\d]+)(.*)$", "\1\3'toneScript.first'\5'toneScript.second'\7", 1) # # Write name in list # toneScript.wordNumber = toneScript.wordNumber+1 # if toneScript.createToneList = 1 # select Table ToneList # toneScript.listLength = Get number of rows # toneScript.listLength = toneScript.listLength + 1 # for toneScript.currLength from toneScript.listLength to toneScript.wordNumber # Append row # Set string value... 'toneScript.currLength' Word ------EMPTY # endfor # Set string value... 'toneScript.wordNumber' Word 'toneScript.currentWord$' # endif #endif # "broken" third tones if index_regex(toneScript.inputWord$, "3") > 0 toneScript.currentWord$ = replace$(toneScript.inputWord$, "3", "9", 0) # Write name in list toneScript.wordNumber = toneScript.wordNumber+1 if toneScript.createToneList = 1 select Table ToneList toneScript.listLength = Get number of rows toneScript.listLength = toneScript.listLength + 1 Set string value... 'toneScript.wordNumber' Word 'toneScript.currentWord$' endif # Actually, generate something call generateWord 'toneScript.generate$' 'toneScript.currentWord$' 'toneScript.upperRegister' endif # 6 tones if toneScript.syllableCount > 1 toneScript.currentWord$ = replace_regex$(toneScript.inputWord$, "[\d+]", "6", 0) # Write name in list toneScript.wordNumber = toneScript.wordNumber+1 if toneScript.createToneList = 1 select Table ToneList toneScript.listLength = Get number of rows toneScript.listLength = toneScript.listLength + 1 Set string value... 'toneScript.wordNumber' Word 'toneScript.currentWord$' endif # Actually, generate something call generateWord 'toneScript.generate$' 'toneScript.currentWord$' 'toneScript.upperRegister' endif else call generateWord 'toneScript.generate$' 'toneScript.inputWord$' 'toneScript.upperRegister' endif endproc procedure extractTone .syllable$ toneScript.toneSyllable = -1 .toneScript.currentToneText$ = replace_regex$(.syllable$, "^[^\d]+([\d]+)(.*)$", "\1", 0) toneScript.toneSyllable = extractNumber(.toneScript.currentToneText$, "") endproc procedure convertVoicing toneScript.voicingSyllable$ # Remove tones toneScript.voicingSyllable$ = replace_regex$(toneScript.voicingSyllable$, "^([^\d]+)[\d]+", "\1", 0) # Convert voiced consonants toneScript.voicingSyllable$ = replace_regex$(toneScript.voicingSyllable$, "(ng|[wrlmny])", "C", 0) # Convert unvoiced consonants toneScript.voicingSyllable$ = replace_regex$(toneScript.voicingSyllable$, "(sh|ch|zh|[fsxhktpgqdbzcj])", "U", 0) # Convert vowels toneScript.voicingSyllable$ = replace_regex$(toneScript.voicingSyllable$, "([aiuoe\XFC])", "V", 0) endproc procedure addToneMovement .syllable$ toneScript.topLine toneScript.prevTone toneScript.nextTone # Get tone toneScript.toneSyllable = -1 call extractTone '.syllable$' if toneScript.toneSyllable = 3 and toneScript.nextTone = 3 toneScript.toneSyllable = 2 endif # Get voicing pattern toneScript.voicingSyllable$ = "" call convertVoicing '.syllable$' # Account for tones in duration toneScript.toneFactor = 1 # Scale the duration of the current syllable call toneDuration toneScript.toneFactor = toneScript.toneFactor * toneScript.durationScale # Unvoiced part if rindex_regex(toneScript.voicingSyllable$, "U") = 1 toneScript.point = toneScript.point + toneScript.delta Add point... 'toneScript.point' 0 toneScript.point = toneScript.point + toneScript.segmentDuration * toneScript.toneFactor Add point... 'toneScript.point' 0 endif # Voiced part toneScript.voiceLength$ = replace_regex$(toneScript.voicingSyllable$, "U*([CV]+)U*", "\1", 0) toneScript.voicedLength = length(toneScript.voiceLength$) toneScript.voicedDuration = toneScript.toneFactor * (toneScript.segmentDuration*toneScript.voicedLength + toneScript.fixedDuration) toneScript.point = toneScript.point + toneScript.delta # Write contour of each tone # Note that tones are influenced by the previous (tone 0) and next (tone 3) # tones. Tone 6 is the Dutch intonation # sqrt(toneScript.frequency_Range) is the mid toneScript.point if toneScript.topLine * toneScript.frequency_Range < toneScript.absoluteMinimum toneScript.frequency_Range = toneScript.absoluteMinimum / toneScript.topLine endif call toneRules toneScript.lastFrequency = toneScript.endPoint endproc procedure wordToTones .wordInput$ toneScript.highPitch .currentRest$ = .wordInput$; toneScript.syllableCount = 0 .length = 2 * toneScript.margin # Split syllables while rindex_regex(.currentRest$, "^[^\d]+[\d]+") > 0 toneScript.syllableCount += 1 syllable'toneScript.syllableCount'$ = replace_regex$(.currentRest$, "^([^\d]+[\d]+)(.*)$", "\1", 1) toneScript.currentSyllable$ = syllable'toneScript.syllableCount'$ # Get the tone call extractTone 'toneScript.currentSyllable$' toneScript.toneSyllable'toneScript.syllableCount' = toneScript.toneSyllable toneScript.currentTone = toneScript.toneSyllable'toneScript.syllableCount' # Get the Voicing pattern call convertVoicing 'toneScript.currentSyllable$' voicingSyllable'toneScript.syllableCount'$ = toneScript.voicingSyllable$ currentVoicing$ = voicingSyllable'toneScript.syllableCount'$ # Calculate new .length # Account for tones in duration toneScript.toneFactor = 1 # Scale the duration of the current syllable call toneDuration toneScript.toneFactor = toneScript.toneFactor * toneScript.durationScale .length = .length + toneScript.toneFactor * (length(voicingSyllable'toneScript.syllableCount'$) * (toneScript.segmentDuration + toneScript.delta) + toneScript.fixedDuration) # Next round .currentRest$ = replace_regex$(.currentRest$, "^([^\d]+[\d]+)(.*)$", "\2", 1) # Safety valve if toneScript.syllableCount > 2000 exit endif endwhile # Create tone pattern toneScript.pitchTier = Create PitchTier... '.wordInput$' 0 '.length' toneScript.pitchTierWord$ = .wordInput$ # Add start toneScript.margin toneScript.lastFrequency = 0 toneScript.point = 0 Add point... 'toneScript.point' 0 toneScript.point = toneScript.margin Add point... 'toneScript.point' 0 toneScript.lastTone = -1 toneScript.followTone = -1 for .i from 1 to toneScript.syllableCount toneScript.currentSyllable$ = syllable'.i'$ toneScript.currentTone = toneScript.toneSyllable'.i' toneScript.followTone = -1 if .i < toneScript.syllableCount .j = .i+1 toneScript.followTone = toneScript.toneSyllable'.j' endif call addToneMovement 'toneScript.currentSyllable$' 'toneScript.highPitch' 'toneScript.lastTone' 'toneScript.followTone' toneScript.lastTone = toneScript.currentTone endfor # Add end toneScript.margin toneScript.point = toneScript.point + toneScript.delta Add point... 'toneScript.point' 0 toneScript.point = toneScript.point + toneScript.margin Add point... 'toneScript.point' 0 endproc procedure generateWord toneScript.whatToGenerate$ toneScript.theWord$ toneScript.upperRegister # First generate model contour call wordToTones 'toneScript.theWord$' 'toneScript.upperRegister' # Generate pitch if toneScript.pitchTierWord$ = toneScript.theWord$ select toneScript.pitchTier else select PitchTier 'toneScript.theWord$' endif toneScript.pitch = noprogress To Pitch... 0.0125 60.0 600.0 Rename... theOrigWord Smooth... 10 Rename... 'toneScript.theWord$' select Pitch theOrigWord Remove # Then look if "real" model exists, and use that if index_regex(config.strict$, "[^0-9]") > 0 config.strict$ = "1" endif .userLevel = 'config.strict$' if 0 and .userLevel >= sgc.highestLevel ... and (fileReadable("'preferencesAppDir$'/pitchmodels/'toneScript.theWord$'.Pitch") ... or fileReadable("'preferencesAppDir$'/pitchmodels/'toneScript.theWord$'.wav")) # Get mean of generated contour select toneScript.pitch Rename... GeneratedContour toneScript.generatedMean = do ("Get mean...", 0, 0, "Hertz") toneScript.generatedMaximum = do ("Get maximum...", 0, 0, "Hertz", "Parabolic") Remove if fileReadable("'preferencesAppDir$'/pitchmodels/'toneScript.theWord$'.Pitch") Read from file... 'preferencesAppDir$'/pitchmodels/'toneScript.theWord$'.Pitch else .modelSound = Read from file... 'preferencesAppDir$'/pitchmodels/'toneScript.theWord$'.wav select .modelSound # Third tones get really low if index(toneScript.theWord$, "3") > 0 call convert2Pitch 15 600 else call convert2Pitch 60 600 endif .modelPitch = convert2Pitch.object select .modelSound Remove select .modelPitch endif Rename... 'toneScript.theWord$' toneScript.mean = do ("Get mean...", 0, 0, "Hertz") toneScript.maximum = do ("Get maximum...", 0, 0, "Hertz", "Parabolic") toneScript.shiftFreq = toneScript.generatedMean - toneScript.mean # toneScript.shiftFreq = toneScript.generatedMaximum - toneScript.maximum Formula... self + toneScript.shiftFreq endif # Generate sound if wanted select Pitch 'toneScript.theWord$' if rindex_regex(toneScript.whatToGenerate$, "Sound") > 0 noprogress To Sound (hum) endif # Clean up select PitchTier 'toneScript.theWord$' if rindex_regex(toneScript.whatToGenerate$, "Sound") > 0 plus Pitch 'toneScript.theWord$' endif Remove endproc procedure convert2Pitch .minimumPitch .maximumPitch #.object = noprogress To Pitch (ac)... 0 '.minimumPitch' 25 yes 0.05 0.3 0.01 0.6 0.14 '.maximumPitch' .object = noprogress To Pitch (cc)... 0 '.minimumPitch' 15 yes 0.03 0.50 0.045 0.35 0.14 '.maximumPitch' endproc # Not everyone add all the zeros for the neutral tones. Here we try to guess where # they would belong. procedure add_missing_neutral_tones .pinyin$ # Missing neutral tones # Missing last tone .pinyin$ = replace_regex$(.pinyin$, "([^0-9])$", "\10", 0) # Easy cases V [^n] .pinyin$ = replace_regex$(.pinyin$, "([euioa]+)([^0-9neuioar])", "\10\2", 0) # Complex case V r V .pinyin$ = replace_regex$(.pinyin$, "([euioa]+)(r[euioa]+)", "\10\2", 0) # Complex case V r C .pinyin$ = replace_regex$(.pinyin$, "([euioa]+r)([^0-9euioa]+)", "\10\2", 0) # Vng cases .pinyin$ = replace_regex$(.pinyin$, "([euioa]+ng)([^0-9])", "\10\2", 0) # VnC cases C != g .pinyin$ = replace_regex$(.pinyin$, "([euioa]+n)([^0-9geuioa])", "\10\2", 0) # VnV cases -> Maximal onset .pinyin$ = replace_regex$(.pinyin$, "([euioa])(n[euioa])", "\10\2", 0) endproc # The rules for constructing the tone contours. # # This procedure works because in Praat, there is no namespace # separation. All variables behave as if they are global # (which they are). # # toneScript.toneSyllable is the tone number on the current syllable # 1-4, 0=neutral, 6=Dutch (garbage) intonation # # These procedures set the following pareameters # and use them to create a Pitch Tier: # # toneScript.toneFactor: Duration scale factor for current tone # toneRules.startPoint: Start of the tone # toneScript.endPoint: end of the tone # toneRules.lowestPoint: bottom of tone 3 # toneScript.point: The time of the next pitch value in the contour # ONLY USE AS: toneScript.point = toneScript.point + * toneScript.voicedDuration # # The following values are given by the calling routine # DO NOT ALTER THEM # # toneScript.toneSyllable: tone number on the current syllable # toneScript.nextTone: tone number of next syllable or -1 # toneScript.prevTone: tone number of previous syllable or -1 # toneScript.lastFrequency: end-frequency of the previous syllable # # toneScript.topLine: the frequency of the first tone # toneScript.frequency_Range: Range of tone four (1 toneScript.octave) # toneScript.voicedDuration: Duration of voiced part of syllable # # Procedure to scale the duration of the current syllable procedure toneDuration if toneScript.toneSyllable = 0 .zeroToneFactor = 0.5 if toneScript.prevTone = 2 .zeroToneFactor = 0.8 * .zeroToneFactor elsif toneScript.prevTone = 3 .zeroToneFactor = 1.1 * .zeroToneFactor elsif toneScript.prevTone = 4 .zeroToneFactor = 0.8 * .zeroToneFactor endif toneScript.toneFactor = .zeroToneFactor * toneScript.toneFactor elsif toneScript.toneSyllable = 2 toneScript.toneFactor = 0.8 elsif toneScript.toneSyllable = 3 toneScript.toneFactor = 1.1 elsif toneScript.toneSyllable = 4 toneScript.toneFactor = 0.8 endif # Next tone 0, then lengthen first syllable if toneScript.nextTone = 0 toneScript.toneFactor = toneScript.toneFactor * 1.2 endif endproc # DO NOT CHANGE toneScript.toneFactor BELOW THIS POINT # Rules to create a tone # # Do not mess with the 'Add point...' commands # unless you know what you are doing # The 'toneScript.point =' defines the time of the next pitch value # # start * ?Semit is a fall # start / ?Semit is a rise # procedure toneRules # # Tone toneRules.levels 1-5 # Defined relative to the topline and the frequency range toneRules.levelFive = toneScript.topLine toneRules.levelOne = toneScript.topLine * toneScript.frequency_Range toneRules.levelThree = toneScript.topLine * sqrt(toneScript.frequency_Range) toneRules.levelTwo = toneScript.topLine * sqrt(sqrt(toneScript.frequency_Range)) toneRules.levelFour = toneRules.levelOne / sqrt(sqrt(toneScript.frequency_Range)) # First tone if toneScript.toneSyllable = 1 # Just a straight line toneRules.startPoint = toneRules.levelFive toneScript.endPoint = toneRules.levelFive # Two first tones, make them a little different if toneScript.prevTone = 1 toneRules.startPoint = toneRules.startPoint * 0.999 toneScript.endPoint = toneScript.endPoint * 0.999 endif # Write toneScript.points Add point... 'toneScript.point' 'toneRules.startPoint' toneScript.point = toneScript.point + toneScript.voicedDuration Add point... 'toneScript.point' 'toneScript.endPoint' # Second tone elsif toneScript.toneSyllable = 2 # Start halfway of the range - 1 semitone toneRules.startPoint = toneRules.levelThree * toneScript.oneSemit # End 1 semitones above the first tone toneScript.endPoint = toneRules.levelFive / toneScript.oneSemit # Special case: 2 followed by 1, stop short of the top-line # ie, 5 semitones above the start if toneScript.nextTone = 1 toneScript.endPoint = toneRules.startPoint / toneScript.fiveSemit endif # Go lower if previous tone is 1 if toneScript.prevTone = 1 toneRules.startPoint = toneRules.startPoint * toneScript.oneSemit elsif toneScript.prevTone = 4 or toneScript.prevTone = 3 # Special case: 2 following 4 or 3 # Go 1 semitone up toneRules.startPoint = toneScript.lastFrequency / toneScript.oneSemit toneScript.endPoint = toneRules.levelFive elsif toneScript.prevTone = 2 # Two consecutive tone 2, start 1 semitone higher toneRules.startPoint = toneRules.startPoint / toneScript.oneSemit endif # Define a midtoneScript.point at 1/3 of the duration toneRules.midPoint = toneRules.startPoint # Write toneScript.points Add point... 'toneScript.point' 'toneRules.startPoint' # Next toneScript.point a 1/3th of duration toneScript.point = toneScript.point + (toneScript.voicedDuration)/3 Add point... 'toneScript.point' 'toneRules.midPoint' # Remaining duration toneScript.point = toneScript.point + (toneScript.voicedDuration)*2/3 Add point... 'toneScript.point' 'toneScript.endPoint' # Third tone elsif toneScript.toneSyllable = 3 # Halfway the range toneRules.startPoint = toneRules.levelThree toneRules.lowestPoint = toneRules.levelOne * toneScript.threeSemit # Protect pitch against "underflow" if toneRules.lowestPoint < toneScript.absoluteMinimum toneRules.lowestPoint = toneScript.absoluteMinimum endif # First syllable if toneScript.nextTone < 0 toneScript.endPoint = toneRules.startPoint # Anticipate rise in next tone elsif toneScript.nextTone = 1 or toneScript.nextTone = 4 toneRules.lowestPoint = toneRules.levelOne / toneScript.twoSemit toneScript.endPoint = toneRules.startPoint # Anticipate rise in next tone and stay low elsif toneScript.nextTone = 2 toneRules.lowestPoint = toneRules.levelOne / toneScript.twoSemit toneScript.endPoint = toneRules.lowestPoint # Last one was low, don't go so much lower elsif toneScript.prevTone = 4 toneRules.lowestPoint = toneRules.levelOne * toneScript.oneSemit # Anticipate rise in next tone and stay low elsif toneScript.nextTone = 0 toneRules.lowestPoint = toneRules.levelOne toneScript.endPoint = toneRules.lowestPoint / toneScript.sixSemit else toneScript.endPoint = toneRules.startPoint endif # Write toneScript.points Add point... 'toneScript.point' 'toneRules.startPoint' # Go 1/3 of the duration down toneScript.point = toneScript.point + (toneScript.voicedDuration)*2/6 Add point... 'toneScript.point' 'toneRules.lowestPoint' # Go half the duration low toneScript.point = toneScript.point + (toneScript.voicedDuration)*3/6 Add point... 'toneScript.point' 'toneRules.lowestPoint' # Return in 1/6th of the duration toneScript.point = toneScript.point + (toneScript.voicedDuration)*1/6 Add point... 'toneScript.point' 'toneScript.endPoint' # Third tone with voice break elsif toneScript.toneSyllable = 9 # Halfway the range toneRules.startPoint = toneRules.levelThree toneRules.lowestPoint = toneRules.levelOne * toneScript.threeSemit # Protect pitch against "underflow" if toneRules.lowestPoint < toneScript.absoluteMinimum toneRules.lowestPoint = toneScript.absoluteMinimum endif # First syllable if toneScript.nextTone < 0 toneScript.endPoint = toneRules.startPoint # Anticipate rise in next tone elsif toneScript.nextTone = 1 or toneScript.nextTone = 4 toneRules.lowestPoint = toneRules.levelOne / toneScript.twoSemit toneScript.endPoint = toneRules.startPoint # Anticipate rise in next tone and stay low elsif toneScript.nextTone = 2 toneRules.lowestPoint = toneRules.levelOne / toneScript.twoSemit toneScript.endPoint = toneRules.lowestPoint # Last one was low, don't go so much lower elsif toneScript.prevTone = 4 toneRules.lowestPoint = toneRules.levelOne * toneScript.oneSemit # Anticipate rise in next tone and stay low elsif toneScript.nextTone = 0 toneRules.lowestPoint = toneRules.levelOne toneScript.endPoint = toneRules.lowestPoint / toneScript.sixSemit else toneScript.endPoint = toneRules.startPoint endif # Write toneScript.points Add point... 'toneScript.point' 'toneRules.startPoint' # Go 1/3 of the duration down toneScript.point = toneScript.point + (toneScript.voicedDuration)*2/6 Add point... 'toneScript.point' 'toneRules.lowestPoint' # voiceless break .delta = 'toneScript.point' + 0.001 Add point... '.delta' 0 # Go half the duration low toneScript.point = toneScript.point + (toneScript.voicedDuration)*3/6 # voiceless break .delta = 'toneScript.point' - 0.001 Add point... '.delta' 0 Add point... 'toneScript.point' 'toneRules.lowestPoint' # Return in 1/6th of the duration toneScript.point = toneScript.point + (toneScript.voicedDuration)*1/6 # Go on Add point... 'toneScript.point' 'toneScript.endPoint' # Fourth tone elsif toneScript.toneSyllable = 4 # Start higher than tone 1 (by 2 semitones) toneRules.startPoint = toneRules.levelFive / toneScript.twoSemit # Go down the full range toneScript.endPoint = toneRules.startPoint * toneScript.frequency_Range # SPECIAL: Fall in following neutral tone if toneScript.nextTone = 0 toneScript.endPoint = toneScript.endPoint / toneScript.threeSemit endif # Write toneScript.points Add point... 'toneScript.point' 'toneRules.startPoint' # A plateau for 1/3th toneScript.point = toneScript.point + toneScript.voicedDuration*1/3 Add point... 'toneScript.point' 'toneRules.startPoint' # Go down the rest toneScript.point = toneScript.point + toneScript.voicedDuration*2/3 Add point... 'toneScript.point' 'toneScript.endPoint' # Neutral tone elsif toneScript.toneSyllable = 0 if toneScript.lastFrequency > 0 toneRules.startPoint = toneScript.lastFrequency else toneRules.startPoint = toneRules.levelThree / toneScript.oneSemit endif if toneScript.prevTone = 1 toneRules.startPoint = toneScript.lastFrequency * toneScript.twoSemit elsif toneScript.prevTone = 2 toneRules.startPoint = toneScript.lastFrequency elsif toneScript.prevTone = 3 toneRules.startPoint = toneScript.lastFrequency / toneScript.oneSemit elsif toneScript.prevTone = 4 toneRules.startPoint = toneScript.lastFrequency * toneScript.oneSemit elsif toneScript.lastFrequency > 0 toneRules.startPoint = toneScript.lastFrequency * toneScript.oneSemit endif # Catch all errors if toneRules.startPoint <= 0 toneRules.startPoint = toneRules.levelThree / toneScript.oneSemit endif # Add spreading and some small or large de/inclination if toneScript.prevTone = 1 toneRules.midPoint = toneRules.startPoint * toneScript.frequency_Range / toneScript.oneSemit toneScript.endPoint = toneRules.midPoint * toneScript.oneSemit elsif toneScript.prevTone = 2 # toneRules.midPoint = toneRules.startPoint * toneScript.fiveSemit toneScript.endPoint = toneRules.midPoint * toneScript.twoSemit elsif toneScript.prevTone = 3 toneRules.midPoint = toneRules.startPoint / toneScript.twoSemit toneScript.endPoint = toneRules.midPoint elsif toneScript.prevTone = 4 toneRules.midPoint = toneRules.startPoint * toneScript.threeSemit toneScript.endPoint = toneRules.midPoint / toneScript.oneSemit else toneRules.midPoint = toneRules.startPoint * toneScript.oneSemit toneScript.endPoint = toneRules.midPoint endif # Add a very short break to force (disabled, maybe should be removed) if 0 if toneScript.point = undefined toneScript.point = 0 endif Add point... 'toneScript.point' 0 toneScript.point = toneScript.point + 1/toneRules.startPoint Add point... 'toneScript.point' 0 toneScript.point = toneScript.point + toneScript.delta endif # Write toneScript.points first 2/3 then decaying 1/3 Add point... 'toneScript.point' 'toneRules.startPoint' toneScript.point = toneScript.point + (toneScript.voicedDuration - 1/toneRules.startPoint)*2/3 Add point... 'toneScript.point' 'toneRules.midPoint' toneScript.point = toneScript.point + (toneScript.voicedDuration - 1/toneRules.startPoint)*1/3 Add point... 'toneScript.point' 'toneScript.endPoint' # Dutch intonation else # Start halfway of the range toneRules.startPoint = toneRules.levelThree # Or continue from last Dutch "tone" if toneScript.prevTone = 6 toneRules.startPoint = toneScript.lastFrequency endif # Add declination toneScript.endPoint = toneRules.startPoint * toneScript.oneSemit # Write toneScript.points Add point... 'toneScript.point' 'toneRules.startPoint' toneScript.point = toneScript.point + toneScript.voicedDuration Add point... 'toneScript.point' 'toneScript.endPoint' endif endproc # Include the configuration page buttons and procedures # # SpeakGoodChinese 2.0 # # Praat script handling configuration page # # SpeakGoodChinese: Config.praat loads the code needed for the # settings and the Settings page of SpeakGoodChinese. # # Copyright (C) 2007-2010 R.J.J.H. van Son and 2010 the Netherlands Cancer Institute # The SpeakGoodChinese team are: # Guangqin Chen, Zhonyan Chen, Stefan de Koning, Eveline van Hagen, # Rob van Son, Dennis Vierkant, David Weenink # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # ############################################################### # # Button Drawing Routines # ############################################################### procedure DrawCredits .color$ .x .y .size .size *= 0.71 .lineheight = 2*.size call adjustFontSizeOnHeight 'defaultFont$' 24 '.lineheight' .currentFontSize = adjustFontSizeOnHeight.newFontSize demo Paint circle... {0.2,0.2,0.8} '.x' '.y' '.size' demo Colour... White demo Text special... '.x' centre '.y' half Times '.currentFontSize' 0 i demoShow() demo Colour... Black call set_font_size 'defaultFontSize' endproc procedure DrawDeleteList .color$ .x .y .size .y += 2*.size .leftX = .x - 10 .rightX = .x + 10 .botY = .y+1 .topY = .botY + 5 call set_font_size 12 demo Red .displayWordList$ = replace_regex$(wordlistName$, "[_]", " ", 0) # Adapt wide of text .maxWidth = (.rightX - .leftX) .currentFontSize = defaultFontSize call adjustFontSizeOnWidth 'defaultFont$' '.currentFontSize' '.maxWidth' '.displayWordList$' .currentFontSize = adjustFontSizeOnWidth.newFontSize if adjustFontSizeOnWidth.diff > 0 .rightX += adjustFontSizeOnWidth.diff/2 .leftX -= adjustFontSizeOnWidth.diff/2 endif call set_font_size '.currentFontSize' demo Paint rectangle... White '.leftX' '.rightX' '.botY' '.topY' demo Text... '.x' Centre '.botY' Bottom '.displayWordList$' demo Black demoShow() call set_font_size 'defaultFontSize' endproc procedure DrawManual .color$ .x .y .size .size *= 0.71 .lineheight = 2*.size call adjustFontSizeOnHeight 'defaultFont$' 24 '.lineheight' .currentFontSize = adjustFontSizeOnHeight.newFontSize demo Paint circle... {0.2,0.2,0.8} '.x' '.y' '.size' demo Colour... White demo Text special... '.x' centre '.y' half Times '.currentFontSize' 0 M demoShow() demo Colour... Black call set_font_size 'defaultFontSize' endproc procedure DrawSaveAudio .color$ .x .y .size .size /= 2 .y += .size if .color$ = "White" .color$ = "White" elsif .color$ = "Blue" .color$ = "{0.5,0.5,1}" else .color$ = "Blue" endif demo Paint circle... '.color$' '.x' '.y' '.size' endproc ############################################################### # # Obligatory button Drawing Routines # # These MUST be defined # ############################################################### procedure DrawReturn .color$ .x .y .size call DrawConfig '.color$' '.x' '.y' '.size' endproc # Set the correct button states after redrawing the window procedure setConfigMainPage call Draw_button 'config$' +SaveAudio 'sgc.saveAudioOn' if sgc2.synthesizer < 0 or config.synthesis$ = "" or config.synthesis$ = "_DISABLED_" call Draw_button 'config$' Voice -1 else call Draw_button 'config$' Voice 2 endif endproc ############################################################### # # Button Processing Routines # ############################################################### procedure processConfigShuffleLists .clickX .clickY .pressed$ .table$ = "Config" .label$ = "ShuffleLists" config.shuffleLists = not config.shuffleLists .displayButton = 2*config.shuffleLists call Draw_button '.table$' '.label$' '.displayButton' endproc procedure processConfigAdaptiveLists .clickX .clickY .pressed$ .table$ = "Config" .label$ = "AdaptiveLists" config.adaptiveLists = not config.adaptiveLists .displayButton = 2*config.adaptiveLists call Draw_button '.table$' '.label$' '.displayButton' endproc procedure processConfigUseSoundExample .clickX .clickY .pressed$ .table$ = "Config" .label$ = "UseSoundExample" config.useSoundExample = not config.useSoundExample .displayButton = 2*config.useSoundExample call Draw_button '.table$' '.label$' '.displayButton' endproc procedure processConfigSynthesis .tts$ .clickX .clickY .pressed$ .table$ = "Config" .label$ = "Synthesis_'.tts$'" if sgc2.synthesizer > 0 or (speakCommandFile$ <> "" and fileReadable(speakCommandFile$)) if config.synthesis$ = "" config.synthesis$ = .tts$ .displayButton = 2 else config.synthesis$ = "" .displayButton = 0 endif else config.synthesis$ = "_DISABLED_" .displayButton = -1 endif call Draw_button '.table$' '.label$' '.displayButton' # Disable or enable voices button! .voiceButton = .displayButton if .voiceButton <= 0 .voiceButton = -1 endif call Draw_button Config Voice '.voiceButton' endproc procedure processConfigStrict .clickX .clickY .pressed$ .table$ = "Config" .label$ = "Strict" .tmp = 'config.strict$' .tmp += 1 if .tmp > sgc.highestLevel .tmp = 0 endif config.strict$ = "'.tmp'" if .tmp > 0 .displayButton = 2 else .displayButton = 0 endif # Change TTS for Strict! call set_up_TTS call Draw_button '.table$' '.label$' '.displayButton' endproc procedure processConfigVoice .clickX .clickY .pressed$ .table$ = "Config" .label$ = "Voice" .tmp = config.voice .tmp += 1 if .tmp > sgc.lastVoice .tmp = 0 endif .displayButton = 2 if sgc2.synthesizer <= 0 or config.synthesis$ = "" or config.synthesis$ = "_DISABLED_" .displayButton = -1 else config.voice = .tmp # Change TTS Voice call set_TTS_parameters call set_up_TTS endif call Draw_button '.table$' '.label$' '.displayButton' endproc procedure processConfigDisplayPinyin .clickX .clickY .pressed$ .table$ = "Config" .label$ = "DisplayPinyin" config.displayPinyin = not config.displayPinyin .displayButton = 2*config.displayPinyin call Draw_button '.table$' '.label$' '.displayButton' endproc procedure processConfigDisplayChar .clickX .clickY .pressed$ .table$ = "Config" .label$ = "DisplayChar" config.displayChar = not config.displayChar .displayButton = 2*config.displayChar call Draw_button '.table$' '.label$' '.displayButton' endproc procedure processConfigDisplayTrans .clickX .clickY .pressed$ .table$ = "Config" .label$ = "DisplayTrans" config.displayTrans = not config.displayTrans .displayButton = 2*config.displayTrans call Draw_button '.table$' '.label$' '.displayButton' endproc procedure processConfigDisplayNumbers .clickX .clickY .pressed$ .table$ = "Config" .label$ = "DisplayNumbers" config.displayNumbers = not config.displayNumbers .displayButton = 2*config.displayNumbers call Draw_button '.table$' '.label$' '.displayButton' endproc procedure processConfigLanguage .language$ .clickX .clickY .pressed$ .table$ = "Config" .label$ = "Language_'.language$'" call processLanguageCodes '.table$' '.label$' endproc procedure processConfigShowBackground .clickX .clickY .pressed$ .table$ = "Config" .label$ = "ShowBackground" config.showBackground = not config.showBackground .displayButton = 2*config.showBackground call Draw_button '.table$' '.label$' '.displayButton' endproc procedure processConfigInput .input$ .clickX .clickY .pressed$ .table$ = "Config" .label$ = "Input_'.input$'" call Draw_button '.table$' Input_'config.input$' 0 config.input$ = .input$ call Draw_button '.table$' Input_'config.input$' 2 endproc procedure processConfigRegister .register .clickX .clickY .pressed$ .table$ = "Config" .label$ = "Register_'.register'" call setRegisterFromLabel '.table$' '.label$' endproc procedure setRegisterFromLabel .table$ .label$ call Draw_button '.table$' Register_'config.register' 0 call Draw_button '.table$' '.label$' 2 # Someone might have to use more than 3 chars for the config.register code .numChars = length(.label$) - length("Register_") .registerText$ = right$(.label$, .numChars) config.register = '.registerText$' endproc procedure processConfigDeleteWordlist .clickX .clickY .pressed$ .table$ = "Config" .label$ = "DeleteWordlist" # Do not process undeletable word lists, only those stored in the # preferencesDirectory$ can be deleted if fileReadable("'sgc2wordlists$'/'wordlistName$'") or fileReadable("'sgc2wordlists$'/'wordlistName$'/wordlist.txt") or fileReadable("'sgc2wordlists$'/'wordlistName$'/wordlist.Table") call findLabel '.table$' !'.label$' if findLabel.row > 0 select Table '.table$' .alertText$ = Get value... 'findLabel.row' Text .confirmKey$ = Get value... 'findLabel.row' Key .popupText$ = Get value... 'findLabel.row' Helptext else exit Cannot find delete directive: '.table$' !'.label$' endif call write_text_popup 'defaultFont$' 14 '.popupText$' call Draw_button '.table$' '.label$' 2 alertText$ = .alertText$ call Draw_button '.table$' '.label$' 3 alertText$ = "" # Wait for confirmation demoWaitForInput() if demoInput(.confirmKey$) .deleteWordListDir$ = wordlistName$ call load_word_list "'localWordlistDir$'" 1 call removeWordlist '.deleteWordListDir$' call load_word_list "'localWordlistDir$'" 0 endif call Draw_button '.table$' '.label$' 0 call Draw_config_page endif endproc wordlistTag$ = "Wordlist name" procedure processConfigInstallWordlist .clickX .clickY .pressed$ .table$ = "Config" .label$ = "InstallWordlist" call Draw_button '.table$' '.label$' 1 if windows # Do not use the automatic sgc list option, ask for a wordlist NAME # Get help text call findLabel '.table$' '.label$' .row = findLabel.row select Table '.table$' .openDialogue$ = Get value... '.row' Helptext call convert_praat_to_latin1 '.openDialogue$' .openDialogue$ = convert_praat_to_latin1.text$ .wordlistButton$ = replace$(wordlistTag$, " ", "_", 0) .wordlistButton$ = replace_regex$(.wordlistButton$, "^.", "\l&", 0) beginPause(.openDialogue$) sentence (wordlistTag$, "") clicked = endPause ("Cancel", "Open", 2, 1) .wordlist_Name$ = "" if clicked = 2 .wordlist_Name$ = '.wordlistButton$'$ endif call install_wordlists_by_name '.wordlist_Name$' else call sgc2wordlist 'homeDirectory$' call sgc2wordlist 'homeDirectory$'/Downloads call sgc2wordlist 'homeDirectory$'/Documents call sgc2wordlist 'homeDirectory$'/My Documents call sgc2wordlist 'homeDirectory$'/My Documents/Downloads call sgc2wordlist 'homeDirectory$'/Desktop call sgc2wordlist 'preferencesAppDir$' endif call load_word_list "'localWordlistDir$'" 0 call Draw_button '.table$' '.label$' 0 call Draw_config_page endproc procedure processConfigOpenWordlist .clickX .clickY .pressed$ .table$ = "Config" .label$ = "OpenWordlist" call Draw_button '.table$' '.label$' 1 # Get help text call findLabel '.table$' '.label$' .row = findLabel.row select Table '.table$' .openDialogue$ = Get value... '.row' Helptext call convert_praat_to_latin1 '.openDialogue$' .openDialogue$ = convert_praat_to_latin1.text$ .wordlist_Name$ = chooseReadFile$ (.openDialogue$) call install_wordlists_by_name '.wordlist_Name$' call load_word_list "'localWordlistDir$'" 0 call Draw_button '.table$' '.label$' 0 call Draw_config_page endproc procedure processConfigExportWordlist .clickX .clickY .pressed$ .table$ = "Config" .label$ = "ExportWordlist" call Draw_button '.table$' '.label$' 1 # Get help text call findLabel '.table$' '.label$' .row = findLabel.row select Table '.table$' .openDialogue$ = Get value... '.row' Helptext call convert_praat_to_latin1 '.openDialogue$' .openDialogue$ = convert_praat_to_latin1.text$ .newWordlistName$ = "'wordlist$'_SGC2" # Ensure the right extension: ".tsv" while .newWordlistName$ <> "" and not endsWith(.newWordlistName$, ".tsv") .newWordlistName$ = .newWordlistName$ + ".tsv" .newWordlistName$ = chooseWriteFile$ (.openDialogue$, .newWordlistName$) .tableName$ = replace_regex$(.newWordlistName$, "^.*[/\\:]([^/\\:]+)\.(tsv|Table)$", "\1", 0) call testLoadTable '.tableName$' if testLoadTable.table > 0 call loadTable '.tableName$' .tmpTable = selected() Save as tab-separated file: .newWordlistName$ Remove .newWordlistName$ = "" endif endwhile if .newWordlistName$ <> "" select sgc.currentWordlist .tmpSaveWordlist = Copy: "SaveWordlist" # Get the table sorted .lessonCol = Get column index: "Lesson" if .lessonCol > 0 Sort rows... Lesson Pinyin else Sort rows... Pinyin endif # Remove all words that are deselected .showCol = Get column index: "Show" if .showCol > 0 .numRows = Get number of rows .row = .numRows while .row > 0 .show$ = Get value: .row, "Show" .sound$ = Get value: .row, "Sound" if .show$ = "-" .numRows = Get number of rows # Do NOT remove all the rows if .numRows > 1 Remove row: .row endif elsif .sound$ <> "" and .sound$ <> "-" and .sound$ <> "?" # Put path before sound examples # If there is no path, add the current wordlist path if index_regex(.sound$, "^(/|~/|[A-Z]:\\)") <= 0 .sound$ = localWordlistDir$+"/"+wordlistName$+"/"+.sound$ Set string value: .row, "Sound", .sound$ endif endif .row -= 1 endwhile Remove column: "Show" endif Write to table file... '.newWordlistName$' Remove endif call Draw_button '.table$' '.label$' 0 call Draw_config_page endproc procedure processConfigPerfSummary .clickX .clickY .pressed$ .table$ = "Config" .label$ = "PerfSummary" call testLoadTable SummaryToneEvaluation if testLoadTable.table > 0 call Draw_button '.table$' '.label$' 1 call loadTable SummaryToneEvaluation call write_tabbed_table SummaryToneEvaluation Evaluation_'config.language$' demoWaitForInput() select Table SummaryToneEvaluation Remove call Draw_button '.table$' '.label$' 0 call Draw_config_page endif endproc # Wipe current performance table and initialize a new one procedure processConfigClearSummary .clickX .clickY .pressed$ .table$ = "Config" .label$ = "ClearSummary" call Draw_button '.table$' '.label$' 1 if not sgc.saveAudioOn select Table '.table$' call findLabel '.table$' !'.label$' if findLabel.row > 0 .alertText$ = Get value... 'findLabel.row' Text .confirmKey$ = Get value... 'findLabel.row' Key .popupText$ = Get value... 'findLabel.row' Helptext call write_text_popup 'defaultFont$' 14 '.popupText$' call Draw_button '.table$' '.label$' 2 alertText$ = .alertText$ call Draw_button '.table$' '.label$' 3 alertText$ = "" # Wait for confirmation demoWaitForInput() if demoInput(.confirmKey$) sgc.savePerf$ = "" call initialize_toneevaluation_tables endif endif endif call Draw_button '.table$' '.label$' 'sgc.saveAudioOn' call Draw_config_page endproc procedure processConfigListPerf .clickX .clickY .pressed$ .table$ = "Config" .label$ = "ListPerf" call Draw_button '.table$' '.label$' 1 select sgc2.performanceTable View & Edit demoWaitForInput() call Draw_button '.table$' '.label$' 0 call Draw_config_page endproc procedure processConfigOpenPerf .clickX .clickY .pressed$ .table$ = "Config" .label$ = "OpenPerf" call Draw_button '.table$' '.label$' 1 if not sgc.saveAudioOn # Get help text call findLabel '.table$' !'.label$' .row = findLabel.row select Table '.table$' .openDialogue$ = Get value... '.row' Helptext call convert_praat_to_latin1 '.openDialogue$' .openDialogue$ = convert_praat_to_latin1.text$ if variableExists("eval.performance$") .defaultName$= "'eval.performance$'.tsv" else .defaultName$= "Performance.tsv" endif if sgc.savePerf$ <> "" .defaultName$= sgc.savePerf$ endif .performance_Name$ = chooseReadFile$ (.openDialogue$) while .performance_Name$ <> "" and index_regex(.performance_Name$, "\.(tsv|TSV)$") <= 0 .performance_Name$ = chooseReadFile$ (.openDialogue$) endwhile if .performance_Name$ <> "" and fileReadable(.performance_Name$) sgc.savePerf$ = .performance_Name$ call initialize_toneevaluation_tables # Set SaveAudio directory if it is not currently "in use" if not sgc.saveAudioOn sgc.saveAudio$ = replace_regex$(sgc.savePerf$, "[/\\][^/\\]+$", "", 0) # We are not sure yet that this is actually an audio directory config.audioName$ = "" endif endif endif call Draw_button '.table$' '.label$' 'sgc.saveAudioOn' call Draw_config_page endproc procedure processConfigSavePerf .clickX .clickY .pressed$ .table$ = "Config" .label$ = "SavePerf" call Draw_button '.table$' '.label$' 1 if not sgc.saveAudioOn # Get help text call findLabel '.table$' '.label$' .row = findLabel.row select Table '.table$' .openDialogue$ = Get value... '.row' Helptext call convert_praat_to_latin1 '.openDialogue$' .openDialogue$ = convert_praat_to_latin1.text$ if variableExists("eval.performance$") .defaultName$= "'eval.performance$'.tsv" else .defaultName$= "Performance.tsv" endif if sgc.savePerf$ <> "" .defaultName$= sgc.savePerf$ endif .performance_Name$ = chooseWriteFile$ (.openDialogue$, .defaultName$) # Ensure the right extension: ".tsv" while .performance_Name$ <> "" and not endsWith(.performance_Name$, ".tsv") .performance_Name$ = .performance_Name$ + ".tsv" .performance_Name$ = chooseWriteFile$ (.openDialogue$, .performance_Name$) endwhile if .performance_Name$ <> "" select sgc2.performanceTable Write to table file... '.performance_Name$' sgc.savePerf$ = .performance_Name$ endif endif call Draw_button '.table$' '.label$' 'sgc.saveAudioOn' call Draw_config_page endproc procedure processConfigManual .clickX .clickY .pressed$ .table$ = "Config" .label$ = "Manual" call Draw_button '.table$' '.label$' 1 if fileReadable("ManPages/SpeakGoodChinese_2.man") Read from file... ManPages/SpeakGoodChinese_2.man else Go to manual page... SpeakGoodChinese 2 endif # Wait until the manual is put to the background demoWaitForInput() call Draw_button '.table$' '.label$' 0 demo Erase all call Draw_config_page endproc procedure processConfigSaveAudio .clickX .clickY .pressed$ .table$ = "Config" .label$ = "SaveAudio" call Draw_button '.table$' '.label$' 1 if sgc.saveAudioOn = 0 # Get help text call findLabel '.table$' '.label$' .row = findLabel.row select Table '.table$' .openDialogue$ = Get value... '.row' Helptext call convert_praat_to_latin1 '.openDialogue$' .openDialogue$ = convert_praat_to_latin1.text$ .defaultName$= "" sgc.saveAudio$ = chooseDirectory$ (.openDialogue$) if sgc.saveAudio$ <> "" sgc.saveAudioOn = 1 .currentPathName$ = replace_regex$(sgc.saveAudio$, "[^/\\]*[/\\]?$", "", 0) .currentDirName$ = replace$(sgc.saveAudio$, .currentPathName$, "", 0) config.savePerf = -1 config.openPerf = -1 config.clearSummary = -1 config.audioName$ = .currentDirName$ # Clear performance table and open/create sgc.savePerf$ sgc.savePerf$ = "'sgc.saveAudio$'/'.currentDirName$'.tsv" call initialize_toneevaluation_tables # Write empty table call update_toneevaluation_file if sgc.savePerf$ <> "" and initialiseSGC2.toneevaluation_table$ <> "" select sgc2.performanceTable Write to table file: sgc.savePerf$ endif else config.audioName$ = "" endif else sgc.saveAudioOn = 0 config.savePerf = 0 config.openPerf = 0 config.clearSummary = 0 # Store current performance table call update_toneevaluation_file endif call Draw_button '.table$' '.label$' 'sgc.saveAudioOn' call Draw_config_page endproc ############################################################### # # Obligatory button Processing Routines # # These MUST be defined # ############################################################### procedure processConfigReturn .clickX .clickY .pressed$ .table$ = "Config" .label$ = "Return" call Draw_button '.table$' '.label$' 1 call write_preferences "" endproc procedure processConfigRefresh .clickX .clickY .pressed$ .table$ = "Config" .label$ = "Refresh" call Draw_config_page endproc procedure processConfigCredits .clickX .clickY .pressed$ .table$ = "Config" .label$ = "Credits" call Draw_button '.table$' '.label$' 1 call write_text_table Credits_'config.language$' demoWaitForInput() call Draw_button '.table$' '.label$' 0 demo Erase all call Draw_config_page endproc procedure processConfigHelp .clickX .clickY .pressed$ .table$ = "Config" .label$ = "Help" call help_loop '.table$' Draw_config_page endproc ############################################################### # # Miscelaneous supporting code # ############################################################### procedure install_wordlists_by_name .wordlist_Name$ if .wordlist_Name$ <> "" if index_regex(.wordlist_Name$, "(?iwordlist|LICENSE)\.") .wordlist_Name$ = replace_regex$(.wordlist_Name$, "[/\\](?iwordlist|LICENSE)\.([^/\\]+)$", "", 0) elsif index_regex(.wordlist_Name$, "(?i\.(wav|flac|iaf[fc]|mp3))") .wordlist_Name$ = replace_regex$(.wordlist_Name$, "[/\\][^/\\]+$", "", 0) endif if index_regex(.wordlist_Name$, "[/\\]") .sourceDir$ = left$(.wordlist_Name$, rindex_regex(.wordlist_Name$, "[/\\]") -1) .file$ = right$(.wordlist_Name$, length(.wordlist_Name$) - rindex_regex(.wordlist_Name$, "[/\\]")) call readWordlist "'.sourceDir$'" '.file$' else .start = 1 if index(.wordlist_Name$, ".") .start = 4 endif .extension1$ = ".sgc" .extension2$ = ".Table" .extension3$ = ".txt" .extension4$ = ".tsv" .extension5$ = "" for .e from .start to 5 .currentExtension$ = .extension'.e'$ call readWordlist "'homeDirectory$'" '.wordlist_Name$''.currentExtension$' call readWordlist "'homeDirectory$'/Downloads" '.wordlist_Name$''.currentExtension$' call readWordlist "'homeDirectory$'/Documents" '.wordlist_Name$''.currentExtension$' call readWordlist "'homeDirectory$'/My Documents/Downloads" '.wordlist_Name$''.currentExtension$' call readWordlist "'homeDirectory$'/My Documents" '.wordlist_Name$''.currentExtension$' call readWordlist "'homeDirectory$'/Desktop" '.wordlist_Name$''.currentExtension$' call readWordlist "'preferencesAppDir$'" '.wordlist_Name$''.currentExtension$' endfor endif endif endproc # Word lists: It is a VERY good idea to make sure that word-lists # have unique names. procedure load_word_list .localdir$ .relnumber call clean_up_sound if sgc.allWordLists > 0 select sgc.allWordLists Remove sgc.allWordLists = -1 endif # Remove old word list if wordlist$ <> "" select sgc.currentWordlist Remove call wipeArea 'wipeWordlistArea$' wordlist$ = "" sgc.currentWordlist = -1 sgc.currentWord = 1 endif # Create Table that will recieve the wordlists and directories sgc.allWordLists = Create Table with column names... AllWordLists 0 Name Directory .sgc.currentWordlistRow = 0 # First the global word lists if fileReadable(globalwordlists$) or fileReadable("'globalwordlists$'/directory.txt") Create Strings as directory list... WordList 'globalwordlists$' .numLists = Get number of strings for .i to .numLists select Strings WordList .currentName$ = Get string... '.i' if .currentName$ <> "directory.txt" select sgc.allWordLists .listExist = Search column: "Name", .currentName$ if not .listExist Append row .sgc.currentWordlistRow = Get number of rows Set string value... '.sgc.currentWordlistRow' Name '.currentName$' .currentDirectory$ = globalwordlists$+"/"+.currentName$ Set string value... '.sgc.currentWordlistRow' Directory '.currentDirectory$' endif endif endfor select Strings WordList Remove endif # Now the preferences word lists if fileReadable(sgc2wordlists$) or fileReadable("'sgc2wordlists$'/directory.txt") Create Strings as directory list... WordList 'sgc2wordlists$' .numLists = Get number of strings for .i to .numLists select Strings WordList .currentName$ = Get string... '.i' if .currentName$ <> "directory.txt" select sgc.allWordLists .listExist = Search column: "Name", .currentName$ if not .listExist Append row .sgc.currentWordlistRow = Get number of rows Set string value... '.sgc.currentWordlistRow' Name '.currentName$' .currentDirectory$ = sgc2wordlists$+"/"+.currentName$ Set string value... '.sgc.currentWordlistRow' Directory '.currentDirectory$' endif endif endfor select Strings WordList Remove endif # End with the word lists in the distribution call CreateCreateWordlists select Table CreateWordlists .numLists = Get number of rows for .i to .numLists select Table CreateWordlists .currentName$ = Get value... '.i' Name if .currentName$ <> "directory.txt" select sgc.allWordLists .listExist = Search column: "Name", .currentName$ if not .listExist .procedureName$ = replace_regex$(.currentName$, "[^\w\-\.]", "_", 0) select sgc.allWordLists Append row .sgc.currentWordlistRow = Get number of rows Set string value... '.sgc.currentWordlistRow' Name '.currentName$' .currentDirectory$ = "*call Create'.procedureName$'" Set string value... '.sgc.currentWordlistRow' Directory '.currentDirectory$' endif endif endfor select Table CreateWordlists Remove # Finally, the local word lists if fileReadable(.localdir$) or fileReadable("'.localdir$'/directory.txt") Create Strings as directory list... WordList '.localdir$' .numLists = Get number of strings for .i to .numLists select Strings WordList .currentName$ = Get string... '.i' if .currentName$ <> "directory.txt" select sgc.allWordLists .listExist = Search column: "Name", .currentName$ if not .listExist Append row .sgc.currentWordlistRow = Get number of rows Set string value... '.sgc.currentWordlistRow' Name '.currentName$' .currentDirectory$ = .localdir$+"/"+.currentName$ Set string value... '.sgc.currentWordlistRow' Directory '.currentDirectory$' endif endif endfor select Strings WordList Remove endif # Get the position of the current word list select sgc.allWordLists .currentNumber = 1 .numLists = Get number of rows if wordlistName$ <> "" select sgc.allWordLists .currentNumber = Search column... Name 'wordlistName$' if .currentNumber <= 0 .currentNumber = 1 endif endif wordlistNum = .currentNumber + .relnumber if wordlistNum > .numLists wordlistNum = 1 elsif wordlistNum < 1 and .numLists > 0 wordlistNum = .numLists endif select sgc.allWordLists wordlistName$ = Get value... 'wordlistNum' Name .dirWordlistName$ = Get value... 'wordlistNum' Directory .dirString$ = replace_regex$(.dirWordlistName$, "[ ]", "&", 0) # Read in full tables if fileReadable("'.dirString$'/wordlist.Table") call readTable '.dirString$'/wordlist.Table if readTable.tableID > 0 Rename... 'wordlistName$' # Praat wil change the name if it feels like it wordlist$ = selected$("Table") # Add a Sound column if it is not present .soundIndex = Get column index: "Sound" if .soundIndex <= 0 Append column: "Sound" endif else .numLists = 0 goto EMERGENCYEXIT endif # Handle (legacy) simple word lists elsif fileReadable("'.dirString$'/wordlist.txt") Create Table with column names... "'wordlistName$'" 0 Pinyin Character Sound Translation wordlist$ = selected$("Table") Read Strings from raw text file... '.dirString$'/wordlist.txt Rename... RawWordList .numWordStrings = Get number of strings for .i to .numWordStrings select Strings RawWordList .currentFile$ = "-" .currentChar$ = "-" .currentTrans$ = "-" .currentLine$ = Get string... '.i' # Remove leading whitespace .currentLine$ = replace_regex$(.currentLine$, "^[ \t]+", "", 0) .separatorIndex = index_regex(.currentLine$, "[ \t;\-]") if .separatorIndex <= 0 .separatorIndex = length(.currentLine$) + 1 endif .currentPinyin$ = left$(.currentLine$, .separatorIndex-1) .currentLine$ = right$(.currentLine$, length(.currentLine$) - .separatorIndex) # There is more on the line, but we do not know what if length(.currentLine$) > 0 while length(.currentLine$) > 0 .separatorIndex = index_regex(.currentLine$, "[\t;]") if .separatorIndex <= 0 .separatorIndex = length(.currentLine$)+1 endif .currentItem$ = left$(.currentLine$, .separatorIndex-1) .currentLine$ = right$(.currentLine$, length(.currentLine$) - .separatorIndex ) if index_regex(.currentItem$, ".(spx|flac|wav|mp3)") # Audio .currentFile$ = .currentItem$ elsif index_regex(.currentItem$, "[a-zA-Z0-9]") > 0 # Translation .currentTrans$ = .currentItem$ elsif index_regex(.currentItem$, "[^ \t\r\l]") > 0 && index_regex(.currentItem$, "[a-zA-Z0-9\-]") <= 0 # Characters .currentChar$ = .currentItem$ endif endwhile endif if .currentFile$ = "-" if fileReadable("'.dirString$'/'.currentPinyin$'.spx") .currentFile$ = .currentPinyin$+".spx" elsif fileReadable("'.dirString$'/'.currentPinyin$'.flac") .currentFile$ = .currentPinyin$+".flac" elsif fileReadable("'.dirString$'/'.currentPinyin$'.wav") .currentFile$ = .currentPinyin$+".wav" elsif fileReadable("'.dirString$'/'.currentPinyin$'.mp3") .currentFile$ = .currentPinyin$+".mp3" endif endif select Table 'wordlist$' Append row Set string value... '.i' Pinyin '.currentPinyin$' Set string value... '.i' Sound '.currentFile$' Set string value... '.i' Character '.currentChar$' Set string value... '.i' Translation '.currentTrans$' endfor select Strings RawWordList Remove select Table 'wordlist$' elsif fileReadable(.dirString$) or fileReadable("'.dirString$'/directory.txt") Create Table with column names... "'wordlistName$'" 0 Pinyin Sound wordlist$ = selected$("Table") Create Strings as file list... RawWordList '.dirString$'/* .numWordStrings = Get number of strings .i = 0 for .j to .numWordStrings select Strings RawWordList .currentLine$ = Get string... '.j' .currentFile$ = extractWord$(.currentLine$, "") if index_regex(.currentFile$, "\.(spx|flac|wav|mp3)") .currentPinyin$ = left$(.currentFile$, index(.currentFile$, ".")-1) select Table 'wordlist$' Append row .i += 1 Set string value... '.i' Pinyin '.currentPinyin$' Set string value... '.i' Sound '.currentFile$' endif endfor select Strings RawWordList Remove select Table 'wordlist$' elsif startsWith(.dirString$, "*call ") .callProcedure$ = right$(.dirString$, length(.dirString$)-1) '.callProcedure$' wordlist$ = selected$("Table") else # Nothing, get out .numLists = 0 goto EMERGENCYEXIT endif # Can this wordlist be deleted? if fileReadable("'sgc2wordlists$'/'wordlistName$'") or fileReadable("'sgc2wordlists$'/'wordlistName$'/wordlist.txt") or fileReadable("'sgc2wordlists$'/'wordlistName$'/wordlist.Table") config.deleteWordlist = 0 else config.deleteWordlist = -1 endif # Check first column name and add Character, Translation, Sound and Show columns if missing if wordlist$ <> "" select Table 'wordlist$' # Hack to correct odd behavior of tables with unicode characters .firstColumn$ = Get column label: 1 if index_regex(.firstColumn$, "^[^!-~]") > 0 .firstColumn$ = replace_regex$(.firstColumn$, "^[^!-~]", "", 0) Set column label (index): 1, .firstColumn$ endif sgc.numberOfWords = Get number of rows .characterColumn = Get column index... Character if not .characterColumn Append column... Character for .i to sgc.numberOfWords Set string value... '.i' Character - endfor endif .translationColumn = Get column index... Translation if not .translationColumn Append column... Translation for .i to sgc.numberOfWords Set string value... '.i' Translation - endfor endif .translationColumn = Get column index... Sound if not .translationColumn Append column... Sound for .i to sgc.numberOfWords Set string value... '.i' Sound - endfor endif .showColumn = Get column index... Show if not .showColumn Append column... Show for .i to sgc.numberOfWords Set string value... '.i' Show + endfor endif endif # Remove all rows without Pinyin .numRows = Get number of rows for i to .numRows .rowNum = .numRows - i + 1 .pinyinValue$ = Get value... '.rowNum' Pinyin .currLength = Get number of rows if not index_regex(.pinyinValue$, "^[a-zA-Z]") if .currLength > 1 Remove row: .rowNum else Set string value: .rowNum, "Pinyin", "bu4" endif endif endfor .numRows = Get number of rows sgc.numberOfWords = Get number of rows # Shuffle words if requested if config.shuffleLists Randomize rows endif # Determine number of words actually shown sgc.currentWord = 0 sgc.currentWordNum = 1 sgc.numberOfDisplayedWords = 0 for .i to .numRows .show$ = Get value: .i, "Show" if .show$ = "+" if sgc.currentWord < 1 sgc.currentWord = .i endif sgc.numberOfDisplayedWords += 1 endif endfor # Clean up label EMERGENCYEXIT #select sgc.allWordLists #Remove # There were no Word Lists label NOWORDLISTS if .numLists <= 0 wordlistName$ = wordlistName$+" No Word Lists available" wordlistNum = 1 Create Table with column names... "'wordlistName$'" 1 Pinyin Character Translation Sound wordlist$ = selected$("Table") .i = 0 Append row .i += 1 Set string value... '.i' Pinyin ni3hao3 Set string value... '.i' Character 你好 Set string value... '.i' Translation hello Set string value... '.i' Sound - Append row .i += 1 Set string value... '.i' Pinyin xie4xie0 Set string value... '.i' Character 谢谢 Set string value... '.i' Translation thanks Set string value... '.i' Sound - Append row .i += 1 Set string value... '.i' Pinyin zai4jian4 Set string value... '.i' Character 再见 Set string value... '.i' Translation goodbye Set string value... '.i' Sound - # Get rid of empty first row Remove row: 1 # Set default values sgc.numberOfWords = Get number of rows sgc.currentWord = 1 sgc.numberOfDisplayedWords = Get number of rows endif select Table 'wordlist$' sgc.currentWordlist = selected() call set_window_title 'buttons$' 'wordlistName$' endproc procedure read_wordlist .wordlistName$ .dirString$ # Read in full tables if fileReadable("'.dirString$'/wordlist.Table") call readTable '.dirString$'/wordlist.Table .wordlistID = selected () if .wordlistID > 0 Rename... '.wordlistName$' # Praat wil change the name if it feels like it .wordlist$ = selected$("Table") # Add a Sound column if it is not present .soundIndex = Get column index: "Sound" if .soundIndex <= 0 Append column: "Sound" endif else goto EMERGENCYEXITWL endif # Handle (legacy) simple word lists elsif fileReadable("'.dirString$'/wordlist.txt") .wordlistID = Create Table with column names... "'.wordlistName$'" 0 Pinyin Character Sound Translation .wordlist$ = selected$("Table") Read Strings from raw text file... '.dirString$'/wordlist.txt Rename... RawWordList .numWordStrings = Get number of strings for .i to .numWordStrings select Strings RawWordList .currentFile$ = "-" .currentChar$ = "-" .currentTrans$ = "-" .currentLine$ = Get string... '.i' # Remove leading whitespace .currentLine$ = replace_regex$(.currentLine$, "^[ \t]+", "", 0) .separatorIndex = index_regex(.currentLine$, "[ \t;\-]") if .separatorIndex <= 0 .separatorIndex = length(.currentLine$) + 1 endif .currentPinyin$ = left$(.currentLine$, .separatorIndex-1) .currentLine$ = right$(.currentLine$, length(.currentLine$) - .separatorIndex) # There is more on the line, but we do not know what if length(.currentLine$) > 0 while length(.currentLine$) > 0 .separatorIndex = index_regex(.currentLine$, "[\t;]") if .separatorIndex <= 0 .separatorIndex = length(.currentLine$)+1 endif .currentItem$ = left$(.currentLine$, .separatorIndex-1) .currentLine$ = right$(.currentLine$, length(.currentLine$) - .separatorIndex ) if index_regex(.currentItem$, ".(spx|flac|wav|mp3)") # Audio .currentFile$ = .currentItem$ elsif index_regex(.currentItem$, "[a-zA-Z0-9]") > 0 # Translation .currentTrans$ = .currentItem$ elsif index_regex(.currentItem$, "[^ \t\r\l]") > 0 && index_regex(.currentItem$, "[a-zA-Z0-9\-]") <= 0 # Characters .currentChar$ = .currentItem$ endif endwhile endif if .currentFile$ = "-" if fileReadable("'.dirString$'/'.currentPinyin$'.spx") .currentFile$ = .currentPinyin$+".spx" elsif fileReadable("'.dirString$'/'.currentPinyin$'.flac") .currentFile$ = .currentPinyin$+".flac" elsif fileReadable("'.dirString$'/'.currentPinyin$'.wav") .currentFile$ = .currentPinyin$+".wav" elsif fileReadable("'.dirString$'/'.currentPinyin$'.mp3") .currentFile$ = .currentPinyin$+".mp3" endif endif select .wordlistID Append row Set string value... '.i' Pinyin '.currentPinyin$' Set string value... '.i' Sound '.currentFile$' Set string value... '.i' Character '.currentChar$' Set string value... '.i' Translation '.currentTrans$' endfor select Strings RawWordList Remove select .wordlistID elsif fileReadable(.dirString$) or fileReadable("'.dirString$'/directory.txt") .wordlistID = Create Table with column names... "'.wordlistName$'" 0 Pinyin Sound .wordlist$ = selected$("Table") .tmp = Create Strings as file list... RawWordList '.dirString$'/* .numWordStrings = Get number of strings .i = 0 for .j to .numWordStrings select .tmp .currentLine$ = Get string... '.j' .currentFile$ = extractWord$(.currentLine$, "") if index_regex(.currentFile$, "\.(spx|flac|wav|mp3)") .currentPinyin$ = left$(.currentFile$, index(.currentFile$, ".")-1) select sgc.currentWordlist Append row .i += 1 Set string value... '.i' Pinyin '.currentPinyin$' Set string value... '.i' Sound '.currentFile$' endif endfor select .tmp Remove select sgc.currentWordlist elsif startsWith(.dirString$, "*call ") .callProcedure$ = right$(.dirString$, length(.dirString$)-1) '.callProcedure$' .wordlistID = selected() .wordlist$ = selected$("Table") else # Nothing, get out goto EMERGENCYEXITWL endif # Add the path to the file Sound file names select .wordlistID .numRows = Get number of rows for .w to .numRows .soundfile$ = Get value: .w, "Sound" if index_regex(.soundfile$, "[/\\]") <= 0 if index_regex(.dirString$, "[/\\]$") .soundfile$ = .dirString$+.soundfile$ elsif index_regex(.dirString$, "[\\]") .soundfile$ = .dirString$+"\\"+.soundfile$ else .soundfile$ = .dirString$+"/"+.soundfile$ endif Set string value: .w, "Sound", .soundfile$ endif endfor label EMERGENCYEXITWL endproc procedure merge_into_wordlist .newTableID .lessonPostfix$ select sgc.currentWordlist .oldLessonColumn = Get column index: "Lesson" select .newTableID .numRows = Get number of rows .lessonColumn = Get column index: "Lesson" .characterColumn = Get column index: "Character" .soundColumn = Get column index: "Sound" .translationColumn = Get column index: "Translation" for .w to .numRows .currentFile$ = "-" .currentChar$ = "-" .currentTrans$ = "-" .currentLesson$ = "-" select .newTableID .currentPinyin$ = Get value: .w, "Pinyin" if .soundColumn > 0 .currentFile$ = Get value: .w, "Sound" endif if .characterColumn > 0 .currentChar$ = Get value: .w, "Character" endif if .translationColumn > 0 .currentTrans$ = Get value: .w, "Translation" endif if .lessonColumn > 0 .currentLesson$ = Get value: .w, "Lesson" endif select sgc.currentWordlist Append row .n = Get number of rows Set string value: .n, "Pinyin", .currentPinyin$ Set string value: .n, "Sound", .currentFile$ Set string value: .n, "Character", .currentChar$ Set string value: .n, "Translation", .currentTrans$ if .oldLessonColumn > 0 if .currentLesson$ = "-" or .currentLesson$ = "" or .currentLesson$ = "?" Set string value: .n, "Lesson", .lessonPostfix$ else Set string value: .n, "Lesson", .currentLesson$+" "+.lessonPostfix$ endif endif endfor endproc procedure next_word if wordlist$ <> "" select sgc.currentWordlist .showCurrent$ = "-" if sgc.currentWord < 0 or sgc.currentWord > sgc.numberOfWords if config.shuffleLists Randomize rows endif sgc.currentWord = 0 sgc.currentWordNum = 0 endif while .showCurrent$ = "-" and sgc.currentWord <= sgc.numberOfWords sgc.currentWord += 1 if sgc.currentWord <= sgc.numberOfWords .showCurrent$ = Get value... 'sgc.currentWord' Show endif endwhile if sgc.currentWord > 0 sgc.currentWordNum += 1 else sgc.currentWordNum = 0 endif endif endproc procedure previous_word if wordlist$ <> "" select sgc.currentWordlist .showCurrent$ = "-" if sgc.currentWord <= 0 if config.shuffleLists Randomize rows endif sgc.currentWord = sgc.numberOfWords + 1 sgc.currentWordNum = sgc.numberOfDisplayedWords + 1 endif while .showCurrent$ = "-" and sgc.currentWord > 0 sgc.currentWord -= 1 if sgc.currentWord > 0 .showCurrent$ = Get value... 'sgc.currentWord' Show endif endwhile if sgc.currentWord > 0 sgc.currentWordNum -= 1 else sgc.currentWordNum = 0 endif endif endproc procedure display_word_list_name .xtext = 50 .ytext = 12 call reset_viewport .displayWordList$ = replace_regex$(wordlistName$, "[_]", " ", 0) call wipeArea 'wipeWordlistArea$' call adjustFontSizeOnHeight 'defaultFont$' 'defaultFontSize' 5 .currentFontSize = adjustFontSizeOnHeight.newFontSize demo Blue demo Text special... '.xtext' Centre '.ytext' Bottom 'defaultFont$' '.currentFontSize' 0 '.displayWordList$' demo Black demoShow() call set_font_size 'defaultFontSize' endproc procedure write_word_list # Write current Pinyin text call display_text Black # Write the current word list name call display_word_list_name endproc procedure paint_saveAudio_light select Table 'config$' .row = Search column... Label SaveAudio if .row < 1 exit Button Table Config does not have a row with label SaveAudio endif # Get button values .leftX = Get value... '.row' LeftX .rightX = Get value... '.row' RightX .lowY = Get value... '.row' LowY .highY = Get value... '.row' HighY .buttonColor$ = Get value... '.row' Color # The button text and symbol .horWC = demo Horizontal mm to wc... 10.0 .verWC = demo Vertical mm to wc... 10.0 if .verWC > 0 .verCoeff = .horWC / .verWC else .verCoeff = 1 endif .centerX = (.leftX + .rightX)/2 .centerY = .lowY + 0.6*(.highY-.lowY) .radius = min(.verCoeff * (.highY - .lowY ), (.rightX - .leftX))/3 .wipeRadius = 1.1*.radius call DrawSaveAudio White '.centerX' '.centerY' '.wipeRadius' if sgc.saveAudioOn and sgc.saveAudio$ <> "" call DrawSaveAudio "DarkBlue" '.centerX' '.centerY' '.radius' endif demoShow() endproc # Uninstall word lists procedure removeWordlist .deletedWordlistName$ .targetDir$ = "" if fileReadable("'sgc2wordlists$'/'.deletedWordlistName$'") or fileReadable("'sgc2wordlists$'/'.deletedWordlistName$'/wordlist.txt") or fileReadable("'sgc2wordlists$'/'.deletedWordlistName$'/wordlist.Table") .targetDir$ = "'sgc2wordlists$'/'.deletedWordlistName$'" endif if .targetDir$ <> "" Create Strings as file list... DeleteList '.targetDir$' .numdeleteFiles = Get number of strings for .i to .numdeleteFiles .file$ = Get string... '.i' deleteFile("'.targetDir$'/'.file$'") endfor filedelete '.targetDir$' # Check whether the directory was actually deleted. Make sure this is a valid directory name! # That is, it does not contain funny characters, nor funny names if index_regex(.deletedWordlistName$, "[^a-zA-Z0-9_ .\-]") <= 0 and index(.deletedWordlistName$, "..") <= 0 and index_regex(.deletedWordlistName$, "[a-zA-Z]") > 0 if windows nocheck system rmdir "'.targetDir$'" /s /q elsif fileReadable(.targetDir$) system bash -rc -- 'rm -r -- "'.targetDir$'"' endif endif # Remove deleted word list select Strings DeleteList plus Table 'wordlist$' Remove wordlist$ = "" endif endproc # Install word lists procedure sgc2wordlist .sourceDir$ if startsWith(.sourceDir$, "preferencesDirectory$") .sourceDir$ = replace$(.sourceDir$, "preferencesDirectory$", preferencesDirectory$) endif .targetDirectory$ = "'sgc2wordlists$'" if fileReadable(.sourceDir$) or fileReadable("'.sourceDir$'/directory.txt") Create Strings as file list... PackageList '.sourceDir$'/*.sgc .numFiles = Get number of strings for .i to .numFiles select Strings PackageList .file$ = Get string... '.i' call readWordlist '.sourceDir$' '.file$' endfor select Strings PackageList Remove endif endproc # Debuggin remarks!!! # fileReadable() does not work in Windows # The file paths / -> \\ must be performed on the filenames in Windows before the system_nocheck is given # And yet only the 7z decompression has been implemented windowsUnzipCommand$ = "" if fileReadable("C:\Program Files\7-Zip\7z.exe") windowsUnzipCommand$ = """C:\Program Files\7-Zip\7z.exe"" -y e" windowsUnzipDestDir$ = " -o" elsif fileReadable("C:\Program Files\WinZip\winzip32.exe") # !!! Find a way to include the output folder !!! windowsUnzipCommand$ = "C:\Program Files\WinZip\winzip32.exe"" -min -e -o -j " windowsUnzipDestDir$ = "" endif procedure readWordlist .sourceDir$ .file$ # No use doing anything if the source does not exist if fileReadable("'.sourceDir$'/'.file$'") or fileReadable("'.sourceDir$'/'.file$'/wordlist.txt") or fileReadable("'.sourceDir$'/'.file$'/wordlist.Table") # What will be the target wordlist directory? .targetDirectory$ = "'sgc2wordlists$'" .dirname$ = left$(.file$, rindex(.file$, ".")-1) if .dirname$ = "" .dirname$ = .file$ endif .wordlistDirectory$ = .targetDirectory$+"/"+.dirname$ # Wordlist directory does not exist, neither locally nor in the preferences .wordListExists = 0 .tmpDirs = nocheck Create Strings as directory list... TMPWORDLISTS '.targetDirectory$'/ if .tmpDirs != undefined and .tmpDirs > 0 .numDirs = Get number of strings for .d to .numDirs select .tmpDirs .currentString$ = Get string... '.d' if .currentString$ = .dirname$ .wordListExists = 1 endif endfor Remove endif if not (.wordListExists or fileReadable(.dirname$) or fileReadable("'.dirname$'/directory.txt") or fileReadable(.wordlistDirectory$) or fileReadable("'.wordlistDirectory$'/directory.txt")) .wasWordList = 0 # Move source to destination # Use this if you want to allow direct loading of ZIP files. Could lead to problems. # if index(.file$, ".sgc") or index(.file$, ".zip") # if index(.file$, ".sgc") if index_regex(.wordlistDirectory$, "[^a-zA-Z0-9_\.\- /~\:]") <= 0 and index_regex(.dirname$, "[^a-zA-Z0-9_\.\- ]") <= 0 and not (windows and windowsUnzipCommand$ = "") # Create wordlist directory createDirectory(.wordlistDirectory$) .wasWordList = 1 if macintosh or unix system bash -rc -- 'unzip -j "'.sourceDir$'/'.file$'" -d "'.wordlistDirectory$'"' elsif windows and windowsUnzipCommand$ <> "" .winWordListDirectory$ = replace_regex$(.wordlistDirectory$, "/", "\\", 0) .winSourceDirectory$ = replace_regex$("'.sourceDir$'\'.file$'", "/", "\\", 0) system mkdir "'.winWordListDirectory$'" & 'windowsUnzipCommand$' "'.winSourceDirectory$'" 'windowsUnzipDestDir$'"'.winWordListDirectory$'" endif elsif (windows and windowsUnzipCommand$ = "") # Warn to install 7Zip call get_feedback_text 'config.language$' InstallUnzip call convert_praat_to_latin1 'get_feedback_text.text$' .zipText$ = convert_praat_to_latin1.text$ call write_text_popup 'defaultFont$' 14 '.zipText$' # Wait for confirmation demoWaitForInput() call Draw_config_page endif # Remove if not valid! if fileReadable("'.wordlistDirectory$'/wordlist.Table") or fileReadable("'.wordlistDirectory$'/wordlist.txt") or fileReadable("'.wordlistDirectory$'/LICENSE.txt") if fileReadable("'.wordlistDirectory$'/wordlist.Table") call readTable '.sourceDir$'/'.file$' if readTable.tableID > 0 select readTable.tableID # Hack around odd behavior of column index .pinyinCol = 0 .firstColumn$ = Get column label: 1 .firstColumn$ = replace_regex$(.firstColumn$, "^[^!-~]", "", 0) if .firstColumn$ = "Pinyin" .pinyinCol = 1 else .pinyinCol = Get column index... Pinyin endif Remove # No Pinyin in table if .pinyinCol <= 0 .wasWordList = 0 endif else .wasWordList = 0 endif endif else # None of wordlist.Table, wordlist.txt, nor LICENSE.txt .wasWordList = 0 endif ### REALLY DANGEROUS STUFF, SHOULD BE HANDLED BETTER if .wasWordList = 0 # Remove newly created directory if index_regex(.wordlistDirectory$, "[^a-zA-Z0-9_\.\- /~\:]") <= 0 and index_regex(.dirname$, "[^a-zA-Z0-9_\.\- ]") <= 0 and index(.dirname$, "..") <= 0 if macintosh or unix system bash -rc -- 'rm -r "'.wordlistDirectory$'/"' elsif windows system rmdir /Q /S "'.winWordListDirectory$'/" endif endif endif elsif index_regex(.file$, "\.(Table|tsv|csv)") # Check whether this is a valid table call readTable '.sourceDir$'/'.file$' if readTable.tableID > 0 select readTable.tableID # Hack around odd behavior of column index .pinyinCol = 0 .firstColumn$ = Get column label: 1 .firstColumn$ = replace_regex$(.firstColumn$, "^[^!-~]", "", 0) if .firstColumn$ = "Pinyin" .pinyinCol = 1 else .pinyinCol = Get column index... Pinyin endif if .pinyinCol > 0 select readTable.tableID # Create wordlist directory createDirectory(.wordlistDirectory$) .wasWordList = 1 .extension$ = "Table" .wordlistFilePath$ = "'.wordlistDirectory$'/wordlist.'.extension$'" if windows .wordlistFilePath$ = replace_regex$(.wordlistFilePath$, "/", "\\", 0) endif # Save select readTable.tableID Save as tab-separated file: .wordlistFilePath$ if not fileReadable(.wordlistFilePath$) .wasWordList = 0 endif endif select readTable.tableID Remove endif elsif index_regex(.file$, "\.(?itxt)") # Check whether this is a valid table readTable.tableID = nocheck Read Strings from raw text file: "'.sourceDir$'/'.file$'" if readTable.tableID > 0 .wasWordList = 1 # Create wordlist directory createDirectory(.wordlistDirectory$) .extension$ = "txt" .wordlistFilePath$ = "'.wordlistDirectory$'/wordlist.'.extension$'" if windows .wordlistFilePath$ = replace_regex$(.wordlistFilePath$, "/", "\\", 0) endif select readTable.tableID Save as raw text file: .wordlistFilePath$ select readTable.tableID Remove endif elsif fileReadable("'.sourceDir$'/'.file$'/wordlist.Table") or fileReadable("'.sourceDir$'/'.file$'/wordlist.txt") or fileReadable("'.sourceDir$'/'.file$'/LICENSE.txt") # Copy wordlist directory if index_regex(.file$, "[^a-zA-Z0-9_\.\- ]") <= 0 .wasWordList = 1 if macintosh or unix system bash -rc -- 'cp -r "'.sourceDir$'/'.file$'" "'.wordlistDirectory$'"' elsif windows createDirectory(.wordlistDirectory$) .winWordListDirectory$ = replace_regex$(.wordlistDirectory$, "/", "\\", 0) .winSourceDirectory$ = replace_regex$("'.sourceDir$'\'.file$'", "/", "\\", 0) system xcopy "'.winSourceDirectory$'" "'.winWordListDirectory$'" /s /e /q endif endif endif # Set current word list to read list if .wasWordList wordlistName$ = .dirname$ else .table$ = "Config" .label$ = "!NotAWordlist" # Get help text call findLabel '.table$' '.label$' .row = findLabel.row select Table '.table$' .helpText$ = Get value... '.row' Helptext .printablePath$ = "'.sourceDir$'/'.file$'" if windows .printablePath$ = replace$("'.sourceDir$'\'.file$'", "\", "\bs", 0) endif .filetext$ = replace_regex$(.printablePath$, "_", "\\_ ", 0) call write_text_popup 'defaultFont$' 14 '.helpText$' "'.filetext$'" # Wait for confirmation demoWaitForInput() endif endif endif endproc # A function: # replaySGC2LogFunction$ = "replaySGC2LogFunction" # procedure replaySGC2LogFunction # .... # Test commands # endproc # # include sgc2.praat # 'replaySGC2Log$' # Start instruction loop while demoWaitForInput() .label$ = "" .clickX = -1 .clickY = -1 .pressed$ = "" if demoClicked() .clickX = demoX() .clickY = demoY() call buttonClicked 'buttons$' '.clickX' '.clickY' .label$ = buttonClicked.label$ elsif demoKeyPressed() .pressed$ = demoKey$() call keyPressed 'buttons$' '.pressed$' .label$ = keyPressed.label$ endif # You cannot select a text field if startsWith(.label$, "$") .label$ = "" endif # Do things if .label$ != "" te.buttonPressValue = 0 # Push button down call Draw_button 'buttons$' '.label$' 1 call process_label '.label$' '.clickX' '.clickY' '.pressed$' # push button up call Draw_button 'buttons$' '.label$' 'te.buttonPressValue' endif endwhile call end_program ######################################################## # # Definitions of procedures # ######################################################## # # Do what is asked procedure process_label .label$ .clickX .clickY .pressed$ # Prcoess the command if .label$ <> "" and not startsWith(.label$,"!") .label$ = replace_regex$(.label$, "^[#]", "", 0) .label$ = replace$(.label$, "_", " ", 0) # log activity 'sgc2.logging$' call process'buttons$''.label$' '.clickX' '.clickY' '.pressed$' call process'buttons$''.label$' '.clickX' '.clickY' '.pressed$' endif endproc # Intialize buttons procedure init_buttons noerase = 1 call Draw_all_buttons 'buttons$' noerase = 0 endproc # Draw all buttons noerase = 0 procedure Draw_all_buttons .table$ .varPrefix$ = replace_regex$(.table$, "^(.)", "\l\1", 0) select Table '.table$' .numRows = Get number of rows for .row to .numRows .label$ = Get value... '.row' Label if not startsWith(.label$, "!") .pressed = 0 # Determine the "pressed" state of a button # A variable with the same name as the button will act as a # "pressed state" .variableName$ = .varPrefix$+"."+(replace_regex$(.label$, "^(.)", "\l\1", 0)) # Simple boolean variables if index(.variableName$, "_") <= 0 and variableExists(.variableName$) # True: Pressed if '.variableName$' > 0 .pressed = 2 # <0: Grayed out elsif '.variableName$' < 0 .pressed = -1 endif elsif index(.variableName$, "_") <= 0 and variableExists("'.variableName$'$") # Non zero: Pressed if '.variableName$'$ <> "" and '.variableName$'$ <> "0" .pressed = 2 endif # Complex buttons with an variableName+'_'+value structure # varableName$ -> name of button, e.g., "language" elsif index(.variableName$, "_") .generalVar$ = left$(.variableName$, rindex(.variableName$, "_") - 1) .currentVariableName$ = .generalVar$ # Is it a string? if variableExists(.generalVar$+"$") .currentVariableName$ = .generalVar$ + "$" endif # Remove one level of indirection if variableExists(.currentVariableName$) if index(.currentVariableName$, "$") .currentVariableName$ = '.currentVariableName$' else .currentValue = '.currentVariableName$' .currentVariableName$ = "'.currentValue'" endif # Remove next level of indirection .currentContent$ = "'.currentVariableName$'" if .currentContent$ = "_DISABLED_" .pressed = -1 endif # Reconstruct label from current values .currentLabelValue$ = .generalVar$ + "_" + .currentContent$ # Set PRESSED from label if .variableName$ = .currentLabelValue$ .pressed = 2 endif endif endif # You did erase everything before you started here? So do not do that again call Draw_button_internal 0 '.table$' '.label$' '.pressed' endif endfor endproc # Draw a button from a predefined button table # Normally, erase the area around a button procedure Draw_button .table$ .label$ .push call Draw_button_internal 1 '.table$' '.label$' '.push' endproc # Use this function if you want to control erasing procedure Draw_button_internal .erase_button_area .table$ .label$ .push # Do not draw invisible buttons starting with # goto NOBUTTON startsWith(.label$, "#") # Scale rounding of rounded rectangles .wc = 1 .mm = demo Horizontal wc to mm... '.wc' # Allow to overide ! skip directive .forceDraw = 0 if startsWith(.label$, "+") .label$ = right$(.label$, length(.label$)-1) .forceDraw = 1 endif select Table '.table$' .row = Search column... Label '.label$' if .row < 1 call emergency_table_exit Button Table '.table$' does not have a row with label '.label$' endif # Perspective shift sizes .shiftDown = 0 .shiftX = 0 .shiftY = 0 if buttonbevel <> 0 .shiftDown = 0.1*buttonbevel .shiftX = -0.2*buttonbevel .shiftY = 0.40*buttonbevel endif # Set drawing parameters .topBackGroundColorUp$ = "{0.93,0.93,0.93}" .topLineColorUp$ = "Black" .topLineWidthUp = 1.5 .topBackGroundColorDown$ = "{0.89,0.89,0.94}" .topLineColorDown$ = "{0.2,0.2,0.2}" .topLineWidthDown = 2.0 .topBackGroundColorDisabled$ = "{0.85,0.85,0.85}" .topLineColorDisabled$ = "{0.70,0.70,0.70}" .topLineWidthDisabled = 1.5 .flankBackGroundColorUp$ = "{0.6,0.6,0.6}" .flankLineColorUp$ = "{0.2,0.2,0.2}" .flankLineWidthUp = 1.5 .flankBackGroundColorDown$ = "{0.75,0.75,0.75}" .flankLineColorDown$ = .flankLineColorUp$ .flankLineWidthDown = 1.5 .buttonFontSize = defaultFontSize # Get button values .leftX = Get value... '.row' LeftX .rightX = Get value... '.row' RightX .lowY = Get value... '.row' LowY .highY = Get value... '.row' HighY .buttonText$ = Get value... '.row' Text .buttonColor$ = Get value... '.row' Color .buttonDraw$ = Get value... '.row' Draw .buttonKey$ = Get value... '.row' Key .noDraw = startsWith(.label$, "!") or (.leftX < 0) or (.rightX < 0) or (.lowY < 0) or (.highY < 0) .rotation = 0 if index_regex(.buttonText$, "^![0-9\.]+!") .rotation = extractNumber(.buttonText$, "!") .buttonText$ = replace_regex$(.buttonText$, "^![0-9\.]+!", "", 0) endif if .leftX = .rightX or .highY = .lowY .noDraw = 1 endif goto NOBUTTON .noDraw and not .forceDraw # Replace button text with ALERT if .push = 3 .buttonText$ = alertText$ endif # Adapt font size to button size .maxWidth = (.rightX - .leftX) - 2 .maxHeight = (.highY - .lowY) - 1 if .rotation = 0 # Adapt size of button to length of text if necessary call adjustFontSizeOnWidth 'defaultFont$' '.buttonFontSize' '.maxWidth' '.buttonText$' .buttonFontSize = adjustFontSizeOnWidth.newFontSize if adjustFontSizeOnWidth.diff > 0 .rightX += adjustFontSizeOnWidth.diff/2 .leftX -= adjustFontSizeOnWidth.diff/2 endif call set_font_size '.buttonFontSize' # Adapt size of button to length of text call adjustFontSizeOnHeight 'defaultFont$' '.buttonFontSize' '.maxHeight' if adjustFontSizeOnHeight.diff > 0 .lowY -= adjustFontSizeOnHeight.diff/2 .highY += adjustFontSizeOnHeight.diff/2 endif .buttonFontSize = adjustFontSizeOnHeight.newFontSize else # With non-horizontal text, only change font size call adjustRotatedFontSizeOnBox 'defaultFont$' '.buttonFontSize' '.maxWidth' '.maxHeight' '.rotation' '.buttonText$' .buttonFontSize = adjustRotatedFontSizeOnBox.newFontSize endif # Reset and erase button area call reset_viewport demo Line width... 'defaultLineWidth' .shiftLeftX = .leftX .shiftRightX = .rightX - .shiftX .shiftLowY = .lowY - .shiftY .shiftHighY = .highY if .erase_button_area # Make erase area minutely larger .eraseLeft = .shiftLeftX - 0.01 .eraseRight = .shiftRightX + 0.01 .eraseBottom = .shiftLowY - 0.01 .eraseTop = .shiftHighY + 0.01 demo Paint rectangle... White .eraseLeft .eraseRight .eraseBottom .eraseTop endif # If label starts with "$", it is a text field. Then do not draw the button if not startsWith(.label$, "$") # Give some depth to button: Draw flank outline if .shiftDown or .shiftX or .shiftY if .push <= 0 demo Paint rounded rectangle... '.flankBackGroundColorUp$' .shiftLeftX .shiftRightX .shiftLowY .shiftHighY '.mm' demo Colour... '.flankLineColorUp$' demo Line width... '.flankLineWidthUp' else demo Paint rounded rectangle... '.flankBackGroundColorDown$' .shiftLeftX .shiftRightX .shiftLowY .shiftHighY '.mm' demo Colour... '.flankLineColorDown$' demo Line width... '.flankLineWidthDown' endif demo Draw rounded rectangle... .shiftLeftX .shiftRightX .shiftLowY .shiftHighY '.mm' endif # Button Down will shift the top perspective # Draw the button top. Buttons with variable labels are treated differently if .push = 0 or (.push >= 2 and index(.buttonText$, "$$$")) demo Paint rounded rectangle... '.topBackGroundColorUp$' '.leftX' '.rightX' '.lowY' '.highY' '.mm' demo Colour... '.topLineColorUp$' demo Line width... '.topLineWidthUp' elsif .push < 0 demo Paint rounded rectangle... '.topBackGroundColorDisabled$' '.leftX' '.rightX' '.lowY' '.highY' '.mm' demo Colour... '.topLineColorDisabled$' demo Line width... '.topLineWidthDisabled' else # Button Down .leftX += .shiftDown .rightX += .shiftDown .lowY -= .shiftDown .highY -= .shiftDown demo Paint rounded rectangle... '.topBackGroundColorDown$' .leftX .rightX .lowY .highY '.mm' demo Colour... '.topLineColorDown$' demo Line width... '.topLineWidthDown' endif demo Draw rounded rectangle... '.leftX' '.rightX' '.lowY' '.highY' '.mm' endif # The button text and symbol .horWC = demo Horizontal mm to wc... 10.0 .verWC = demo Vertical mm to wc... 10.0 if .verWC > 0 .verCoeff = .horWC / .verWC else .verCoeff = 1 endif .centerX = (.leftX + .rightX)/2 .centerY = .lowY + 0.6*(.highY-.lowY) .radius = min(.verCoeff * (.highY - .lowY ), (.rightX - .leftX))/3 .buttonKey$ = replace$(.buttonKey$, "\", "\\", 0) .buttonKey$ = replace$(.buttonKey$, """", "\""""", 0) .keyText$ = replace$(.buttonKey$, "\", "", 0) .keyText$ = replace$(.keyText$, "-", "", 0) .newText$ = "" if .keyText$ <> "" .newText$ = replace_regex$(.buttonText$, "['.keyText$']", "#%&", 1) endif if .newText$ = "" .newText$ = .buttonText$ endif # Variable text field, read corresponding variable if index(.newText$, "$$$") .fieldName$ = replace_regex$(.label$, "^[!$#]", "", 0) .fieldName$ = replace_regex$(.fieldName$, "^(.)", "\l\1", 0) .varPrefix$ = replace_regex$(.table$, "^(.)", "\l\1", 0) .newText$ = replace$(.newText$, "$$$", '.varPrefix$'.'.fieldName$'$, 0) endif if .push = 1 or .push = -1 demo Grey if .buttonColor$ = "Red" .buttonColor$ = "Pink" elsif .buttonColor$ = "Blue" .buttonColor$ = "{0.5,0.5,1}" else .buttonColor$ = "Grey" endif elsif .push >= 2 .buttonColor$ = "Maroon" else demo Colour... Black endif call '.buttonDraw$' '.buttonColor$' '.centerX' '.centerY' '.radius' call set_font_size '.buttonFontSize' demo Colour... '.buttonColor$' if .rotation = 0 .anchorY = .lowY .verticalAlignment$ = "Bottom" else .anchorY = .lowY + 0.5*(.highY-.lowY) .verticalAlignment$ = "Half" endif demo Text special... '.centerX' Centre '.anchorY' '.verticalAlignment$' 'defaultFont$' '.buttonFontSize' '.rotation' '.newText$' demoShow() # Reset call set_font_size 'defaultFontSize' demo Black demo Line width... 'defaultLineWidth' label NOBUTTON endproc procedure set_window_title .table$ .addedText$ select Table '.table$' .row = Search column... Label !WindowTitle if .row < 1 call emergency_table_exit Button Table '.table$' does not have a row with label !WindowTitle endif .windowText$ = Get value... '.row' Text call convert_praat_to_latin1 '.windowText$' .windowText$ = convert_praat_to_latin1.text$ if index(.windowText$, "$$$") .displayWindowText$ = replace$(.windowText$, "$$$", .addedText$, 0) else .displayWindowText$ = .windowText$ + .addedText$ endif demoWindowTitle(.displayWindowText$ ) endproc # Handle language setting procedure processLanguageCodes .table$ .label$ .table$ = "Config" call Draw_button 'config$' Language_'config.language$' 0 call Draw_button 'config$' '.label$' 2 # Someone might have to use more than 2 chars for the language code .numChars = length(.label$) - length("Language_") .lang$ = right$(.label$, .numChars) # Load new tables call set_language '.lang$' endproc # Set the language procedure set_language .lang$ .redraw_config = 0 # Remove old tables if buttons$ <> "" select Table 'buttons$' Remove .redraw_config = 1 endif if config$ <> "" select Table 'config$' Remove .redraw_config = 1 endif # See whether there is a custom language sgc.customLanguage$ = "" .langList = nocheck Create Strings as file list: "CustomLanguages", preferencesTableDir$+"/Config_*.Table" # NOTE: The list might not exist!!! if .langList = undefined .numLanguages = -1 else .numLanguages = Get number of strings endif if .numLanguages <= 0 if not .langList = undefined Remove endif .langList = nocheck Create Strings as file list: "CustomLanguages", globaltablelists$+"/Config_*.Table" if .langList = undefined .numLanguages = -1 else .numLanguages = Get number of strings endif endif if .numLanguages > 0 .configTable$ = Get string: 1 .startChar = rindex(.configTable$, "_") sgc.customLanguage$ = right$(.configTable$, length(.configTable$) - .startChar) sgc.customLanguage$ = left$(sgc.customLanguage$, index(sgc.customLanguage$, ".") -1) endif if not .langList = undefined select .langList Remove endif # Set language call checkTable 'configTableName$'_'.lang$' if checkTable.available config.language$ = .lang$ else config.language$ = "EN" endif if config.language$ = "JA" CJK font style preferences: "Japanese" else CJK font style preferences: "Chinese" endif # Load buttons tables call loadTable 'buttonsTableName$' buttons$ = selected$("Table") Append column... Text Append column... Key Append column... Helptext .numLabels = Get number of rows call testLoadTable 'buttonsTableName$'_'config.language$' if testLoadTable.table > 0 call loadTable 'buttonsTableName$'_'config.language$' else call loadTable 'buttonsTableName$'_EN endif .buttonsLang$ = selected$("Table") for .row to .numLabels select Table 'buttons$' .label$ = Get value... '.row' Label call findLabel '.buttonsLang$' '.label$' if findLabel.row > 0 select Table '.buttonsLang$' .valueText$ = Get value... 'findLabel.row' Text .valueKey$ = Get value... 'findLabel.row' Key .valueHelp$ = Get value... 'findLabel.row' Helptext select Table 'buttons$' Set string value... '.row' Text '.valueText$' Set string value... '.row' Key '.valueKey$' Set string value... '.row' Helptext '.valueHelp$' elsif index(.label$, "_") # Load alternative language table .startChar = rindex(.label$, "_") .otherLanguage$ = right$(.label$, length(.label$) - .startChar) call loadTable 'buttonsTableName$'_'.otherLanguage$' .otherbuttonsLang$ = selected$("Table") call findLabel '.otherbuttonsLang$' '.label$' if findLabel.row > 0 select Table '.buttonsLang$' .valueText$ = Get value... 'findLabel.row' Text .valueKey$ = Get value... 'findLabel.row' Key .valueHelp$ = Get value... 'findLabel.row' Helptext select Table 'buttons$' Set string value... '.row' Text '.valueText$' Set string value... '.row' Key '.valueKey$' Set string value... '.row' Helptext '.valueHelp$' else call emergency_table_exit Cannot find Label: '.otherbuttonsLang$' '.label$' endif select Table '.otherbuttonsLang$' Remove else call emergency_table_exit Cannot find Label: '.buttonsLang$' '.label$' endif endfor select Table '.buttonsLang$' Remove # Load configuration table call loadTable 'configTableName$' config$ = selected$("Table") .configTable = selected() # Substitute or remove optional languages .optRow = Search column: "Label", "!Language_???" if .optRow > 0 .row = -1 if sgc.customLanguage$ <> "" .row = Search column: "Label", "Language_"+sgc.customLanguage$ endif if .row <= 0 and sgc.customLanguage$ <> "" Set string value: .optRow, "Label", "Language_"+sgc.customLanguage$ else .tableLength = Get number of rows # Should never ever happen if .tableLength > 1 Remove row: .optRow else Set string value: .optRow, "Label", "Language_EN" endif endif endif select .configTable Append column... Text Append column... Key Append column... Helptext .numLabels = Get number of rows call testLoadTable 'configTableName$'_'config.language$' if testLoadTable.table > 0 call loadTable 'configTableName$'_'config.language$' else call loadTable 'configTableName$'_EN endif .configLang$ = selected$("Table") for .row to .numLabels select Table 'config$' .label$ = Get value... '.row' Label call findLabel '.configLang$' '.label$' if findLabel.row > 0 select Table '.configLang$' .valueText$ = Get value... 'findLabel.row' Text .valueKey$ = Get value... 'findLabel.row' Key .valueHelp$ = Get value... 'findLabel.row' Helptext select Table 'config$' Set string value... '.row' Text '.valueText$' Set string value... '.row' Key '.valueKey$' Set string value... '.row' Helptext '.valueHelp$' elsif index(.label$, "_") .startChar = rindex(.label$, "_") .otherLanguage$ = right$(.label$, length(.label$) - .startChar) call loadTable 'configTableName$'_'.otherLanguage$' .otherconfigLang$ = selected$("Table") call findLabel '.otherconfigLang$' '.label$' if findLabel.row > 0 select Table '.otherconfigLang$' .valueText$ = Get value... 'findLabel.row' Text .valueKey$ = Get value... 'findLabel.row' Key .valueHelp$ = Get value... 'findLabel.row' Helptext select Table 'config$' Set string value... '.row' Text '.valueText$' Set string value... '.row' Key '.valueKey$' Set string value... '.row' Helptext '.valueHelp$' else call emergency_table_exit Cannot find Label: '.otherconfigLang$' '.label$' endif select Table '.otherconfigLang$' Remove else call emergency_table_exit Cannot find Label: '.configLang$' '.label$' endif endfor select Table '.configLang$' Remove # Make language change visible if .redraw_config call Draw_config_page endif endproc ############################################################### # # Button Drawing Routines # ############################################################### # A stub for buttons that do not have a drawing routine (yet) procedure DrawNull .color$ .x .y .size endproc procedure DrawHelp .color$ .x .y .size .currentFontSize = 24 .y -= .size .maxHeight = 2*.size call adjustFontSizeOnHeight 'defaultFont$' '.currentFontSize' '.maxHeight' .currentFontSize = adjustFontSizeOnHeight.currentFontSize call set_font_size '.currentFontSize' demo Colour... '.color$' demo Text... '.x' Centre '.y' Bottom ? call set_font_size 'defaultFontSize' endproc ############################################################### # # Button Processing Routines # ############################################################### # Search row in table on label procedure findKey .table$ .label$ .row = 0 select Table '.table$' .to$ = selected$("Table") .to$ = "Table_"+.to$ .numRows = Get number of rows for .i to .numRows .currentKey$ = '.to$'$[.i, "Key"] if .label$ = .currentKey$ .row = .i goto KEYFOUND endif endfor label KEYFOUND if .row <= 0 and index(.label$, "_") <= 0 printline "'.label$'" is not a key in '.table$' endif endproc procedure findLabel .table$ .label$ .row = 0 select Table '.table$' .to$ = selected$("Table") .to$ = "Table_"+.to$ .numRows = Get number of rows for .i to .numRows .currentKey$ = '.to$'$[.i, "Label"] if .label$ = .currentKey$ .row = .i goto LABELFOUND endif endfor label LABELFOUND if .row <= 0 and index(.label$, "_") <= 0 call emergency_table_exit "'.label$'" is not a key in '.table$' endif endproc # Get the label procedure buttonClicked table$ .x .y .label$ = "" select Table 'table$' .bo$ = selected$("Table") .bo$ = "Table_"+.bo$ .numRows = Get number of rows for .i to .numRows if .label$ = "" .leftX = '.bo$'[.i, "LeftX"] .rightX = '.bo$'[.i, "RightX"] .lowY = '.bo$'[.i, "LowY"] .highY = '.bo$'[.i, "HighY"] if .x > .leftX and .x < .rightX and .y > .lowY and .y < .highY .label$ = '.bo$'$[.i, "Label"] endif endif endfor endproc procedure keyPressed table$ .pressed$ .label$ = "" # Magic if .pressed$ = "" and not demoShiftKeyPressed() .label$ = "Refresh" endif .lowerPressed$ = replace_regex$(.pressed$, ".", "\L&", 0) .upperPressed$ = replace_regex$(.pressed$, ".", "\U&", 0) select Table 'table$' .bo$ = selected$("Table") .bo$ = "Table_"+.bo$ .numRows = Get number of rows for .i to .numRows if .label$ = "" .key$ = '.bo$'$[.i, "Key"] if index(.key$, .lowerPressed$) or index(.key$, .upperPressed$) .label$ = '.bo$'$[.i, "Label"] endif endif endfor endproc procedure count_syllables .number = 0 .pinyin$ = "" select sgc.currentWordlist if sgc.currentWord > 0 and sgc.currentWord <= sgc.numberOfWords .sound$ = Get value... 'sgc.currentWord' Sound call readPinyin 'sgc.currentWord' .pinyin$ = readPinyin.pinyin$ endif call add_missing_neutral_tones '.pinyin$' .pinyin$ = add_missing_neutral_tones.pinyin$ if index_regex(.pinyin$, "[0-9]") > 0 .number = length(replace_regex$(.pinyin$, "[^\d]+([\d]+)", "1", 0)) elsif .pinyin$ <> "" .number = 1 endif endproc procedure play_sound .sound if .sound > 0 if sgc.useAlternativePlayer and fileReadable(sgc.playCommandFile$) .scratchFile$ = "'sgc.scratchAudioDir$'SCRATCH.wav" select .sound Save as WAV file: .scratchFile$ .command$ < 'sgc.playCommandFile$' .command$ = replace$(.command$, "[']", """", 0) .command$ = replace$(.command$, "'newline$'", " ", 0) if unix or macintosh system_nocheck bash -c -- ''.command$' "'.scratchFile$'"' elsif windows system_nocheck call '.command$' "'.scratchFile$'" endif deleteFile(.scratchFile$) else select .sound Play endif endif endproc procedure record_sound .recordingTime if .recordingTime <= 0 .recordingTime = recordingTime endif call clean_up_sound # NOTE: Some sound can be playing! This will not be stopped. # There is a very nasty delay before the first recording starts, do a dummy record if not variableExists("recordingInitialized") and not sgc.useAlternativeRecorder call basic_sound_recording 'samplingFrequency' 0.1 Remove recordingInitialized = 1 endif # Recording light demo Paint circle... Red 5 95 2 demoShow() # In Windows XP interaction between demoWaitForInput and Record Sound blocks drawing the feedback # This code might be removed # if windows and endsWith(build_SHA$, " XP") # Display a pause window to flush the graphics buffer beginPause ("DESTROY WINDOW ") comment (" ") endPause ("DESTROY WINDOW ", 1) #call init_window demo Paint circle... Red 5 95 2 demoShow() endif ############################## call basic_sound_recording 'samplingFrequency' '.recordingTime' demo Paint circle... White 5 95 2.5 call wipeArea 'wipeFeedbackArea$' # Feedback on recording level .extremum = Get absolute extremum... 0 0 None .radius = 2 * .extremum if .radius <= 0 .radius = 0.02 endif .blue = 0 .green = 0 .red = 0 if .extremum >= 0.95 .red = 1 elsif .extremum >= 0.49 .green = 1 else .green = .extremum / 0.5 endif .color$ = "{'.red','.green','.blue'}" demo Colour... '.color$' demo Line width... 1 demo Draw circle... 5 95 '.radius' # Reset demoShow() demo Colour... Black demo Line width... 'defaultLineWidth' # Process sound Rename... Tmp Resample... 10000 50 Rename... Pronunciation recordedSound$ = selected$("Sound") sgc.recordedSound = selected("Sound") select Sound Tmp Remove select Sound 'recordedSound$' sgc.recordedSound = selected("Sound") # Cut out real sound from silences/noise call sound_detection 'recordedSound$' 'soundMargin' select Sound 'recordedSound$' sgc.recordedSound = selected("Sound") # Store audio if requested if sgc.saveAudioOn and sgc.saveAudio$ <> "" if sgc.savePerf$ <> "" and fileReadable(sgc.savePerf$) .pinyin$ = "" select sgc.currentWordlist if sgc.currentWord > 0 and sgc.currentWord <= sgc.numberOfWords call readPinyin 'sgc.currentWord' .pinyin$ = readPinyin.pinyin$ .outputName$ = "'sgc.saveAudio$'/'.pinyin$'.wav" select sgc.recordedSound Save as WAV file: .outputName$ endif else # The Audio directory disappeared sgc.savePerf$ = "" sgc.saveAudioOn = 0 sgc.saveAudio$ = "" config.savePerf = 0 config.openPerf = 0 config.clearSummary = 0 config.audioName$ = "" endif endif endproc # Uses global variables!!! procedure basic_sound_recording .samplingFrequency .recordingTime # Use a different recorder program if sgc.useAlternativeRecorder and fileReadable(sgc.recordCommandFile$) .scratchFile$ = "'sgc.scratchAudioDir$'SCRATCH.wav" .command$ < 'sgc.recordCommandFile$' .command$ = replace$(.command$, "[']", """", 0) .command$ = replace$(.command$, "'newline$'", " ", 0) if unix or macintosh if unix and .recordingTime < 1 .recordingTime = 1 endif system_nocheck bash -c -- ''.command$' '.recordingTime'' elsif windows system_nocheck call '.command$' '.recordingTime' endif .sound = Read from file: .scratchFile$ deleteFile(.scratchFile$) else .sound = nocheck noprogress nowarn Record Sound (fixed time)... 'config.input$' 0.99 0.5 '.samplingFrequency' '.recordingTime' if .sound = undefined .sound = Create Sound: "Pronunciation", 0, .recordingTime, .samplingFrequency, "0" endif endif # The recorded sound should now be the selected object!!! select .sound endproc # Select real sound from recording # Uses some global variable procedure sound_detection .sound$ .margin select Sound '.sound$' .soundlength = Get total duration .internalSilence = 2*.margin # Silence and remove noise, DANGEROUS To TextGrid (silences)... 'minimumPitch' 0 'noiseThresshold' '.internalSilence' 0.1 silent sounding Rename... Input'.sound$' select TextGrid Input'.sound$' .numberofIntervals = Get number of intervals... 1 if .numberofIntervals < 2 .numberofIntervals = 0 endif # The code below will suppress noise, but also weak third tones # This handles the problem that third tones can be realized with # alternative cues, e.g, non-standard voice and very low levels # # Remove buzzing and other obnoxious sounds (if switched on) for .i from 1 to .numberofIntervals select TextGrid Input'.sound$' .value$ = Get label of interval... 1 '.i' .begintime = Get starting point... 1 '.i' .endtime = Get end point... 1 '.i' # Remove noise if .value$ = "silent" select Sound '.sound$' Set part to zero... '.begintime' '.endtime' at nearest zero crossing endif endfor # Select target sound .maximumIntensity = -1 .counter = 1 for i from 1 to .numberofIntervals select TextGrid Input'.sound$' .value$ = Get label of interval... 1 'i' .begintime = Get starting point... 1 'i' .endtime = Get end point... 1 'i' if .value$ != "silent" if .begintime > .margin .begintime -= .margin else .begintime = 0 endif if .endtime + .margin < .soundlength .endtime += .margin else .endtime = .soundlength endif select Sound '.sound$' Extract part... '.begintime' '.endtime' Rectangular 1.0 no Rename... Tmp'.sound$' Subtract mean .newIntensity = Get intensity (dB) if .newIntensity > .maximumIntensity if .maximumIntensity > 0 select Sound New'.sound$' Remove endif select Sound Tmp'.sound$' Rename... New'.sound$' .maximumIntensity = .newIntensity else select Sound Tmp'.sound$' Remove endif # endif endfor if .maximumIntensity > minimumIntensity select Sound '.sound$' Remove select Sound New'.sound$' Rename... '.sound$' elsif .maximumIntensity > -1 select Sound New'.sound$' Remove endif select TextGrid Input'.sound$' Remove select Sound '.sound$' endproc procedure end_program call write_preferences "" demo Erase all select all Remove exit endproc ###################################################### # # Configuration Page # ###################################################### procedure config_page demo Erase all demoWindowTitle("Speak Good Chinese: Change settings") .label$ = "" call Draw_config_page goto GOBACK index_regex(replaySGC2Log$, "^\s*#") <= 0 while (.label$ <> "Return") and demoWaitForInput() .clickX = -1 .clickY = -1 .pressed$ = "" .label$ = "" if demoClicked() .clickX = demoX() .clickY = demoY() call buttonClicked 'config$' '.clickX' '.clickY' .label$ = buttonClicked.label$ elsif demoKeyPressed() .pressed$ = demoKey$() call keyPressed 'config$' '.pressed$' .label$ = keyPressed.label$ endif # You cannot select a text field if startsWith(.label$, "$") .label$ = "" endif # Do things if .label$ != "" # Handle push button in process_config call process_config '.label$' '.clickX' '.clickY' '.pressed$' endif if .label$ = "Return" goto GOBACK endif endwhile # Go back label GOBACK call init_window endproc procedure Draw_config_page demo Erase all # Draw background if config.showBackground call draw_background Background endif # Draw buttons call Draw_all_buttons 'config$' call set_window_title 'config$' # Set correct buttons (alert) call setConfigMainPage endproc # Do what is asked procedure process_config .label$ .clickX .clickY .pressed$ if .label$ <> "" and not startsWith(.label$,"!") .label$ = replace_regex$(.label$, "^[#]", "", 0) .label$ = replace$(.label$, "_", " ", 0) # Log activity 'sgc2.logging$' call process'config$''.label$' '.clickX' '.clickY' '.pressed$' call process'config$''.label$' '.clickX' '.clickY' '.pressed$' endif endproc ############################################################### # # Presenting help texts # ############################################################### # Process Help procedure help_loop .table$ .redrawProc$ # General Help text call write_help_title '.table$' .label$ = "" call Draw_button '.table$' Help 2 goto HELPGOBACK index_regex(replaySGC2Log$, "^\s*#") <= 0 .redrawScreen = 0 while (.label$ <> "Help") and demoWaitForInput() .label$ = "" if demoClicked() .clickX = demoX() .clickY = demoY() call buttonClicked '.table$' '.clickX' '.clickY' .label$ = buttonClicked.label$ elsif demoKeyPressed() .pressed$ = demoKey$() call keyPressed '.table$' '.pressed$' .label$ = keyPressed.label$ endif if .label$ != "" and .label$ <> "Help" # Redraw screen if .redrawScreen demo Erase all call '.redrawProc$' else .redrawScreen = 1 endif call Draw_button '.table$' Help 2 call write_help_title '.table$' # Handle push button in process_config call write_help_text '.table$' '.label$' # Log activity 'sgc2.logging$' demo Erase all 'sgc2.logging$' call '.redrawProc$' 'sgc2.logging$' call write_help_title '.table$' 'sgc2.logging$' call write_help_text '.table$' '.label$' endif endwhile label HELPGOBACK # Reset button call Draw_button '.table$' Help 0 demo Erase all call '.redrawProc$' endproc # Write help text procedure write_help_text .table$ .label$ call findLabel '.table$' '.label$' .row = findLabel.row select Table '.table$' # Get text if .row <= 0 call findLabel '.table$' Help .row = findLabel.row select Table '.table$' endif .helpText$ = Get value... '.row' Helptext .helpKey$ = Get value... '.row' Key .helpKey$ = replace$(.helpKey$, "\", "", 0) .helpKey$ = replace$(.helpKey$, "_", "\_ ", 0) if index_regex(.helpKey$, "\S") .helpText$ = .helpText$+" ("+.helpKey$+")" endif # Get button values .leftX = Get value... '.row' LeftX .rightX = Get value... '.row' RightX .lowY = Get value... '.row' LowY .highY = Get value... '.row' HighY # PopUp dimensions .currentHelpFontSize = defaultFontSize call set_font_size '.currentHelpFontSize' .helpTextSize = demo Text width (wc)... '.helpText$' .helpTextSize += 4 if .leftX > 50 .htXleft = 20 .htXright = .htXleft + .helpTextSize + 5 .xstart = .leftX else .htXright = 80 .htXleft = .htXright - .helpTextSize - 5 .xstart = .rightX endif if .lowY > 50 .htYlow = 40 .htYhigh = .htYlow + 7 .ystart = .lowY .yend = .htYhigh else .htYhigh = 60 .htYlow = .htYhigh - 7 .ystart = .highY .yend = .htYlow endif # Adapt font size to horizontal dimensions .maxWidth = 90 call adjustFontSizeOnWidth 'defaultFont$' '.currentHelpFontSize' '.maxWidth' '.helpText$' .currentHelpFontSize = adjustFontSizeOnWidth.newFontSize if .htXleft < 0 or .htXright > 100 .htXleft = 0 .htXright = .htXleft + adjustFontSizeOnWidth.textWidth + 5 endif call set_font_size '.currentHelpFontSize' # Adapt vertical dimensions to font height call points_to_wc '.currentHelpFontSize' .lineHeight = points_to_wc.wc if .lineHeight > .htYhigh - .htYlow - 4 .htYhigh = .htYlow + .lineHeight + 4 endif # Determine arrow endpoints .xend = .htXleft if abs(.htXleft - .xstart) > abs(.htXright - .xstart) .xend = .htXright endif if abs((.htXleft+.htXright)/2 - .xstart) < min(abs(.htXright - .xstart),abs(.htXleft - .xstart)) .xend = (.htXleft+.htXright)/2 endif .xtext = .htXleft + 2 .ytext = .htYlow + 1 # Draw pop-up .mm2wc = demo Horizontal mm to wc... 1 .lineWidth = 2/.mm2wc demo Line width... '.lineWidth' demo Arrow size... '.lineWidth' demo Colour... 'sgc2.popUp_bordercolor$' demo Paint rectangle... 'sgc2.popUp_backgroundcolor$' '.htXleft' '.htXright' '.htYlow' '.htYhigh' demo Draw rectangle... '.htXleft' '.htXright' '.htYlow' '.htYhigh' demo Draw arrow... '.xstart' '.ystart' '.xend' '.yend' demo Line width... 'defaultLineWidth' demo Arrow size... 1 demo Black demo Text... '.xtext' Left '.ytext' Bottom '.helpText$' demoShow() call set_font_size 'defaultFontSize' endproc procedure write_help_title .table$ # Set help text title # General Help text call findLabel '.table$' Help .row = findLabel.row select Table '.table$' .helpTitle$ = Get value... '.row' Helptext .helpKey$ = Get value... '.row' Key .helpKey$ = replace$(.helpKey$, "\", "", 0) .helpKey$ = replace$(.helpKey$, "_", "\_ ", 0) .helpTitle$ = .helpTitle$+" ("+.helpKey$+")" call reset_viewport .helpTitleFontSize = 14 # Adapt size of button to length of text .maxWidth = 80 call adjustFontSizeOnWidth 'defaultFont$' '.helpTitleFontSize' '.maxWidth' '.helpTitle$' .helpTitleFontSize = adjustFontSizeOnWidth.newFontSize call set_font_size '.helpTitleFontSize' .helpTop = 100 demo Select inner viewport... 0 100 0 100 demo Axes... 0 100 0 100 demo Text... 50 Centre '.helpTop' Top '.helpTitle$' call set_font_size 'defaultFontSize' call reset_viewport endproc ############################################################### # # Miscelaneous procedures # ############################################################### procedure printPageToPrinter call print_window demo Print... 'printerName$' 'printerPresets$' call init_window endproc procedure points_to_wc .points .mm = .points * 0.3527777778 .wc = demo Vertical mm to wc... '.mm' endproc procedure reset_viewport .low = viewportMargin .high = 100 - viewportMargin demo Select inner viewport... '.low' '.high' '.low' '.high' demo Axes... 0 100 0 100 endproc procedure set_font_size .fontSize call reset_viewport demo Font size... '.fontSize' call reset_viewport endproc procedure wipeArea .areaCommand$ call reset_viewport '.areaCommand$' endproc procedure adjustFontSizeOnWidth .font$ .currentFontSize .maxWidth .text$ demo '.font$' call set_font_size '.currentFontSize' .textWidth = demo Text width (wc)... '.text$' while .textWidth > .maxWidth and .currentFontSize > 2 .currentFontSize -= 0.5 call set_font_size '.currentFontSize' .textWidth = demo Text width (wc)... '.text$' endwhile .diff = .textWidth - .maxWidth .newFontSize = .currentFontSize demo 'defaultFont$' endproc procedure adjustRotatedFontSizeOnBox .font$ .currentFontSize .maxWidth .maxHeight .rotation .text$ demo '.font$' .radians = .rotation/360 * 2 * pi .horWC = demo Horizontal mm to wc... 10.0 .verWC = demo Vertical mm to wc... 10.0 if .horWC > 0 .verCoeff = .verWC / .horWC else .verCoeff = 1 endif call set_font_size '.currentFontSize' .textLength = demo Text width (wc)... '.text$' while (.textLength * .verCoeff * sin(.radians) > .maxHeight or .textLength * cos(.radians) > .maxWidth) and .currentFontSize > 2 .currentFontSize -= 0.5 call set_font_size '.currentFontSize' .textLength = demo Text width (wc)... '.text$' endwhile .diff = .textLength - .maxHeight .newFontSize = .currentFontSize demo 'defaultFont$' endproc procedure adjustFontSizeOnHeight .font$ .currentFontSize .maxHeight demo '.font$' call points_to_wc '.currentFontSize' .lineHeight = points_to_wc.wc while .lineHeight > .maxHeight and .currentFontSize > 2 .currentFontSize -= 0.5 call points_to_wc '.currentFontSize' .lineHeight = points_to_wc.wc endwhile .diff = .lineHeight - .maxHeight .newFontSize = .currentFontSize demo 'defaultFont$' endproc # Load a table with button info etc. # Load local tables if present. Else load # build-in scripted tables procedure loadTable .tableName$ .tableVariableName$ = replace_regex$(.tableName$, "[^\w]", "_", 0); # Search for the table in local, preference, and global directories if localTableDir$ <> "" and fileReadable("'localTableDir$'/'.tableName$'.Table") .table = Read from file... 'localTableDir$'/'.tableName$'.Table elsif fileReadable("'preferencesTableDir$'/'.tableName$'.Table") .table = Read from file... 'preferencesTableDir$'/'.tableName$'.Table elsif fileReadable("'globaltablelists$'/'.tableName$'.Table") .table = Read from file... 'globaltablelists$'/'.tableName$'.Table # Load them from script elsif variableExists("procCreate'.tableVariableName$'$") call Create'.tableVariableName$' Rename: .tableName$ .table = selected("Table") else call emergency_table_exit '.tableName$' cannot be found endif # Check whether this is a real table selectObject: .table .fullName$ = selected$ () .type$ = extractWord$(.fullName$, "") if .type$ <> "Table" Remove .table = -1 endif if .table <= 0 call emergency_table_exit '.tableFileName$' corrupted or cannot be found endif endproc procedure testLoadTable .tableName$ .table = 0 .tableVariableName$ = replace_regex$(.tableName$, "[^\w]", "_", 0); # Search for the table in local, preference, and global directories if localTableDir$ <> "" and fileReadable("'localTableDir$'/'.tableName$'.Table") .table = 1 elsif fileReadable("'preferencesTableDir$'/'.tableName$'.Table") .table = 2 elsif fileReadable("'globaltablelists$'/'.tableName$'.Table") .table = 3 # Load them from script elsif variableExists("procCreate'.tableVariableName$'$") .table = 4 else .table = 0 endif endproc procedure checkTable .tableName$ .available = 0 if localTableDir$ <> "" and fileReadable("'localTableDir$'/'.tableName$'.Table") .available = 1 elsif fileReadable("'preferencesTableDir$'/'.tableName$'.Table") .available = 1 elsif fileReadable("'globaltablelists$'/'.tableName$'.Table") .available = 1 # Load them from script elsif variableExists("procCreate'.tableName$'$") .available = 1 else .available = 0 endif endproc # Create a pop-up window with text from a Text Table procedure write_text_table .table$ .xleft = 10 .xright = 90 .ylow = 20 .yhigh = 85 .lineHeight = 2.5 # Get table with text and longest line .numLines = 0 call testLoadTable '.table$' if testLoadTable.table > 0 call loadTable '.table$' .instructionText = selected() .numLines = Get number of rows else goto ESCAPEwrite_text_table endif .instructionFontSize = 14 .referenceText$ = "" .maxlenght = 0 .maxLine = 0 .maxFontSize = 0 .maxWidth = 0 for .l to .numLines select '.instructionText' .currentText$ = Get value... '.l' text # Expand variables, eg, 'praatVersion$' call expand_praat_variables '.currentText$' .currentText$ = expand_praat_variables.text$ .font$ = Get value... '.l' font .fontSize = Get value... '.l' size call set_font_size '.fontSize' .textWidth = demo Text width (wc)... '.currentText$' if .fontSize > .maxFontSize .maxFontSize = .fontSize endif if .textWidth > .maxWidth .maxWidth = .textWidth .instructionFontSize = .fontSize .maxLine = .l endif endfor select '.instructionText' .referenceText$ = Get value... '.maxLine' text .maxLineFont$ = Get value... '.maxLine' font .instructionFontSize = Get value... '.maxLine' size call set_font_size '.maxFontSize' # Adapt size of button to length of text .maxWidth = (.xright - .xleft) - 4 .origFontSize = .instructionFontSize call adjustFontSizeOnWidth 'defaultFont$' '.instructionFontSize' '.maxWidth' '.referenceText$' call adjustFontSizeOnHeight 'defaultFont$' '.maxFontSize' '.lineHeight' .instructionFontSize = min(adjustFontSizeOnWidth.newFontSize, adjustFontSizeOnHeight.newFontSize) if adjustFontSizeOnWidth.diff > 0 .xright += adjustFontSizeOnWidth.diff/4 .xleft -= 3*adjustFontSizeOnWidth.diff/4 endif call set_font_size '.instructionFontSize' .fontSizeFactor = .instructionFontSize / .origFontSize .numRows = Get number of rows # Calculate length from number of lines. .dy = .lineHeight .midY = .yhigh - (.yhigh - .ylow)/2 .yhigh = .midY + (.numRows+1) * .dy / 2 .ylow = .yhigh - (.numRows+1) * .dy .textleft = .xleft + 2 demo Line width... 8 demo Colour... 'sgc2.popUp_bordercolor$' demo Paint rectangle... 'sgc2.popUp_backgroundcolor$' '.xleft' '.xright' '.ylow' '.yhigh' demo Draw rectangle... '.xleft' '.xright' '.ylow' '.yhigh' demo Line width... 'defaultLineWidth' demo Black .ytext = .yhigh - 2 - .dy for .i to .numRows select '.instructionText' .font$ = Get value... '.i' font .fontSize = Get value... '.i' size .font$ = extractWord$(.font$, "") # Scale font .fontSize = floor(.fontSize*.fontSizeFactor) if .fontSize < 4 .fontSize = 4 endif .line$ = Get value... '.i' text # Expand variables, eg, 'praatVersion$' call expand_praat_variables '.line$' .line$ = expand_praat_variables.text$ # Display text demo Text special... '.textleft' Left '.ytext' Bottom '.font$' '.fontSize' 0 '.line$' .ytext -= .dy endfor demoShow() call set_font_size 'defaultFontSize' select '.instructionText' Remove label ESCAPEwrite_text_table endproc # Create a pop-up window with text from an existing Table object procedure write_tabbed_table .table$ .labelTextTable$ .xleft = 0 .xright = 100 .ylow = 20 .yhigh = 85 .lineHeight = 2.5 # Get table with text and longest line call testLoadTable '.table$' if testLoadTable.table <= 0 call loadTable '.labelTextTable$' .labelText$ = selected$("Table") endif select Table '.table$' .tabbedText = selected() .numLines = Get number of rows .numCols = Get number of columns .font$ = defaultFont$ .fontSize = defaultFontSize # Standard width .widthCanvas = .xright - .xleft .dx = (.widthCanvas - 4) / (.numCols) # Get longest entry demo '.font$' call set_font_size '.fontSize' .maxWidth = 0 for .i from 0 to .numLines .xtext = .xleft + .dx / 2 for .j to .numCols select '.tabbedText' .currentLabel$ = Get column label... '.j' if .i > 0 .line$ = Get value... '.i' '.currentLabel$' else .line$ = .currentLabel$ select Table '.labelText$' call findLabel '.labelText$' '.line$' select Table '.labelText$' .line$ = Get value... 'findLabel.row' Text endif # Expand variables, eg, 'praatVersion$' call expand_praat_variables '.line$' .line$ = expand_praat_variables.text$ .textWidth = demo Text width (wc)... '.line$' if .textWidth > .maxWidth .maxWidth = .textWidth endif endfor endfor if .dx > 1.2 * .maxWidth .widthCanvas = 1.2 * .maxWidth * .numCols + 4 .xleft = 50 - .widthCanvas / 2 .xright = 50 + .widthCanvas / 2 .dx = (.widthCanvas - 4) / (.numCols) else .maxWidth = .dx - 1 endif # Calculate length from number of lines. .dy = .lineHeight + 0.5 .midY = .yhigh - (.yhigh - .ylow)/2 .yhigh = .midY + (.numLines+2) * .dy / 2 .ylow = .yhigh - (.numLines+2) * .dy .textleft = .xleft + 2 demo Line width... 8 demo Colour... 'sgc2.popUp_bordercolor$' demo Paint rectangle... 'sgc2.popUp_backgroundcolor$' '.xleft' '.xright' '.ylow' '.yhigh' demo Draw rectangle... '.xleft' '.xright' '.ylow' '.yhigh' demo Line width... 'defaultLineWidth' demo Black .ytext = .yhigh - 2 - .dy # First the column names, then the items for .i from 0 to .numLines .xtext = .textleft + .dx / 2 for .j to .numCols select '.tabbedText' .currentLabel$ = Get column label... '.j' if .i > 0 .line$ = Get value... '.i' '.currentLabel$' else .line$ = .currentLabel$ select Table '.labelText$' call findLabel '.labelText$' '.line$' select Table '.labelText$' .line$ = Get value... 'findLabel.row' Text endif # Expand variables, eg, 'praatVersion$' call expand_praat_variables '.line$' .line$ = expand_praat_variables.text$ call adjustFontSizeOnWidth '.font$' '.fontSize' '.maxWidth' '.line$' .currentFontSize = adjustFontSizeOnWidth.newFontSize # Display text demo Text special... '.xtext' Centre '.ytext' Bottom '.font$' '.currentFontSize' 0 '.line$' .xtext += .dx endfor .ytext -= .dy endfor demoShow() call set_font_size 'defaultFontSize' select Table '.labelText$' Remove label ESCAPEwrite_tabbed_table endproc # Create a pop-up window with a given text procedure write_text_popup .font$ .size .text$ .xleft = 10 .xright = 90 .ylow = 20 .yhigh = 85 .lineHeight = 3 # Adapt size of button to length of text .maxWidth = (.xright - .xleft) - 4 call adjustFontSizeOnWidth 'defaultFont$' '.size' '.maxWidth' '.text$' call adjustFontSizeOnHeight 'defaultFont$' '.size' '.lineHeight' .popupFontSize = min(adjustFontSizeOnWidth.newFontSize, adjustFontSizeOnHeight.newFontSize) if adjustFontSizeOnWidth.diff > 0 .xright += adjustFontSizeOnWidth.diff/4 .xleft -= 3*adjustFontSizeOnWidth.diff/4 else .xleft = ((.xright + .xleft) - adjustFontSizeOnWidth.textWidth)/2 - 2 .xright = ((.xright + .xleft) + adjustFontSizeOnWidth.textWidth)/2 + 2 endif .numRows = 1 # Calculate length from number of lines. .dy = .lineHeight .midY = .yhigh - (.yhigh - .ylow)/2 .yhigh = .midY + (.numRows+1) * .dy / 2 .ylow = .yhigh - (.numRows+1) * .dy .textleft = .xleft + 2 .xmid = (.textleft + .xright - 2)/2 demo Line width... 8 demo Colour... 'sgc2.popUp_bordercolor$' demo Paint rectangle... 'sgc2.popUp_backgroundcolor$' '.xleft' '.xright' '.ylow' '.yhigh' demo Draw rectangle... '.xleft' '.xright' '.ylow' '.yhigh' demo Line width... 'defaultLineWidth' demo Black .ytext = .yhigh - 2 - .dy # Write text demo Text special... '.xmid' Centre '.ytext' Bottom '.font$' '.popupFontSize' 0 '.text$' demoShow() demo 'defaultFont$' call set_font_size 'defaultFontSize' endproc # Write the background from a Text Table procedure draw_background .table$ .xleft = 0 .xright = 100 .ylow = 0 .yhigh = 100 .lineHeight = 5 .defaultColour$ = "{0.9,0.9,0.9}" .defaultAlign$ = "centre" # Get table with text and longest line call loadTable '.table$' .backgroundText = selected() .numLines = Get number of rows .backgroundFontSize = 28 .referenceText$ = "" .maxlenght = 0 .maxLine = 0 .maxFontSize = 0 .maxWidth = 0 .textLines = 0 for .l to .numLines select '.backgroundText' .currentText$ = Get value... '.l' text # Expand variables, eg, 'praatVersion$' call expand_praat_variables '.currentText$' .currentText$ = expand_praat_variables.text$ .font$ = Get value... '.l' font .fontSize = Get value... '.l' size if .fontSize > .maxFontSize .maxFontSize = .fontSize endif if not startsWith(.font$, "!") call set_font_size '.fontSize' .textWidth = demo Text width (wc)... '.currentText$' if .textWidth > .maxWidth .maxWidth = .textWidth .backgroundFontSize = .fontSize .maxLine = .l endif .textLines += 1 endif endfor if .maxLine > 0 select '.backgroundText' .referenceText$ = Get value... '.maxLine' text .maxLineFont$ = Get value... '.maxLine' font .backgroundFontSize = Get value... '.maxLine' size .backgroundFontColour$ = Get value... '.maxLine' colour call set_font_size '.maxFontSize' else .maxFontSize = .backgroundFontSize endif # Adapt size of button to length of text .maxWidth = (.xright - .xleft) - 4 .origFontSize = .backgroundFontSize call adjustFontSizeOnWidth 'defaultFont$' '.backgroundFontSize' '.maxWidth' '.referenceText$' .fontSizeFactor = adjustFontSizeOnWidth.newFontSize / .backgroundFontSize .backgroundFontSize = adjustFontSizeOnWidth.newFontSize call set_font_size '.backgroundFontSize' call adjustFontSizeOnHeight 'defaultFont$' '.backgroundFontSize' '.lineHeight' .lineHeight /= adjustFontSizeOnHeight.newFontSize / .backgroundFontSize if adjustFontSizeOnHeight.newFontSize >= .origFontSize and (.textLines+1) * .lineHeight > (.yhigh - .ylow - 4) .lineHeight = (.yhigh - .ylow - 4)/(.textLines + 1) call adjustFontSizeOnHeight 'defaultFont$' '.maxFontSize' '.lineHeight' .fontSizeFactor = adjustFontSizeOnHeight.newFontSize / .backgroundFontSize endif .numRows = Get number of rows # Calculate length from number of lines. .dy = .lineHeight .midY = .yhigh - (.yhigh - .ylow)/2 .yhigh = .midY + (.textLines+1) * .dy / 2 .ylow = .yhigh - (.textLines+1) * .dy .textleft = .xleft + 2 .textright = .xright - 2 .textmid = (.xright - .xleft)/2 demo Black .ytext = .yhigh - 2 - .dy for .i to .numRows select '.backgroundText' .font$ = Get value... '.i' font .fontSize = Get value... '.i' size .fontColour$ = Get value... '.i' colour .fontColour$ = replace_regex$(.fontColour$, "^[\- ]$", ".defaultColour$", 1) .fontAlign$ = Get value... '.i' align .fontAlign$ = replace_regex$(.fontAlign$, "^[\- ]$", ".defaultAlign$", 1) .line$ = Get value... '.i' text # Expand variables, eg, 'praatVersion$' call expand_praat_variables '.line$' .line$ = expand_praat_variables.text$ # Scale font .fontSize = floor(.fontSize*.fontSizeFactor) if not startsWith(.font$, "!") .font$ = extractWord$(.font$, "") if .fontAlign$ = "centre" .xtext = .textmid elsif .fontAlign$ = "right" .xtext = .textright else .xtext = .textleft endif if .fontSize < 4 .fontSize = 4 endif # Clean up text demo Colour... '.fontColour$' demo Text special... '.xtext' '.fontAlign$' '.ytext' Bottom '.font$' '.fontSize' 0 '.line$' .ytext -= .dy elsif .font$ = "!demo command" demo Colour... '.fontColour$' .line$ = replace_regex$(.line$, "\{FONTSIZE\$\}", "'.fontSize'", 0) .line$ = replace_regex$(.line$, "\{XTEXT\$\}", "'.xtext'", 0) .line$ = replace_regex$(.line$, "\{YTEXT\$\}", "'.ytext'", 0) .line$ = replace_regex$(.line$, "\{DY\$\}", "'.dy'", 0) .line$ = replace_regex$(.line$, "\{[^\}]*\}", "", 0) while index(.line$, "[[") .nextBracketOpen = index(.line$, "[[") .nextBracketOpen += 2 .nextBracketClose = index(.line$, "]]") .bracketLength = .nextBracketClose - .nextBracketOpen .result$ = "" if .bracketLength > 0 .expression$ = mid$(.line$, .nextBracketOpen, .bracketLength) .expression$ = replace_regex$(.expression$, "\s", "", 0) if length(.expression$) > 0 # Test expression for security, only allow explicitely defined functions .allowedStrings$ = "e|pi|not|and|or|div|mod|abs|round|floor|ceiling" .allowedStrings$ = .allowedStrings$ + "|sqrt|min|max|imin|imax|sin|cos|tan|arcsin|arccos|arctan|arctan2|sinc|sincpi" .allowedStrings$ = .allowedStrings$ + "|exp|ln|log10|log2|sinh|cosh|tanh|arcsinh|arccosh|arctanh" .allowedStrings$ = .allowedStrings$ + "|sigmoid|invSigmoid|erf|erfc|randomUniform|randomInteger|randomGauss|randomPoisson" .allowedStrings$ = .allowedStrings$ + "|lnGamma|gaussP|gaussQ|invGaussQ|chiSquareP|chiSquareQ" .allowedStrings$ = .allowedStrings$ + "|invChiSquareP|invChiSquareQ|studentP|studentQ|invStudentP|invStudentQ" .allowedStrings$ = .allowedStrings$ + "|beta|besselI|besselK" .testExpression$ = replace_regex$(.expression$, "(^|\W)('.allowedStrings$')(?=$|\W)", "\1\3", 0) .testExpression$ = replace_regex$(.testExpression$, "[0-9\.,\-+/*^()<>= ]", "", 0) if .testExpression$ = "" .calc = '.expression$' .result$ = "'.calc'" endif endif endif # Replace expression by result .lastLeft = .nextBracketOpen - 3 .newLine$ = left$(.line$, .lastLeft) .newLine$ = .newLine$ + .result$ .numCopy = length(.line$) - .nextBracketClose - 1 .newLine$ = .newLine$ + right$(.line$, .numCopy) .line$ = .newLine$ endwhile demo '.line$' endif endfor demo Black demoShow() call set_font_size 'defaultFontSize' select '.backgroundText' Remove endproc procedure convert_praat_to_utf8 .text$ .text$ = replace_regex$(.text$, "\\a""", "\xc3\xa4", 0) .text$ = replace_regex$(.text$, "\\A""", "\xc3\x84", 0) .text$ = replace_regex$(.text$, "\\o""", "\xc3\xb6", 0) .text$ = replace_regex$(.text$, "\\O""", "\xc3\x96", 0) .text$ = replace_regex$(.text$, "\\u""", "\xc3\xbc", 0) .text$ = replace_regex$(.text$, "\\U""", "\xc3\x9c", 0) .text$ = replace_regex$(.text$, "\\i""", "\xc3\xaf", 0) .text$ = replace_regex$(.text$, "\\I""", "\xc3\x8f", 0) .text$ = replace_regex$(.text$, "\\e""", "\xc3\xab", 0) .text$ = replace_regex$(.text$, "\\E""", "\xc3\x8b", 0) .text$ = replace_regex$(.text$, "\\y""", "\xc3\xbf", 0) .text$ = replace_regex$(.text$, "\\e'", "\xc3\xa9", 0) .text$ = replace_regex$(.text$, "\\E'", "\xc3\x89", 0) .text$ = replace_regex$(.text$, "\\ss", "\xc3\x9f", 0) endproc procedure convert_praat_to_latin1 .text$ .text$ = replace_regex$(.text$, "\\a""", "\xe4", 0) .text$ = replace_regex$(.text$, "\\A""", "\xc4", 0) .text$ = replace_regex$(.text$, "\\o""", "\xf6", 0) .text$ = replace_regex$(.text$, "\\O""", "\xd6", 0) .text$ = replace_regex$(.text$, "\\u""", "\xfc", 0) .text$ = replace_regex$(.text$, "\\U""", "\xdc", 0) .text$ = replace_regex$(.text$, "\\i""", "\xef", 0) .text$ = replace_regex$(.text$, "\\I""", "\xcf", 0) .text$ = replace_regex$(.text$, "\\e""", "\xeb", 0) .text$ = replace_regex$(.text$, "\\E""", "\xcb", 0) .text$ = replace_regex$(.text$, "\\y""", "\xff", 0) .text$ = replace_regex$(.text$, "\\Y""", "Y", 0) .text$ = replace_regex$(.text$, "\\e'", "\xe9", 0) .text$ = replace_regex$(.text$, "\\E'", "\xc9", 0) .text$ = replace_regex$(.text$, "\\ss", "\xdf", 0) endproc # Expand 'variable$' into the value of variable$. # Eg, 'praatVersion$' becomes 5.1.45 or whatever is the current version # Single quotes can be protected by \' procedure expand_praat_variables .text$ if index(.text$, "'") .tempText$ = replace_regex$(.text$, "(^|[^\\])'([\w\$\.]+)'", "\1""+\2+""", 0) .tempText$ = replace_regex$(.tempText$, "[\\]'", "'", 0) .tempText$ = """"+.tempText$+"""" # Check whether all the variables actually exist. Ignore any variable that does not exist .checkVars$ = .tempText$ while length(.checkVars$) > 0 and index(.checkVars$, "+") .start = index(.checkVars$, "+") .checkVars$ = right$(.checkVars$, length(.checkVars$) - .start) .end = index(.checkVars$, "+") if .end .variable$ = left$(.checkVars$, .end - 1) if not variableExists(.variable$) .tempText$ = replace$(.tempText$, """+'.variable$'+""", "'"+.variable$+"'", 0) endif .checkVars$ = right$(.checkVars$, length(.checkVars$) - .end) else .checkVars$ = "" endif endwhile .text$ = '.tempText$' endif endproc # Get a time stamp in normalized format procedure getTimeStamp .currentDateTime$ = date$() .string$ = replace_regex$(.currentDateTime$, "[A-Z][a-z]+\s+([A-Z][a-z]+)\s+(\d+)\s+(\d+)\W(\d+)\W(\d+)\s+(\d+)$", "\6-\1-\2T\3-\4-\5", 0) endproc # A table error, can be insiduously caused by an outdate preferences file! procedure emergency_table_exit .message$ # If you come here as a user, your preferences file is borked if preferencesAppFile$ <> "" and fileReadable(preferencesAppFile$) deleteFile(preferencesAppFile$) endif # Put out message call get_feedback_text 'config.language$' Cancel call convert_praat_to_latin1 'get_feedback_text.text$' .cancelText$ = convert_praat_to_latin1.text$ beginPause: "Fatal Error" comment: .message$ endPause: .cancelText$, 1 exit '.message$' endproc # Remove previous files from system procedure clean_up_sound if recordedSound$ = "" sgc.recordedSound = 0 endif if sgc.recordedSound > 0 select sgc.recordedSound Remove recordedSound$ = "" sgc.recordedSound = 0 endif if te.recordedPitch > 0 select te.recordedPitch Remove te.recordedPitch = 0 endif if sgc.alignedTextGrid > 0 select sgc.alignedTextGrid Remove sgc.alignedTextGrid = -1 endif endproc # Safely read a table procedure readTable .filename$ .tableID = -1 if .filename$ <> "" and fileReadable(.filename$) and index_regex(.filename$, "(?i\.(tsv|table|csv))$") > 0 if index_regex(.filename$, "(?i\.(csv))$") > 0 .tableID = Read Table from comma-separated file: .filename$ elsif index_regex(.filename$, "(?i\.(tsv))$") > 0 .tableID = nocheck Read Table from tab-separated file: .filename$ else .tableID = nocheck Read from file... '.filename$' endif if .tableID = undefined or .tableID <= 0 .tableID = -1 else .fullName$ = selected$ () .type$ = extractWord$(.fullName$, "") if .type$ <> "Table" Remove .tableID = -1 endif endif endif endproc # Read feedback table and get keyed text procedure get_feedback_text .language$ .key$ if not endsWith(feedbackTableName$, "_'.language$'") if feedbackTableName$ <> "" select Table 'feedbackTableName$' Remove endif call testLoadTable 'feedbackTablePrefix$'_'.language$' if testLoadTable.table > 0 call loadTable 'feedbackTablePrefix$'_'.language$' else call loadTable 'feedbackTablePrefix$'_EN endif feedbackTableName$ = selected$("Table") endif call findKey 'feedbackTableName$' '.key$' .row = findKey.row select Table 'feedbackTableName$' .text$ = Get value... '.row' Text # Expand variables, eg, 'praatVersion$' call expand_praat_variables '.text$' .text$ = expand_praat_variables.text$ endproc # Read evaluation table and get keyed text. Only praat converted Text procedure get_evaluation_text .language$ .key$ if not endsWith(evaluationTableName$, "_'.language$'") if evaluationTableName$ <> "" select Table 'evaluationTableName$' Remove endif call testLoadTable 'evaluationTablePrefix$'_'.language$' if testLoadTable.table > 0 call loadTable 'evaluationTablePrefix$'_'.language$' else call loadTable 'evaluationTablePrefix$'_EN endif evaluationTableName$ = selected$("Table") endif call findLabel 'evaluationTableName$' '.key$' .row = findLabel.row select Table 'evaluationTableName$' .text$ = Get value... '.row' Text # Expand variables, eg, 'praatVersion$' call expand_praat_variables '.text$' .rawtext$ = expand_praat_variables.text$ call convert_praat_to_latin1 '.rawtext$' .text$ = convert_praat_to_latin1.text$ endproc # Read all the relevant evaluation labels and put them in "eval.