dpwe/audfprint

IndexError: too many indices for array

Closed this issue · 5 comments

Hi, having issues with recognising a clip using this script.

This is the command I used:
python audfprint.py match --dbase db1.pklz SS9-18.wav

And this is the traceback I get:
Read fprints for 4864 files ( 25037164 hashes) from db1.pklz (2.75% dropped)
Traceback (most recent call last):
File "audfprint.py", line 490, in
main(sys.argv)
File "audfprint.py", line 473, in main
strip_prefix=args['--wavdir'])
File "audfprint.py", line 156, in do_cmd
msgs = matcher.file_match_to_msgs(analyzer, hash_tab, filename, num)
File "/home/ben/audio_recognition-master/bin/audfprint/audfprint_match.py", line 379, in file_match_to_msgs
rslts, dur, nhash = self.match_file(analyzer, ht, qry, number)
File "/home/ben/audio_recognition-master/bin/audfprint/audfprint_match.py", line 355, in match_file
q_hashes = analyzer.wavfile2hashes(filename)
File "/home/ben/audio_recognition-master/bin/audfprint/audfprint_analyze.py", line 407, in wavfile2hashes
self.peaks2landmarks(peaklist)))
File "/home/ben/audio_recognition-master/bin/audfprint/audfprint_analyze.py", line 89, in landmarks2hashes
hashes[:, 0] = landmarks[:, 0]
IndexError: too many indices for array

Time is of the essence here unfortunately, and any help would be appreciated 😄

dpwe commented

The file is only 0.395 of a second long, how would I get this sample to match to the database? (If it gives me multiple low confidence results I'd be happy to manually listen to them individually, but I didn't really want to go through 4,800 odd songs for 0.4 of a second of audio.

Thanks,

Ben

dpwe commented

I added 0.4s of white noise to the start and it worked! Thank you for your dedication to this code :)

dpwe commented