espnet2.tts.feats_extract.yin.differenceFunction_np
Less than 1 minute
espnet2.tts.feats_extract.yin.differenceFunction_np
espnet2.tts.feats_extract.yin.differenceFunction_np(x, N, tau_max)
Compute difference function of data x. This corresponds to equation (6) in [1].
This solution is implemented directly with Numpy fft.
espnet2.tts.feats_extract.yin.x
Audio data.
- Type: np.ndarray
espnet2.tts.feats_extract.yin.N
Length of data.
- Type: int
espnet2.tts.feats_extract.yin.tau_max
Integration window size.
Type: int
Parameters:
- x – Audio data as a NumPy array.
- N – Length of data.
- tau_max – Integration window size.
Returns: The computed difference function.
Return type: list
Examples
>>> x = np.array([0.0, 1.0, 2.0, 3.0])
>>> N = len(x)
>>> tau_max = 2
>>> difference_function_result = differenceFunction_np(x, N, tau_max)
NOTE
Ensure that the input audio data is a 1-dimensional NumPy array.