Code Monkey home page Code Monkey logo

chinese-fastspeech2's Introduction

Chinese-FastSpeech2

基于标贝中文标准女声数据继续训练,同时对原论文的FastSpeech2模型做了改进,引入了韵律表征以及韵律预测模块,使中文发音更生动且富有节奏

20230402 更新

  • 1、加入韵律模型训练代码, 在BertProsody目录下
  • 2、加入韵律模型训练的数据预处理代码(针对标贝数据,代码未整理,先放出来),在preprocessor/biaobei.py

样例

参考samples中生成的音频

模型文件

本项目主体架构为FastSpeech2+HifiGAN结构,另外在输入阶段引入了中文文本的韵律向量,因此共有三个模型:fastspeech_model、hifigan_model、prosody_model(网盘链接,提取码:qgpi),下载后将模型文件放入指定的目录下:

  • 8000.pth.tar ---> output/ckpt/biaobei/
  • generator_universal.pth.tar ---> hifigan/
  • best_model.pt ---> transformer/prosody_model/

预测

提供了两种预测方式:1)python synthesize_all.py;2)http接口调用

  • 第一种方式是交互式,命令行运行python synthesize_all.py后,输入需要转换的文本,运行后会在代码会在当前工作目录下生成tmp.wav文件;
  • 第二种方式是api调用,运行tts_server.py,会启动语音转文本的接口,调用该接口可参考TestServer.py,同样生成的音频文件(tmp.wav)会保存在当前工作目录下

训练


本项目是出于个人兴趣在语音合成方面做的一些尝试,欢迎大家批评指正,多多交流!

chinese-fastspeech2's People

Contributors

executedone avatar

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.