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

Phn2annot fixes #75

Merged
merged 8 commits into from
Jan 12, 2021
Merged

Phn2annot fixes #75

merged 8 commits into from
Jan 12, 2021

Conversation

NickleDave
Copy link
Collaborator

No description provided.

change `phn2annot` function so that it checks
for both `.wav` and `.WAV` files when
opening the file to determine the sampling rate,
which it does to convert samples to seconds
for onsets and offsets

fixes bug on some versions of TIMIT dataset
where audio files end in .WAV instead of .wav
`soundfile` is able to parse the NIST format .WAV files
in addition to standard `.wav` files, so the function
should now work regardless of
which version of TIMIT dataset user has
(will add tests to verify this)
modify the `crowsetta.validation._parse_file` function
so that the type of the `extension` argument can be
not just a string but also a tuple of strings

this way other functions can specify a set of valid
extensions, e.g. `('.phn', '.PHN')`, not just `'.phn'`.

Makes it possible for e.g. `phn2annot` to act in a
"case-insensitive" way, converting both `.phn` and
`.PHN` files
by using the modified `_parse_file` function
that can accept multiple extensions as valid

`phn2annot` will now check for both `.phn` and `.PHN` extensions
@NickleDave NickleDave merged commit 53ee345 into master Jan 12, 2021
@NickleDave NickleDave deleted the phn2annot-fixes branch January 12, 2021 17:45
NickleDave added a commit that referenced this pull request Jan 12, 2021
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