Paper: LLaSA: Scaling Train-time and Inference-time Compute for LLaMA-based Speech Synthesis
Update (2026-06-25): Xcodec2 has been added to Transformers! A Transformers-native checkpoint can be found been here!
Update (2025-02-13): Add Llasa finetune instruction.
Update (2025-02-07): Our paper has been released!
Codec: xcodec2 (Use xcodec2==0.1.5 for codec inference and llasa fine-tuning. I’ve removed unnecessary dependencies, and it works fine in my testing. However, I’m not sure if other problems may arise. If you prefer more stability, I recommend using xcodec2==0.1.3 which accurately aligns during my codec training.)
Llasa-collections: Llasa-collections
Single Vector Quantization
Multilingual Speech Semantic Support
High-Quality Speech Reconstruction
Code is tested on python3.9
Please follow the following steps to setup your environment
pip install -r requirements.txtpython inference.py
To train a XCodec2, firstly you have to prepare your data
python get_tsv.py
python train.py log_dir=/path/to/log_dir
Batch inference
python inference_save_code.py
Training
Sbatch train_slurm.sh
Code extracting
Sbatch large_scale_save_code.sh
Code will save in output folder with the same subfolder structure for audio file.
I would like to extend a special thanks to authors of BigCodec, since our code base is mainly borrowed from BigCodec.
Python
98.9%
Shell
1.1%
Paper: LLaSA: Scaling Train-time and Inference-time Compute for LLaMA-based Speech Synthesis
Update (2026-06-25): Xcodec2 has been added to Transformers! A Transformers-native checkpoint can be found been here!
Update (2025-02-13): Add Llasa finetune instruction.
Update (2025-02-07): Our paper has been released!
Codec: xcodec2 (Use xcodec2==0.1.5 for codec inference and llasa fine-tuning. I’ve removed unnecessary dependencies, and it works fine in my testing. However, I’m not sure if other problems may arise. If you prefer more stability, I recommend using xcodec2==0.1.3 which accurately aligns during my codec training.)
Llasa-collections: Llasa-collections
Single Vector Quantization
Multilingual Speech Semantic Support
High-Quality Speech Reconstruction
Code is tested on python3.9
Please follow the following steps to setup your environment
pip install -r requirements.txtpython inference.py
To train a XCodec2, firstly you have to prepare your data
python get_tsv.py
python train.py log_dir=/path/to/log_dir
Batch inference
python inference_save_code.py
Training
Sbatch train_slurm.sh
Code extracting
Sbatch large_scale_save_code.sh
Code will save in output folder with the same subfolder structure for audio file.
I would like to extend a special thanks to authors of BigCodec, since our code base is mainly borrowed from BigCodec.
Python
98.9%
Shell
1.1%