kahst/BirdNET-Analyzer

Individual .WAV load Error

gb627 opened this issue · 0 comments

Discussed in #417

Originally posted by gb627 August 23, 2024
Hello,

I have a long term dataset (.WAV) files which I was to run BirdNet on. I'm keen to be able to create a look that reads .WAV file, extract the month and then apply the BirdNet date filter.

I'm currently running BirdNet in R through NSNSDAcoustics, which works perfectly if you input a folder of .WAV files but I'm finding I can't run through the .WAV files individually in a loop. I end up with this error:

"
Traceback (most recent call last):
File "analyze.py", line 654, in
File "analyze.py", line 360, in analyzeFile
File "analyze.py", line 319, in get_result_file_name
IndexError: string index out of range
[5332] Failed to execute script 'analyze' due to unhandled exception!
Species list contains 6522 species
"
##############################################################################################

Rough R code

data<-list.files(path = PATHsearch,pattern = ".wav$", recursive = TRUE,full.names = TRUE)
my.birdnet.path<-"C:/Users/guybe/AppData/Local/Programs/BirdNET-Analyzer/BirdNET-Analyzer.exe"

for (i in 1:NROW(Data)) {
D1<-Data1[i,1]
birdnet_analyzer(
birdnet.version = 'v1.1.0',
birdnet.path = my.birdnet.path,
i.audio = D1,
o.results = D1,
rtype = 'r'
)