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
311 stars 33 forks source link

Overhaul audio.py #41

Closed timmahrt closed 1 year ago

timmahrt commented 1 year ago

audio.py suffers from a number of inconsistencies and bugs.

This PR aims to remove redundant methods and add documentation, and test coverage to audio.py

scottmk commented 1 year ago

I wonder if it's worth the effort to split this up into a few separate PRs, given the sheer volume of changes. That might also help mitigate the build failures and reduce the burden of writing tests.

scottmk commented 1 year ago

Could you also detail in the commit message what refactoring you did for audio.py? For example, I'm not sure I understand the change from WavQueryObj to QueryWav.

timmahrt commented 1 year ago

I wonder if it's worth the effort to split this up into a few separate PRs, given the sheer volume of changes. That might also help mitigate the build failures and reduce the burden of writing tests.

I've basically rewritten the whole file. In hindsight I should have broken it into steps but I think its too late for that. I'll do my best to write comprehensive tests!

Could you also detail in the commit message what refactoring you did for audio.py? For example, I'm not sure I understand the change from WavQueryObj to QueryWav.

The names weren't great, so I renamed them. Maybe the new names aren't great either. If you have feedback, please share.

When the new version gets published, I'll have a changelog detailing all the removed/renamed/added methods.

I'm going to release a new version, so I'm trying to do as much cleaning as possible now, for things that I'm unsatisfied with.

coveralls commented 1 year ago

Coverage Status

Coverage: 75.605% (+7.3%) from 68.282% when pulling ab4c5f1839715d00f44a40057331510b32557281 on overhaul_audio_code into 50dbff6efb33a93c675d993b6deb08505e45e094 on praatio_v6.

timmahrt commented 1 year ago

I'll merge this into the release branch now. 🙏