@torch.no_grad()
def full_band_crm_mask(self, noisy, inference_args):
    noisy_complex = self.torch_stft(noisy)
    (noisy_mag, _) = mag_phase(noisy_complex)
    noisy_mag = noisy_mag.unsqueeze(1)
    t1 = time.time()
    pred_crm = self.model(noisy_mag)
    t2 = time.time()
    pred_crm = pred_crm.permute(0, 2, 3, 1)
    pred_crm = decompress_cIRM(pred_crm)
    enhanced_real = ((pred_crm[(..., 0)] * noisy_complex.real) - (pred_crm[(..., 1)] * noisy_complex.imag))
    enhanced_imag = ((pred_crm[(..., 1)] * noisy_complex.real) + (pred_crm[(..., 0)] * noisy_complex.imag))
    enhanced_complex = torch.stack((enhanced_real, enhanced_imag), dim=(- 1))
    enhanced = self.torch_istft(enhanced_complex, length=noisy.size((- 1)))
    enhanced = enhanced.detach().squeeze(0).cpu().numpy()
    rtf = ((t2 - t1) / ((len(enhanced) * 1.0) / self.acoustic_config['sr']))
    print(f'model rtf: {rtf}')
    return enhanced
@torch.no_grad()
def full_band_crm_mask(self, noisy, inference_args):
    noisy_complex = self.torch_stft(noisy)
    (noisy_mag, _) = mag_phase(noisy_complex)
    noisy_mag = noisy_mag.unsqueeze(1)
    t1 = time.time()
    pred_crm = self.model(noisy_mag)
    t2 = time.time()
    pred_crm = pred_crm.permute(0, 2, 3, 1)
    pred_crm = decompress_cIRM(pred_crm)
    enhanced_real = ((pred_crm[(..., 0)] * noisy_complex.real) - (pred_crm[(..., 1)] * noisy_complex.imag))
    enhanced_imag = ((pred_crm[(..., 1)] * noisy_complex.real) + (pred_crm[(..., 0)] * noisy_complex.imag))
    enhanced_complex = torch.stack((enhanced_real, enhanced_imag), dim=(- 1))
    enhanced = self.torch_istft(enhanced_complex, length=noisy.size((- 1)))
    enhanced = enhanced.detach().squeeze(0).cpu().numpy()
    rtf = ((t2 - t1) / ((len(enhanced) * 1.0) / self.acoustic_config['sr']))
    print(f'model rtf: {rtf}')
    return enhanced