This repository contains a set of labeler
and plugins for vLabeler to
support TextGrid files.
vLabeler
1.0.0-beta20 or later.
labelers
textgrid-labeler
: labeler for TextGrid files
plugins
macro
textgrid-mark-tier-relations
: Used to mark parent-child relations between existing tierstextgrid-merge-to-next-tier
: Used to create/update a parent tier using a child tier with relations tagstextgrid-manage-module
: Used to manage modules (sub-projects) in the project
- The labeler currently only supports the
IntervalTier
tier, soPointTier
will be ignored and will not be exported. Please backup your original TextGrid files before using the labeler if you havePointTier
tiers. - The labeler only recognize
.TextGrid
extension, so please rename your files if they have other extensions in prior.
See Releases.
- Open Menu
Settings
->Labelers...
- Click
+
and select the downloadedtextgrid.labeler.json
file - Open Menu
Tools
->Batch Edit
->Manage Plugins...
- Click
+
and select the all the downloadedplugin.json
files in theplugins
folder - Instead of 4, you can also click the
Open directory
button and paste all the plugin folders into the openedmacro
folder.
- Make your files look like the following structure:
If you don't have TextGrid files yet, you can leave the
your_project ├── wav │ ├── file1.wav │ ├── file2.wav │ └── file3.wav └── TextGrid ├── file1.TextGrid ├── file2.TextGrid └── file3.TextGrid
TextGrid
folder empty. - Open the
New project
page of vLabeler - Select the
your_project
folder (its name can be any text) as theSampleDirectory
. - Select Labeler
TextGrid labeler
- If you have different names for the
wav
andTextGrid
folders, you can change them in the labeler's settings (the gear button next to it). - Complete other settings as you wish and create the project.
If you have existing TextGrid files, you can see several module tabs in the created project, like:
- file1.wav_1_tier1
- file1.wav_1_tier2
- file2.wav_1_tier1
- file2.wav_1_tier2
The name of the module should be in the format of <file_name>.wav_<tier_index>_<tier_name>
.
If your tiers are not related, which means you don't need to make sure the boundaries in different tiers are aligned, you can just do the adjustment in each module independently.
However, in many cases, we have parent-child relations between tiers, like:
phoneme: | a | k | a | s | a |
note: | a | ka | sa |
sentence: | a ka sa |
So we may want to adjust the boundaries synchronously in all the tiers related.
To do this, we can use the plugins with the following steps:
- Run
TextGrid - Mark tier relations
plugin. Please read carefully the instructions in the plugin dialog and fill in the correct variables. After execution, parent entry names will be set as tags of the child entries. e.g.phoneme: | a (a) | k (ka) | a (ka) | s (sa) | a (sa) | note: | a (a ka sa) | ka (a ka sa) | sa (a ka sa) | sentence: | a ka sa |
- Adjust the boundaries and label names in the most detailed tier (e.g.
phoneme
tier in the example above). After adjustment, it may look like:phoneme: | a (a) | k (ka) | a (ka) | s (sa) | a (sa) | note: | a (a ka sa) | ka (a ka sa) | sa (a ka sa) | sentence: | a ka sa |
- Run
TextGrid - Merge to update next tier
plugin in the most detailed tier. We will get the next tier updated like:phoneme: | a (a) | k (ka) | a (ka) | s (sa) | a (sa) | note: | a (a ka sa) | ka (a ka sa) | sa (a ka sa) | sentence: | a ka sa |
- Repeat step 2 and 3 until the top tier is updated. The
TextGrid - Merge to update next tier
plugin also have settings to allow batch process for multiple tiers and/or multiple sample files. Please check the plugin's settings for details.
If we want to create TextGrid files from scratch, we get a empty project including tabs like:
- file1.wav_1_default
- file2.wav_1_default
default
is a default tier name. We can rename it by the TextGrid - Manage module
plugin.
If we want to create tiers with parent-child relations, we can do the same steps 2 and 3 as the previous section.
Note that the plugin TextGrid - Merge to update next tier
will create a new tier if the given next tier doesn't exist,
so you don't need to create the next tier manually.
You can add, remove, rename and duplicate modules by the TextGrid - Manage module
plugin as you like, but please note
that the plugin doesn't block all the possible errors, so you will need to double-check the module names before running
other plugins or export.
You can choose any of the following methods to export TextGrid files:
- Menu
File
->Export...
: Export the TextGrid file for the current wav file to a certain file. - Menu
File
->Export Overwriting
: Export the TextGrid file for the current wav file to the original TextGrid file (if not existing, create as<project>/TextGrid/<wavFileName>.TextGrid
). - Menu
File
->Export Overwriting All
: Export all the TextGrid files in the project to the corresponding original TextGrid files.
- You can click the module name labels on the left side of the tier view to switch to another module.
- You can click any entry in the tier view to switch to that tier and jump to the entry.
- You can use menu
Navigate
->Go to Next/Previous Sub-project
to switch between tiers. You can also set the keyboard shortcuts for these actions in theSettings
->Preferences...
->Keymap
->Key actions
page. - Dragging when multiple tiers exist will be snapped to entries in other tiers.
- You can use the plugin quick launch feature to easily run plugins with a set of parameters.