logo
Browse Source

Fix for mono input

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 2 years ago
parent
commit
4159c67497
  1. 2
      nn_fingerprint.py

2
nn_fingerprint.py

@ -115,7 +115,9 @@ class NNFingerprint(NNOperator):
audio = numpy.vstack(frames).transpose() audio = numpy.vstack(frames).transpose()
else: else:
audio = numpy.hstack(frames) audio = numpy.hstack(frames)
if len(audio.shape) == 1:
audio = audio[None, :] audio = audio[None, :]
assert len(audio.shape) == 2
audio = self.int2float(audio) audio = self.int2float(audio)
if sr != self.params['sample_rate']: if sr != self.params['sample_rate']:

Loading…
Cancel
Save