MCPcopy Create free account
hub / github.com/AlayaLab/Hive / load_full_audio

Method load_full_audio

infer_flowsep.py:68–73  ·  view source on GitHub ↗
(self, filename)

Source from the content-addressed store, hash-verified

66 return log_mel_spec
67
68 def load_full_audio(self, filename):
69 waveform, sr = torchaudio.load(filename)
70 if sr != self.sampling_rate:
71 waveform = torchaudio.functional.resample(waveform, sr, self.sampling_rate)
72 waveform = waveform.numpy()[0, ...]
73 return waveform
74
75 def preprocess_chunk(self, chunk):
76 chunk = chunk - np.mean(chunk)

Callers 1

mainFunction · 0.95

Calls 1

resampleMethod · 0.80

Tested by

no test coverage detected