From 5ff885f11613bf0c92df5ccc7426c3ec06a74182 Mon Sep 17 00:00:00 2001 From: TianYuan Date: Fri, 24 Jun 2022 07:00:25 +0000 Subject: [PATCH 1/2] add tts static/onnx models in pretrained_models.py --- paddlespeech/resource/pretrained_models.py | 312 +++++++++++++++++++-- 1 file changed, 296 insertions(+), 16 deletions(-) diff --git a/paddlespeech/resource/pretrained_models.py b/paddlespeech/resource/pretrained_models.py index 439fda5f..324bd3ae 100644 --- a/paddlespeech/resource/pretrained_models.py +++ b/paddlespeech/resource/pretrained_models.py @@ -639,6 +639,22 @@ tts_dynamic_pretrained_models = { 'speaker_id_map.txt', }, }, + "fastspeech2_cnndecoder_csmsc-zh": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_cnndecoder_csmsc_ckpt_1.0.0.zip', + 'md5': + '6eb28e22ace73e0ebe7845f86478f89f', + 'config': + 'cnndecoder.yaml', + 'ckpt': + 'snapshot_iter_153000.pdz', + 'speech_stats': + 'speech_stats.npy', + 'phones_dict': + 'phone_id_map.txt', + }, + }, # tacotron2 "tacotron2_csmsc-zh": { '1.0': { @@ -831,22 +847,6 @@ tts_dynamic_pretrained_models = { 'feats_stats.npy', }, }, - "fastspeech2_cnndecoder_csmsc-zh": { - '1.0': { - 'url': - 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_cnndecoder_csmsc_ckpt_1.0.0.zip', - 'md5': - '6eb28e22ace73e0ebe7845f86478f89f', - 'config': - 'cnndecoder.yaml', - 'ckpt': - 'snapshot_iter_153000.pdz', - 'speech_stats': - 'speech_stats.npy', - 'phones_dict': - 'phone_id_map.txt', - }, - }, } tts_static_pretrained_models = { @@ -886,6 +886,58 @@ tts_static_pretrained_models = { 24000, }, }, + "fastspeech2_ljspeech-en": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_ljspeech_static_1.1.0.zip', + 'md5': + 'c49f70b52973423ec45aaa6184fb5bc6', + 'model': + 'fastspeech2_ljspeech.pdmodel', + 'params': + 'fastspeech2_ljspeech.pdiparams', + 'phones_dict': + 'phone_id_map.txt', + 'sample_rate': + 22050, + }, + }, + "fastspeech2_aishell3-zh": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_aishell3_static_1.1.0.zip', + 'md5': + '695af44679f48eb4abc159977ddaee16', + 'model': + 'fastspeech2_aishell3.pdmodel', + 'params': + 'fastspeech2_aishell3.pdiparams', + 'phones_dict': + 'phone_id_map.txt', + 'speaker_dict': + 'speaker_id_map.txt', + 'sample_rate': + 24000, + }, + }, + "fastspeech2_vctk-en": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_vctk_static_1.1.0.zip', + 'md5': + '92d8c082f180bda2fd05a534fb4a1b62', + 'model': + 'fastspeech2_vctk.pdmodel', + 'params': + 'fastspeech2_vctk.pdiparams', + 'phones_dict': + 'phone_id_map.txt', + 'speaker_dict': + 'speaker_id_map.txt', + 'sample_rate': + 24000, + }, + }, # pwgan "pwgan_csmsc-zh": { '1.0': { @@ -901,6 +953,48 @@ tts_static_pretrained_models = { 24000, }, }, + "pwgan_ljspeech-en": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/pwgan/pwgan_ljspeech_static_1.1.0.zip', + 'md5': + '6f457a069da99c6814ac1fb4677281e4', + 'model': + 'pwgan_ljspeech.pdmodel', + 'params': + 'pwgan_ljspeech.pdiparams', + 'sample_rate': + 22050, + }, + }, + "pwgan_aishell3-zh": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/pwgan/pwgan_aishell3_static_1.1.0.zip', + 'md5': + '199f64010238275fbdacb326a5cf82d1', + 'model': + 'pwgan_aishell3.pdmodel', + 'params': + 'pwgan_aishell3.pdiparams', + 'sample_rate': + 24000, + }, + }, + "pwgan_vctk-en": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/pwgan/pwgan_vctk_static_1.1.0.zip', + 'md5': + 'ee0fc571ad5a7fbe4ca20e49df22b819', + 'model': + 'pwgan_vctk.pdmodel', + 'params': + 'pwgan_vctk.pdiparams', + 'sample_rate': + 24000, + }, + }, # mb_melgan "mb_melgan_csmsc-zh": { '1.0': { @@ -931,9 +1025,67 @@ tts_static_pretrained_models = { 24000, }, }, + "hifigan_ljspeech-en": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/hifigan/hifigan_ljspeech_static_1.1.0.zip', + 'md5': + '8c674e79be7c45f6eda74825316438a0', + 'model': + 'hifigan_ljspeech.pdmodel', + 'params': + 'hifigan_ljspeech.pdiparams', + 'sample_rate': + 22050, + }, + }, + "hifigan_aishell3-zh": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/hifigan/hifigan_aishell3_static_1.1.0.zip', + 'md5': + '7a10ec5d8d851e2000128f040d30cc01', + 'model': + 'hifigan_aishell3.pdmodel', + 'params': + 'hifigan_aishell3.pdiparams', + 'sample_rate': + 24000, + }, + }, + "hifigan_vctk-en": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/hifigan/hifigan_vctk_static_1.1.0.zip', + 'md5': + '130f791dfac84ccdd44ccbdfb67bf08e', + 'model': + 'hifigan_vctk.pdmodel', + 'params': + 'hifigan_vctk.pdiparams', + 'sample_rate': + 24000, + }, + }, } tts_onnx_pretrained_models = { + # speedyspeech + "speedyspeech_csmsc_onnx-zh": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/speedyspeech/speedyspeech_csmsc_onnx_0.2.0.zip', + 'md5': + '3e9c45af9ef70675fc1968ed5074fc88', + 'ckpt': ['speedyspeech_csmsc.onnx'], + 'phones_dict': + 'phone_id_map.txt', + 'tones_dict': + 'tone_id_map.txt', + 'sample_rate': + 24000, + }, + }, # fastspeech2 "fastspeech2_csmsc_onnx-zh": { '1.0': { @@ -948,6 +1100,49 @@ tts_onnx_pretrained_models = { 24000, }, }, + "fastspeech2_ljspeech_onnx-en": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_ljspeech_onnx_1.1.0.zip', + 'md5': + '00754307636a48c972a5f3e65cda3d18', + 'ckpt': ['fastspeech2_ljspeech.onnx'], + 'phones_dict': + 'phone_id_map.txt', + 'sample_rate': + 22050, + }, + }, + "fastspeech2_aishell3_onnx-zh": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_aishell3_onnx_1.1.0.zip', + 'md5': + 'a1d6ee21de897ce394f5469e2bb4df0d', + 'ckpt': ['fastspeech2_aishell3.onnx'], + 'phones_dict': + 'phone_id_map.txt', + 'speaker_dict': + 'speaker_id_map.txt', + 'sample_rate': + 24000, + }, + }, + "fastspeech2_vctk_onnx-en": { + '1.0': { + 'url': + 'hhttps://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_vctk_onnx_1.1.0.zip', + 'md5': + 'd9c3a9b02204a2070504dd99f5f959bf', + 'ckpt': ['fastspeech2_vctk.onnx'], + 'phones_dict': + 'phone_id_map.txt', + 'speaker_dict': + 'speaker_id_map.txt', + 'sample_rate': + 24000, + }, + }, "fastspeech2_cnndecoder_csmsc_onnx-zh": { '1.0': { 'url': @@ -967,6 +1162,55 @@ tts_onnx_pretrained_models = { 24000, }, }, + # pwgan + "pwgan_csmsc_onnx-zh": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/pwgan/pwgan_csmsc_onnx_0.2.0.zip', + 'md5': + '711d0ade33e73f3b721efc9f20669f9c', + 'ckpt': + 'pwgan_csmsc.onnx', + 'sample_rate': + 24000, + }, + }, + "pwgan_ljspeech_onnx-en": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/pwgan/pwgan_ljspeech_onnx_1.1.0.zip', + 'md5': + '73cdeeccb77f2ea6ed4d07e71d8ac8b8', + 'ckpt': + 'pwgan_ljspeech.onnx', + 'sample_rate': + 22050, + }, + }, + "pwgan_aishell3_onnx-zh": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/pwgan/pwgan_aishell3_onnx_1.1.0.zip', + 'md5': + '096ab64e152a4fa476aff79ebdadb01b', + 'ckpt': + 'pwgan_aishell3.onnx', + 'sample_rate': + 24000, + }, + }, + "pwgan_vctk_onnx-en": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/pwgan/pwgan_vctk_onnx_1.1.0.zip', + 'md5': + '4e754d42cf85f6428f0af887c923d86c', + 'ckpt': + 'pwgan_vctk.onnx', + 'sample_rate': + 24000, + }, + }, # mb_melgan "mb_melgan_csmsc_onnx-zh": { '1.0': { @@ -993,6 +1237,42 @@ tts_onnx_pretrained_models = { 24000, }, }, + "hifigan_ljspeech_onnx-en": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/hifigan/hifigan_ljspeech_onnx_1.1.0.zip', + 'md5': + '062f54b79c1135a50adb5fc8406260b2', + 'ckpt': + 'hifigan_ljspeech.onnx', + 'sample_rate': + 22050, + }, + }, + "hifigan_aishell3_onnx-zh": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/hifigan/hifigan_aishell3_onnx_1.1.0.zip', + 'md5': + 'd6c0d684ad148583ca57837d5e870167', + 'ckpt': + 'hifigan_aishell3.onnx', + 'sample_rate': + 24000, + }, + }, + "hifigan_vctk_onnx-en": { + '1.0': { + 'url': + 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/hifigan/hifigan_vctk_onnx_1.1.0.zip', + 'md5': + 'fd714df3be283c0efbefc8510160ff6d', + 'ckpt': + 'hifigan_vctk.onnx', + 'sample_rate': + 24000, + }, + }, } # --------------------------------- From 5e3e4b6ffdf696bf4f973560e2bdde802beff3ed Mon Sep 17 00:00:00 2001 From: TianYuan Date: Mon, 27 Jun 2022 03:04:11 +0000 Subject: [PATCH 2/2] add api doc, test=doc --- .readthedocs.yml | 5 +++-- docs/requirements.txt | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index dc38a20f..e922891e 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -21,5 +21,6 @@ python: version: 3.7 install: - requirements: docs/requirements.txt - - + - method: setuptools + path: . + system_packages: true \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index 11e0d4b4..461a7aa1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -5,3 +5,46 @@ sphinx sphinx-autobuild sphinx-markdown-tables sphinx_rtd_theme +paddlepaddle>=2.2.2 +editdistance +g2p_en +g2pM +h5py +inflect +jieba +jsonlines +kaldiio +librosa==0.8.1 +loguru +matplotlib +nara_wpe +onnxruntime +pandas +paddlenlp +paddlespeech_feat +praatio==5.0.0 +pypinyin +pypinyin-dict +python-dateutil +pyworld +resampy==0.2.2 +sacrebleu +scipy +sentencepiece~=0.1.96 +soundfile~=0.10 +textgrid +timer +tqdm +typeguard +visualdl +webrtcvad +yacs~=0.1.8 +prettytable +zhon +colorlog +pathos == 0.2.8 +fastapi +websockets +keyboard +uvicorn +pattern_singleton \ No newline at end of file