MCPcopy
hub / github.com/Audio-AGI/AudioSep / spectrogram_phase

Method spectrogram_phase

models/base.py:83–88  ·  view source on GitHub ↗
(self, input, eps=0.)

Source from the content-addressed store, hash-verified

81 return torch.clamp(real ** 2 + imag ** 2, eps, np.inf) ** 0.5
82
83 def spectrogram_phase(self, input, eps=0.):
84 (real, imag) = self.stft(input)
85 mag = torch.clamp(real ** 2 + imag ** 2, eps, np.inf) ** 0.5
86 cos = real / mag
87 sin = imag / mag
88 return mag, cos, sin
89
90
91 def wav_to_spectrogram_phase(self, input, eps=1e-10):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected