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

ValueError: scale < 0 #21

Open
JetteReeg opened this issue Oct 26, 2021 · 0 comments
Open

ValueError: scale < 0 #21

JetteReeg opened this issue Oct 26, 2021 · 0 comments

Comments

@JetteReeg
Copy link

Hi @kahst,
I have been using the BirdNET Docker for a few weeks now (on my local machine and also on a HPC cluster) and actually never had a problem. Now I wanted to analyse a larger set of wav-files (several 12h recordings, saved as 15min files).

Unfortunately I get an error message for a lot of the files (but not all).

My command for analysing the files is:
docker run -v F:/jreeg/MakroOeko/BirdNET/example:/audio birdnet --i audio/SMU02869_20210921_213002.wav --lat 52.73379 --lon 12.21099

BirdNET output:

FILES IN DATASET: 1
LOADING SNAPSHOT BirdNET_Soundscape_Model.pkl ... DONE!
BUILDING BirdNET MODEL... DONE!
IMPORTING MODEL PARAMS... DONE!
COMPILING THEANO TEST FUNCTION FUNCTION... DONE!
LOADING eBIRD GRID DATA... DONE! 13800 GRID CELLS
SID: 1 PROCESSING: SMU02869_20210921_213002.wav SPECIES: 201 Traceback (most recent call last):
File "./analyze.py", line 292, in
main()
File "./analyze.py", line 288, in main
process(s, dataset.index(s) + 1, result_path, args.results, test_function)
File "./analyze.py", line 219, in process
p = analyzeFile(soundscape, test_function)
File "./analyze.py", line 182, in analyzeFile
duration=None):
File "/utils/audio.py", line 233, in specsFromFile
for spec in specsFromSignal(sig, rate, **kwargs):
File "/utils/audio.py", line 217, in specsFromSignal
sig_splits = splitSignal(sig, rate, seconds, overlap, minlen)
File "/utils/audio.py", line 208, in splitSignal
split = np.hstack((split, noise(split, (int(rate * seconds) - len(split)), 0.5)))
File "/utils/audio.py", line 27, in noise
noise = RANDOM.normal(min(sig) * amount, max(sig) * amount, shape)
File "mtrand.pyx", line 1501, in numpy.random.mtrand.RandomState.normal
File "_common.pyx", line 557, in numpy.random._common.cont
File "_common.pyx", line 366, in numpy.random._common.check_constraint
ValueError: scale < 0

I only get this message for some of the audiofiles (which have the same recording settings and location, the only difference is the timestemp of the day).

Do you have any idea what causes this error message?

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