Using the Praat Script Read Grid.Script

Total Page:16

File Type:pdf, Size:1020Kb

Using the Praat Script Read Grid.Script

Using the Praat script read_grid.script

1 Purpose This script is used in Praat to read a TextGrid file after the accompanying Sound file has been read from a previously defined directory. It is useful when a substantial number of Sound and TextGrid files, which are located in the same directory, have to be edited in Praat.

2 Installation Three files, i.e. read_grid.script, datadir.script and olddir.script are supplied.  Copy these file to known directory, e.g. c:\Praat_scripts.  During operation a file named do_not_erase.txt will be generated in the same directory where the scripts are located. The previously used setting of the data directory is stored in this file.  Open Praat and click Control / Open Praat script  Direct the ‘Open’ window to the location of the directory in which you saved the scripts  Select read_grid.script and click ‘Open’  In the script window, click File / Add to dynamic window  The ‘Add to dynamic menu’ window will open. Complete the fields as follows: o Class 1: Sound o Number 1: 0 o Class 2: Leave this field open o Number 2: 0 o Class 3: Leave this field open o Number 3: 0 o Command: Read TextGrid o After command: Sound help o Depth: 0 o Do not change the Script file field. o Click OK  A button named ‘Read TextGrid’ will appear when a Sound object is selected in the objects window. Almost the same procedure is repeated for the script datadir.script:  Open Praat and click Control / Open Praat script  Direct the ‘Open’ window to the location of the directory in which you saved the scripts  Select read_grid.script and click ‘Open’  In the script window, click File / Add to dynamic window  The ‘Add to dynamic menu’ window will open. Complete the fields as follows: o Class 1: Sound o Number 1: 0 o Class 2: Leave this field open o Number 2: 0 o Class 3: Leave this field open

USING THE PRAAT SCRIPT READ_GRID.SCRIPT 1 o Number 3: 0 o Command: Set data directory o After command: Edit o Depth: 0 o Do not change the Script file field. o Click OK  A button named ‘Set data directory’ will appear when a Sound object is selected in the objects window of Praat.

3 Instructions of use  Place all the Sound and TextGrid files that are to be edited in the same directory, i.e. the data directory.  Read the first Sound file using ‘Read / Read from file’ in the objects window  Click on ‘Set data directory’, the new button in the objects window.  A window ‘Data directory’ will open. Type the location of the data directory in the field ‘Name of data directory’. (Do not end the name of the directory with ‘\”). Click OK. This location will be remembered by the system even if you exit Praat or turn your computer off.  To read the TextGrid file with the same name as the Sound file, click on the ‘Read TextGrid’ button.  To read other pairs of Sound and TextGrid files, read the Sound file in the normal way using Read / Read from file and then click on the ‘Read TextGrid’ button. This procedure could be repeated for all the Sound and TextGrid files in the data directory.

USING THE PRAAT SCRIPT READ_GRID.SCRIPT 2

Recommended publications