1 / 53

Praat

Praat. LING115 November 4, 2009. 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.

kevina
Télécharger la présentation

Praat

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. Sampling frequency Number of samples taken per second Higher sampling frequency More accurate digitization A larger sound file 22050Hz is enough for speech analysis Recording

  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 is the object that will be analyzed, manipulated, ... Sound object

  6. Sound editor window

  7. Selection

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

  9. Pitch

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

  11. Pitch extraction (in selection)

  12. Intensity

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

  14. Intensity listing

  15. Formants

  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 <text> • clearinfo • print <text> • printline <text>

  37. Object selection • select <type> <name> • select Sound 2500_1 • plus <type> <name> • plus Sound 2500_10 • minus <type> <name> • 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} <ID> • 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. 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... Commands

  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 • <command>... <arg1> <arg2> ... <arg_n> • 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 <expression> and ends with endif • may have elsif <expression> 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 <expression1> and <expression2> for <variable> from <expression1> to <expression2> <statement_1> <statement_2> ... endfor

  49. “Repeat” loops • Repeats the statements between repeat and until, while the <expression> after until is false repeat <statement_1> <statement_2> ... until <expression>

  50. “while” loops • Statements between while <expression> and endwhile are repeated until <expression> is no longer true while <expression> <statement_1> <statement_2> ... endwhile

More Related