timmahrt / praatIO.js

Javascript library for reading and writing textgrid files
MIT License
15 stars 4 forks source link

About TextGrid normal/short #4

Closed jinjingzhong closed 4 years ago

jinjingzhong commented 4 years ago

Hi, recently, I found this praatIO for my apps, it's really useful, but after I parsed and modified my TextGrid with praatIO, I could not find a serialization method for the NORMAL type TextGrid, the exists serializatin method is for SHORT type. the praatIO can recognize NORMAL/SHORT type TextGrid when parsing, Maybe there should be a function for recognizing different type when sirialization. Could you update for it? Best regards.

timmahrt commented 4 years ago

Hello jinjingzhong, I recently had this request for my python praatIO library. It's an easy fix and it is good to have.

I should have time to do it today or tomorrow. I'll let you know once its released. Thanks! Tim

timmahrt commented 4 years ago

I've published praatio.js version 2.2.0

let longText = serializeTextgrid(tg, null, null, null, false); will output a textdump of a textgrid in normal format that can be saved to a file.

By default, serializeTextgrid(tg) will save to a short textgrid for backwards compatibility reasons.

If you notice any problems or have any questions, please let me know. Thanks!

jinjingzhong commented 4 years ago

Thanks for updating, It is really helpful for me,thank you .

timmahrt commented 4 years ago

I'll close this issue for now. If you have other questions, feel free to reopen or make a new issue. Thanks!