Skip to content

Batch inference #16

@LiuZH-19

Description

@LiuZH-19

Hi,
I would like to inquire about performing batch inference using XCodec. Specifically, what is the expected shape of the wav input in the following code snippet ? Should the wav input be of shape [batch_size, 1, num_samples]?

    compressed = soundstream.encode(wav,   target_bw=args.bw)
    print(f"Compressed shape: {compressed.shape}")
    # Decode and save
    out = soundstream.decode(compressed)
    out = out.detach().cpu().squeeze(0)

Any clarification or examples would be greatly appreciated.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions