Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add format checking in praat.py for TextGrid files #42

Open
kevanini opened this issue Aug 13, 2016 · 0 comments
Open

add format checking in praat.py for TextGrid files #42

kevanini opened this issue Aug 13, 2016 · 0 comments
Labels
feature Add a new feature

Comments

@kevanini
Copy link

Users sometimes provide a TextGrid input file to FAVE-extract that has a formatting error, such as the following (note the two newline characters after "HH:

        intervals [403]:
            xmin = 146.703
            xmax = 146.72091856991668
            text = "HH

"

praat.py crashes while trying to read in this file with the following error:

File "/home/speech/Resources/Tools/FAVE/FAVE-extract/bin/praat.py", line 540, in read
jmin = round(float(line.strip().split('=')[1].strip()), 3) # line reads "xmin = xxx.xxxxx"
IndexError: list index out of range

It would be more helpful to the user to print out the line that caused the crash so that the user doesn't need to look for it themselves after the crash. Even better would be for praat.py to check the format of the entire TextGrid file while reading it in and output information about any lines that have formatting errors.

@chrisbrickhouse chrisbrickhouse added the feature Add a new feature label Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Add a new feature
Projects
None yet
Development

No branches or pull requests

2 participants