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

Method __init__

app.py:31–47  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

29
30class FlowSepPreprocessor:
31 def __init__(self, config):
32 import utilities.audio as Audio
33
34 self.sampling_rate = config["preprocessing"]["audio"]["sampling_rate"]
35 self.duration = config["preprocessing"]["audio"]["duration"]
36 self.hopsize = config["preprocessing"]["stft"]["hop_length"]
37 self.target_length = int(self.duration * self.sampling_rate / self.hopsize)
38
39 self.STFT = Audio.stft.TacotronSTFT(
40 config["preprocessing"]["stft"]["filter_length"],
41 config["preprocessing"]["stft"]["hop_length"],
42 config["preprocessing"]["stft"]["win_length"],
43 config["preprocessing"]["mel"]["n_mel_channels"],
44 config["preprocessing"]["audio"]["sampling_rate"],
45 config["preprocessing"]["mel"]["mel_fmin"],
46 config["preprocessing"]["mel"]["mel_fmax"],
47 )
48
49 def read_wav_file(self, filename):
50 waveform, sr = torchaudio.load(filename)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected