Registry / ai-ml / bigvgan

bigvgan

JSON →
library2.4.1pypypi✓ verified 84d ago

BigVGAN is a universal neural vocoder with large-scale training. The current version is 2.4.1, with active development and monthly releases.

pip install bigvgan
INSTALL
IMPORT
SIG · BIGVGAN
B
bigvgan
ai-mlpythonv2.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BigVGAN
from bigvgan import BigVGAN
load_checkpoint
from bigvgan.utils import load_checkpoint
from bigvgan import load_checkpoint
load_checkpoint is in bigvgan.utils in v2.4+

Load a pretrained BigVGAN model and generate audio from a mel-spectrogram.

import torch from bigvgan import BigVGAN from bigvgan.utils import load_checkpoint model = BigVGAN() checkpoint = 'path/to/checkpoint.pt' load_checkpoint(model, checkpoint) model.eval() # Generate audio mel = torch.randn(1, 80, 64) # Example mel-spectrogram with torch.no_grad(): audio = model(mel) # Returns waveform tensor
Debug
Known issues
breakingIn version 2.4.0, the checkpoint loading API changed from `from bigvgan import load_checkpoint` to `from bigvgan.utils import load_checkpoint`.
fix
Update import statement to `from bigvgan.utils import load_checkpoint`.
affects: >=2.4.0,<2.5
deprecated`BigVGAN.from_pretrained` is deprecated in v2.4 and will be removed in v2.5.
fix
Use `BigVGAN()` and `load_checkpoint` instead.
affects: >=2.4,<2.5
gotchaThe input mel-spectrogram must have the correct number of bins (80 by default). Using 128 bins from HiFi-GAN will cause shape mismatch errors.
fix
Ensure mel-spectrogram has 80 bins or adjust model configuration.
affects: >=2.0
Errors
Common errors & fixes
RuntimeError: Given groups=1, weight of size [32, 256, 7], expected input[1, 128, 64] to have 256 channels, but got 128 channels instead
Input mel-spectrogram has wrong number of channels (e.g., 128 instead of 80).
fix
Reshape or generate mel with 80 bins. Example: `mel = librosa.feature.melspectrogram(y=y, sr=sr, n_mels=80)`.
ModuleNotFoundError: No module named 'bigvgan.utils'
Using an older version of bigvgan (< 2.4.0) where the utilities were in a different module.
fix
Upgrade to latest version: `pip install --upgrade bigvgan`. For older versions, import from `bigvgan` directly.
AttributeError: 'BigVGAN' object has no attribute 'from_pretrained'
Attempting to use deprecated `from_pretrained` method removed in v2.5.
fix
Use `model = BigVGAN()` and load checkpoint manually with `load_checkpoint(model, path)`.
Upgrade
Version history
2.4.1latest on PyPI · released Oct 27, 2024
Audit
Dependencies
torchrequiredCore dependency for neural network operations
numpyrequiredAudio processing and array operations
scipyoptionalSignal processing utilities
Agent activity
16 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources

No resource links recorded.

bigvgan — pip install bigvgan · libregistry