nnmnkwii.postfilters.merlin_post_filter

nnmnkwii.postfilters.merlin_post_filter(mgc, alpha, minimum_phase_order=511, fftlen=1024, coef=1.4, weight=None)[source]

Post-filter used in Merlin.

This is a pysptk translation of Merlin’s post filter written with SPTK CLI tools.

Parameters:
  • mgc (2darray) – mel-generalized cepstrum
  • alpha (float) – all-pass constant
  • minimum_phase_order (int) – Order of minimum phase sequence
  • fftlen (int) – FFT length used to convert cepstrum to autocorrelation.
  • coef (float) – Weight coefficient to build weight vector. Default is 1.4.
  • weight ([optional]1darray) – Weight vector for scaling mel-generalized cepstrum. If None, set automatically by coef as in Merlin.
Returns:

Post-filtered mel-generalized cepstrum.

Return type:

2darray

Examples

>>> from nnmnkwii.postfilters import merlin_post_filter
>>> import numpy as np
>>> mgc = np.random.rand(100, 60)
>>> mgc_filtered = merlin_post_filter(mgc, 0.58)
>>> assert mgc.shape == mgc_filtered.shape

Todo

Reference paper.