Fix to dejavu.py script, small edits, removal of unecessary printing

This commit is contained in:
worldveil 2014-03-05 01:28:34 -05:00
parent 2e6d030655
commit c90d14fdd6
3 changed files with 4 additions and 5 deletions

View file

@ -10,7 +10,7 @@
## Dependency installation for Mac OS X
Tested on OS X Mavericks. Needs [Homebrew](http://brew.sh) to be installed.
Tested on OS X Mavericks. An option is to install [Homebrew](http://brew.sh) and do the following:
```
brew install portaudio
@ -27,3 +27,5 @@ sudo pip install MySQL-python
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
```
However installing `portaudio` and/or `ffmpeg` from source is also doable.

View file

@ -72,6 +72,7 @@ if command == 'fingerprint': # Fingerprint all files in a directory
elif command == 'recognize': # Recognize audio
source = sys.argv[2]
song = None
if source in ['mic', 'microphone']:

View file

@ -32,7 +32,6 @@ class Dejavu(object):
for song in self.songs:
song_name = song[self.db.FIELD_SONGNAME]
self.songnames_set.add(song_name)
print "Added: %s to the set of fingerprinted songs..." % song_name
def fingerprint_directory(self, path, extensions, nprocesses=None):
# Try to use the maximum amount of processes if not given.
@ -134,9 +133,6 @@ class Dejavu(object):
largest_count = diff_counter[diff][sid]
song_id = sid
print("Diff is %d with %d offset-aligned matches" % (largest,
largest_count))
# extract idenfication
song = self.db.get_song_by_id(song_id)
if song: