espnet2.enh.layers.beamformer.signal_framing
Less than 1 minute
espnet2.enh.layers.beamformer.signal_framing
espnet2.enh.layers.beamformer.signal_framing(signal: Tensor | ComplexTensor, frame_length: int, frame_step: int, bdelay: int, do_padding: bool = False, pad_value: int = 0, indices: List | None = None) → Tensor | ComplexTensor
Expand signal into several frames, with each frame of length frame_length.
- Parameters:
- signal – (…, T)
- frame_length – length of each segment
- frame_step – step for selecting frames
- bdelay – delay for WPD
- do_padding – whether or not to pad the input signal at the beginning of the time dimension
- pad_value – value to fill in the padding
- Returns: if do_padding: (…, T, frame_length) else: (…, T - bdelay - frame_length + 2, frame_length)
- Return type: torch.Tensor