(self, input, eps=0.)
| 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): |
no outgoing calls
no test coverage detected