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

Make openTextgrid() and save() parameters manditory #27

Closed timmahrt closed 2 years ago

timmahrt commented 3 years ago

New features are added in a backwards compatible way--they are given default values--but this has obscured some important functionality.

These parameters should be changed to be required so that users are forced to make mindful decisions about how praatio manipulates their data.

timmahrt commented 2 years ago

This is in Praatio 5.0 now.

textgrid.openTextgrid() had an optional parameter readRaw. This was renamed to includeEmptyIntervals and made required.

For textgrid instance tg, tg.save there were two optional arguments format and ignoreBlankSpaces. ignoreBlankSpaces was changed to includeBlankSpaces (the variable was renamed and the logic flipped in the code).

Both parameters were made required.

timmahrt commented 2 years ago

Here are examples of the new interface

textgrid.openTextgrid(
  fn=name,
  includeEmptyIntervals=False
)
tg.save(
  fn=name,
  format= "short_textgrid",
  includeBlankSpaces= "false"
)
timmahrt commented 2 years ago

I will close this issue once Praatio 5.0 is released.

timmahrt commented 2 years ago

Praatio 5.0 is now released!