python - Additional information for songs recognised by dejavu.py -
i'm investigating dejavu.py (some more info), , must quite impressed far. though find docs bit incomplete when comes user interfacing.
when recognise song file odjv.recognize(filerecognizer, sfile), returned dictionary looks this:
{'song_id': 2, 'song_name': 'sean-fournier--falling-for-you', 'file_sha1': 'a9d18b9b9daa467350d1b6b249c36759282b962e', 'confidence': 127475, 'offset_seconds': 0.0, 'match_time': 32.23410487174988, 'offset': 0} and recording (odjv.recognize(microphonerecognizer, seconds=isecs)):
{'song_id': 2, 'song_name': 'sean-fournier--falling-for-you', 'file_sha1': 'a9d18b9b9daa467350d1b6b249c36759282b962e', 'confidence': 124, 'offset_seconds': 24.89179, 'offset': 536} so, questions:
1) confidence, , there upper bounds confidence level?
2) difference between offset_seconds , offset?
3) why take algorithm somewhere between 30 , 60 seconds (in case of tests ran) identify song disk, can in 10 or seconds when recording audio?
4) when running function record audio, following chunk of code preceding actual output (even if successful) function. trying go?
alsa lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable open slave alsa lib pcm.c:2239:(snd_pcm_open_noupdate) unknown pcm cards.pcm.rear alsa lib pcm.c:2239:(snd_pcm_open_noupdate) unknown pcm cards.pcm.center_lfe alsa lib pcm.c:2239:(snd_pcm_open_noupdate) unknown pcm cards.pcm.side bt_audio_service_open: connect() failed: connection refused (111) bt_audio_service_open: connect() failed: connection refused (111) bt_audio_service_open: connect() failed: connection refused (111) bt_audio_service_open: connect() failed: connection refused (111) alsa lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable open slave cannot connect server socket err = no such file or directory cannot connect server request channel jack server not running or cannot started 5) there online music database can plug config?
dconfig = { "database": { "host": "some magical music database", "user": "root", "passwd": "", "db": "dejavu" } } odjv = dejavu(dconfig)
most of questions can either found in dejavu github readme.md or writeup , explanation here.
but answer each of numbered questions:
- in dejavu,
confidencenumber of fingerprint hashes "aligned" in current audio clip database closest match. there's no probabilistic interpretation. keep in mind there can many thousands of fingerprints per audio file, have reference point. - they same duration of time, different units.
offset_secondsexpressed seconds, ,offsetexpressed length of algorithm's time bins. - dejavu fingerprints songs @ 3x listening speed. 3 minute song might take longer than, say, short audio clip listens 10 seconds. can adjust how long default command line mic recognition takes using
python dejavu.py --recognize mic 5listens 5 seconds instead of default of 10. fyi, 1 of best options of library can change number of seconds dejavu uses on-disk recognition in json config filefingerprint_limitkey. - there wrong installation or perhaps using virtual machine doesn't know how record audio ,
pyaudio. in case see this solution, perhaps might help. - there no online music database, plug own mysql or (soon) postgresql , record own fingerprints. dejavu meant recognizing sorts of pre-recorded audio. plus, each user's needs different. want more accurate fingerprinting @ expense of fingerprints? raise
default_fan_value. need higher collision guarantees don't mind storage cost? can decreasefingerprint_reduction, keep more characters of each sha-1. dejavu meant adapt many different use cases means if change fingerprinting parameters in this file database have differently distribution , structure.
Comments
Post a Comment