Commit graph

73 commits

Author SHA1 Message Date
Tyrone-Zhao
bfe0003551 change to print song_name and file_sha1 with 'utf8' encoding correctly 2018-09-22 15:32:11 +08:00
Tyrone-Zhao
b52b8ef7bd change all cursor's encoding to 'utf8' 2018-09-22 14:24:32 +08:00
Tyrone-Zhao
c124d53aff change cursor's encoding to 'utf8' 2018-09-22 14:12:11 +08:00
Will Drevo
254a79cdf5 Completed integration for SHA1 file hashing to avoid duplicates 2015-04-19 15:12:16 -04:00
Tyler Jones
27ed19b0f0 Files are now uniquely identified through a SHA1 hash, as opposed to
using the song name.
2015-03-28 18:36:51 -07:00
sg3510
2feecce34b updated docstring 2015-02-26 16:10:09 +00:00
sg3510
3a9e3a4da7 adding limit support 2015-02-26 14:33:41 +00:00
sg3510
2c961cc43f waive add 2015-02-26 14:24:44 +00:00
sg3510
8b200c39f7 adding wavio support 2015-02-26 14:20:52 +00:00
Will Drevo
dad98961f4 Offset cast to int, return is valid JSON. Fixes #67 2015-01-14 20:32:49 -05:00
Will Drevo
ece1c8b22e Fixes #65, fixes #60, merges #64 2014-12-15 21:30:33 -05:00
Saleem Ansari
4aabea7814 Refactor and update documentation for installation on Fedora 20+ 2014-11-28 22:56:22 +05:30
Saleem Ansari
2972dce6eb Arguments parser CLI, with all existing tests passed. 2014-11-28 05:21:04 +05:30
Saleem Ansari
4d2b91b052 Added tuning section to README.md. Removed trailing space from fingerprint.py 2014-11-28 03:58:52 +05:30
Will Drevo
684902f6b8 Now returns match offset into track in seconds 2014-11-21 01:21:08 -05:00
Will Drevo
60d9d6758e Added annotations for different fingerprinting parameters 2014-07-03 00:43:40 -04:00
Will Drevo
a779ca4cf9 Merging in new test suite with modifications, mp3 example files to test on, and shell files for automation 2014-07-03 00:26:50 -04:00
Will Drevo
7cbb894501 revamped testing script 2014-07-02 23:49:38 -04:00
Will Drevo
b966225ad4 refactored testing suite file to no longer depend on file naming convention 2014-07-01 20:24:53 -04:00
Fabio Costa
a97ab6d35c Update fingerprint.py 2014-06-26 09:13:30 +01:00
Fabio Costa
375189cf70 Update fingerprint.py 2014-06-25 10:01:43 +01:00
Fabio Costa
5805a676d2 Update fingerprint.py 2014-06-25 09:57:06 +01:00
Fabio Costa
35c536a372 Update fingerprint.py 2014-06-25 09:56:45 +01:00
worldveil
e1454bf1ea Incorporated MAX_HASH_TIME_DELTA optimization 2014-03-05 01:30:19 -05:00
worldveil
3c6b741db4 Merge branch 'patch-1' of https://github.com/suxianbaozi/dejavu 2014-03-05 01:29:18 -05:00
worldveil
c90d14fdd6 Fix to dejavu.py script, small edits, removal of unecessary printing 2014-03-05 01:28:34 -05:00
suxianbaozi
f41d036d45 fix #39
Make the two point for hash with little delta of time
2014-03-04 16:44:35 +08:00
worldveil
1e3dbe8eaf Formatting 2014-02-23 11:30:24 -05:00
worldveil
fec889db78 Merge branch 'patch-1' of https://github.com/suxianbaozi/dejavu 2014-02-23 11:29:29 -05:00
suxianbaozi
7cc178444e change the start of j val to 1
when j=0  ,i+j is alse equal to i,that will make so many same hashes from diffent songs
2014-02-21 15:29:46 +08:00
Bhuvanesh Kumar
ea748847ed fixed multiple issues to prevent refingerprinting songs in same dejavu instance
* fixed code to prevent refingerprinting song if it is already fingerprinted in fingerprint_file()
	* fixed code to prevent multiple fingerprinting of songs in same dejavu instance
2014-02-21 03:00:15 +05:30
Bhuvanesh Kumar
3fe99ac5c3 fixing fingerprinted column of songs table not getting updated to 1. 2014-02-21 01:13:42 +05:30
worldveil
eefcf0991c Corrected fingerprints table schema, fixes #26 2014-01-26 12:28:40 -05:00
Wessie
64a6161b90 Rewrote multiprocessing parts to only require one database connection
List of changes in detail:
- fingerprint_directory:
	Now uses mp.Pool.imap and updates database in callers
	process.
- fingerprint_file:
	Now uses _fingerprint_worker internally.
- _fingerprint_worker:
	Some slight changes to argument handling due to `imap`
	usage.

	Changed to return (song_name, hashes) where hashes is
	a set of hashes from all channels.
- path_to_songname:
	Changed to use `os.path.splitext`, this caused files with
	a period in their name to return the wrong name.
2014-01-20 20:53:25 +01:00
worldveil
cd7adc1485 Fixes #17 by adding configuration parameter for fingerprinting seconds, preserves this in FileRecognizer, and documents this in the README 2014-01-07 23:25:55 -05:00
worldveil
9eca3cc05a bugfixes and tweaks. also now returns offset of matched song 2013-12-25 02:56:43 -06:00
Wessie
7d14e0734a Switched fingerprint_directory to using multiprocessing.Pool
Fixed an issue of 'grouper' items being generators due to ifilter usage.
Temporary fix applied for the need of referencing SQLDatabase.FIELD_SONGNAME in __init__
Cleaned up some pep8 style issues
2013-12-23 14:59:08 +01:00
Wessie
e071804ea5 Fixed the issue of the default database not being imported.
Fixed a bug in the SQL database pertaining to the use of grouper.
Made SQLDatabase pickleable, for better multiprocessing support.
2013-12-21 12:01:05 +01:00
Wessie
f276efdf32 Cleaned up database.py
- Moved SQLDatabase to a SQL specific file
- Database class is now an abstract base class
- Cursor moved into SQL specific file
- Allowed for multi-database support in the future
2013-12-20 18:16:35 +01:00
Wessie
94c4cc0d95 Updated README for the changes to the interface.
Changed default value from None to 10 for the MicrophoneRecognizer.recognize
2013-12-19 01:34:04 +01:00
Wessie
292ddf029d Reversed expected variables to the correct position. 2013-12-19 01:22:27 +01:00
Wessie
29029238fc A fairly big batch of changes, blame me to forget committing
Changes in no particular order:
- Replaced all use cases of wavfile/wave and extract_channels with the new decoder.read function
- Added a 'recognize' method to the Dejavu class. This is a shortcut for recognizing songs.
- Renamed 'do_fingerprint' into 'fingerprint_directory'
- Removed parameters not required anymore from fingerprint_directory
- Cleaned up fingerprint.py
- Made fingerprint.generate_hashes a generator
- WaveFileRecognizer is now FileRecognizer and can take any formats supported by pydub
- Fixed MicrophoneRecognizer to actually run, previous version had many small mistakes
- Renamed 'fingerprint_worker' to '_fingerprint_worker' to signify it is not to be used publicly
- Moved 'chunkify' outside the Dejavu class
- Cleaned up pep8 styling mistakes in all edited files.
2013-12-19 00:54:17 +01:00
Wessie
7895bae23e Fixed any references to old converter to use the new functions.
- Reversed return values in decode.read
2013-12-18 18:15:57 +01:00
Wessie
8a7358d426 Added the fix for issue #13 in the original repository. 2013-12-18 18:11:23 +01:00
Wessie
7122e110d1 Cleaned up convert.py and renamed it to decode.py
- 'Converter' class removed
- 'ensure_folder' removed
- 'find_files' changed into a generator and made it work with spaces
- 'convert' renamed into 'read'
- 'convert' now handles any supported file by pydub
- 'convert' now returns the data instead of saving it to a file (same format as 'extract_channels')
- generic cleanup of formatting in the file
2013-12-18 18:02:07 +01:00
worldveil
48d7e8ecee small fixes to pguridi PR 2013-12-18 00:31:00 -06:00
Pedro Guridi
880af4a5b9 fixes #15, adds handling for KeyboardInterrupt. added some handling for #4, now skips file not sampled at 44100hz 2013-12-18 00:38:27 -03:00
Pedro Guridi
907637a633 fixes #9, now works well with spaces in filenames 2013-12-17 20:33:40 -03:00
Wessie
3b72768f94 Fixed various small things that weren't caught before.
- Fixes SQL queries for table creations
- Table creation is now down in reverse order to accompany the foreign key
- Fixed a typo in the BaseRecognizer that caused it to not work
- Changed configuration passed to Dejavu into a (nested) dictionary
2013-12-18 00:31:57 +01:00
Pedro Guridi
f3bdc34994 adds a config option to limit the input seconds for fingerprinting. 2013-12-17 20:21:59 -03:00