MAEST
MAEST copied to clipboard
TypeError: While connecting VectorInput::data to FrameCutter::signal:
This code produced the following error
model = maest(arch="discogs-maest-30s-pw-73e-ts")
signal, sr = librosa.load(song_file, sr =16000)
activations, labels = model.predict_labels(signal)
TypeError Traceback (most recent call last) Cell In[12], line 1 ----> 1 activations, labels = model.predict_labels(signal)
File ~/MAEST/models/maest.py:881, in MAEST.predict_labels(self, x) 880 def predict_labels(self, x): --> 881 logits = self.forward(x)[0] 882 activations = nn.functional.softmax(logits, dim=-1) 883 activations = torch.mean(activations, dim=0)
File ~/MAEST/models/maest.py:830, in MAEST.forward(self, x, transformer_block, return_self_attention) 827 self.init_melspectrogram_extractor() 829 # extract melspec from raw audio --> 830 x = self.melspectrogram_extractor(x) 831 # normalize 832 x = (x - DISCOGS_MEAN) / (DISCOGS_STD * 2)
File ~/MAEST/models/helpers/melspectrogram_extractor.py:70, in MelSpectrogramExtractor.call(self, audio) 68 # set vector input and connect the network 69 vector_input = VectorInput(audio) ---> 70 vector_input.data >> self.frameCutter.signal 72 run(vector_input) 73 mel_bands = np.array(self.pool['mel_bands'])
File /opt/miniconda3/envs/jaage/lib/python3.8/site-packages/essentia/streaming.py:59, in _StreamConnector.rshift(left, right) 55 if not right.input_algo.hasInput(right.name): 56 raise NameError('The '%s' algorithm does not have a sink called '%s'' 57 %(right.input_algo.name(), right.name)) ---> 59 _essentia.connect(left.output_algo, left.name, 60 right.input_algo, right.name) 62 # update connections 63 left.output_algo.connections[left].append(right)
TypeError: While connecting VectorInput::data to FrameCutter::signal: You cannot connect more than one Source to a Sink: FrameCutter::signal is already connected to VectorInput::data`