timmahrt / praatIO

A python library for working with praat, textgrids, time aligned audio transcripts, and audio files. It is primarily used for extracting features from and making manipulations on audio files given hierarchical time-aligned transcriptions (utterance > word > syllable > phone, etc).
MIT License
299 stars 32 forks source link

TextGrids with a -0 xmin fail to parse #34

Closed mmcauliffe closed 2 years ago

mmcauliffe commented 2 years ago

I had an MFA user run into some issues with TextGrid parsing where their TextGrids has the minimum time at "-0" for some reason, I think the source of the TextGrids was Praat itself. Probably not too hard for PraatIO to handle this, just a matter of adding "-?" to the xmin parsing line.

timmahrt commented 2 years ago

Sounds simple enough. I should be able to push out a fix. I'll take a look at it tonight?

If you have the exact textgrid, I can confirm the fix is valid for the student's use case.

Do you know where the textgrid came from? It might be also helpful to alert whoever was responsible for it. [EDIT: Rereading, I see you said it came from Praat. Hmmm.]

Thanks!

On Mon, Nov 29, 2021, 10:21 Michael McAuliffe @.***> wrote:

I had an MFA user run into some issues with TextGrid parsing where their TextGrids has the minimum time at "-0" for some reason, I think the source of the TextGrids was Praat itself. Probably not too hard for PraatIO to handle this, just a matter of adding "-?" to the xmin parsing line.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/timmahrt/praatIO/issues/34, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUG7UG26JOTQPX6G6F7GXLUOLISZANCNFSM5I56ZLMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

timmahrt commented 2 years ago

I was able to replicate the issue. I fixed the problem and pushed out v5.0.1

Thanks for the bug report!

timmahrt commented 2 years ago

I'll close this now since I think the problem is resolved. If you are still experiencing problems, feel free to reopen. Thanks!