mirror of
https://github.com/correl/dejavu.git
synced 2024-12-29 11:09:26 +00:00
small fixes to pguridi PR
This commit is contained in:
parent
880af4a5b9
commit
48d7e8ecee
2 changed files with 4 additions and 6 deletions
|
@ -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
6
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
|
||||
song = recognizer.listen(seconds=5, verbose=True)
|
||||
print song
|
Loading…
Reference in a new issue