forked from worldveil/dejavu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrated code to python 3.6.6 and refactored some code to improve it.
- Loading branch information
1 parent
d2b8761
commit 78dfef0
Showing
18 changed files
with
681 additions
and
660 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Dejavu | ||
SONG_ID = "song_id" | ||
SONG_NAME = 'song_name' | ||
CONFIDENCE = 'confidence' | ||
MATCH_TIME = 'match_time' | ||
OFFSET = 'offset' | ||
OFFSET_SECS = 'offset_seconds' | ||
|
||
# DATABASE CLASS INSTANCES: | ||
DATABASES = { | ||
'mysql': ("dejavu.database_handler.mysql_database", "MySQLDatabase") | ||
} | ||
|
||
# TABLE SONGS | ||
SONGS_TABLENAME = "songs" | ||
|
||
# SONGS FIELDS | ||
FIELD_SONG_ID = 'song_id' | ||
FIELD_SONGNAME = 'song_name' | ||
FIELD_FINGERPRINTED = "fingerprinted" | ||
FIELD_FILE_SHA1 = 'file_sha1' | ||
|
||
# TABLE FINGERPRINTS | ||
FINGERPRINTS_TABLENAME = "fingerprints" | ||
|
||
# FINGERPRINTS FIELDS | ||
FIELD_HASH = 'hash' | ||
FIELD_OFFSET = 'offset' | ||
|
||
# FINGERPRINTS CONFIG: | ||
# Sampling rate, related to the Nyquist conditions, which affects | ||
# the range frequencies we can detect. | ||
DEFAULT_FS = 44100 | ||
|
||
# Size of the FFT window, affects frequency granularity | ||
DEFAULT_WINDOW_SIZE = 4096 | ||
|
||
# Ratio by which each sequential window overlaps the last and the | ||
# next window. Higher overlap will allow a higher granularity of offset | ||
# matching, but potentially more fingerprints. | ||
DEFAULT_OVERLAP_RATIO = 0.5 | ||
|
||
# Degree to which a fingerprint can be paired with its neighbors -- | ||
# higher will cause more fingerprints, but potentially better accuracy. | ||
DEFAULT_FAN_VALUE = 15 | ||
|
||
# Minimum amplitude in spectrogram in order to be considered a peak. | ||
# This can be raised to reduce number of fingerprints, but can negatively | ||
# affect accuracy. | ||
DEFAULT_AMP_MIN = 10 | ||
|
||
# Number of cells around an amplitude peak in the spectrogram in order | ||
# for Dejavu to consider it a spectral peak. Higher values mean less | ||
# fingerprints and faster matching, but can potentially affect accuracy. | ||
PEAK_NEIGHBORHOOD_SIZE = 20 | ||
|
||
# Thresholds on how close or far fingerprints can be in time in order | ||
# to be paired as a fingerprint. If your max is too low, higher values of | ||
# DEFAULT_FAN_VALUE may not perform as expected. | ||
MIN_HASH_TIME_DELTA = 0 | ||
MAX_HASH_TIME_DELTA = 200 | ||
|
||
# If True, will sort peaks temporally for fingerprinting; | ||
# not sorting will cut down number of fingerprints, but potentially | ||
# affect performance. | ||
PEAK_SORT = True | ||
|
||
# Number of bits to grab from the front of the SHA1 hash in the | ||
# fingerprint calculation. The more you grab, the more memory storage, | ||
# with potentially lesser collisions of matches. | ||
FINGERPRINT_REDUCTION = 20 | ||
|
||
# Number of results being returned for file recognition | ||
TOPN = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.