flutter_textgrid

Last updated:

0 purchases

flutter_textgrid Image
flutter_textgrid Images
Add to Cart

Description:

flutter textgrid

From Praat's documentation, a TextGrid object consists of a number of tiers. There are two kinds of tiers: an interval tier is a connected sequence of labelled intervals, with boundaries in between. A point tier is a sequence of labelled points.
Index #

Index
Features
How to use

Install
Create and edit TextGrid
Read TextGrid

From String
From File





Features #

Read and write TextGrid files
Supports both Long & Short TextGrid formats
Manipulate TextGrid objects

How to use #
Install #
To use [flutter_textgrid], install [flutter_textgrid] by adding it to your pubspec.yaml file:"
For a Flutter project:
flutter pub add flutter_textgrid
copied to clipboard
For a Dart project:
dart pub add flutter_textgrid
copied to clipboard
Create and edit TextGrid #
final textGrid = TextGrid(
startTime: Time.zero,
endTime: Time(5), // 5 seconds
);

final intervalTier = IntervalTier(name: 'test');
final ia = IntervalAnnotation(
startTime: Time.zero,
endTime: const Time(0.5),
text: 'worda',
);
intervalTier.addAnnotation(ia);

textGrid.addTier(intervalTier);
copied to clipboard
Read TextGrid #
First of all create a TextGridSerializer. It can read both Long and Short format, without any configurations.
From String #
final tgs = TextGridSerializer();

final tgContent = "...TextGrid...";

final textGrid = tgs.fromString(tgContent);
copied to clipboard
From file #
final tgs = TextGridSerializer();

final textGrid = tgs.fromFile(File('../path/to/file'));

// Just use your TextGrid file
copied to clipboard
or you can read directly from a path:
final tgs = TextGridSerializer();

final textGrid = tgs.fromPath('../path/to/file');

// Just use your TextGrid file
copied to clipboard
or you can use the [fromString] method.
final tgs = TextGridSerializer();

final fileContent = File('../path/to/file').readAsStringSync();

final textGrid = tgs.fromString(fileContent);

// Just use your TextGrid file
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.