espnet2.gan_tts.utils.get_random_segments.get_segments
Less than 1 minute
espnet2.gan_tts.utils.get_random_segments.get_segments
espnet2.gan_tts.utils.get_random_segments.get_segments(x: Tensor, start_idxs: Tensor, segment_size: int) → Tensor
Get segments.
- Parameters:
- x (Tensor) – Input tensor (B, C, T).
- start_idxs (Tensor) – Start index tensor (B,).
- segment_size (int) – Segment size.
- Returns: Segmented tensor (B, C, segment_size).
- Return type: Tensor