core.models.audio.packed_audio#

Module Contents#

Classes#

PackedAudioEmbeddings

Flat valid audio embeddings with one length per source audio.

API#

class core.models.audio.packed_audio.PackedAudioEmbeddings#

Flat valid audio embeddings with one length per source audio.

embeddings: torch.Tensor#

None

lengths: torch.Tensor#

None

property cu_seqlens: torch.Tensor#

Return cumulative sequence lengths with a leading zero (int32).

pad_to_lengths(
target_lengths: torch.Tensor,
) core.models.audio.packed_audio.PackedAudioEmbeddings#

Zero-pad each packed embedding up to the given per-source target lengths.