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

Raise more informative error when processing stereo tracks #41

Open
edward-io opened this issue Nov 1, 2024 · 0 comments
Open

Raise more informative error when processing stereo tracks #41

edward-io opened this issue Nov 1, 2024 · 0 comments

Comments

@edward-io
Copy link

Thanks for converting crepe to PyTorch!

When running python -m torchcrepe --audio_files=..., I encountered the error:

  File "~/miniconda3/lib/python3.11/site-packages/torchcrepe/core.py", line 733, in resample
    audio = audio.detach().cpu().numpy().squeeze(0)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: cannot select an axis to squeeze out which has size not equal to one

Investigating the error, audio has shape torch.Size([2, 10674560]). Raising an exception when the input audio track is stereo (or downmix to mono) could be useful to other users of the project.

Thanks!

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

No branches or pull requests

1 participant