Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/worldveil/dejavu
/ functions
Functions
114 in github.com/worldveil/dejavu
⨍
Functions
114
◇
Types & classes
13
↓ 16 callers
Function
log_msg
(msg, log=True, silent=False)
dejavu/tests/dejavu_test.py:267
↓ 5 callers
Method
recognize
(self, recognizer, *options, **kwoptions)
dejavu/__init__.py:224
↓ 3 callers
Method
__load_fingerprinted_audio_hashes
Keeps a dictionary with the hashes of the fingerprinted songs, in that way is possible to check whether or not an audio file was alre
dejavu/__init__.py:38
↓ 3 callers
Function
autolabeldoubles
(rects, ax)
dejavu/tests/dejavu_test.py:281
↓ 3 callers
Method
fingerprint_directory
Given a directory and a set of extensions it fingerprints all files that match each extension specified. :param path: path to the di
dejavu/__init__.py:66
↓ 3 callers
Method
recognize_file
(self, filename: str)
dejavu/logic/recognizer/file_recognizer.py:14
↓ 2 callers
Method
_recognize
(self, *data)
dejavu/base_classes/base_recognizer.py:15
↓ 2 callers
Function
_scale_to_sampwidth
(data, sampwidth, vmin, vmax)
dejavu/third_party/wavio.py:178
↓ 2 callers
Method
create_plots
(self, name, results, results_folder)
dejavu/tests/dejavu_test.py:74
↓ 2 callers
Function
cursor_factory
(**factory_options)
dejavu/database_handler/postgres_database.py:166
↓ 2 callers
Function
cursor_factory
(**factory_options)
dejavu/database_handler/mysql_database.py:153
↓ 2 callers
Function
fingerprint
FFT the channel, log transform output, find local maxima, then return locally sensitive hashes. :param channel_samples: channel samples to f
dejavu/logic/fingerprint.py:21
↓ 2 callers
Function
get_audio_name_from_path
Extracts song name from a file path. :param file_path: path to an audio file. :return: file name
dejavu/logic/decoder.py:98
↓ 2 callers
Method
get_songs
Returns all fully fingerprinted songs in the database :return: a dictionary with the songs info.
dejavu/base_classes/base_database.py:79
↓ 2 callers
Method
insert_hashes
Insert a multitude of fingerprints. :param song_id: Song identifier the fingerprints belong to :param hashes: A sequence of
dejavu/base_classes/base_database.py:142
↓ 2 callers
Method
insert_song
Inserts a song name into the database, returns the new identifier of the song. :param song_name: The name of the song.
dejavu/base_classes/base_database.py:109
↓ 2 callers
Method
set_song_fingerprinted
Sets a specific song as having all fingerprints in the database. :param song_id: song identifier.
dejavu/base_classes/base_database.py:70
↓ 1 callers
Method
__init__
(self, dictionary=False, **options)
dejavu/database_handler/postgres_database.py:181
↓ 1 callers
Method
__init__
(self, dictionary=False, **options)
dejavu/database_handler/mysql_database.py:168
↓ 1 callers
Function
_array2wav
Convert the input array `a` to a string of WAV data. a.dtype must be one of uint8, int16 or int32. Allowed sampwidth values are:
dejavu/third_party/wavio.py:70
↓ 1 callers
Method
_fingerprint_worker
(arguments)
dejavu/__init__.py:229
↓ 1 callers
Function
_wav2array
data must be the string containing the bytes from the wav file.
dejavu/third_party/wavio.py:47
↓ 1 callers
Method
align_matches
Finds hash matches that align in time with other matches and finds consensus about which hashes are "true" signal from the audio.
dejavu/__init__.py:175
↓ 1 callers
Function
autolabel
(rects, ax)
dejavu/tests/dejavu_test.py:274
↓ 1 callers
Method
begin
(self)
dejavu/tests/dejavu_test.py:109
↓ 1 callers
Method
clear_cache
(cls)
dejavu/database_handler/postgres_database.py:197
↓ 1 callers
Method
clear_cache
(cls)
dejavu/database_handler/mysql_database.py:184
↓ 1 callers
Method
empty
Called when the database should be cleared of all data.
dejavu/base_classes/base_database.py:37
↓ 1 callers
Method
find_matches
Finds the corresponding matches on the fingerprinted audios for the given hashes. :param hashes: list of tuples for hashes and their
dejavu/__init__.py:160
↓ 1 callers
Method
fingerprint_file
Given a path to a file the method generates hashes for it and stores them in the database for later be queried. :param file_
dejavu/__init__.py:121
↓ 1 callers
Method
generate_fingerprints
f""" Generate the fingerprints for the given sample data (channel). :param samples: list of ints which represents the channel info of
dejavu/__init__.py:147
↓ 1 callers
Function
generate_hashes
Hash list structure: sha1_hash[0:FINGERPRINT_REDUCTION] time_offset [(e05b341a9b77a51fd26, 32), ... ] :param peaks: list o
dejavu/logic/fingerprint.py:122
↓ 1 callers
Function
generate_test_files
Generates a test file for each file recursively in `src` directory of given format using `nseconds` sampled from the audio file. Results
dejavu/tests/dejavu_test.py:231
↓ 1 callers
Function
get_2D_peaks
Extract maximum peaks from the spectogram matrix (arr2D). :param arr2D: matrix representing the spectogram. :param plot: for plotting th
dejavu/logic/fingerprint.py:55
↓ 1 callers
Method
get_column_id
(self, secs)
dejavu/tests/dejavu_test.py:62
↓ 1 callers
Function
get_database
Given a database type it returns a database instance for that type. :param database_type: type of the database. :return: an instance of
dejavu/base_classes/base_database.py:182
↓ 1 callers
Method
get_file_fingerprints
(file_name: str, limit: int, print_output: bool = False)
dejavu/__init__.py:244
↓ 1 callers
Function
get_files_recursive
`src` is the source directory. `fmt` is the extension, ie ".mp3" or "mp3", etc.
dejavu/tests/dejavu_test.py:193
↓ 1 callers
Function
get_length_audio
Returns length of audio in seconds. Returns None if format isn't supported or in case of error.
dejavu/tests/dejavu_test.py:206
↓ 1 callers
Method
get_line_id
(self, song)
dejavu/tests/dejavu_test.py:67
↓ 1 callers
Method
get_song_by_id
Brings the song info from the database. :param song_id: song identifier. :return: a song by its identifier. Result must be a
dejavu/base_classes/base_database.py:88
↓ 1 callers
Function
get_starttime
`length` is total audio length in seconds `nseconds` is amount of time to sample in seconds `padding` is off-limits seconds at beginning
dejavu/tests/dejavu_test.py:219
↓ 1 callers
Function
init
Load config from a JSON file
dejavu.py:14
↓ 1 callers
Function
main
(seconds: int, results_folder: str, temp_folder: str, log: bool, silent: bool, log_file: str, padding
run_tests.py:15
↓ 1 callers
Function
parse_requirements
(requirements)
setup.py:4
↓ 1 callers
Method
process_recording
(self)
dejavu/logic/recognizer/microphone_recognizer.py:46
↓ 1 callers
Method
query
Returns all matching fingerprint entries associated with the given hash as parameter, if None is passed it returns all entries.
dejavu/base_classes/common_database.py:134
↓ 1 callers
Method
recognize_recording
(self)
dejavu/logic/recognizer/microphone_recognizer.py:61
↓ 1 callers
Method
return_matches
Searches the database for pairs of (hash, offset) values. :param hashes: A sequence of tuples in the format (hash, offset)
dejavu/base_classes/base_database.py:154
↓ 1 callers
Function
set_seed
`seed` as None means that the sampling will be random. Setting your own seed means that you can produce the same experiment over and ove
dejavu/tests/dejavu_test.py:182
↓ 1 callers
Method
setup
Called on creation or shortly afterwards.
dejavu/base_classes/base_database.py:30
↓ 1 callers
Method
setup
Called on creation or shortly afterwards.
dejavu/base_classes/common_database.py:29
↓ 1 callers
Method
start_recording
(self, channels=default_channels, samplerate=default_samplerate,
dejavu/logic/recognizer/microphone_recognizer.py:23
↓ 1 callers
Method
stop_recording
(self)
dejavu/logic/recognizer/microphone_recognizer.py:54
↓ 1 callers
Function
unique_hash
Small function to generate a hash to uniquely generate a file. Inspired by MD5 version here: http://stackoverflow.com/a/1131255/712997 W
dejavu/logic/decoder.py:13
Method
__enter__
(self)
dejavu/database_handler/postgres_database.py:200
Method
__enter__
(self)
dejavu/database_handler/mysql_database.py:187
Method
__exit__
(self, extype, exvalue, traceback)
dejavu/database_handler/postgres_database.py:207
Method
__exit__
(self, extype, exvalue, traceback)
dejavu/database_handler/mysql_database.py:191
Method
__getstate__
(self)
dejavu/database_handler/postgres_database.py:158
Method
__getstate__
(self)
dejavu/database_handler/mysql_database.py:145
Method
__init__
(self, config)
dejavu/__init__.py:22
Method
__init__
(self, **options)
dejavu/database_handler/postgres_database.py:134
Method
__init__
(self, **options)
dejavu/database_handler/mysql_database.py:121
Method
__init__
(self, dejavu)
dejavu/logic/recognizer/microphone_recognizer.py:13
Method
__init__
(self, dejavu)
dejavu/logic/recognizer/file_recognizer.py:11
Method
__init__
(self, folder, seconds)
dejavu/tests/dejavu_test.py:22
Method
__init__
(self, data, rate, sampwidth)
dejavu/third_party/wavio.py:111
Method
__init__
(self, dejavu)
dejavu/base_classes/base_recognizer.py:11
Method
__init__
(self)
dejavu/base_classes/base_database.py:13
Method
__init__
(self)
dejavu/base_classes/common_database.py:12
Method
__repr__
(self)
dejavu/third_party/wavio.py:116
Method
__setstate__
(self, state)
dejavu/database_handler/postgres_database.py:161
Method
__setstate__
(self, state)
dejavu/database_handler/mysql_database.py:148
Method
after_fork
(self)
dejavu/database_handler/postgres_database.py:139
Method
after_fork
(self)
dejavu/database_handler/mysql_database.py:126
Method
after_fork
Called after the database instance has been given to the new process This will be called in the new process.
dejavu/base_classes/base_database.py:22
Method
after_fork
Called after the database instance has been given to the new process This will be called in the new process.
dejavu/base_classes/common_database.py:21
Method
before_fork
Called before the database instance is given to the new process
dejavu/base_classes/base_database.py:16
Method
before_fork
Called before the database instance is given to the new process
dejavu/base_classes/common_database.py:15
Function
cursor
(**options)
dejavu/database_handler/postgres_database.py:167
Function
cursor
(**options)
dejavu/database_handler/mysql_database.py:154
Method
delete_songs_by_id
Deletes all audios given their ids. :param song_ids: song ids to delete from the database.
dejavu/__init__.py:58
Method
delete_songs_by_id
Given a list of song ids it deletes all songs specified and their corresponding fingerprints. :param song_ids: song ids to be delete
dejavu/base_classes/base_database.py:172
Method
delete_songs_by_id
Given a list of song ids it deletes all songs specified and their corresponding fingerprints. :param song_ids: song ids to be delete
dejavu/base_classes/common_database.py:220
Method
delete_unfingerprinted_songs
Called to remove any song entries that do not have any fingerprints associated with them.
dejavu/base_classes/base_database.py:44
Method
delete_unfingerprinted_songs
Called to remove any song entries that do not have any fingerprints associated with them.
dejavu/base_classes/common_database.py:48
Method
empty
Called when the database should be cleared of all data.
dejavu/base_classes/common_database.py:38
Function
find_files
Get all files that meet the specified extensions. :param path: path to a directory with audio files. :param extensions: file extensions
dejavu/logic/decoder.py:34
Method
get_fingerprinted_songs
To pull all fingerprinted songs from the database. :return: a list of fingerprinted audios from the database.
dejavu/__init__.py:50
Method
get_iterable_kv_pairs
Returns all fingerprints in the database. :return: a list containing all fingerprints stored in the db.
dejavu/base_classes/base_database.py:133
Method
get_iterable_kv_pairs
Returns all fingerprints in the database. :return: a list containing all fingerprints stored in the db.
dejavu/base_classes/common_database.py:149
Method
get_num_fingerprints
Returns the fingerprints' count stored. :return: the number of fingerprints in the database.
dejavu/base_classes/base_database.py:61
Method
get_num_fingerprints
Returns the fingerprints' count stored. :return: the number of fingerprints in the database.
dejavu/base_classes/common_database.py:68
Method
get_num_songs
Returns the song's count stored. :return: the amount of songs in the database.
dejavu/base_classes/base_database.py:52
Method
get_num_songs
Returns the song's count stored. :return: the amount of songs in the database.
dejavu/base_classes/common_database.py:56
Method
get_recorded_time
(self)
dejavu/logic/recognizer/microphone_recognizer.py:66
Method
get_song_by_id
Brings the song info from the database. :param song_id: song identifier. :return: a song by its identifier. Result must be a
dejavu/base_classes/common_database.py:99
Method
get_songs
Returns all fully fingerprinted songs in the database :return: a dictionary with the songs info.
dejavu/base_classes/common_database.py:89
Method
insert
Inserts a single fingerprint into the database. :param fingerprint: Part of a sha1 hash, in hexadecimal format :param song_i
dejavu/base_classes/base_database.py:98
next →
1–100 of 114, ranked by callers