def localtest(): """Function to provide quick test""" pat = '/Users/dpwe/projects/shazam/Nine_Lives/*mp3' qry = 'query.mp3' hash_tab = audfprint_analyze.glob2hashtable(pat) matcher = Matcher() rslts, dur, nhash = matcher.match_file(audfprint_analyze.g2h_analyzer, hash_tab, qry) t_hop = 0.02322 print "Matched", qry, "(", dur, "s,", nhash, "hashes)", \ "as", hash_tab.names[rslts[0][0]], \ "at", t_hop*float(rslts[0][2]), "with", rslts[0][1], \ "of", rslts[0][3], "hashes"
def localtest(): """Function to provide quick test""" pat = '/Users/dpwe/projects/shazam/Nine_Lives/*mp3' qry = 'query.mp3' hash_tab = audfprint_analyze.glob2hashtable(pat) matcher = Matcher() rslts, dur, nhash = matcher.match_file(audfprint_analyze.g2h_analyzer, hash_tab, qry) t_hop = 0.02322 print("Matched", qry, "(", dur, "s,", nhash, "hashes)", "as", hash_tab.names[rslts[0][0]], "at", t_hop * float(rslts[0][2]), "with", rslts[0][1], "of", rslts[0][3], "hashes")