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

17 lines
853 B
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.Fade
============================
.. py:class:: mindspore.dataset.audio.Fade(fade_in_len=0, fade_out_len=0, fade_shape=FadeShape.LINEAR)
向波形添加淡入和/或淡出。
参数:
- **fade_in_len** (int, 可选) - 淡入长度时间帧必须是非负。默认值0。
- **fade_out_len** (int, 可选) - 淡出长度时间帧必须是非负。默认值0。
- **fade_shape** (FadeShape, 可选) - 淡入淡出形状可以是FadeShape.QUARTER_SINE、FadeShape.HALF_SINE、
FadeShape.LINEAR、FadeShape.LOGARITHMIC或FadeShape.EXPONENTIAL中的一个。默认值FadeShape.LINEAR。
异常:
- **RuntimeError** - 如果 `fade_in_len` 超过音频波形长度。
- **RuntimeError** - 如果 `fade_out_len` 超过音频波形长度。