diff --git a/nn_fingerprint.py b/nn_fingerprint.py index 680fc23..709020a 100644 --- a/nn_fingerprint.py +++ b/nn_fingerprint.py @@ -115,7 +115,9 @@ class NNFingerprint(NNOperator): audio = numpy.vstack(frames).transpose() else: audio = numpy.hstack(frames) - audio = audio[None, :] + if len(audio.shape) == 1: + audio = audio[None, :] + assert len(audio.shape) == 2 audio = self.int2float(audio) if sr != self.params['sample_rate']: