nnmnkwii.functions.modspec

nnmnkwii.functions.modspec(y, n=4096, norm=None)[source]

Modulation spectrum computation

Given an parameter trajectory (T x D), it computes modulation spectrum. Here we define modulation spectrum is power of discrete Fourier transform of parameter trajectory. See [R6] for example application.

[R6]Takamichi, Shinnosuke, et al. “A postfilter to modify the modulation spectrum in HMM-based speech synthesis.” Acoustics, Speech and Signal Processing (ICASSP), 2014 IEEE International Conference on. IEEE, 2014.
Parameters:
Returns:

Modulation spectrum as T x n//2 + 1 array.

Return type:

numpy.ndarray

Examples

>>> import numpy as np
>>> from nnmnkwii import functions as F
>>> generated = np.random.rand(10, 2)
>>> ms = F.modspec(generated, n=16)
>>> ms.shape
(9, 2)