mirror of
https://github.com/correl/dejavu.git
synced 2024-11-23 11:09:52 +00:00
Updated readme and fixed a gramma error
This commit is contained in:
parent
27bf6b380b
commit
acca344f23
2 changed files with 10 additions and 8 deletions
16
README.md
16
README.md
|
@ -24,6 +24,8 @@ Second, you'll need to create a MySQL database where Dejavu can store fingerprin
|
||||||
|
|
||||||
Now you're ready to start fingerprinting your audio collection!
|
Now you're ready to start fingerprinting your audio collection!
|
||||||
|
|
||||||
|
Obs: The same from above goes for postgres database if you want to use it.
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -81,7 +83,7 @@ The following keys are mandatory:
|
||||||
The following keys are optional:
|
The following keys are optional:
|
||||||
|
|
||||||
* `fingerprint_limit`: allows you to control how many seconds of each audio file to fingerprint. Leaving out this key, or alternatively using `-1` and `None` will cause Dejavu to fingerprint the entire audio file. Default value is `None`.
|
* `fingerprint_limit`: allows you to control how many seconds of each audio file to fingerprint. Leaving out this key, or alternatively using `-1` and `None` will cause Dejavu to fingerprint the entire audio file. Default value is `None`.
|
||||||
* `database_type`: as of now, only `mysql` (the default value) is supported. If you'd like to subclass `Database` and add another, please fork and send a pull request!
|
* `database_type`: `mysql` (the default value) and `postgres` are supported. If you'd like to add another subclass for `BaseDatabase` and implement a new type of database, please fork and send a pull request!
|
||||||
|
|
||||||
An example configuration is as follows:
|
An example configuration is as follows:
|
||||||
|
|
||||||
|
@ -102,16 +104,16 @@ An example configuration is as follows:
|
||||||
|
|
||||||
## Tuning
|
## Tuning
|
||||||
|
|
||||||
Inside `fingerprint.py`, you may want to adjust following parameters (some values are given below).
|
Inside `config/settings.py`, you may want to adjust following parameters (some values are given below).
|
||||||
|
|
||||||
FINGERPRINT_REDUCTION = 30
|
FINGERPRINT_REDUCTION = 30
|
||||||
PEAK_SORT = False
|
PEAK_SORT = False
|
||||||
DEFAULT_OVERLAP_RATIO = 0.4
|
DEFAULT_OVERLAP_RATIO = 0.4
|
||||||
DEFAULT_FAN_VALUE = 10
|
DEFAULT_FAN_VALUE = 5
|
||||||
DEFAULT_AMP_MIN = 15
|
DEFAULT_AMP_MIN = 10
|
||||||
PEAK_NEIGHBORHOOD_SIZE = 30
|
PEAK_NEIGHBORHOOD_SIZE = 10
|
||||||
|
|
||||||
These parameters are described in the `fingerprint.py` in detail. Read that in-order to understand the impact of changing these values.
|
These parameters are described within the file in detail. Read that in-order to understand the impact of changing these values.
|
||||||
|
|
||||||
## Recognizing
|
## Recognizing
|
||||||
|
|
||||||
|
@ -123,7 +125,7 @@ Through the terminal:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ python dejavu.py --recognize file sometrack.wav
|
$ python dejavu.py --recognize file sometrack.wav
|
||||||
{'song_id': 1, 'song_name': 'Taylor Swift - Shake It Off', 'confidence': 3948, 'offset_seconds': 30.00018, 'match_time': 0.7159781455993652, 'offset': 646L}
|
{'total_time': 2.863781690597534, 'fingerprint_time': 2.4306554794311523, 'query_time': 0.4067542552947998, 'align_time': 0.007731199264526367, 'results': [{'song_id': 1, 'song_name': 'Taylor Swift - Shake It Off', 'input_total_hashes': 76168, 'fingerprinted_hashes_in_db': 4919, 'hashes_matched_in_input': 794, 'input_confidence': 0.01, 'fingerprinted_confidence': 0.16, 'offset': -924, 'offset_seconds': -30.00018, 'file_sha1': b'3DC269DF7B8DB9B30D2604DA80783155912593E8'}, {...}, ...]}
|
||||||
```
|
```
|
||||||
|
|
||||||
or in scripting, assuming you've already instantiated a Dejavu object:
|
or in scripting, assuming you've already instantiated a Dejavu object:
|
||||||
|
|
|
@ -121,7 +121,7 @@ class Dejavu:
|
||||||
def fingerprint_file(self, file_path: str, song_name: str = None) -> None:
|
def fingerprint_file(self, file_path: str, song_name: str = None) -> None:
|
||||||
"""
|
"""
|
||||||
Given a path to a file the method generates hashes for it and stores them in the database
|
Given a path to a file the method generates hashes for it and stores them in the database
|
||||||
for later being queried.
|
for later be queried.
|
||||||
|
|
||||||
:param file_path: path to the file.
|
:param file_path: path to the file.
|
||||||
:param song_name: song name associated to the audio file.
|
:param song_name: song name associated to the audio file.
|
||||||
|
|
Loading…
Reference in a new issue