mirror of
https://github.com/correl/dejavu.git
synced 2024-12-28 19:19:18 +00:00
parent
1e3dbe8eaf
commit
f41d036d45
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ DEFAULT_FAN_VALUE = 15
|
|||
DEFAULT_AMP_MIN = 10
|
||||
PEAK_NEIGHBORHOOD_SIZE = 20
|
||||
MIN_HASH_TIME_DELTA = 0
|
||||
|
||||
MAX_HASH_TIME_DELTA = 200
|
||||
|
||||
def fingerprint(channel_samples, Fs=DEFAULT_FS,
|
||||
wsize=DEFAULT_WINDOW_SIZE,
|
||||
|
@ -108,7 +108,7 @@ def generate_hashes(peaks, fan_value=DEFAULT_FAN_VALUE):
|
|||
|
||||
t_delta = t2 - t1
|
||||
|
||||
if t_delta >= MIN_HASH_TIME_DELTA:
|
||||
if t_delta >= MIN_HASH_TIME_DELTA and t_delta <= MAX_HASH_TIME_DELTA:
|
||||
h = hashlib.sha1(
|
||||
"%s|%s|%s" % (str(freq1), str(freq2), str(t_delta))
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue