gnorm#

class diffsptk.GeneralizedCepstrumGainNormalization(cep_order, gamma=0, c=None)[source]#

See this page for details.

Parameters:
cep_orderint >= 0

Order of cepstrum, \(M\).

gammafloat in [-1, 1]

Gamma, \(\gamma\).

cint >= 1 or None

Number of stages.

forward(x)[source]#

Perform cepstrum gain normalization.

Parameters:
xTensor [shape=(…, M+1)]

Generalized cepstrum.

Returns:
outTensor [shape=(…, M+1)]

Normalized generalized cepstrum.

Examples

>>> x = diffsptk.ramp(1, 4)
>>> gnorm = diffsptk.GeneralizedCepstrumGainNormalization(3, c=2)
>>> y = gnorm(x)
>>> y
tensor([2.2500, 1.3333, 2.0000, 2.6667])
diffsptk.functional.gnorm(x, gamma=0, c=None)[source]#

Perform cepstrum gain normalization.

Parameters:
xTensor [shape=(…, M+1)]

Generalized cepstrum.

gammafloat in [-1, 1]

Gamma, \(\gamma\).

cint >= 1 or None

Number of stages.

Returns:
outTensor [shape=(…, M+1)]

Normalized generalized cepstrum.

See also

ignorm mgc2mgc