mcpf

Functions

int main(int argc, char *argv[])

mcpf [ option ] [ infile ]

  • -m int

    • order of mel-cepstral coefficients \((0 \le M < L)\)

  • -l int

    • length of impulse response \((M < L)\)

  • -s int

    • onset index \((0 \le S \le M)\)

  • -a double

    • all-pass constant \((|\alpha| < 1)\)

  • -b double

    • intensity \((\beta)\)

  • infile str

    • double-type mel-cepstral coefficients

  • stdout

    • double-type postfiltered mel-cepstral coefficients

Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

mgcep amgcep

class MelCepstrumPostfilter

Emphasize formant in mel-cepstum domain.

The input is the \(M\)-th order mel-cepstral coefficients:

\[ \begin{array}{cccc} \tilde{c}(0), & \tilde{c}(1), & \ldots, & \tilde{c}(M), \end{array} \]
and the output is the \(M\)-th order postfiltered ones:
\[ \begin{array}{cccc} \tilde{c}_\beta(0), & \tilde{c}_\beta(1), & \ldots, & \tilde{c}_\beta(M), \end{array} \]
where \(\beta\) is the intensity of postfiltering. Note if \(\beta=0\), postfiltering is not performed.

[1] T. Yoshimura, K. Tokuda, T. Masuko, and T. Kobayashi, “Incorporating a mixed excitation model and postfilter into HMM-based text-to-speech synthesis,” Systems and Computers in Japan, vol. 36, no. 12, pp. 43-50, 2005.

Public Functions

MelCepstrumPostfilter(int num_order, int impulse_response_length, int onset_index, double alpha, double beta)
Parameters:
  • num_order[in] Order of mel-cepstral coefficients, \(M\).

  • impulse_response_length[in] Length of impulse response, \(L\).

  • onset_index[in] This is typically set to two, i.e., 0th and 1st mel-cepstral coefficients are not emphasized.

  • alpha[in] All-pass constant, \(\alpha\).

  • beta[in] Intensity of postfiltering, \(\beta\).

inline int GetNumOrder() const
Returns:

Order of mel-cepstral coefficients.

inline int GetImpulseResponseLength() const
Returns:

Impulse response length.

inline int GetOnsetIndex() const
Returns:

Onset index.

inline double GetAlpha() const
Returns:

Alpha.

inline double GetBeta() const
Returns:

Beta.

inline bool IsValid() const
Returns:

True if this object is valid.

bool Run(const std::vector<double> &mel_cepstrum, std::vector<double> *postfiltered_mel_cepstrum, MelCepstrumPostfilter::Buffer *buffer) const
Parameters:
  • mel_cepstrum[in] \(M\)-th order mel-cepstral coefficients.

  • postfiltered_mel_cepstrum[out] \(M\)-th order postfiltered ones.

  • buffer[out] Buffer.

Returns:

True on success, false on failure.

bool Run(std::vector<double> *input_and_output, MelCepstrumPostfilter::Buffer *buffer) const
Parameters:
  • input_and_output[inout] \(M\)-th order mel-cepstral coefficients.

  • buffer[out] Buffer.

Returns:

True on success, false on failure.

class Buffer

Buffer for MelCepstrumPostfilter class.