Browse Source
Update accelerate
Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
1 changed files with
7 additions and
1 deletions
-
nn_fingerprint.py
|
@ -28,7 +28,12 @@ from towhee import register |
|
|
from towhee.types.audio_frame import AudioFrame |
|
|
from towhee.types.audio_frame import AudioFrame |
|
|
from towhee.models.nnfp import NNFp |
|
|
from towhee.models.nnfp import NNFp |
|
|
from towhee.models.utils.audio_preprocess import preprocess_wav, MelSpec |
|
|
from towhee.models.utils.audio_preprocess import preprocess_wav, MelSpec |
|
|
# from towhee.dc2 import accelerate |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try: |
|
|
|
|
|
from towhee import accelerate |
|
|
|
|
|
except: |
|
|
|
|
|
def accelerate(func): |
|
|
|
|
|
return func |
|
|
|
|
|
|
|
|
from .configs import default_params, hop25_params, distill_params |
|
|
from .configs import default_params, hop25_params, distill_params |
|
|
|
|
|
|
|
@ -81,6 +86,7 @@ class NNFingerprint(NNOperator): |
|
|
""" |
|
|
""" |
|
|
Audio embedding operator using Neural Network Fingerprint |
|
|
Audio embedding operator using Neural Network Fingerprint |
|
|
""" |
|
|
""" |
|
|
|
|
|
|
|
|
def __init__(self, |
|
|
def __init__(self, |
|
|
model_name: str = 'nnfp_default', |
|
|
model_name: str = 'nnfp_default', |
|
|
model_path: str = None, |
|
|
model_path: str = None, |
|
|