mindspore/docs/api/api_python/dataset_audio/mindspore.dataset.audio.Gri...

25 lines
1.7 KiB
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.dataset.audio.GriffinLim
==================================
.. py:class:: mindspore.dataset.audio.GriffinLim(n_fft=400, n_iter=32, win_length=None, hop_length=None, window_type=WindowType.HANN, power=2, momentum=0.99, length=None, rand_init=True)
使用GriffinLim算法对音频波形进行近似幅度谱图反演。
.. math::
x(n)=\frac{\sum_{m=-\infty}^{\infty} w(m S-n) y_{w}(m S, n)}{\sum_{m=-\infty}^{\infty} w^{2}(m S-n)}
其中w表示窗口函数y表示每个帧的重建信号x表示整个信号。
参数:
- **n_fft** (int, 可选) - FFT的长度默认值400。
- **n_iter** (int, 可选) - 相位恢复的迭代次数默认值32。
- **win_length** (int, 可选) - GriffinLim的窗口大小默认值None将设置为 `n_fft` 的值。
- **hop_length** (int, 可选) - STFT窗口之间的跳数长度默认值None将设置为 `win_length//2`
- **window_type** (WindowType, 可选) - GriffinLim的窗口类型可以是WindowType.BARTLETT
WindowType.BLACKMANWindowType.HAMMINGWindowType.HANN或WindowType.KAISER。
默认值WindowType.HANN目前macOS上不支持kaiser窗口。
- **power** (float, 可选) - 幅度谱图的指数默认值2.0。
- **momentum** (float, 可选) - 快速Griffin-Lim的动量默认值0.99。
- **length** (int, 可选) - 预期输出波形的长度。默认值None将设置为stft矩阵的最后一个维度的值。
- **rand_init** (bool, 可选) - 随机相位初始化或全零相位初始化标志默认值True。