Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch inference #16

Open
LiuZH-19 opened this issue Dec 6, 2024 · 0 comments
Open

Batch inference #16

LiuZH-19 opened this issue Dec 6, 2024 · 0 comments

Comments

@LiuZH-19
Copy link

LiuZH-19 commented Dec 6, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant