Practical overview
When it fits
Use it when you want to inspect or build on a code-level Voicebox implementation and can provide the model assets required by the examples.
Who it is for
- Developers exploring or adapting text-to-speech model implementations.
- Researchers and practitioners working with PyTorch speech-generation training workflows.
Documented uses
- Explore a Voicebox-based text-to-speech implementation.
- Train and sample a text-conditioned speech model using a SpearTTS text-to-semantic component.
- Set up an unconditional training and sampling path by disabling text conditioning.
Requirements & limits
The repository provides a pip installation example and identifies its license as MIT.
- The text-conditioned example depends on Hubert checkpoint and k-means files, a trained SpearTTS model, and an audio encoder-decoder.
- The README includes an unconditional path that sets condition_on_text=False.
- The README recommends E2 TTS instead of this implementation.
- The README does not specify hardware requirements or a serving interface.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Train and sample with text conditioning
Set up the documented VoiceBox and TextToSemantic components to train on audio and sample conditioned on text.
Before you start
- Install the package with
pip install voicebox-pytorch. - Provide a HuBERT checkpoint and k-means file, plus a trained Spear-TTS model checkpoint.
- Use PyTorch and the repository’s documented
voicebox_pytorchcomponents.
Steps
Create
HubertWithKmeansusing the HuBERT checkpoint and k-means file paths.Create
TextToSemanticwith the HuBERT component and load the trained Spear-TTS model checkpoint.Create
VoiceBoxwithaudio_enc_dec=EncodecVoco(), then pass it andTextToSemantictoConditionalFlowMatcherWrapper.Train by calling the wrapper on audio and backpropagating the returned loss; after training, call
samplewith conditioning audio and a list of texts.
Expected outcome
The README demonstrates a training loss and a sampling result shaped `(2, 1, )` after training.
Guide limitations
- The example uses mock audio and conditioning tensors; it does not document data preparation or a complete training schedule.
- Sampling is shown only after “much training”; no duration or quality guarantee is given.
- The repository recommends using E2 TTS instead.
Train and sample without text conditioning
Configure VoiceBox for unconditional training and sampling using the documented tensor interface.
Before you start
- Install the package with
pip install voicebox-pytorch. - Use PyTorch and the repository’s documented
VoiceBoxandConditionalFlowMatcherWrappercomponents.
Steps
Create
VoiceBoxwith the documented model parameters and setcondition_on_text=False.Create
ConditionalFlowMatcherWrapperwith the model and no text-to-semantic component.Train by passing a tensor shaped
(2, 1024, 512)to the wrapper and backpropagating the loss.After training, call
samplewith a conditioning tensor of the same documented shape.
Expected outcome
The README shows sampling output shaped `(2, 1024, 512)` after training.
Guide limitations
- The example uses mock tensors rather than a documented real-data workflow.
- Sampling is shown only after “much training”; the README does not specify training duration or guarantee results.
- The repository recommends using E2 TTS instead.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- lucidrains/voicebox-pytorch · Official homepage title · retained in its source language
Related options
E2 TTS — The repository README recommends using E2 TTS instead of this work.
SpearTTS — A separate project whose TextToSemantic module and trained model are used in the documented text-conditioned workflow.

