Skip to main content

BigCodec

Python library for bigcodec. This is something that the author of bigcodec didn't do, so I'm doing it for him.

Setup

pip install bigcodec

Usage

import torch.accelerator
from bigcodec import BigCodec
import torchaudio

codec = BigCodec.from_pretrained("intexcp/bigcodec")

wav = torchaudio.load("enc.wav")[0]
wav = wav.unsqueeze(0)
device = torch.accelerator.current_accelerator().type if torch.accelerator.is_available() else "cpu"
codec = codec.to(device)
wav = wav.to(device)
with torch.no_grad():
    enc = codec.encode(wav)
    dec = codec.decode(enc)
print(enc)
torchaudio.save("dec.wav", dec.squeeze(0).cpu(), 16000, encoding="PCM_F")

Metadata

Release files for bigcodec 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bigcodec 0.0.3
File Size Uploaded Provenance Actions
bigcodec-0.0.3.tar.gz 8.1 kB Without provenance Details for bigcodec-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bigcodec 0.0.3
File Interpreter ABI Platform Actions
bigcodec-0.0.3-py3-none-any.whl Python 3 none any Details for bigcodec-0.0.3-py3-none-any.whl

Total release size: 16.1 kB

Release files / bigcodec-0.0.3.tar.gz

Download URL bigcodec-0.0.3.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
21a871937b8036522dfa550bd5937bd0e658869d4c4f76bf4312160ab15a0a75
BLAKE2b-256 checksum
How to use checksums
87ee10863bc3fe57027ca6e5c929de3e4a3e5c1d70127b1d77040c47d83d5a79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / bigcodec-0.0.3-py3-none-any.whl

Download URL bigcodec-0.0.3-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a18fa586ed01fc9fabcfb8311667778ae8e7959880e9dd583e8d782127fb69a6
BLAKE2b-256 checksum
How to use checksums
9480569c677c7402eebaf6b84099049fc3ba5e09cd4944d40166993ccbc96bd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Security for bigcodec 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page