    def _inference(self, eval_wave):
        """Inference during training for test audios."""
        z = self.model.encoder(
            eval_wave[None, None, ...].to(self.accelerator.device).float()
        )
        z, quantized, commitment_loss, codebook_loss, timbre = self.model.quantizer(
            z, eval_wave[None, None, ...], n_c=self.cfg.model_params.n_c_codebooks
        )
        full_pred_wave = self.model.decoder(z)
        return full_pred_wave[0]
Inference during training for test audios.
models/codec/facodec/facodec_trainer.py