#Written by Li Yunjing, CASS, 2009-02-04 #本脚本用于画光标所在时间点的F1/F2数值和元音图。也可自行指定F1F2的值。 #使用步骤: #1、用Praat打开一个声音文件,在一个元音中点鼠标,然后运行本脚本。 #2、在跳出的对话框中填入该元音的符号(Label)、字体大小(FontSize)、 #   字体颜色(Color)、是否斜体(italic)等各项。 #3、将Piture窗口清空,用鼠标拉出来一个作图区域,然后点Apply。 #4、运行完毕后,在Praat info窗口中查看时间和F1F2的值,在Picture窗口中查看元音图。 #5、如果想用已知的F1F2值画图,请将"F1F2 values already known"选项打钩, #   并将F1 value和F2 value填上,然后点击Apply。 #6、国际音标请参考Praat帮助中的输入规则。例如在label处填入"\sw"图上显示为中元音倒e。 #7、注意:要画图的声音文件必须在Praat Object窗口中选中。 form info sentence Label a integer FontSize 22 optionmenu Color: 1 option Black option Red option Blue option Green option Yellow option Purple boolean Italic boolean F1F2_values_already_known 0 positive F1_value 700 positive F2_value 1750 endform 'color$' if f1F2_values_already_known=0 name$=selected$("Sound") editor Sound 'name$' f1=Get first formant f2=Get second formant cur=Get cursor endeditor else f1=f1_value f2=f2_value cur=0 endif if italic=1 label$="%"+label$ endif #Select outer viewport... 0 8 0 6 Axes... 3000 500 1200 200 Font size... fontSize Marks top every... 1 500 yes no yes Marks right every... 1 200 yes no yes Text... f2 Centre f1 Half 'label$' printline print Label = 'label$''tab$'Time = 'cur''tab$'F1 = 'f1''tab$'F2 = 'f2' exit