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

load_channels_as_audio fails when file has 1 channel #614

Closed
sammlapp opened this issue Dec 19, 2022 · 0 comments
Closed

load_channels_as_audio fails when file has 1 channel #614

sammlapp opened this issue Dec 19, 2022 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@sammlapp
Copy link
Collaborator

Librosa returns a 1d array of samples instead of a 2d array with load(...mono=False) if the file only has one channel. This causes load_channels_as_audio to raise a ValueError when it tries to make one Audio object per [first dimension of sample array]. The fix is easy - just make a single object if the sample array is 1D. The function should still return a list of Audio object(s) for consistency.

@sammlapp sammlapp added the bug Something isn't working label Dec 19, 2022
@sammlapp sammlapp self-assigned this Dec 19, 2022
@sammlapp sammlapp added this to the 0.8.0 milestone Dec 19, 2022
@sammlapp sammlapp added the resolved_in_branch The issue has been resolved in a feat/issue branch but not merged into develop label Dec 20, 2022
sammlapp added a commit that referenced this issue Dec 20, 2022
resolves #614 - avoid bug in load channels of mono
@sammlapp sammlapp added resolved_in_develop The issue has been resolved in the develop branch but not in master and removed resolved_in_branch The issue has been resolved in a feat/issue branch but not merged into develop labels Dec 20, 2022
@rhine3 rhine3 closed this as completed in b491f0e Jan 12, 2023
@sammlapp sammlapp removed the resolved_in_develop The issue has been resolved in the develop branch but not in master label Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant