An unofficial minimal package for using BigVGAN at inference time
Project description
BigVGAN Inference
An unofficial minimal package for using BigVGAN at inference time
Installation
pip install bigvganinference
or install from source:
git clone https://github.com/thunn/BigVGANInference.git
cd BigVGANInference
poetry install
Usage
Loading model is as simple as:
from bigvganinference import BigVGANInference
# -- model loading ---
# model is loaded, set to eval and weight norm is removed
model = BigVGANInference.from_pretrained(
'nvidia/BigVGAN-V2-44KHZ-128BAND-512X', use_cuda_kernel=False
)
# also supports loading from local directory
model = BigVGANInference.from_pretrained(
"path/to/local/model", use_cuda_kernel=False
)
# --- usage example ---
path_to_audio = "path/to/audio.wav"
wav, sr = librosa.load(path_to_audio, sr=model.h.sampling_rate, mono=True)
# get mel spectrogram using bigvgan's implementation
mel = model.get_mel_spectrogram(wav)
# generate waveform from mel
# note: torch.inference_mode() is used internally
output_audio = model(input_mel)
See the example for full usage example.
Acknowledgements
This is an unofficial implementation based on original BigVGAN repository.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bigvganinference-0.0.3.tar.gz.
File metadata
- Download URL: bigvganinference-0.0.3.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2eb998ac17e5fa275b3a46f6253881f0752a37648c3fc50c34128c41dbae0e6
|
|
| MD5 |
94b5fb893bfe578dae5af85c6cc9de6b
|
|
| BLAKE2b-256 |
23440c1c7b74f87bef7446d590b1237e5547f356fef163e82271825833b13ce2
|
Provenance
The following attestation bundles were made for bigvganinference-0.0.3.tar.gz:
Publisher:
build-package.yaml on thunn/BigVGANInference
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bigvganinference-0.0.3.tar.gz -
Subject digest:
d2eb998ac17e5fa275b3a46f6253881f0752a37648c3fc50c34128c41dbae0e6 - Sigstore transparency entry: 151481036
- Sigstore integration time:
-
Permalink:
thunn/BigVGANInference@a4cb2c77feb9472c7310ecdb3a55239e841a7695 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/thunn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-package.yaml@a4cb2c77feb9472c7310ecdb3a55239e841a7695 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bigvganinference-0.0.3-py3-none-any.whl.
File metadata
- Download URL: bigvganinference-0.0.3-py3-none-any.whl
- Upload date:
- Size: 24.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
290cbe4077e08230ce7ee67998f7ec527543efee15b7c3ae016bb0eb3dd81b2e
|
|
| MD5 |
b7fecc56a70de8234014c863d2deccdc
|
|
| BLAKE2b-256 |
54754ccf5db5f1763318e91bfd1461f952d4c554f45a81182d2c1eb7bc52bb73
|
Provenance
The following attestation bundles were made for bigvganinference-0.0.3-py3-none-any.whl:
Publisher:
build-package.yaml on thunn/BigVGANInference
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bigvganinference-0.0.3-py3-none-any.whl -
Subject digest:
290cbe4077e08230ce7ee67998f7ec527543efee15b7c3ae016bb0eb3dd81b2e - Sigstore transparency entry: 151481037
- Sigstore integration time:
-
Permalink:
thunn/BigVGANInference@a4cb2c77feb9472c7310ecdb3a55239e841a7695 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/thunn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-package.yaml@a4cb2c77feb9472c7310ecdb3a55239e841a7695 -
Trigger Event:
push
-
Statement type: