TextGridTools icon indicating copy to clipboard operation
TextGridTools copied to clipboard

Extracting and creating new textgrid from existing textgrid file

Open mamadyonline opened this issue 3 years ago • 2 comments

Hello,

An interesting feature of the library is the possibility to extract parts from an existing textgrid file. But the feature does not seem to work. I systematically get an AttributeError: 'IntervalTier' object has no attribute 'extract_part'.

Is this normal? How can I make it work?

By recreating the feature using your written function, I have the correct behavior, but with a textgrid that is not nice as the original textgrid. I would like to preserve all other properties of the original textgrid file, but only extracting intervals I need.

Thanks

mamadyonline avatar Oct 25 '22 15:10 mamadyonline

Hello,

the method extract_parts is in the GitHub code, but has not been released yet. I can create a new release (that is then also distributed via pypi) in the next few days. Until then, you can clone the GitHub repo and then use setup.py to install it from source.

Thanks for the ‘bug’ report!

Hendrik

hbuschme avatar Oct 25 '22 20:10 hbuschme

Oh ok... I should have known better.

I would be glad if you can create a new release. But if you think you better wait, no worries, I would just have the function locally for my needs right now.

Thanks for the help

mamadyonline avatar Oct 25 '22 20:10 mamadyonline