-
Notifications
You must be signed in to change notification settings - Fork 102
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
Some file sizes will crash CLI version #1067
Comments
Addition: With the file type provided and command as above it seems all files equal to or bigger than 16370 samples will crash Meyda. |
Complete error trace:
I notice a method called |
Yet another observation. So my proposal is merging #1066 with this issue and that the solution is to throw an error for the file format in question since it is not read properly. Worth noting is that the files I provided are playable in all audio applications I've tried so the file format is not incorrect, but since they are probably not compatible with Meyda better to throw an error. (Will be away for a few days now...) |
Yes, the CLI only supports integer encoded WAVs. See #118. I hope to address that as soon as we have a stateless extract method, which I'm working on in #931, but running into typescript issues with. We should definitely throw a better error in the existing CLI, but that's some fairly old code, and adding stuff there would take time away from finishing #931, which would make working on the CLI much smoother. In the initial issue though, you described a size limit - do you still think that's the case? or was it just that the shorter file was float encoded? |
I wrote this quick little CLI that should work for whatever encoding that ffmpeg supports: let me know if this suits your purposes better?. I imagine you'll need to make changes (like having it call out to sox instead of ffmpeg?), but it might be a good start. In its current state, you need to have ffmpeg installed on your machine, and you can edit it to change the config for Meyda at the top of the file. |
Thanks for the feedback. I solved this by another extraction strategy in Python prior to calling the Meyda script so I produce integer wav files, seems to work, but I haven't done any deep tests. I'm pretty sure the size thing was just som strange side effect from floats getting misread. Now with integer wavs I can Meyda-analyze longer files. |
Describe the bug
When using the CLI version to analyze files produced from the same source (produced by scipy.io wavfile) but of different length, some lengths will crash Meyda.
To Reproduce
Use attached files and issue following commands, this is what I get:
File length of 11000 samples is ok but 22025 is not. None of these are multiples of buffer size, so that's not the issue.
Expected behavior
All files analyzed regardless of length, at least for unextreme sizes.
Environment configuration
Node on macOS 10.14 using Terminal.
Node: v10.15.0
Meyda: sorry I don't get how to list the version number (new to node and npm, npm list meyda says
(empty)
) but I think it's 5.3.0. I installed it oct 2021.Additional context
filesize_issue.zip
The text was updated successfully, but these errors were encountered: