def __init__(self, config=None): super().__init__(config=config) assert self.audio_featurizer.feat is not None assert self.hparams.audio_config is not None params_func = self.audio_featurizer.feat.params params = params_func(self.hparams.audio_config) energy_config = { "type": "Framepow", "window_length": params.window_length, "frame_length": params.frame_length, "remove_dc_offset": params.remove_dc_offset } self.energy_featurizer = AudioFeaturizer(energy_config) pitch_config = { "type": "Pitch", "window_length": params.window_length, "frame_length": params.frame_length, "preEph_coeff": params.preEph_coeff, "upper_frequency_limit": params.upper_frequency_limit } self.pitch_featurizer = AudioFeaturizer(pitch_config) self.frame_length = params.frame_length self.speakers_dict = {} self.speakers_ids_dict = {} self.text_featurizer = TextFeaturizer(self.hparams.text_config) if self.hparams.data_csv is not None: self.preprocess_data(self.hparams.data_csv)
def __init__(self, config=None): super().__init__() # hparams self.hparams = register_and_parse_hparams(self.default_config, config, cls=self.__class__) logging.info("hparams: {}".format(self.hparams)) self.audio_featurizer = AudioFeaturizer(self.hparams.audio_config) self.feature_normalizer = FeatureNormalizer(self.hparams.cmvn_file)
def __init__(self, config=None): super().__init__() # hparams self.hparams = register_and_parse_hparams( self.default_config, config, cls=self.__class__) logging.info("hparams: {}".format(self.hparams)) self.audio_featurizer = AudioFeaturizer(self.hparams.audio_config) self.feature_normalizer = FeatureNormalizer(self.hparams.cmvn_file) self.text_featurizer = TextFeaturizer(self.hparams.text_config) if self.hparams.data_scps_dir is not None: self.load_scps(self.hparams.data_scps_dir)
def __init__(self, config=None): super().__init__() # hparams self.hparams = register_and_parse_hparams(self.default_config, config, cls=self.__class__) logging.info("hparams: {}".format(self.hparams)) self.audio_featurizer = AudioFeaturizer(self.hparams.audio_config) self.feature_normalizer = FeatureNormalizer(self.hparams.cmvn_file) self.entries = [] self.speakers = [] if self.hparams.data_csv is not None: self.load_csv(self.hparams.data_csv)
def __init__(self, config=None): super().__init__(config=config) self.speakers = [] self.audio_featurizer = AudioFeaturizer(self.hparams.audio_config) self.spectrum_augmenter = SpecAugment(self.hparams.spec_augment_config) self.feature_normalizer = FeatureNormalizer(self.hparams.cmvn_file)