title: Additional information for songs recognised by dejavu.py
body: <p>I'm currently investigating <a href="https://github.com/worldveil/dejavu" rel="nofollow">dejavu.py</a> (<a href="http://willdrevo.com/fingerprinting-and-audio-recognition-with-python/" rel="nofollow">some more info</a>), and I must say that I am quite impressed by it so far.  Though I do find that the docs are a bit incomplete when it comes to user interfacing.<br>
  When you recognise a song from file with <code>oDjv.recognize(FileRecognizer, sFile)</code>, you get returned a dictionary which looks like this:  </p>
  
  <pre><code>{'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}
  </code></pre>
  
  <p>And from recording (<code>oDjv.recognize(MicrophoneRecognizer, seconds=iSecs)</code>):  </p>
  
  <pre><code>{'song_id': 2, 'song_name': 'Sean-Fournier--Falling-For-You', 'file_sha1': 'A9D18B9B9DAA467350D1B6B249C36759282B962E', 'confidence': 124, 'offset_seconds': 24.89179, 'offset': 536}
  </code></pre>
  
  <p><strong>So, to the questions</strong>:<br>
  1)  What exactly is <code>confidence</code>, and is there an upper bounds for the confidence level?</p>
  
  <p>2)  What is the difference between <code>offset_seconds</code> and <code>offset</code>?</p>
  
  <p>3)  Why does it take the algorithm somewhere between 30 and 60 seconds (in the case of all tests I ran) to identify the song from disk, but it can do it in 10 or so seconds when recording audio?</p>
  
  <p>4)  When running the function to record from audio, I get the following chunk of code preceding the actual output (even if successful) from the function.  Where are we trying to go?  </p>
  
  <pre><code>ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to 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 to open slave
  Cannot connect to server socket err = No such file or directory
  Cannot connect to server request channel
  jack server is not running or cannot be started
  </code></pre>
  
  <p>5)  Is there an online music Database that I can just plug into the config?</p>
  
  <pre><code>dConfig = {
      "database": {
          "host": "some magical music database",
          "user": "root",
          "passwd": "", 
          "db": "dejavu"
      }
  }
  
  oDjv = Dejavu(dConfig)
  </code></pre>