From c90d14fdd6aa66426d05ec1ea46aec26654ed2ed Mon Sep 17 00:00:00 2001 From: worldveil Date: Wed, 5 Mar 2014 01:28:34 -0500 Subject: [PATCH] Fix to dejavu.py script, small edits, removal of unecessary printing --- DEPENDENCIES.md | 4 +++- dejavu.py | 1 + dejavu/__init__.py | 4 ---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index a38ab2f..a9259d7 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -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. \ No newline at end of file diff --git a/dejavu.py b/dejavu.py index 50c767f..e2b34a1 100755 --- a/dejavu.py +++ b/dejavu.py @@ -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']: diff --git a/dejavu/__init__.py b/dejavu/__init__.py index 4921992..b18ad2e 100755 --- a/dejavu/__init__.py +++ b/dejavu/__init__.py @@ -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: