From 40e50931dace032d93955e41dff8bfca8ecff15e Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Thu, 30 Mar 2023 10:58:40 +0800 Subject: [PATCH] Update accelerate Signed-off-by: Jael Gu --- nn_fingerprint.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nn_fingerprint.py b/nn_fingerprint.py index 44e8dc9..1cf86b3 100644 --- a/nn_fingerprint.py +++ b/nn_fingerprint.py @@ -28,7 +28,12 @@ from towhee import register from towhee.types.audio_frame import AudioFrame from towhee.models.nnfp import NNFp 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 @@ -81,6 +86,7 @@ class NNFingerprint(NNOperator): """ Audio embedding operator using Neural Network Fingerprint """ + def __init__(self, model_name: str = 'nnfp_default', model_path: str = None,