Skip to content

Commit

Permalink
Remove normalize code from transform __init__
Browse files Browse the repository at this point in the history
This code is part of module_normalize now.
  • Loading branch information
tglarner committed Dec 5, 2019
1 parent 262b61e commit 5dd2860
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions paderbox/transform/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,13 @@
get_stft_center_frequencies,
)

import numpy as np
from paderbox.transform.module_resample import resample_sox


def normalize_mean_variance(data, axis=0, eps=1e-6):
""" Normalize features.
from .module_filter import (
preemphasis,
inverse_preemphasis,
offset_compensation,
preemphasis_with_offset_compensation,
)

:param data: Any feature
:param axis: Time dimensions, default is 0
:return: Normalized observation
"""
return (data - np.mean(data, axis=axis, keepdims=True)) /\
(np.std(data, axis=axis, keepdims=True) + eps)
from .module_fbank import fbank, logfbank
from .module_mfcc import mfcc, mfcc_velocity_acceleration
from .module_normalize import normalize_mean_variance
Expand Down

0 comments on commit 5dd2860

Please sign in to comment.