Views
No views yet
1git clone https://github.com/ictnlp/SLED-TTS.git
2cd SLED-TTS
3pip install -e ./CHECKPOINT variable to the path of the cached SLED-TTS-Libriheavy or SLED-TTS-Streaming-Libriheavy model.SEED variable.1CHECKPOINT=/path/to/checkpoint
2CFG=2.0
3SEED=01python scripts/run_offline.py \
2 --model_name_or_path ${CHECKPOINT} \
3 --cfg ${CFG} \
4 --input "My remark pleases him, but I soon prove to him that it is not the right way to speak. However perfect may have been the language of that ancient writer." \
5 --seed ${SEED}1python scripts/run_stream.py \
2 --model_name_or_path ${CHECKPOINT} \
3 --cfg ${CFG} \
4 --input "My remark pleases him, but I soon prove to him that it is not the right way to speak. However perfect may have been the language of that ancient writer." \
5 --seed ${SEED}
6# Please note that we have simulated the generation in a streaming environment in run_stream.py for evaluating its quality.
7# However, the existing code does not actually provide a streaming API.--prompt_text and --prompt_audio.1python scripts/run_voice_clone.py \
2 --prompt_text "Were I in the warm room with all the splendor and magnificence!" \
3 --prompt_audio "example_prompt.flac" \
4 --model_name_or_path ${CHECKPOINT} \
5 --cfg ${CFG} \
6 --input "Perhaps the other trees from the forest will come to look at me!" \
7 --seed ${SEED}1OUTPUT_DIR=./runs/libriheavy
2mkdir -p $OUTPUT_DIR
3LOG_FILE=${OUTPUT_DIR}/log
4
5BATCH_SIZE=8
6UPDATE_FREQ=8
7# assume 8 proc per node, then WORLD_SIZE * 8 * BATCH_SIZE * UPDATE_FREQ == 512
8
9torchrun --nnodes ${WORLD_SIZE} --node_rank ${RANK} --nproc_per_node 8 --master_addr ${MASTER_ADDR} --master_port ${MASTER_PORT} \
10 ./scripts/train_libriheavy.py \
11 --training_cfg 0.1 \
12 --num_hidden_layers 12 --diffloss_d 6 --noise_channels 128 \
13 --dataloader_num_workers 8 \
14 --dataloader_pin_memory True \
15 --remove_unused_columns False \
16 --label_names audio_inputs \
17 --group_by_speech_length \
18 --do_train \
19 --do_eval \
20 --eval_strategy steps \
21 --eval_steps 10000 \
22 --prediction_loss_only \
23 --per_device_train_batch_size ${BATCH_SIZE} \
24 --per_device_eval_batch_size 24 \
25 --gradient_accumulation_steps ${UPDATE_FREQ} \
26 --bf16 \
27 --learning_rate 5e-4 \
28 --weight_decay 0.01 \
29 --adam_beta1 0.9 \
30 --adam_beta2 0.999 \
31 --adam_epsilon 1e-8 \
32 --max_grad_norm 1.0 \
33 --max_steps 300000 \
34 --lr_scheduler_type "linear" \
35 --warmup_steps 32000 \
36 --logging_first_step \
37 --logging_steps 100 \
38 --save_steps 10000 \
39 --save_total_limit 10 \
40 --output_dir ${OUTPUT_DIR} \
41 --report_to tensorboard \
42 --disable_tqdm True \
43 --ddp_timeout 3600 --overwrite_output_dir
441OUTPUT_DIR=./runs/libriheavy_stream
2mkdir -p $OUTPUT_DIR
3LOG_FILE=${OUTPUT_DIR}/log
4
5BATCH_SIZE=8
6UPDATE_FREQ=8
7# assume 8 proc per node, then WORLD_SIZE * 8 * BATCH_SIZE * UPDATE_FREQ == 512
8
9torchrun --nnodes ${WORLD_SIZE} --node_rank ${RANK} --nproc_per_node 8 --master_addr ${MASTER_ADDR} --master_port ${MASTER_PORT} \
10 ./scripts/train_libriheavy_stream.py \
11 --finetune_path ./runs/libriheavy/checkpoint-300000/model.safetensors \
12 --stream_n 5 --stream_m 45 \
13 --training_cfg 0.1 \
14 --num_hidden_layers 12 --diffloss_d 6 --noise_channels 128 \
15 --dataloader_num_workers 8 \
16 --dataloader_pin_memory True \
17 --remove_unused_columns False \
18 --label_names audio_inputs \
19 --group_by_speech_length \
20 --do_train \
21 --do_eval \
22 --eval_strategy steps \
23 --eval_steps 10000 \
24 --prediction_loss_only \
25 --per_device_train_batch_size ${BATCH_SIZE} \
26 --per_device_eval_batch_size 24 \
27 --gradient_accumulation_steps ${UPDATE_FREQ} \
28 --bf16 \
29 --learning_rate 3e-4 \
30 --weight_decay 0.01 \
31 --adam_beta1 0.9 \
32 --adam_beta2 0.999 \
33 --adam_epsilon 1e-8 \
34 --max_grad_norm 1.0 \
35 --max_steps 100000 \
36 --lr_scheduler_type "linear" \
37 --warmup_steps 10000 \
38 --logging_first_step \
39 --logging_steps 100 \
40 --save_steps 10000 \
41 --save_total_limit 10 \
42 --output_dir ${OUTPUT_DIR} \
43 --report_to tensorboard \
44 --disable_tqdm True \
45 --ddp_timeout 3600 --overwrite_output_dir@misc{ma2025efficientspeechlanguagemodeling,
title={Efficient Speech Language Modeling via Energy Distance in Continuous Latent Space},
author={Zhengrui Ma and Yang Feng and Chenze Shao and Fandong Meng and Jie Zhou and Min Zhang},
year={2025},
eprint={2505.13181},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2505.13181},
}