ndps2c

Functions

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

ndps2c [ option ] [ infile ]

  • -l int

    • FFT length \((2 \le L)\)

  • -m int

    • order of cepstrum \((0 \le M \le L/2)\)

  • infile str

    • double-type NDPS

  • stdout

    • double-type cepstrum

Parameters
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns

0 on success, 1 on failure.

See also

c2ndps

class sptk::NegativeDerivativeOfPhaseSpectrumToCepstrum

Convert negative derivative of phase spectrum to cepstral coefficients.

The input is the \((L/2+1)\)-length NDPS:

\[ \begin{array}{cccc} n(0), & n(1), & \ldots, & n(L/2+1), \end{array} \]
and the output is the \(M\)-th order cepstral coefficients:
\[ \begin{array}{cccc} 0, & c(1), & \ldots, & c(M). \end{array} \]
The cepstral coefficients are obtained by using the inverse DFT:
\[ c(m) = \frac{1}{mL} \sum_{k=0}^{L-1} n(k) e^{j2\pi mk / L}. \]

[1] B. Yegnanarayana, “Pole-zero decomposition of speech spectra,” Signal Processing, vol. 3, no. 1, pp. 5-17, 1981.

Public Functions

NegativeDerivativeOfPhaseSpectrumToCepstrum(int fft_length, int num_order)
Parameters
  • fft_length[in] Length of NDPS, \(L\).

  • num_order[in] Order of cepstrum, \(M\).

inline int GetFftLength() const
Returns

FFT length.

inline int GetNumOrder() const
Returns

Order of cepstrum.

inline bool IsValid() const
Returns

True if this object is valid.

bool Run(const std::vector<double> &negative_derivative_of_phase_spectrum, std::vector<double> *cepstrum, NegativeDerivativeOfPhaseSpectrumToCepstrum::Buffer *buffer) const
Parameters
  • negative_derivative_of_phase_spectrum[in] \((L/2+1)\)-length NDPS.

  • cepstrum[out] \(M\)-th order cepstrum.

  • buffer[out] Buffer.

Returns

True on success, false on failure.

class Buffer

Buffer for NegativeDerivativeOfPhaseSpectrumToCepstrum class.