zerodf
Functions
-
int main(int argc, char *argv[])
zerodf [ option ] bfile [ infile ]
-m int
order of coefficients \((0 \le M)\)
-p int
frame period \((1 \le P)\)
-i int
interpolation period \((0 \le I \le P/2)\)
-t
transpose filter
-k
filtering without gain
bfile str
double-type FIR filter coefficients
infile str
double-type input sequence
stdout
double-type output sequence
In the below example, an excitation signal generated from pitch information is passed through the standard form synthesis filter built from FIR filter coefficients.
excite < data.pitch | zerodf data.b > data.syn
- Parameters:
argc – [in] Number of arguments.
argv – [in] Argument vector.
- Returns:
0 on success, 1 on failure.
-
class AllZeroDigitalFilter
Apply all-zero digital filter for speech synthesis to signals.
The transfer function \(H(z)\) of an all-zero filter is
\[ H(z) = \displaystyle\sum_{m=0}^M b(m)z^{-m}, \]where \(M\) is the order of filter.Given the \(M\)-th order filter coefficients,
\[ \begin{array}{cccc} b(0), & b(1), & \ldots, & b(M), \end{array} \]an output signal is obtained by applying \(H(z)\) to an input signal in time domain.Public Functions
-
AllZeroDigitalFilter(int num_filter_order, bool transposition)
- Parameters:
num_filter_order – [in] Order of filter coefficients, \(M\).
transposition – [in] If true, use transposed form filter.
-
inline int GetNumFilterOrder() const
- Returns:
Order of coefficients.
-
inline bool IsTransposition() const
- Returns:
True if transposed form is used.
-
inline bool IsValid() const
- Returns:
True if this object is valid.
-
bool Run(const std::vector<double> &filter_coefficients, double filter_input, double *filter_output, AllZeroDigitalFilter::Buffer *buffer) const
- Parameters:
filter_coefficients – [in] \(M\)-th order FIR filter coefficients.
filter_input – [in] Input signal.
filter_output – [out] Output signal.
buffer – [inout] Buffer.
- Returns:
True on success, false on failure.
-
bool Run(const std::vector<double> &filter_coefficients, double *input_and_output, AllZeroDigitalFilter::Buffer *buffer) const
- Parameters:
filter_coefficients – [in] \(M\)-th order FIR filter coefficients.
input_and_output – [inout] Input/output signal.
buffer – [inout] Buffer.
- Returns:
True on success, false on failure.
-
class Buffer
Buffer for AllZeroDigitalFilter class.
-
AllZeroDigitalFilter(int num_filter_order, bool transposition)