-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEngine.py
More file actions
35 lines (28 loc) · 797 Bytes
/
Engine.py
File metadata and controls
35 lines (28 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from abc import ABC, abstractmethod
class Engine(ABC):
@abstractmethod
def extract_fingerprints(self, audiotrack):
"""Extracts a feature from an audiotrack saved in file_path and returns an array of samples
Parameters
----------
audiotrack : Audiotrack
"""
pass
@abstractmethod
def compare(self, lhs, rhs):
"""Compares two fingerprints
Parameters
----------
lhs : Fingerprint
rhs : Fingerprint
"""
pass
@abstractmethod
def find_matches(self, audiotrack, top_k):
"""Finds the top_k most similar audiotracks for the reference audiotrack
Parameters
----------
audiotrack : Audiotrack
top_K : integer
"""
pass