dst#

diffsptk.DST#

alias of DiscreteSineTransform

class diffsptk.DiscreteSineTransform(dst_length)[source]#

Discrete sine transform module.

Parameters:
dst_lengthint >= 1

DST length, \(L\).

forward(x)[source]#

Apply DST to input.

Parameters:
xTensor [shape=(…, L)]

Input.

Returns:
outTensor [shape=(…, L)]

DST output.

Examples

>>> x = diffsptk.ramp(3)
>>> dst = diffsptk.DST(4)
>>> y = dst(x)
>>> y
tensor([ 2.7716, -2.0000,  1.1481, -1.0000])
diffsptk.functional.dst(x)[source]#

Compute DST.

Parameters:
xTensor [shape=(…, L)]

Input signal.

Returns:
outTensor [shape=(…, L)]

DST output.

See also

idst