Instructions to use stabilityai/stable-codec-speech-16k-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Stable Audio Tools
How to use stabilityai/stable-codec-speech-16k-base with Stable Audio Tools:
import torch import torchaudio from einops import rearrange from stable_audio_tools import get_pretrained_model from stable_audio_tools.inference.generation import generate_diffusion_cond device = "cuda" if torch.cuda.is_available() else "cpu" # Download model model, model_config = get_pretrained_model("stabilityai/stable-codec-speech-16k-base") sample_rate = model_config["sample_rate"] sample_size = model_config["sample_size"] model = model.to(device) # Set up text and timing conditioning conditioning = [{ "prompt": "128 BPM tech house drum loop", }] # Generate stereo audio output = generate_diffusion_cond( model, conditioning=conditioning, sample_size=sample_size, device=device ) # Rearrange audio batch to a single sequence output = rearrange(output, "b d n -> d (b n)") # Peak normalize, clip, convert to int16, and save to file output = output.to(torch.float32).div(torch.max(torch.abs(output))).clamp(-1, 1).mul(32767).to(torch.int16).cpu() torchaudio.save("output.wav", output, sample_rate) - Notebooks
- Google Colab
- Kaggle
You need to agree to share your contact information to access this model
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
By clicking "Agree", you agree to the License Agreement and acknowledge Stability AI's Privacy Policy.
Log in or Sign Up to review the conditions and access this model content.
stable-codec-speech-16k-base Model Card
stable-codec-speech-16k-base is a Transformer-based codec model designed for high-quality, low-bitrate audio coding. It processes audio waveforms by encoding them into discrete tokens, which can later be decoded back into the original audio waveform.
IMPORTANT: This is the base version of the model without CTC finetuning, provided for reproducibility of results in the arXiv paper. For 99% of usecases, stable-codec-speech-16k is a better choice.
Please note: For individuals or organizations generating annual revenue of US $1,000,000 (or local currency equivalent) or more, regardless of the source of that revenue, you must obtain an enterprise commercial license directly from Stability AI before commercially using Stable Codec, any derivative work of Stable Codec (such as a “fine tune” model), or their outputs. You may submit a request for an Enterprise License at https://stability.ai/enterprise. Please refer to Stability AI's Community License, available at https://stability.ai/license, for more information.
Model Description
- Developed by: Stability AI
- Model type: Transformer audio codec model
- Model details: This released model is a speech codec designed to compress real-world speech data into a suitable format for generative modeling. It provides a foundational tool for developing downstream applications in speech understanding and generation, such as text-to-speech systems and conversational AI models. Please check our arXiv page and Github repo for details.
License
- Community License: Free for research, non-commercial, and commercial use by organizations and individuals generating annual revenue of US $1,000,000 (or local currency equivalent) or more, regardless of the source of that revenue. If your annual revenue exceeds US $1M, any commercial use of this model or derivative works thereof requires obtaining an Enterprise License directly from Stability AI. You may submit a request for an Enterprise License at https://stability.ai/enterprise. Please refer to Stability AI's Community License, available at https://stability.ai/license, for more information.
Model Sources
- Repository: https://github.com/Stability-AI/stable-codec
- Audio demos: https://stability-ai.github.io/stable-codec-demo/
- arXiv page: https://arxiv.org/abs/2411.19842
Training Dataset
The model was trained on datasets derived from creative commons or public domain audiobook recordings. See academic paper for more details.
Usage
For usage instructions, please refer to our GitHub repository
Intended Uses
Intended uses include the following: Efficient compression of speech signals for storage or streaming purposes. Enhancing speech-based applications, such as telecommunication systems and real-time communication platforms. Research and development in audio coding and speech synthesis, including understanding and improving codec performance. Development of downstream applications including speech recognition and generation.
All uses of the model should be in accordance with our Acceptable Use Policy.
Out-of-Scope Uses
This model is purely trained on non-overlapping clean English speech, and exhibits optimal performance in these situations. It is not suitable for applications requiring high-fidelity music or environmental sound coding.
Contact
Please report any issues with the model or contact us:
- Safety issues: safety@stability.ai
- Security issues: security@stability.ai
- Privacy issues: privacy@stability.ai
- License and general: https://stability.ai/license
- Enterprise license: https://stability.ai/enterprise
- Downloads last month
- -