diff --git a/dejavu/convert.py b/dejavu/convert.py index 61f673d..f1e7b2c 100644 --- a/dejavu/convert.py +++ b/dejavu/convert.py @@ -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 diff --git a/go.py b/go.py index 2aaee89..2b22eac 100644 --- a/go.py +++ b/go.py @@ -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 \ No newline at end of file +song = recognizer.listen(seconds=5, verbose=True) +print song \ No newline at end of file