Skip to content

fix: resolve issue saving pitch tiers - #6

Merged
timmahrt merged 6 commits into
mainfrom
upgrade_praatio_6_2_1
Jan 17, 2026
Merged

fix: resolve issue saving pitch tiers#6
timmahrt merged 6 commits into
mainfrom
upgrade_praatio_6_2_1

Conversation

@timmahrt

@timmahrt timmahrt commented Jan 17, 2026

Copy link
Copy Markdown
Owner

After not running ProMo for a long time, I found that it no longer ran properly. Running tests showed the error:

Error: Early end of text detected while looking for a real number (line 165).
"number" not read.
PitchTier not read.
Data not read from text file “/Users/tmahrt/Dropbox/workspace/promo/examples/files/pitchTiers/mary1_mary1_stylized_f0_morph_0.333.PitchTier”.

I traced the issue to a behavior change with NumPy and how it handles floats. I modified praatio to normalize numbers when adding data to data files (like PitchTiers).

This PR:

  • pins the version of praatio to one that contains the bugfix
  • updates relevant documentation and example files
  • replaces setup.py with pyproject.toml

pitchList = [(timeV, pitchV) for timeV, pitchV, _ in piList]

dur = audio.WavQueryObj(join(root, wavFN)).getDuration()
dur = audio.getDuration(join(root, wavFN))

@timmahrt timmahrt Jan 17, 2026

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WavQueryObj was deleted at some point. This is the current way to use the library to get duration.

@timmahrt
timmahrt merged commit 0273fd5 into main Jan 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant