Functions | |
def | window_sumsquare (window, n_frames, hop_length=200, win_length=800, n_fft=800, dtype=np.float32, norm=None) |
def | griffin_lim (magnitudes, stft_fn, n_iters=30) |
def | dynamic_range_compression (x, C=1, clip_val=1e-5) |
def | dynamic_range_decompression (x, C=1) |
def audio_processing.window_sumsquare | ( | window, | |
n_frames, | |||
hop_length = 200 , |
|||
win_length = 800 , |
|||
n_fft = 800 , |
|||
dtype = np.float32 , |
|||
norm = None |
|||
) |
# from librosa 0.6 Compute the sum-square envelope of a window function at a given hop length. This is used to estimate modulation effects induced by windowing observations in short-time fourier transforms. Parameters ---------- window : string, tuple, number, callable, or list-like Window specification, as in `get_window` n_frames : int > 0 The number of analysis frames hop_length : int > 0 The number of samples to advance between frames win_length : [optional] The length of the window function. By default, this matches `n_fft`. n_fft : int > 0 The length of each analysis frame. dtype : np.dtype The data type of the output Returns ------- wss : np.ndarray, shape=`(n_fft + hop_length * (n_frames - 1))` The sum-squared envelope of the window function
def audio_processing.griffin_lim | ( | magnitudes, | |
stft_fn, | |||
n_iters = 30 |
|||
) |
PARAMS ------ magnitudes: spectrogram magnitudes stft_fn: STFT class with transform (STFT) and inverse (ISTFT) methods
def audio_processing.dynamic_range_compression | ( | x, | |
C = 1 , |
|||
clip_val = 1e-5 |
|||
) |
PARAMS ------ C: compression factor
def audio_processing.dynamic_range_decompression | ( | x, | |
C = 1 |
|||
) |
PARAMS ------ C: compression factor used to compress