Fewer-token Neural Speech Codec with Time-invariant Codes

Abstract

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 and force it to capture more global information, 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.

Framework of the voice conversion and speaker representation control

Code

Our Code is available at:

TiCodec

Demo of reconstruction

Eg 1

GT
Model 1 token sequence 2 token sequences 4 token sequences
EnCodec
HifiCodec
TiCodec
TiCodec+Lc

Eg 2

GT
Model 1 token sequence 2 token sequences 4 token sequences
EnCodec
HifiCodec
TiCodec
TiCodec+Lc

Eg 3

GT
Model 1 token sequence 2 token sequences 4 token sequences
EnCodec
HifiCodec
TiCodec
TiCodec+Lc

Demo of zero-shot TTS

Prompt Speech 1


Model 1 token sequence 2 token sequences 4 token sequences
HifiCodec
TiCodec
TiCodec+Lc

Prompt Speech 2


Model 1 token sequence 2 token sequences 4 token sequences
HifiCodec
TiCodec
TiCodec+Lc

Prompt Speech 3


Model 1 token sequence 2 token sequences 4 token sequences
HifiCodec
TiCodec
TiCodec+Lc