High-level interface for waveform synthesis¶
Module pysptk.synthesis
provides high-leve interface that wraps low-level
SPTK waveform synthesis functions (e.g. mlsadf
),
Synthesizer¶
-
class
pysptk.synthesis.
Synthesizer
(filt, hopsize)¶ Speech waveform synthesizer
Attributes: - filt : SynthesisFilter
A speech synthesis filter
- hopsize : int
Hop size
-
synthesis
(source, b)¶ Synthesize a waveform given a source excitation and sequence of filter coefficients (e.g. cepstrum).
Parameters: - source : array
Source excitation
- b : array
Filter coefficients
Returns: - y : array, shape (same as
source
) Synthesized waveform
-
synthesis_one_frame
(source, prev_b, curr_b)¶ Synthesize one frame waveform
Parameters: - source : array
Source excitation
- prev_b : array
Filter coefficients of previous frame
- curr_b : array
Filter coefficients of current frame
Returns: - y : array
Synthesized waveform
SynthesisFilters¶
LMADF¶
-
class
pysptk.synthesis.
LMADF
(order=25, pd=4)¶ LMA digital filter that wraps
lmadf
Attributes: - pd : int
Order of pade approximation. Default is 4.
- delay : array
Delay
-
filt
(x, coef)¶ Filter one sample using using
lmadf
Parameters: - x : float
A input sample
- coef: array
LMA filter coefficients (i.e. Cepstrum)
Returns: - y : float
A filtered sample
See also
MLSADF¶
-
class
pysptk.synthesis.
MLSADF
(order=25, alpha=0.35, pd=4)¶ MLSA digital filter that wraps
mlsadf
Attributes: - alpha : float
All-pass constant
- pd : int
Order of pade approximation. Default is 4.
- delay : array
Delay
-
filt
(x, coef)¶ Filter one sample using
mlsadf
Parameters: - x : float
A input sample
- coef: array
MLSA filter coefficients
Returns: - y : float
A filtered sample
See also
MGLSADF¶
-
class
pysptk.synthesis.
MGLSADF
(order=25, alpha=0.35, stage=1)¶ MGLSA digital filter that wraps
mglsadf
Attributes: - alpha : float
All-pass constant
- stage : int
-1/gamma
- delay : array
Delay
-
filt
(x, coef)¶ Filter one sample using
mglsadf
Parameters: - x : float
A input sample
- coef: array
MGLSA filter coefficients
Returns: - y : float
A filtered sample
See also
AllPoleDF¶
AllPoleLatticeDF¶
-
class
pysptk.synthesis.
AllPoleLatticeDF
(order=25)¶ All-pole lttice digital filter that wraps
ltcdf
Attributes: - delay : array
Delay
-
filt
(x, coef)¶ Filter one sample using using
ltcdf
Parameters: - x : float
A input sample
- coef: array
PARCOR coefficients (with loggain)
Returns: - y : float
A filtered sample
See also