#phonetic #linguistics #file-format #praat #textgrid

textgridde-rs

A library for dealing with Praat TextGrid files. MIT licensed.

2 releases

0.1.1 Aug 31, 2024
0.1.0 Aug 11, 2024

#1041 in Parser implementations

Download history 107/week @ 2024-08-10 9/week @ 2024-08-17 176/week @ 2024-08-31 3/week @ 2024-09-07 23/week @ 2024-09-14 9/week @ 2024-09-21 32/week @ 2024-09-28 3/week @ 2024-10-05

67 downloads per month

MIT license

86KB
2K SLoC

textgridde-rs

Written by Caleb Long cmlong02@outlook.com

A Rust library for dealing with Praat TextGrid files.

Usage

use textgridde_rs::TextGrid;

fn main() {
    let textgrid = TextGrid::from(PathBuf("path/to/textgrid.TextGrid")).unwrap();
    
    for tier in textgrid.get_tiers() {
        println!("Tier name: {}", tier.name());
        match tier {
            Tier::IntervalTier(interval_tier) => {
                for interval in interval_tier.get_intervals() {
                    println!("Interval: {:?}", interval);
                }
            },
            Tier::PointTier(point_tier) => {
                for point in point_tier.get_points() {
                    println!("Point: {:?}", point);
                }
            }
        }
    }
}

License

MIT! Credit me if you can and it's feasible. Not necessary though :-)

Dependencies

~2.4–4MB
~70K SLoC