Skip to content
Rolando Muñoz edited this page Jul 29, 2020 · 18 revisions

TextGrid Toolkit Tutorial

This is a Praat plug-in that focuses on TextGrid objects. By using this tool, you can process many TextGrid files with just a few clicks. In this tutorial, I'll walk you through the basics.

Getting started

The commands in the plug-in are divided in four main categories: Create, Modify, Query and Clean. When you click on any of them, a dialogue box will pop up. Although, these dialogue boxes have some advanced features for searching files within sub-folders or pair of files (audio and TextGrid) in different directories, we will not review them until the advance feature section. For now, we will assume that your audio and TextGrid files are in the same directory.

1. Creating TextGrids from many audio files

Use the commands Sound to TextGrid... and Sound to TextGrid (silences)..., in the menu Praat> Goodies > TextGrid toolkit > Create, to create TextGrid files from audios located in a folder. Both commands are similar to Sound: To TextGrid... and Sound: To TextGrid (Silences)... When you click on any of them, the only difference is that the dialogue box will prompt you to input the directory where your files are located.

As in the image, fill the Folder with Sound files field. The . in the Folder with TextGrid files field means that the TextGrid files are located in the same directory as the audio files (you can also replace the dot . notation by copying the audio files directory). Set your TextGrid tiers and click on Ok.

Finally, you will see that the TextGrid files will be saved in the same directory as the audio files. If a TextGrid already exists in the directory, the plug-in will skip this file, so the plug-in wont't overwrite your existing TextGrids!

2. Modifying TextGrid files

This set of commands modify/rewrite the TextGrid files stored in a directory.

a. Inserting tiers

Use the Insert tier... command to insert one or more tiers in an existing TextGrid file. Additionally, use it to rearrange your TextGrid tiers.

Insert one or more tier

Enter the name of the tiers that you want to insert in All tier names. Use blank spaces to separate between two or more tier levels. By default, this command inserts only interval tiers. To insert a point tier, copy the name of the tier twice, one in All tier names field and other in Which of these are point tiers. The tiers will be positioned at the top of the TextGrid layout by default. You can also insert a list of tiers below an existing tier. Include the name of that existing tier at the beginning of the list in All tier names. By doing so, the command will first search for the position of the existing tier. Then, it will place the other tiers just below it.

Rearrange tiers

You can also use the Insert tier command to rearrange all the existing tiers in a TextGrid. Go to All tier names and write a list of the existing tiers in the order you want to obtain. Then, run the command. If any TextGrid layout have a different order than in the tier list, it will be rearranged.

3. Cleaning TextGrid files

In this section, we will see the commands below the menu Praat > Goodies > TextGrid toolkit > Clean. These commands are more focused in detecting "common mistakes" when working with TextGrid files. These commands along with the modify commands can save you time when dealing with one of following problems.

Checking TextGrid files

A single TextGrid file contains one or more tiers, each one has a position number and a name. Position numbers are unique, while names can be duplicated. Although this, it is good practice to keep names unique since they are a useful way to refer to a tier position by its semantic value.

In general, it is good idea that all your TextGrid files for a specific analysis have the same layout – that is to say, TextGrid files must have the same tier names in the same position! This helps to keep you organized and makes some tasks easier (writing scripts for acoustic analysis, for example).

Use the command Summarize tiers... to check your TextGrid files. When you click on it, a dialogue box will pop-up. This will ask you to enter the folder directory where your files are. Fill this field and press Ok

The command will print a report in the Info Window. This report has two main sections. The first is a list containing all the tier names, their frequencies and the number of labels they have. The second section is a list of all layouts found in your annotation files and their frequency as shown in the Figure below.

Additionally, the command Summarize tiers... also detects when a TextGrid have duplicate tier names. When this happens, a list of files will be printed, so you can check manually those specific cases and fix them. If there are many cases, try using the Modify > Set tier name… to change the name of the last occurrence. Be cautious because the changes will also apply to the well-formed TextGrids.

Finally, there is also another type of ill-formed name – that is, when a tier name contains space characters (as far as I know, this is only possible if you rename a tier in the TextGridEditor). When this happen, I strongly recommend using the Modify > Set tier name… command. This command allows you to enter space characters in the Tier name argument, so you can match and fix those cases.

Find TextGrid files if tier name...

Detecting and fixing boundary aligments

This tool is designed to check if the (interval or point) boundaries in a tier also exist in other tiers of the same TextGrid. This problem is specially important when working with intervals from one tier that contain sub-intervals in another tier domain. To clarify this point, let's think about two tiers in the same TextGrid: word and phonemes... [Add picture]
Use Check boundary aligments...

Checking whitespaces

Use Check whitespaces...

Advance features