small fixes to pguridi PR

This commit is contained in:
worldveil 2013-12-18 00:31:00 -06:00
parent 880af4a5b9
commit 48d7e8ecee
2 changed files with 4 additions and 6 deletions

View file

@ -11,8 +11,8 @@ class Converter():
def __init__(self, config):
self.config = config
if self.config.has_section("input") and self.config.has_option("input", "lenght"):
self.max_input_len = int(self.config.get("input", "lenght"))
if self.config.has_section("input") and self.config.has_option("input", "length"):
self.max_input_len = self.config.getint("input", "length")
else:
self.max_input_len = None

6
go.py
View file

@ -15,8 +15,6 @@ dejavu.fingerprint("va_us_top_40/mp3", "va_us_top_40/wav", [".mp3"], 5)
from dejavu.recognize import Recognizer
recognizer = Recognizer(dejavu.fingerprinter, config)
song = recognizer.read("va_us_top_40/wav/17_-_#Beautiful_-_Mariah_Carey_ft.wav")
# recognize song playing over microphone for 10 seconds
#song = recognizer.listen(seconds=1, verbose=True)
#print song
song = recognizer.listen(seconds=5, verbose=True)
print song