Registry / ai-ml / audiolm

audiolm

JSON →
library0.0.1.dev0pypypi✓ verified 81d ago

AudioLM is a PyTorch-based implementation of a language modeling approach to audio generation, capable of generating coherent audio continuations given a short prompt. Current version is 0.0.1.dev0, with irregular releases.

pip install audiolm
INSTALL
IMPORT
SIG · AUDIOLM
A
audiolm
ai-mlpythonv0.0.1.dev0
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.

AudioLM
import audiolm
from audiolm import AudioLM

Load a pre-trained AudioLM model and generate a continuation from a prompt audio file.

import torch import torchaudio from audiolm import AudioLM from audiolm.decode import decode model = AudioLM() # Load a prompt audio file waveform, sample_rate = torchaudio.load('prompt.wav') # Generate continuation (requires GPU or CPU) generated = decode(model, waveform, sample_rate, max_new_tokens=256) torchaudio.save('output.wav', generated[0].unsqueeze(0), sample_rate)
Debug
Known issues
breakingThe library is in early development (0.0.1.dev0). API is unstable and may change without notice. Do not use in production.
fix
Pin to specific commit or use only for experimentation.
affects: all
gotchaAudioLM requires significant GPU memory (16GB+). CPU inference is extremely slow and may run out of memory.
fix
Use a GPU with at least 16GB VRAM; reduce max_new_tokens if out-of-memory.
affects: all
deprecatedThe 'decode' function signature may change in future versions; current version uses (model, waveform, sample_rate, ...).
fix
Refer to the GitHub README for the most up-to-date usage.
affects: 0.0.1.dev0
Upgrade
Version history
0.0.1.dev0latest on PyPI · released Mar 26, 2023
Audit
Dependencies
torchrequiredCore dependency for model operations
torchaudiorequiredAudio I/O and processing
transformersrequiredHuggingFace models and tokenizers
soundfilerequiredAudio file reading/writing
einopsrequiredTensor operations
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
audiolm — pip install audiolm · libregistry