def __init__(
        self,
        sample_rate=16000,
        frame_ms=25,
        stride_ms=10,
        num_feature_bins=80,
        feature_type="log_mel_spectrogram",
        preemphasis=0.97,
        pad_end=True,
        use_librosa_like_stft=False,
        epsilon=1e-6,
        lower_edge_hertz=0.0,
        upper_edge_hertz=8000.0,
        log_base="e",  # "10", "e"
        nfft=512,
        normalize_signal=False,
        normalize_zscore=False,
        normalize_min_max=False,
        padding=0,
        augmentation_config={},
        **kwargs,
    ):
        """
        Audio Features Extraction Keras Layer

        Parameters
        ----------
        sample_rate : int, optional
            Sample rate of audio signals in Hz, by default 16000
        frame_ms : int, optional
            Amount of data grabbed for each frame during analysis in ms, by default 25
        stride_ms : int, optional
            Number of ms to jump between frames, by default 10
        num_feature_bins : int, optional
            Number of bins in the feature output, by default 80
        feature_type : str, optional
            Type of feature extraction, by default "log_mel_spectrogram"
        preemphasis : float, optional
            The first-order filter coefficient used for preemphasis, when it is 0.0, preemphasis is turned off, by default 0.0
        pad_end : bool, optional
            Whether to pad the end of `signals` with zeros when framing produces a frame that lies partially past its end, by default True
        use_librosa_like_stft : bool, optional
            Use librosa like stft, by default False
        epsilon : float, optional
            Epsilon value to avoid log(0.0) causes Inf, by default 1e-6
        lower_edge_hertz : float, optional
            The lowest frequency of the feature analysis, by default 125.0
        upper_edge_hertz : float, optional
            The highest frequency of the feature analysis, by default 8000.0
        log_base : str, optional
            The base of logarithm, by default 'e'
        nfft : int, optional
            NFFT, if None, equals frame_length derived from frame_ms, by default None
        normalize_signal : bool, optional
            Normalize signals to [-1,1] range, by default False
        normalize_zscore : bool, optional
            Normalize features using z-score, by default False
        normalize_min_max : bool, optional
            Normalize features as (value - min) / (max - min), by default True
        padding : int, optional
            Number of samples to pad with 0 before feature extraction, by default 0
        augmentation_config : dict, optional
            Dictionary of augmentation config for training
        """
        assert feature_type in asdict(FEATURE_TYPES()).values(), f"feature_type must be in {asdict(FEATURE_TYPES()).values()}"

        super().__init__(name=feature_type, **kwargs)
        self.sample_rate = sample_rate

        self.frame_ms = frame_ms
        self.frame_length = int(round(self.sample_rate * self.frame_ms / 1000.0))

        self.stride_ms = stride_ms
        self.frame_step = int(round(self.sample_rate * self.stride_ms / 1000.0))

        self.num_feature_bins = num_feature_bins

        self.feature_type = feature_type

        self.preemphasis = preemphasis

        self.pad_end = pad_end

        self.use_librosa_like_stft = use_librosa_like_stft

        # fmt: off
        self.epsilon = epsilon
        assert self.epsilon > 1e-9 and self.epsilon <= 0.001, "epsilon must be in (1e-9, 0.001]"
        # fmt: on

        self.lower_edge_hertz = lower_edge_hertz
        self.upper_edge_hertz = upper_edge_hertz

        self.log_base = log_base
        assert self.log_base in ("10", "e"), "log_base must be '10' or 'e'"

        self._normalize_signal = normalize_signal
        self._normalize_zscore = normalize_zscore
        self._normalize_min_max = normalize_min_max

        self.padding = padding
        self.nfft = self.frame_length if nfft is None else nfft

        self.augmentations = Augmentation(augmentation_config)

        Audio Features Extraction Keras Layer

        Parameters
        ----------
        sample_rate : int, optional
            Sample rate of audio signals in Hz, by default 16000
        frame_ms : int, optional
            Amount of data grabbed for each frame during analysis in ms, by default 25
        stride_ms : int, optional
            Number of ms to jump between frames, by default 10
        num_feature_bins : int, optional
            Number of bins in the feature output, by default 80
        feature_type : str, optional
            Type of feature extraction, by default "log_mel_spectrogram"
        preemphasis : float, optional
            The first-order filter coefficient used for preemphasis, when it is 0.0, preemphasis is turned off, by default 0.0
        pad_end : bool, optional
            Whether to pad the end of `signals` with zeros when framing produces a frame that lies partially past its end, by default True
        use_librosa_like_stft : bool, optional
            Use librosa like stft, by default False
        epsilon : float, optional
            Epsilon value to avoid log(0.0) causes Inf, by default 1e-6
        lower_edge_hertz : float, optional
            The lowest frequency of the feature analysis, by default 125.0
        upper_edge_hertz : float, optional
            The highest frequency of the feature analysis, by default 8000.0
        log_base : str, optional
            The base of logarithm, by default 'e'
        nfft : int, optional
            NFFT, if None, equals frame_length derived from frame_ms, by default None
        normalize_signal : bool, optional
            Normalize signals to [-1,1] range, by default False
        normalize_zscore : bool, optional
            Normalize features using z-score, by default False
        normalize_min_max : bool, optional
            Normalize features as (value - min) / (max - min), by default True
        padding : int, optional
            Number of samples to pad with 0 before feature extraction, by default 0
        augmentation_config : dict, optional
            Dictionary of augmentation config for training
        
tensorflow_asr/models/layers/feature_extraction.py