Thanks to visit codestin.com
Credit goes to github.com

Skip to content

y-ren16/TiCodec

Repository files navigation

TiCodec: Fewer-token Neural Speech Codec with Time-invariant Codes. (ICASSP 2024)

🤗 Hugging Face   |   🖥️ Demo |   📑 Paper  

1. Introduction

Language model based text-to-speech (TTS) models, like VALL-E, have gained attention for their outstanding in-context learning capability in zero-shot scenarios. Neural speech codec is a critical component of these models, which can convert speech into discrete token representations. However, excessive token sequences from the codec may negatively affect prediction accuracy and restrict the progression of Language model based TTS models. To address this issue, this paper proposes a novel neural speech codec with time-invariant codes named TiCodec. By encoding and quantizing time-invariant information into a separate code, TiCodec can reduce the amount of frame-level information that needs encoding, effectively decreasing the number of tokens as codes of speech. Furthermore, this paper introduces a time-invariant encoding consistency loss to enhance the consistency of time-invariant code within an utterance, which can benefit the zero-shot TTS task. Experimental results demonstrate that TiCodec can not only enhance the quality of reconstruction speech with fewer tokens but also increase the similarity and naturalness, as well as reduce the word error rate of the synthesized speech by the TTS model.

Architecture

2. Quick Started

2.1 Dependencies

pip install -r requirement.txt

Install visqol for calculating objective metrics.

2.2 Dataset preparation

Gengenerate ./Lib_resources/*/*.lst for training.

.
├── Lib_resources
│   └── LibriTTS
│       ├── dev.lst
│       ├── test.lst
│       └── train.lst

Put *.wav in ./egs/Paper_Data/GT/*/*.wav for metrics.

.
├── Paper_Data
│   ├── GEN
│   └── GT

2.3 Train

cd TiCodec/egs/TiCodec-24k-320d
bash start_conv_1g1r_8g3k1s_cos_from_head.sh
bash start_conv_1g2r_8g3k1s_cos_from_head.sh
bash start_conv_1g4r_8g3k1s_cos_from_head.sh

2.4 Test

test_conv_1g1r_8g3k1s_cos_from_head.sh
test_conv_1g2r_8g3k1s_cos_from_head.sh
test_conv_1g4r_8g3k1s_cos_from_head.sh

2.5 Metrics

python metrics.py

3. Citations

If our code and paper help you, please kindly cite:

@inproceedings{ren2024fewer,
  title={Fewer-token neural speech codec with time-invariant codes},
  author={Ren, Yong and Wang, Tao and Yi, Jiangyan and Xu, Le and Tao, Jianhua and Zhang, Chu Yuan and Zhou, Junzuo},
  booktitle={ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
  pages={12737--12741},
  year={2024},
  organization={IEEE}
}

4. Acknowledgements

This repo is based on AcademiCodec. We highly appreciate their contributions to this community.

License Agreement

License: The repository is licensed under the Apache 2.0 License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published