Browse Source
Update
Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
1 changed files with
0 additions and
6 deletions
-
clmr_magnatagatune.py
|
@ -72,12 +72,6 @@ class ClmrMagnatagatune(NNOperator): |
|
|
self.model.to(self.device) |
|
|
self.model.to(self.device) |
|
|
|
|
|
|
|
|
def __call__(self, data: List[AudioFrame]) -> numpy.ndarray: |
|
|
def __call__(self, data: List[AudioFrame]) -> numpy.ndarray: |
|
|
audio_tensors = self.preprocess(data).to(self.device) |
|
|
|
|
|
features = self.model(audio_tensors) |
|
|
|
|
|
outs = features.to("cpu") |
|
|
|
|
|
return outs.detach().numpy() |
|
|
|
|
|
|
|
|
|
|
|
def preprocess(self, data: List[AudioFrame]) -> numpy.ndarray: |
|
|
|
|
|
_sr = 22050 |
|
|
_sr = 22050 |
|
|
audio_length = 59049 |
|
|
audio_length = 59049 |
|
|
|
|
|
|
|
|