Presentation is loading. Please wait.

Presentation is loading. Please wait.

Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from.

Similar presentations


Presentation on theme: "Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from."— Presentation transcript:

1 Praat LING115 November 4, 2009

2 Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from formula –Analyzing sound objects Selection Pitch, intensity, formants –Drawing Sound wave, pitch/intensity/formant contours Saving

3 Recording Sampling frequency –Number of samples taken per second –Higher sampling frequency More accurate digitization A larger sound file –22050Hz is enough for speech analysis

4 Reading from a file Supported file types –.wav –.aiff –.au –etc. Use “Open long sound file...” if the file is longer than two minutes

5 Sound object Sound object is the object that will be analyzed, manipulated,...

6 Sound editor window

7 Selection

8 Zoom to selection Zoom in to selection (sel) Zoom out to view all (all)

9 Pitch

10 Pitch range settings Pitch analysis will find values only within the specified range

11 Pitch extraction (in selection)

12 Intensity

13 Intensity range settings Some dB levels –Whisper, 5ft = 30dB –Normal conversation = 60dB –Threshold of pain = 130dB

14 Intensity listing

15 Formants aeiou F1 (Hz) 1000500320500320 F2 (Hz) 1400230025001000800

16 Formant listing

17 Drawing – sound wave

18 Drawing – pitch contour

19 Drawing – intensity contour

20 Drawing – formant contour

21 Saving picture

22 Segmentation and labeling TextGrid in Praat –Creating (interval) tiers –Adding intervals –Labeling intervals –Extracting values within the interval Exercise –F1 and F2 extraction from TextGrid –Creating a vowel chart

23 Creating a TextGrid

24 Starting the TextGrid Editor Select both the sound object and the textgrid object –Click on the sound object –Hold the Ctrl-key –Click on the textgrid object Click “Edit”

25 TextGrid Editor

26 Selecting tiers Click on the tier or View > –Select next tier –Select previous tier

27 Adding intervals Click on the part of the wave form where you wish to mark the boundary Click on the small ring in the tier where you wish to add the interval or Interval > Add interval on tier (tier-level)

28 Labeling the interval Click on the tier or the interval within a tier Make sure the part that you want to edit is highlighted in yellow Type in the text to label the interval

29 X-SAMPA A phonetic transcription system using ASCII characters http://en.wikipedia.org/wiki/Xsampa

30 Information within the interval Select the interval Make sure relevant information is set to be displayed –e.g. Turn on “Show intensity” Choose the desired menu to extract information related to the selected interval –e.g. “Get intensity”

31 Praat scripting Object selection Commands, arguments Language elements –Variables, formulas, jumps, loops Listing multiple files in a directory Scripting an editor from a shell script

32 Why? To save time and energy from repeating same/similar processes

33 Reference NB: Some of the examples are outdated

34 Basic idea, for example Suppose we had a sequence of commands that we want to run repeatedly –e.g. “ Read from file > Select object > Play “ We list the sequence of commands (with arguments if necessary) We specify how and under which conditions we want to run the sequence of commands –e.g. Repeat over the entire list of.wav files in the directory (folder)

35 Getting started Or use your favorite text editor before you run the script

36 Info window You can print out the extracted information or messages to the “Info” window echo clearinfo print printline

37 Object selection select –select Sound 2500_1 plus –plus Sound 2500_10 minus –minus Sound 2500_1 select all Remove

38 Object selection – (2) Objects have sequential ID, which begins from 1 since the program started –{select, plus, minus} e.g. select 3, plus 3, minus 3 You can save the name, type+name, and ID of the selected object to a variable –name$=selected$(“Sound”) or selected$(“Sound”,2) –fullname$=selected$() or selected$(2) –id=selected (“Sound”, -1) The positive numbers are counted from the top of the object list The negative numbers are counted from the bottom of the object list

39 Commands Once one or more objects are selected (or even when there is no object selected), you can choose from a set of menus or commands Some of these do not require any arguments to be specified –e.g. Play, Info, Edit, etc. For others, arguments should be specified –e.g. Query > Get mean...

40 Commands – (2) For commands without arguments, you can simply type the command in a separate line in the script –e.g. Play

41 Commands – (3) For commands with arguments, you must specify all the arguments in the script –...... Arguments are separated by space If an argument contains a space, it must be in double quotes For check-box, “yes” to check and “no” to uncheck For radio button, write the text next to the radio button you wish to select Arguments are ordered left to right, top to bottom

42 Comments and white space White space (space and tab) at the beginning is ignored Start a line by #, !, or ; to add comments –e.g. # The next line does x,y,z

43 Variables Numeric variables –Variable name must start with a lower case letter –i=2 String variables –Variable name must start in lower case and end with $ –i$=“hello” Variables must be initialized before use Variables in single quotes can substitute parts of a string –name$=selected$(“Sound”,-1) –echo The name of the sound is ‘name$’

44 Variables – (2) You can store the value from query commands, for example, in a variable –Query commands are the commands that appear under “Query-” –mean = Get mean... All 0.0 0.0 –If you don’t store the value in a variable, it will be printed on the Info window

45 Formulas Numbers –length=2 –height=8 –area=length*height/2 Strings (there may be more...) –a$=“hello,” –b$=“ world!” –c$=a$+b$ (concatenate a$ and b$) –d$=a$-”o” (right strip the string from a$)

46 Formulas – (2) When a formula is used as an argument, you must make sure there is no white space between the terms in the formula –e.g. Get mean... length/2 length Unless the formula is in double quotes –e.g. Get mean... “length / 2” length

47 Jumps An if-then construct –begins with if and ends with endif –may have elsif or else in between Example if age<=3 length=1.20 elsif age<=8 length=1.60 else length = 2.0 endif

48 “For” loops Repeats the statements within the “for” loop while variable takes on a value between and for from to... endfor

49 “Repeat” loops Repeats the statements between repeat and until, while the after until is false repeat... until

50 “while” loops Statements between while and endwhile are repeated until is no longer true while... endwhile

51 Listing filenames from a directory Create Strings as file list... – = name of the list – Directory, e.g. C:\linguistics\ Directory and the file type, e.g. C:\linguistics\*.wav “Edit” to view the listed filenames “Get number of strings” to see how many filenames are in the list “Get string... ” to retrieve individual filenames

52 Example path$="C:\temp\" Create Strings as file list... temp 'path$' select Strings temp numfiles=Get number of strings for i from 1 to numfiles select Strings temp filename$=Get string... i fullname$=path$+filename$ Read from file... 'fullname$' soundname$=filename$-".wav" select Sound 'soundname$' Play endfor select all Remove

53 Scripting an editor You can switch from the Praat objects window to the Editor window, and include the editor commands in your script Edit editor Editor-specific commands... endeditor


Download ppt "Praat LING115 November 4, 2009. Getting started Basic phonetic analyses with Praat –Creating sound objects Recording, reading from a file, creating from."

Similar presentations


Ads by Google