Git Product home page Git Product logo

facodec's Introduction

FAcodec

This repository is a Pytorch implementation for the training of FAcodec, which was proposed in paper NaturalSpeech 3: Zero-Shot Speech Synthesis with Factorized Codec and Diffusion Models

Implementation is slightly different from the original paper. While the original version is based on phoneme prediction, which requires text transcription and phoneme-audio alignment, this implementation is based on predicting semantic latent, eliminating the need for this difficult part in data preparation (alignment is especially difficult).

Current implementation is only experimented with VCTK dataset but it has already demonstrated successful speech reconstruction and content, timbre & prosody disentanglement abilities.

Requirements

  • Python 3.10

Dataset

prepare your dataset annotation in a .txt file with each line containing:

<absolute_path_to_audio>\t<speaker_id>\t<language>\t<transcript>\t<phonemized_transcript>

An example of the dataset annotation file is provided in data/val.txt. Note that speaker ids, languages or transcripts can be omitted if you do not have them, they are just placeholders. Only make sure audio paths are correct.
Put your prepared data under ./data/train.txt and ./data/val.txt.

Training

Download the semantic teacher (currently we are using SpeechTokenizer) from here and put the checkpoint and config file under ./w2v_models/.
Then run the following command:

accelerate launch train.py

Default tensorboard log directory is ./Models/run/tensorboard
You will need at least 100k steps until you observe successful disentanglement.

Evaluation

Results will be logged to tensorboard. Default tensorboard log directory is ./Models/run/eval/tensorboard.

python eval.py

Inference

(To be implemented)

Pretrained Models

Currently, training is only implemented with VCTK dataset. Pretrained model's generalization ability is not good but can demonstrate successful speech reconstruction and disentanglement.
It will be released soon.

Appendix: Loss curves during training

grad_norm predictor_losses reverse_predictor_losses reconstruction_losses_1 reconstruction_losses_2

facodec's People

Contributors

plachtaa avatar

Stargazers

 avatar  avatar  avatar  avatar JunHyeok Cha avatar  avatar  avatar  avatar hertz avatar liangoy avatar Youqiang Zheng avatar tingweichen avatar Disong Wang avatar YU XINYUAN avatar Dongchao Yang avatar Helin Wang avatar Vector Ventures avatar  avatar Okrio avatar Zeying Xie avatar Victor Chen avatar 王贤锐(Henry) avatar Kai Li (李凯) avatar Tianrui Wang (王天锐) avatar jishengpeng avatar Eric Lam avatar Keith Hon avatar Xinsheng Wang avatar  avatar Pawel Cyrta avatar HAESUNG JEON (chad.plus) avatar  avatar roycheng avatar Deon avatar jackiexiao avatar  avatar Ashwin Sankar avatar Hayeong avatar Slice avatar MaxMax avatar Yong Liu avatar  avatar sunzheng avatar 爱可可-爱生活 avatar Dong Zhang avatar Molanis avatar  avatar aaronchen avatar Changjin Han avatar PlatformKit avatar kkk avatar Zulin Fang avatar Yuan-Man avatar shaun avatar Carlos Emilio Puente avatar liuhuang31 avatar  avatar wendong avatar NaN03 avatar tomato avatar Alef Iury avatar  avatar  avatar GuanXuzeng avatar Wendong Gan avatar Oleg avatar Nick Fisher avatar  avatar Nickolay V. Shmyrev avatar  avatar Лэюань  avatar eagle avatar suzhenghang avatar Marcos Sandoval avatar Sofian Mejjoute avatar Ziyi Chen avatar Sapphira Tempest avatar

Watchers

 avatar Nickolay V. Shmyrev avatar suzhenghang avatar GuanXuzeng avatar tingweichen avatar Vector Ventures avatar  avatar

facodec's Issues

模型问题咨询

想请教下,您是否已经跑通了代码,并且验证了效果呢?
因为看到好多权重设置跟论文中不一致

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.