Skip to content

Some sample rates produce an error when running run_detector.py #13

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

Open
bgotthold-usgs opened this issue Dec 14, 2021 · 0 comments · May be fixed by #14
Open

Some sample rates produce an error when running run_detector.py #13

bgotthold-usgs opened this issue Dec 14, 2021 · 0 comments · May be fixed by #14

Comments

@bgotthold-usgs
Copy link

Multiple wav files with sample rate of 384000 produce a runtime error. Manually changing the sample rate to 380k or 386k work fine. The sample rate of 382k also produces this error.

1 of 4 /p508_g93537_f54319825.wav dur 6.0 (secs) , fs 384002 Traceback (most recent call last): File "/Users/bgotthold/src/code.chs.usgs.gov/fort/batdetect/bat_eval/run_detector.py", line 137, in <module> det_time, det_prob = run_model(det, audio, file_dur, samp_rate, File "/Users/bgotthold/src/code.chs.usgs.gov/fort/batdetect/bat_eval/run_detector.py", line 72, in run_model spec = det.create_spec(audio_chunk, samp_rate) File "/Users/bgotthold/src/code.chs.usgs.gov/fort/batdetect/bat_eval/cpu_detection.py", line 106, in create_spec zoom(hspec, 0.5, output=spec, order=1) File "/usr/local/lib/python3.9/site-packages/scipy/ndimage/interpolation.py", line 771, in zoom output = _ni_support._get_output(output, input, shape=output_shape, File "/usr/local/lib/python3.9/site-packages/scipy/ndimage/_ni_support.py", line 94, in _get_output raise RuntimeError("output shape not correct") RuntimeError: output shape not correct

bgotthold-usgs added a commit to bgotthold-usgs/batdetect that referenced this issue Dec 14, 2021
Not sure if this change has any other implications but it does fix macaodha#13
@bgotthold-usgs bgotthold-usgs linked a pull request Dec 14, 2021 that will close this issue
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 a pull request may close this issue.

1 participant