pnorm

Functions

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

pnorm [ option ] [ infile ]

  • -m int

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

  • -l int

    • length of impulse response \((2 \le L)\)

  • -a double

    • alpha \((|\alpha|<1)\)

  • infile str

    • double-type mel-cepstral coefficients

  • stdout

    • double-type power-normalized mel-cepstral coefficients

Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

ipnorm

class MelCepstrumPowerNormalization

Convert mel-cepstral coefficients to power-normalized ones.

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 are the \(M\)-th order power-normalized ones:
\[ \begin{array}{ccccc} \tilde{c}'(0), & \tilde{c}'(1), & \ldots, & \tilde{c}'(M), \end{array} \]
and \(\log P\) where \(P\) is the power and
\[\begin{split} \tilde{c}'(m) = \left\{ \begin{array}{ll} \tilde{c}(0) - \log \sqrt{P}, & m = 0 \\ \tilde{c}(m). & 1 \le m \le M \end{array} \right. \end{split}\]

Public Functions

MelCepstrumPowerNormalization(int num_order, int impulse_response_length, double alpha)
Parameters:
  • num_order[in] Order of coefficients, \(M\).

  • impulse_response_length[in] Length of impuse response.

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

inline int GetNumOrder() const
Returns:

Order of coefficients.

inline bool IsValid() const
Returns:

True if this object is valid.

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

  • power_normalized_mel_cepstrum[out] \(M\)-th order power-normalized mel-cepstral coefficients.

  • power[out] Logarithm of power.

  • buffer[out] Buffer.

Returns:

True on success, false on failure.

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

  • power[out] Logarithm of power.

  • buffer[out] Buffer.

Returns:

True on success, false on failure.

class Buffer

Buffer for MelCepstrumPowerNormalization class.