k2-fsa / snowfall

Moved to https://github.com/k2-fsa/icefall
Apache License 2.0
143 stars 42 forks source link

Support visualizing text grid files with Praat. #208

Closed csukuangfj closed 3 years ago

csukuangfj commented 3 years ago

Example results:

Screen Shot 2021-06-07 at 7 54 04 PM

all.pdf a-0.5-3.5.pdf

csukuangfj commented 3 years ago

See https://github.com/k2-fsa/snowfall/blob/cf5ba85c5d10066eed2008716bc27a24801ae00f/test/fixtures/README.rst for how to run it:

$ snowfall ali visualize -i ./a.flac -t a.TextGrid -w 20 -s 0.5 -e 3.5 -o a-0.5-3.5.pdf
$ snowfall ali visualize -i ./a.flac -t a.TextGrid -w 100 -o all.pdf

Praat can be installed by visiting https://www.fon.hum.uva.nl/praat/

Screen Shot 2021-06-07 at 7 56 42 PM
csukuangfj commented 3 years ago

That's pretty cool! Are you also planning to add a utility for storing alignments as textgrid files?

I think we can add several utilities: one to convert snowfall alignments to ctm, another to text grid.

The above example contains only one tier, phones. We can also add another tier, words. And they can be visualized together in a single figure.

danpovey commented 3 years ago

Great!! Merge when you think it makes sense...