    def __init__(self, datasets: Iterable[Dataset], full_audio_inference=False):
        """Concatenate a series of datasets with their random inference audio merged."""
        super().__init__(datasets)

        self.cfg = self.datasets[0].cfg

        self.metadata = []

        # Merge metadata
        for dataset in self.datasets:
            self.metadata += dataset.metadata

        # Merge random inference features
        if full_audio_inference:
            self.eval_audios = []
            self.eval_dataset_names = []
            if self.cfg.preprocess.use_mel:
                self.eval_mels = []
            if self.cfg.preprocess.use_frame_pitch:
                self.eval_pitchs = []
            for dataset in self.datasets:
                self.eval_audios.append(dataset.eval_audio)
                self.eval_dataset_names.append(dataset.get_dataset_name())
                if self.cfg.preprocess.use_mel:
                    self.eval_mels.append(dataset.eval_mel)
                if self.cfg.preprocess.use_frame_pitch:
                    self.eval_pitchs.append(dataset.eval_pitch)
Concatenate a series of datasets with their random inference audio merged.
models/codec/codec_dataset.py