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

21 lines
1.2 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.MaskAlongAxisIID
========================================
.. py:class:: mindspore.dataset.audio.MaskAlongAxisIID(mask_param, mask_value, axis)
对音频波形沿 `axis` 轴应用掩码。掩码的起始和长度由 `[mask_start, mask_start + mask_width)` 决定,其中 `mask_width``uniform[0, mask_param]` 中采样, `mask_start``uniform[0, max_length - mask_width]` 中采样,
`max_length` 是光谱图中特定轴的列数。
参数:
- **mask_param** (int) - 要屏蔽的列数,将从[0, mask_param]统一采样,必须是非负数。
- **mask_value** (float) - 填充到掩码区间的值。
- **axis** (int) - 要应用掩码的轴1表示频率2表示时间
异常:
- **TypeError** - 当 `mask_param` 的类型不为int。
- **ValueError** - 当 `mask_param` 为负数。
- **TypeError** - 当 `mask_value` 的类型不为float。
- **TypeError** - 当 `axis` 的类型不为int。
- **ValueError** - 当 `axis` 取值不在[1, 2]范围内。
- **RuntimeError** - 当输入音频的shape不为<..., freq, time>。