Core SPTK API¶
All functionality in pysptk.sptk
is directly accesible from the top-level pysptk.*
namespace.
Note
Almost all of pysptk functions assume that the input array is C-contiguous and has float64
element type.
Library routines¶
agexp (r, x, y) |
Magnitude squared generalized exponential function |
gexp (r, x) |
Generalized exponential function |
glog (r, x) |
Generalized logarithmic function |
mseq () |
M-sequence |
Adaptive cepstrum analysis¶
acep (x, c[, lambda_coef, step, tau, pd, eps]) |
Adaptive cepstral analysis |
agcep (x, c[, stage, lambda_coef, step, tau, eps]) |
Adaptive generalized cepstral analysis |
amcep (x, b[, alpha, lambda_coef, step, tau, …]) |
Adaptive mel-cepstral analysis |
Mel-generalized cepstrum analysis¶
mcep (windowed[, order, alpha, miniter, …]) |
Mel-cepstrum analysis |
gcep (windowed[, order, gamma, miniter, …]) |
Generalized-cepstrum analysis |
mgcep (windowed[, order, alpha, gamma, …]) |
Mel-generalized cepstrum analysis |
uels (windowed[, order, miniter, maxiter, …]) |
Unbiased estimation of log spectrum |
fftcep (logsp[, order, num_iter, …]) |
FFT-based cepstrum analysis |
lpc (windowed[, order, min_det]) |
Linear prediction analysis |
LPC, LSP and PARCOR conversions¶
lpc2c (lpc[, order]) |
LPC to cepstrum |
lpc2lsp (lpc[, numsp, maxiter, eps, loggain, …]) |
LPC to LSP |
lpc2par (lpc) |
LPC to PARCOR |
par2lpc (par) |
PARCOR to LPC |
lsp2sp (lsp[, fftlen]) |
LSP to spectrum |
Mel-generalized cepstrum conversions¶
mc2b (mc[, alpha]) |
Mel-cepsrum to MLSA filter coefficients |
b2mc (b[, alpha]) |
MLSA filter coefficients to mel-cesptrum |
c2acr (c[, order, fftlen]) |
Cepstrum to autocorrelation |
c2ir (c[, length]) |
Cepstrum to impulse response |
ic2ir (h[, order]) |
Impulse response to cepstrum |
c2ndps (c[, fftlen]) |
Cepstrum to Negative Derivative of Phase Spectrum (NDPS) |
ndps2c (ndps[, order]) |
Cepstrum to Negative Derivative of Phase Spectrum (NDPS) |
gc2gc (src_ceps[, src_gamma, dst_order, …]) |
Generalized cepstrum transform |
gnorm (ceps[, gamma]) |
Gain normalization |
ignorm (ceps[, gamma]) |
Inverse gain normalization |
freqt (ceps[, order, alpha]) |
Frequency transform |
mgc2mgc (src_ceps[, src_alpha, src_gamma, …]) |
Mel-generalized cepstrum transform |
mgc2sp (ceps[, alpha, gamma, fftlen]) |
Mel-generalized cepstrum transform |
mgclsp2sp (lsp[, alpha, gamma, fftlen, gain]) |
MGC-LSP to spectrum |
F0 analysis¶
swipe (x, fs, hopsize[, min, max, threshold, …]) |
SWIPE’ - A Saw-tooth Waveform Inspired Pitch Estimation |
rapt (x, fs, hopsize[, min, max, voice_bias, …]) |
RAPT - a robust algorithm for pitch tracking |
Window functions¶
blackman (n[, normalize]) |
Blackman window |
hamming (n[, normalize]) |
Hamming window |
hanning (n[, normalize]) |
Hanning window |
bartlett (n[, normalize]) |
Bartlett window |
trapezoid (n[, normalize]) |
Trapezoid window |
rectangular (n[, normalize]) |
Rectangular window |
Waveform generation filters¶
poledf (x, a, delay) |
All-pole digital filter |
lmadf (x, b, pd, delay) |
LMA digital filter |
lspdf (x, f, delay) |
LSP synthesis digital filter |
ltcdf (x, k, delay) |
All-pole lattice digital filter |
glsadf (x, c, stage, delay) |
GLSA digital filter |
mlsadf (x, b, alpha, pd, delay) |
MLSA digital filter |
mglsadf (x, b, alpha, stage, delay) |
MGLSA digital filter |
Utilities for waveform generation filters¶
poledf_delay (order) |
Delay for poledf |
lmadf_delay (order, pd) |
Delay for lmadf |
lspdf_delay (order) |
Delay for lspdf |
ltcdf_delay (order) |
Delay for ltcdf |
glsadf_delay (order, stage) |
Delay for glsadf |
mlsadf_delay (order, pd) |
Delay for mlsadf |
mglsadf_delay (order, stage) |
Delay for mglsadf |