From afb63b7376bf720f9eaf6ffb4659862dcca1e8c0 Mon Sep 17 00:00:00 2001 From: Nick Ovchinnikov Date: Thu, 8 Feb 2024 13:18:00 +0100 Subject: [PATCH] Step 1 --- advanced-demo.ipynb | 2 +- docs/index.md | 10 +- docs/model/acoustic_model/acoustic_model.md | 1 - docs/model/acoustic_model/aligner.md | 1 - docs/model/acoustic_model/embedding.md | 1 - docs/model/acoustic_model/helpers.md | 1 - docs/model/acoustic_model/length_adaptor.md | 1 - docs/model/acoustic_model/mas.md | 1 - .../phoneme_prosody_predictor.md | 1 - docs/model/acoustic_model/pitch_adaptor.md | 1 - docs/model/acoustic_model/pitch_adaptor2.md | 1 - .../acoustic_model/variance_predictor.md | 1 - docs/model/attention/conformer.md | 1 - docs/model/attention/conformer_block.md | 1 - docs/model/attention/conformer_conv_module.md | 1 - .../conformer_multi_headed_self_attention.md | 1 - docs/model/attention/feed_forward.md | 1 - docs/model/attention/multi_head_attention.md | 1 - .../relative_multi_head_attention.md | 1 - docs/model/attention/style_embed_attention.md | 1 - docs/model/config/langs.md | 1 - docs/model/conv_blocks/activation.md | 1 - docs/model/conv_blocks/add_coords.md | 1 - docs/model/conv_blocks/bsconv.md | 1 - docs/model/conv_blocks/conv1d.md | 1 - docs/model/conv_blocks/conv1d_glu.md | 1 - docs/model/conv_blocks/conv_transposed.md | 1 - docs/model/conv_blocks/coord_conv1d.md | 1 - docs/model/helpers/initializer.md | 1 - docs/model/helpers/tools.md | 1 - docs/model/reference_encoder/STL.md | 1 - .../phoneme_level_prosody_encoder.md | 1 - .../reference_encoder/reference_encoder.md | 1 - .../utterance_level_prosody_encoder.md | 1 - docs/model/univnet/discriminator.md | 1 - docs/model/univnet/discriminator_p.md | 1 - docs/model/univnet/discriminator_r.md | 1 - docs/model/univnet/kernel_predictor.md | 1 - docs/model/univnet/lvc_block.md | 1 - .../univnet/multi_period_discriminator.md | 1 - .../univnet/multi_resolution_discriminator.md | 1 - docs/model/univnet/traced_univnet.md | 1 - docs/model/univnet/univnet.md | 1 - docs/models/acoustic_model/acoustic_model.md | 1 + docs/models/acoustic_model/aligner.md | 1 + docs/models/acoustic_model/embedding.md | 1 + docs/models/acoustic_model/helpers.md | 1 + docs/models/acoustic_model/length_adaptor.md | 1 + docs/models/acoustic_model/mas.md | 1 + .../phoneme_prosody_predictor.md | 1 + docs/models/acoustic_model/pitch_adaptor.md | 1 + docs/models/acoustic_model/pitch_adaptor2.md | 1 + .../acoustic_model/readme.md | 0 .../acoustic_model/variance_predictor.md | 1 + docs/models/attention/conformer.md | 1 + docs/models/attention/conformer_block.md | 1 + .../models/attention/conformer_conv_module.md | 1 + .../conformer_multi_headed_self_attention.md | 1 + docs/models/attention/feed_forward.md | 1 + docs/models/attention/multi_head_attention.md | 1 + docs/{model => models}/attention/readme.md | 0 .../relative_multi_head_attention.md | 1 + .../models/attention/style_embed_attention.md | 1 + docs/models/config/langs.md | 1 + docs/{model => models}/config/readme.md | 0 docs/models/conv_blocks/activation.md | 1 + docs/models/conv_blocks/add_coords.md | 1 + docs/models/conv_blocks/bsconv.md | 1 + docs/models/conv_blocks/conv1d.md | 1 + docs/models/conv_blocks/conv1d_glu.md | 1 + docs/models/conv_blocks/conv_transposed.md | 1 + docs/models/conv_blocks/coord_conv1d.md | 1 + docs/{model => models}/conv_blocks/readme.md | 0 docs/models/helpers/initializer.md | 1 + docs/{model => models}/helpers/readme.md | 0 docs/models/helpers/tools.md | 1 + docs/models/reference_encoder/STL.md | 1 + .../phoneme_level_prosody_encoder.md | 1 + .../reference_encoder/readme.md | 0 .../reference_encoder/reference_encoder.md | 1 + .../utterance_level_prosody_encoder.md | 1 + docs/models/univnet/discriminator.md | 1 + docs/models/univnet/discriminator_p.md | 1 + docs/models/univnet/discriminator_r.md | 1 + docs/models/univnet/kernel_predictor.md | 1 + docs/models/univnet/lvc_block.md | 1 + .../univnet/multi_period_discriminator.md | 1 + .../univnet/multi_resolution_discriminator.md | 1 + docs/{model => models}/univnet/readme.md | 0 docs/models/univnet/traced_univnet.md | 1 + docs/models/univnet/univnet.md | 1 + mkdocs.yml | 98 +++++++++---------- {model => models}/__init__.py | 0 {model => models}/acoustic_model/__init__.py | 0 .../acoustic_model/acoustic_model.py | 8 +- {model => models}/acoustic_model/aligner.py | 2 +- {model => models}/acoustic_model/embedding.py | 0 .../acoustic_model/energy_adaptor.py | 0 {model => models}/acoustic_model/helpers.py | 0 .../acoustic_model/length_adaptor.py | 4 +- {model => models}/acoustic_model/mas.py | 0 .../phoneme_prosody_predictor.py | 6 +- .../acoustic_model/pitch_adaptor.py | 2 +- .../acoustic_model/pitch_adaptor2.py | 2 +- .../acoustic_model/tests/__init__.py | 0 .../acoustic_model/tests/mocks/speakers.json | 0 .../acoustic_model/tests/mocks/stats.json | 0 .../tests/test_accoustic_model.py | 4 +- .../acoustic_model/tests/test_aligner.py | 8 +- .../acoustic_model/tests/test_embedding.py | 2 +- .../tests/test_length_adaptor.py | 2 +- .../acoustic_model/tests/test_mas.py | 2 +- .../tests/test_phoneme_prosody_predictor.py | 2 +- .../tests/test_pitch_adaptor.py | 4 +- .../tests/test_pitch_adaptor2.py | 4 +- .../tests/test_pitch_phoneme_averaging.py | 2 +- .../tests/test_position_encoding.py | 2 +- .../tests/test_variance_predictor.py | 2 +- .../acoustic_model/variance_predictor.py | 4 +- {model => models}/attention/__init__.py | 0 {model => models}/attention/conformer.py | 0 .../attention/conformer_block.py | 2 +- .../attention/conformer_conv_module.py | 6 +- .../conformer_multi_headed_self_attention.py | 0 {model => models}/attention/feed_forward.py | 2 +- .../attention/multi_head_attention.py | 0 .../relative_multi_head_attention.py | 0 .../attention/style_embed_attention.py | 0 {model => models}/attention/tests/__init__.py | 0 .../attention/tests/test_conformer.py | 6 +- .../attention/tests/test_conformer_block.py | 6 +- .../tests/test_conformer_conv_module.py | 2 +- ...t_conformer_multi_headed_self_attention.py | 2 +- .../attention/tests/test_feed_forward.py | 2 +- .../tests/test_multi_head_attention.py | 2 +- .../test_relative_multi_head_attention.py | 2 +- .../tests/test_style_embed_attention.py | 2 +- {model => models}/checkpoints/.gitkeep | 0 {model => models}/config/__init__.py | 0 {model => models}/config/configs.py | 0 {model => models}/config/langs.py | 2 +- {model => models}/config/stats.json | 0 {model => models}/config/symbols.py | 0 {model => models}/constants.py | 0 {model => models}/conv_blocks/__init__.py | 0 {model => models}/conv_blocks/activation.py | 2 +- {model => models}/conv_blocks/add_coords.py | 0 {model => models}/conv_blocks/bsconv.py | 0 {model => models}/conv_blocks/conv1d.py | 0 {model => models}/conv_blocks/conv1d_glu.py | 0 .../conv_blocks/conv_transposed.py | 0 {model => models}/conv_blocks/coord_conv1d.py | 0 .../conv_blocks/tests/__init__.py | 0 .../conv_blocks/tests/test_activation.py | 2 +- .../conv_blocks/tests/test_add_coords.py | 2 +- .../conv_blocks/tests/test_bsconv.py | 2 +- .../conv_blocks/tests/test_conv1d.py | 2 +- .../conv_blocks/tests/test_conv1d_glu.py | 6 +- .../conv_blocks/tests/test_conv_transposed.py | 4 +- .../conv_blocks/tests/test_coord_conv1d.py | 2 +- {model => models}/helpers/__init__.py | 0 {model => models}/helpers/initializer.py | 10 +- {model => models}/helpers/tests/__init__.py | 0 .../helpers/tests/tests_tools/__init__.py | 0 .../tests_tools/test_calc_same_padding.py | 2 +- .../tests_tools/test_get_mask_from_lengths.py | 2 +- .../tests_tools/test_initialize_embeddings.py | 2 +- .../helpers/tests/tests_tools/test_pad.py | 2 +- .../test_stride_lens_downsampling.py | 2 +- {model => models}/helpers/tools.py | 0 {model => models}/reference_encoder/STL.py | 4 +- .../reference_encoder/__init__.py | 0 .../phoneme_level_prosody_encoder.py | 4 +- .../reference_encoder/reference_encoder.py | 8 +- .../reference_encoder/tests/__init__.py | 0 .../reference_encoder/tests/test_STL.py | 2 +- .../test_phoneme_level_prosody_encoder.py | 10 +- .../tests/test_reference_encoder.py | 4 +- .../test_utterance_level_prosody_encoder.py | 4 +- .../utterance_level_prosody_encoder.py | 2 +- {model => models}/univnet/__init__.py | 0 {model => models}/univnet/discriminator.py | 2 +- {model => models}/univnet/discriminator_p.py | 2 +- {model => models}/univnet/discriminator_r.py | 2 +- {model => models}/univnet/kernel_predictor.py | 0 {model => models}/univnet/lvc_block.py | 0 .../univnet/multi_period_discriminator.py | 2 +- .../univnet/multi_resolution_discriminator.py | 2 +- {model => models}/univnet/tests/__init__.py | 0 .../univnet/tests/test_discriminator.py | 4 +- .../univnet/tests/test_discriminator_p.py | 4 +- .../univnet/tests/test_discriminator_r.py | 4 +- .../univnet/tests/test_kernel_predictor.py | 2 +- .../univnet/tests/test_lvc_block.py | 2 +- .../tests/test_multi_period_discriminator.py | 4 +- .../test_multi_resolution_discriminator.py | 4 +- .../univnet/tests/test_traced_univnet.py | 6 +- .../univnet/tests/test_univnet.py | 4 +- {model => models}/univnet/traced_univnet.py | 2 +- {model => models}/univnet/univnet.py | 4 +- notebooks/demo_voices.py | 2 +- notebooks/experiments/conv_leaky_relu.py | 2 +- .../optimizer/scheduled_optim_finetuning.py | 2 +- .../optimizer/scheduled_optim_pretraining.py | 2 +- .../tests/test_scheduled_optim_finetuning.py | 2 +- .../tests/test_scheduled_optim_pretraining.py | 2 +- .../experiments/scheduled_optim_finetuning.py | 2 +- .../scheduled_optim_pretraining.py | 2 +- notebooks/libritts_prepared.py | 2 +- notebooks/preprocess_libritts.py | 2 +- notebooks/weights_load_check.py | 8 +- .../datasets/libritts_dataset_acoustic.py | 2 +- training/loss/metrics.py | 2 +- training/loss/univnet_loss.py | 2 +- training/modules/acoustic_module.py | 6 +- training/modules/tests/test_vocoder_module.py | 36 +++---- training/modules/vocoder_module.py | 4 +- training/preprocess/preprocess_libritts.py | 2 +- training/preprocess/tokenizer_ipa.py | 2 +- training/preprocess/tokenizer_ipa_espeak.py | 2 +- 220 files changed, 253 insertions(+), 253 deletions(-) delete mode 100644 docs/model/acoustic_model/acoustic_model.md delete mode 100644 docs/model/acoustic_model/aligner.md delete mode 100644 docs/model/acoustic_model/embedding.md delete mode 100644 docs/model/acoustic_model/helpers.md delete mode 100644 docs/model/acoustic_model/length_adaptor.md delete mode 100644 docs/model/acoustic_model/mas.md delete mode 100644 docs/model/acoustic_model/phoneme_prosody_predictor.md delete mode 100644 docs/model/acoustic_model/pitch_adaptor.md delete mode 100644 docs/model/acoustic_model/pitch_adaptor2.md delete mode 100644 docs/model/acoustic_model/variance_predictor.md delete mode 100644 docs/model/attention/conformer.md delete mode 100644 docs/model/attention/conformer_block.md delete mode 100644 docs/model/attention/conformer_conv_module.md delete mode 100644 docs/model/attention/conformer_multi_headed_self_attention.md delete mode 100644 docs/model/attention/feed_forward.md delete mode 100644 docs/model/attention/multi_head_attention.md delete mode 100644 docs/model/attention/relative_multi_head_attention.md delete mode 100644 docs/model/attention/style_embed_attention.md delete mode 100644 docs/model/config/langs.md delete mode 100644 docs/model/conv_blocks/activation.md delete mode 100644 docs/model/conv_blocks/add_coords.md delete mode 100644 docs/model/conv_blocks/bsconv.md delete mode 100644 docs/model/conv_blocks/conv1d.md delete mode 100644 docs/model/conv_blocks/conv1d_glu.md delete mode 100644 docs/model/conv_blocks/conv_transposed.md delete mode 100644 docs/model/conv_blocks/coord_conv1d.md delete mode 100644 docs/model/helpers/initializer.md delete mode 100644 docs/model/helpers/tools.md delete mode 100644 docs/model/reference_encoder/STL.md delete mode 100644 docs/model/reference_encoder/phoneme_level_prosody_encoder.md delete mode 100644 docs/model/reference_encoder/reference_encoder.md delete mode 100644 docs/model/reference_encoder/utterance_level_prosody_encoder.md delete mode 100644 docs/model/univnet/discriminator.md delete mode 100644 docs/model/univnet/discriminator_p.md delete mode 100644 docs/model/univnet/discriminator_r.md delete mode 100644 docs/model/univnet/kernel_predictor.md delete mode 100644 docs/model/univnet/lvc_block.md delete mode 100644 docs/model/univnet/multi_period_discriminator.md delete mode 100644 docs/model/univnet/multi_resolution_discriminator.md delete mode 100644 docs/model/univnet/traced_univnet.md delete mode 100644 docs/model/univnet/univnet.md create mode 100644 docs/models/acoustic_model/acoustic_model.md create mode 100644 docs/models/acoustic_model/aligner.md create mode 100644 docs/models/acoustic_model/embedding.md create mode 100644 docs/models/acoustic_model/helpers.md create mode 100644 docs/models/acoustic_model/length_adaptor.md create mode 100644 docs/models/acoustic_model/mas.md create mode 100644 docs/models/acoustic_model/phoneme_prosody_predictor.md create mode 100644 docs/models/acoustic_model/pitch_adaptor.md create mode 100644 docs/models/acoustic_model/pitch_adaptor2.md rename docs/{model => models}/acoustic_model/readme.md (100%) create mode 100644 docs/models/acoustic_model/variance_predictor.md create mode 100644 docs/models/attention/conformer.md create mode 100644 docs/models/attention/conformer_block.md create mode 100644 docs/models/attention/conformer_conv_module.md create mode 100644 docs/models/attention/conformer_multi_headed_self_attention.md create mode 100644 docs/models/attention/feed_forward.md create mode 100644 docs/models/attention/multi_head_attention.md rename docs/{model => models}/attention/readme.md (100%) create mode 100644 docs/models/attention/relative_multi_head_attention.md create mode 100644 docs/models/attention/style_embed_attention.md create mode 100644 docs/models/config/langs.md rename docs/{model => models}/config/readme.md (100%) create mode 100644 docs/models/conv_blocks/activation.md create mode 100644 docs/models/conv_blocks/add_coords.md create mode 100644 docs/models/conv_blocks/bsconv.md create mode 100644 docs/models/conv_blocks/conv1d.md create mode 100644 docs/models/conv_blocks/conv1d_glu.md create mode 100644 docs/models/conv_blocks/conv_transposed.md create mode 100644 docs/models/conv_blocks/coord_conv1d.md rename docs/{model => models}/conv_blocks/readme.md (100%) create mode 100644 docs/models/helpers/initializer.md rename docs/{model => models}/helpers/readme.md (100%) create mode 100644 docs/models/helpers/tools.md create mode 100644 docs/models/reference_encoder/STL.md create mode 100644 docs/models/reference_encoder/phoneme_level_prosody_encoder.md rename docs/{model => models}/reference_encoder/readme.md (100%) create mode 100644 docs/models/reference_encoder/reference_encoder.md create mode 100644 docs/models/reference_encoder/utterance_level_prosody_encoder.md create mode 100644 docs/models/univnet/discriminator.md create mode 100644 docs/models/univnet/discriminator_p.md create mode 100644 docs/models/univnet/discriminator_r.md create mode 100644 docs/models/univnet/kernel_predictor.md create mode 100644 docs/models/univnet/lvc_block.md create mode 100644 docs/models/univnet/multi_period_discriminator.md create mode 100644 docs/models/univnet/multi_resolution_discriminator.md rename docs/{model => models}/univnet/readme.md (100%) create mode 100644 docs/models/univnet/traced_univnet.md create mode 100644 docs/models/univnet/univnet.md rename {model => models}/__init__.py (100%) rename {model => models}/acoustic_model/__init__.py (100%) rename {model => models}/acoustic_model/acoustic_model.py (99%) rename {model => models}/acoustic_model/aligner.py (99%) rename {model => models}/acoustic_model/embedding.py (100%) rename {model => models}/acoustic_model/energy_adaptor.py (100%) rename {model => models}/acoustic_model/helpers.py (100%) rename {model => models}/acoustic_model/length_adaptor.py (98%) rename {model => models}/acoustic_model/mas.py (100%) rename {model => models}/acoustic_model/phoneme_prosody_predictor.py (96%) rename {model => models}/acoustic_model/pitch_adaptor.py (99%) rename {model => models}/acoustic_model/pitch_adaptor2.py (96%) rename {model => models}/acoustic_model/tests/__init__.py (100%) rename {model => models}/acoustic_model/tests/mocks/speakers.json (100%) rename {model => models}/acoustic_model/tests/mocks/stats.json (100%) rename {model => models}/acoustic_model/tests/test_accoustic_model.py (98%) rename {model => models}/acoustic_model/tests/test_aligner.py (97%) rename {model => models}/acoustic_model/tests/test_embedding.py (96%) rename {model => models}/acoustic_model/tests/test_length_adaptor.py (98%) rename {model => models}/acoustic_model/tests/test_mas.py (97%) rename {model => models}/acoustic_model/tests/test_phoneme_prosody_predictor.py (95%) rename {model => models}/acoustic_model/tests/test_pitch_adaptor.py (95%) rename {model => models}/acoustic_model/tests/test_pitch_adaptor2.py (92%) rename {model => models}/acoustic_model/tests/test_pitch_phoneme_averaging.py (96%) rename {model => models}/acoustic_model/tests/test_position_encoding.py (92%) rename {model => models}/acoustic_model/tests/test_variance_predictor.py (96%) rename {model => models}/acoustic_model/variance_predictor.py (96%) rename {model => models}/attention/__init__.py (100%) rename {model => models}/attention/conformer.py (100%) rename {model => models}/attention/conformer_block.py (98%) rename {model => models}/attention/conformer_conv_module.py (93%) rename {model => models}/attention/conformer_multi_headed_self_attention.py (100%) rename {model => models}/attention/feed_forward.py (98%) rename {model => models}/attention/multi_head_attention.py (100%) rename {model => models}/attention/relative_multi_head_attention.py (100%) rename {model => models}/attention/style_embed_attention.py (100%) rename {model => models}/attention/tests/__init__.py (100%) rename {model => models}/attention/tests/test_conformer.py (96%) rename {model => models}/attention/tests/test_conformer_block.py (96%) rename {model => models}/attention/tests/test_conformer_conv_module.py (92%) rename {model => models}/attention/tests/test_conformer_multi_headed_self_attention.py (95%) rename {model => models}/attention/tests/test_feed_forward.py (94%) rename {model => models}/attention/tests/test_multi_head_attention.py (94%) rename {model => models}/attention/tests/test_relative_multi_head_attention.py (96%) rename {model => models}/attention/tests/test_style_embed_attention.py (93%) rename {model => models}/checkpoints/.gitkeep (100%) rename {model => models}/config/__init__.py (100%) rename {model => models}/config/configs.py (100%) rename {model => models}/config/langs.py (96%) rename {model => models}/config/stats.json (100%) rename {model => models}/config/symbols.py (100%) rename {model => models}/constants.py (100%) rename {model => models}/conv_blocks/__init__.py (100%) rename {model => models}/conv_blocks/activation.py (97%) rename {model => models}/conv_blocks/add_coords.py (100%) rename {model => models}/conv_blocks/bsconv.py (100%) rename {model => models}/conv_blocks/conv1d.py (100%) rename {model => models}/conv_blocks/conv1d_glu.py (100%) rename {model => models}/conv_blocks/conv_transposed.py (100%) rename {model => models}/conv_blocks/coord_conv1d.py (100%) rename {model => models}/conv_blocks/tests/__init__.py (100%) rename {model => models}/conv_blocks/tests/test_activation.py (95%) rename {model => models}/conv_blocks/tests/test_add_coords.py (97%) rename {model => models}/conv_blocks/tests/test_bsconv.py (97%) rename {model => models}/conv_blocks/tests/test_conv1d.py (98%) rename {model => models}/conv_blocks/tests/test_conv1d_glu.py (94%) rename {model => models}/conv_blocks/tests/test_conv_transposed.py (96%) rename {model => models}/conv_blocks/tests/test_coord_conv1d.py (96%) rename {model => models}/helpers/__init__.py (100%) rename {model => models}/helpers/initializer.py (98%) rename {model => models}/helpers/tests/__init__.py (100%) rename {model => models}/helpers/tests/tests_tools/__init__.py (100%) rename {model => models}/helpers/tests/tests_tools/test_calc_same_padding.py (96%) rename {model => models}/helpers/tests/tests_tools/test_get_mask_from_lengths.py (94%) rename {model => models}/helpers/tests/tests_tools/test_initialize_embeddings.py (96%) rename {model => models}/helpers/tests/tests_tools/test_pad.py (96%) rename {model => models}/helpers/tests/tests_tools/test_stride_lens_downsampling.py (98%) rename {model => models}/helpers/tools.py (100%) rename {model => models}/reference_encoder/STL.py (95%) rename {model => models}/reference_encoder/__init__.py (100%) rename {model => models}/reference_encoder/phoneme_level_prosody_encoder.py (96%) rename {model => models}/reference_encoder/reference_encoder.py (96%) rename {model => models}/reference_encoder/tests/__init__.py (100%) rename {model => models}/reference_encoder/tests/test_STL.py (94%) rename {model => models}/reference_encoder/tests/test_phoneme_level_prosody_encoder.py (95%) rename {model => models}/reference_encoder/tests/test_reference_encoder.py (93%) rename {model => models}/reference_encoder/tests/test_utterance_level_prosody_encoder.py (89%) rename {model => models}/reference_encoder/utterance_level_prosody_encoder.py (97%) rename {model => models}/univnet/__init__.py (100%) rename {model => models}/univnet/discriminator.py (96%) rename {model => models}/univnet/discriminator_p.py (98%) rename {model => models}/univnet/discriminator_r.py (99%) rename {model => models}/univnet/kernel_predictor.py (100%) rename {model => models}/univnet/lvc_block.py (100%) rename {model => models}/univnet/multi_period_discriminator.py (96%) rename {model => models}/univnet/multi_resolution_discriminator.py (97%) rename {model => models}/univnet/tests/__init__.py (100%) rename {model => models}/univnet/tests/test_discriminator.py (97%) rename {model => models}/univnet/tests/test_discriminator_p.py (98%) rename {model => models}/univnet/tests/test_discriminator_r.py (94%) rename {model => models}/univnet/tests/test_kernel_predictor.py (96%) rename {model => models}/univnet/tests/test_lvc_block.py (98%) rename {model => models}/univnet/tests/test_multi_period_discriminator.py (97%) rename {model => models}/univnet/tests/test_multi_resolution_discriminator.py (95%) rename {model => models}/univnet/tests/test_traced_univnet.py (90%) rename {model => models}/univnet/tests/test_univnet.py (94%) rename {model => models}/univnet/traced_univnet.py (97%) rename {model => models}/univnet/univnet.py (97%) diff --git a/advanced-demo.ipynb b/advanced-demo.ipynb index 0f79347..f707bb8 100644 --- a/advanced-demo.ipynb +++ b/advanced-demo.ipynb @@ -27,7 +27,7 @@ "from sklearn.preprocessing import StandardScaler\n", "import torch\n", "\n", - "from model.helpers.tools import get_mask_from_lengths\n", + "from models.helpers.tools import get_mask_from_lengths\n", "from training.datasets import LibriTTSDatasetAcoustic\n", "from training.loss import FastSpeech2LossGen, Metrics\n", "from training.modules import AcousticModule\n", diff --git a/docs/index.md b/docs/index.md index 09736bd..cd25677 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,7 +17,7 @@ Description of the training process. Docs, ideas and examples for the training p ## Model -### [Acoustic Model](model/acoustic_model/readme.md) +### [Acoustic Model](models/acoustic_model/readme.md) The [DelightfulTTS: The Microsoft Speech Synthesis System for Blizzard Challenge 2021](https://arxiv.org/abs/2110.12612) AcousticModel class represents a PyTorch module for an acoustic model in text-to-speech (TTS). The acoustic model is responsible for predicting speech signals from phoneme sequences. @@ -25,20 +25,20 @@ The acoustic model is responsible for predicting speech signals from phoneme seq The model comprises multiple sub-modules including encoder, decoder and various prosody encoders and predictors. Additionally, a pitch and length adaptor are instantiated. -### [Reference Encoder](model/reference_encoder/readme.md) +### [Reference Encoder](models/reference_encoder/readme.md) Similar to Tacotron model, the reference encoder is used to extract the high-level features from the reference -### [Convolution Blocks](model/conv_blocks/readme.md) +### [Convolution Blocks](models/conv_blocks/readme.md) This part of the code responsible for the convolution blocks used in the model. Based on the FastSpeech models from [FastSpeech: Fast, Robust and Controllable Text to Speech](https://arxiv.org/abs/1905.09263) by Yi Ren et al and [FastSpeech 2: Fast and High-Quality End-to-End Text to Speech](https://arxiv.org/abs/2006.04558) by Yi Ren et al. -### [Attention](model/attention/readme.md) +### [Attention](models/attention/readme.md) Attention mechanizm used in the model. The concept of "global style tokens" (GST) was introduced in [Style Tokens: Unsupervised Style Modeling, Control and Transfer in End-to-End Speech Synthesis](https://arxiv.org/abs/1803.09017) by Yuxuan Wang et al. -### [Univnet](model/univnet/readme.md) +### [Univnet](models/univnet/readme.md) [UnivNet: A Neural Vocoder with Multi-Resolution Spectrogram Discriminators for High-Fidelity Waveform Generation](https://arxiv.org/abs/2106.07889v1) diff --git a/docs/model/acoustic_model/acoustic_model.md b/docs/model/acoustic_model/acoustic_model.md deleted file mode 100644 index 8fef354..0000000 --- a/docs/model/acoustic_model/acoustic_model.md +++ /dev/null @@ -1 +0,0 @@ -::: model.acoustic_model.acoustic_model \ No newline at end of file diff --git a/docs/model/acoustic_model/aligner.md b/docs/model/acoustic_model/aligner.md deleted file mode 100644 index 77930bc..0000000 --- a/docs/model/acoustic_model/aligner.md +++ /dev/null @@ -1 +0,0 @@ -::: model.acoustic_model.aligner \ No newline at end of file diff --git a/docs/model/acoustic_model/embedding.md b/docs/model/acoustic_model/embedding.md deleted file mode 100644 index 6447b3c..0000000 --- a/docs/model/acoustic_model/embedding.md +++ /dev/null @@ -1 +0,0 @@ -::: model.acoustic_model.embedding \ No newline at end of file diff --git a/docs/model/acoustic_model/helpers.md b/docs/model/acoustic_model/helpers.md deleted file mode 100644 index 020c31c..0000000 --- a/docs/model/acoustic_model/helpers.md +++ /dev/null @@ -1 +0,0 @@ -::: model.acoustic_model.helpers \ No newline at end of file diff --git a/docs/model/acoustic_model/length_adaptor.md b/docs/model/acoustic_model/length_adaptor.md deleted file mode 100644 index 627c9bb..0000000 --- a/docs/model/acoustic_model/length_adaptor.md +++ /dev/null @@ -1 +0,0 @@ -::: model.acoustic_model.length_adaptor \ No newline at end of file diff --git a/docs/model/acoustic_model/mas.md b/docs/model/acoustic_model/mas.md deleted file mode 100644 index c308b7c..0000000 --- a/docs/model/acoustic_model/mas.md +++ /dev/null @@ -1 +0,0 @@ -::: model.acoustic_model.mas \ No newline at end of file diff --git a/docs/model/acoustic_model/phoneme_prosody_predictor.md b/docs/model/acoustic_model/phoneme_prosody_predictor.md deleted file mode 100644 index 34fbd0f..0000000 --- a/docs/model/acoustic_model/phoneme_prosody_predictor.md +++ /dev/null @@ -1 +0,0 @@ -::: model.acoustic_model.phoneme_prosody_predictor \ No newline at end of file diff --git a/docs/model/acoustic_model/pitch_adaptor.md b/docs/model/acoustic_model/pitch_adaptor.md deleted file mode 100644 index 085af74..0000000 --- a/docs/model/acoustic_model/pitch_adaptor.md +++ /dev/null @@ -1 +0,0 @@ -::: model.acoustic_model.pitch_adaptor \ No newline at end of file diff --git a/docs/model/acoustic_model/pitch_adaptor2.md b/docs/model/acoustic_model/pitch_adaptor2.md deleted file mode 100644 index 0459157..0000000 --- a/docs/model/acoustic_model/pitch_adaptor2.md +++ /dev/null @@ -1 +0,0 @@ -::: model.acoustic_model.pitch_adaptor2 \ No newline at end of file diff --git a/docs/model/acoustic_model/variance_predictor.md b/docs/model/acoustic_model/variance_predictor.md deleted file mode 100644 index 546f96c..0000000 --- a/docs/model/acoustic_model/variance_predictor.md +++ /dev/null @@ -1 +0,0 @@ -::: model.acoustic_model.variance_predictor \ No newline at end of file diff --git a/docs/model/attention/conformer.md b/docs/model/attention/conformer.md deleted file mode 100644 index bacea75..0000000 --- a/docs/model/attention/conformer.md +++ /dev/null @@ -1 +0,0 @@ -::: model.attention.conformer \ No newline at end of file diff --git a/docs/model/attention/conformer_block.md b/docs/model/attention/conformer_block.md deleted file mode 100644 index d2cf4a3..0000000 --- a/docs/model/attention/conformer_block.md +++ /dev/null @@ -1 +0,0 @@ -::: model.attention.conformer_block \ No newline at end of file diff --git a/docs/model/attention/conformer_conv_module.md b/docs/model/attention/conformer_conv_module.md deleted file mode 100644 index a383a58..0000000 --- a/docs/model/attention/conformer_conv_module.md +++ /dev/null @@ -1 +0,0 @@ -::: model.attention.conformer_conv_module \ No newline at end of file diff --git a/docs/model/attention/conformer_multi_headed_self_attention.md b/docs/model/attention/conformer_multi_headed_self_attention.md deleted file mode 100644 index 6ef205e..0000000 --- a/docs/model/attention/conformer_multi_headed_self_attention.md +++ /dev/null @@ -1 +0,0 @@ -::: model.attention.conformer_multi_headed_self_attention \ No newline at end of file diff --git a/docs/model/attention/feed_forward.md b/docs/model/attention/feed_forward.md deleted file mode 100644 index 43bc4bd..0000000 --- a/docs/model/attention/feed_forward.md +++ /dev/null @@ -1 +0,0 @@ -::: model.attention.feed_forward \ No newline at end of file diff --git a/docs/model/attention/multi_head_attention.md b/docs/model/attention/multi_head_attention.md deleted file mode 100644 index 59be71f..0000000 --- a/docs/model/attention/multi_head_attention.md +++ /dev/null @@ -1 +0,0 @@ -::: model.attention.multi_head_attention \ No newline at end of file diff --git a/docs/model/attention/relative_multi_head_attention.md b/docs/model/attention/relative_multi_head_attention.md deleted file mode 100644 index ce29dd3..0000000 --- a/docs/model/attention/relative_multi_head_attention.md +++ /dev/null @@ -1 +0,0 @@ -::: model.attention.relative_multi_head_attention \ No newline at end of file diff --git a/docs/model/attention/style_embed_attention.md b/docs/model/attention/style_embed_attention.md deleted file mode 100644 index 80a669f..0000000 --- a/docs/model/attention/style_embed_attention.md +++ /dev/null @@ -1 +0,0 @@ -::: model.attention.style_embed_attention \ No newline at end of file diff --git a/docs/model/config/langs.md b/docs/model/config/langs.md deleted file mode 100644 index 5b44077..0000000 --- a/docs/model/config/langs.md +++ /dev/null @@ -1 +0,0 @@ -::: model.config.langs \ No newline at end of file diff --git a/docs/model/conv_blocks/activation.md b/docs/model/conv_blocks/activation.md deleted file mode 100644 index 79b0020..0000000 --- a/docs/model/conv_blocks/activation.md +++ /dev/null @@ -1 +0,0 @@ -::: model.conv_blocks.activation \ No newline at end of file diff --git a/docs/model/conv_blocks/add_coords.md b/docs/model/conv_blocks/add_coords.md deleted file mode 100644 index 4099438..0000000 --- a/docs/model/conv_blocks/add_coords.md +++ /dev/null @@ -1 +0,0 @@ -::: model.conv_blocks.add_coords \ No newline at end of file diff --git a/docs/model/conv_blocks/bsconv.md b/docs/model/conv_blocks/bsconv.md deleted file mode 100644 index 6a6c506..0000000 --- a/docs/model/conv_blocks/bsconv.md +++ /dev/null @@ -1 +0,0 @@ -::: model.conv_blocks.bsconv \ No newline at end of file diff --git a/docs/model/conv_blocks/conv1d.md b/docs/model/conv_blocks/conv1d.md deleted file mode 100644 index aca580a..0000000 --- a/docs/model/conv_blocks/conv1d.md +++ /dev/null @@ -1 +0,0 @@ -::: model.conv_blocks.conv1d \ No newline at end of file diff --git a/docs/model/conv_blocks/conv1d_glu.md b/docs/model/conv_blocks/conv1d_glu.md deleted file mode 100644 index 51314be..0000000 --- a/docs/model/conv_blocks/conv1d_glu.md +++ /dev/null @@ -1 +0,0 @@ -::: model.conv_blocks.conv1d_glu \ No newline at end of file diff --git a/docs/model/conv_blocks/conv_transposed.md b/docs/model/conv_blocks/conv_transposed.md deleted file mode 100644 index 39a429b..0000000 --- a/docs/model/conv_blocks/conv_transposed.md +++ /dev/null @@ -1 +0,0 @@ -::: model.conv_blocks.conv_transposed \ No newline at end of file diff --git a/docs/model/conv_blocks/coord_conv1d.md b/docs/model/conv_blocks/coord_conv1d.md deleted file mode 100644 index 56ed2af..0000000 --- a/docs/model/conv_blocks/coord_conv1d.md +++ /dev/null @@ -1 +0,0 @@ -::: model.conv_blocks.coord_conv1d \ No newline at end of file diff --git a/docs/model/helpers/initializer.md b/docs/model/helpers/initializer.md deleted file mode 100644 index bae660d..0000000 --- a/docs/model/helpers/initializer.md +++ /dev/null @@ -1 +0,0 @@ -::: model.helpers.initializer \ No newline at end of file diff --git a/docs/model/helpers/tools.md b/docs/model/helpers/tools.md deleted file mode 100644 index e56e2f6..0000000 --- a/docs/model/helpers/tools.md +++ /dev/null @@ -1 +0,0 @@ -::: model.helpers.tools \ No newline at end of file diff --git a/docs/model/reference_encoder/STL.md b/docs/model/reference_encoder/STL.md deleted file mode 100644 index 43d377c..0000000 --- a/docs/model/reference_encoder/STL.md +++ /dev/null @@ -1 +0,0 @@ -::: model.reference_encoder.STL \ No newline at end of file diff --git a/docs/model/reference_encoder/phoneme_level_prosody_encoder.md b/docs/model/reference_encoder/phoneme_level_prosody_encoder.md deleted file mode 100644 index fcbb22f..0000000 --- a/docs/model/reference_encoder/phoneme_level_prosody_encoder.md +++ /dev/null @@ -1 +0,0 @@ -::: model.reference_encoder.phoneme_level_prosody_encoder \ No newline at end of file diff --git a/docs/model/reference_encoder/reference_encoder.md b/docs/model/reference_encoder/reference_encoder.md deleted file mode 100644 index cf29506..0000000 --- a/docs/model/reference_encoder/reference_encoder.md +++ /dev/null @@ -1 +0,0 @@ -::: model.reference_encoder.reference_encoder \ No newline at end of file diff --git a/docs/model/reference_encoder/utterance_level_prosody_encoder.md b/docs/model/reference_encoder/utterance_level_prosody_encoder.md deleted file mode 100644 index 9ec3849..0000000 --- a/docs/model/reference_encoder/utterance_level_prosody_encoder.md +++ /dev/null @@ -1 +0,0 @@ -::: model.reference_encoder.utterance_level_prosody_encoder \ No newline at end of file diff --git a/docs/model/univnet/discriminator.md b/docs/model/univnet/discriminator.md deleted file mode 100644 index f05a851..0000000 --- a/docs/model/univnet/discriminator.md +++ /dev/null @@ -1 +0,0 @@ -::: model.univnet.discriminator \ No newline at end of file diff --git a/docs/model/univnet/discriminator_p.md b/docs/model/univnet/discriminator_p.md deleted file mode 100644 index 0e6e479..0000000 --- a/docs/model/univnet/discriminator_p.md +++ /dev/null @@ -1 +0,0 @@ -::: model.univnet.discriminator_p \ No newline at end of file diff --git a/docs/model/univnet/discriminator_r.md b/docs/model/univnet/discriminator_r.md deleted file mode 100644 index 26e58a3..0000000 --- a/docs/model/univnet/discriminator_r.md +++ /dev/null @@ -1 +0,0 @@ -::: model.univnet.discriminator_r \ No newline at end of file diff --git a/docs/model/univnet/kernel_predictor.md b/docs/model/univnet/kernel_predictor.md deleted file mode 100644 index 6403c9c..0000000 --- a/docs/model/univnet/kernel_predictor.md +++ /dev/null @@ -1 +0,0 @@ -::: model.univnet.kernel_predictor \ No newline at end of file diff --git a/docs/model/univnet/lvc_block.md b/docs/model/univnet/lvc_block.md deleted file mode 100644 index 6643038..0000000 --- a/docs/model/univnet/lvc_block.md +++ /dev/null @@ -1 +0,0 @@ -::: model.univnet.lvc_block \ No newline at end of file diff --git a/docs/model/univnet/multi_period_discriminator.md b/docs/model/univnet/multi_period_discriminator.md deleted file mode 100644 index dd6154e..0000000 --- a/docs/model/univnet/multi_period_discriminator.md +++ /dev/null @@ -1 +0,0 @@ -::: model.univnet.multi_period_discriminator \ No newline at end of file diff --git a/docs/model/univnet/multi_resolution_discriminator.md b/docs/model/univnet/multi_resolution_discriminator.md deleted file mode 100644 index c1edee8..0000000 --- a/docs/model/univnet/multi_resolution_discriminator.md +++ /dev/null @@ -1 +0,0 @@ -::: model.univnet.multi_resolution_discriminator \ No newline at end of file diff --git a/docs/model/univnet/traced_univnet.md b/docs/model/univnet/traced_univnet.md deleted file mode 100644 index 1e1cb02..0000000 --- a/docs/model/univnet/traced_univnet.md +++ /dev/null @@ -1 +0,0 @@ -::: model.univnet.traced_univnet \ No newline at end of file diff --git a/docs/model/univnet/univnet.md b/docs/model/univnet/univnet.md deleted file mode 100644 index 0431e7e..0000000 --- a/docs/model/univnet/univnet.md +++ /dev/null @@ -1 +0,0 @@ -::: model.univnet.univnet \ No newline at end of file diff --git a/docs/models/acoustic_model/acoustic_model.md b/docs/models/acoustic_model/acoustic_model.md new file mode 100644 index 0000000..4a13c58 --- /dev/null +++ b/docs/models/acoustic_model/acoustic_model.md @@ -0,0 +1 @@ +::: models.acoustic_model.acoustic_model \ No newline at end of file diff --git a/docs/models/acoustic_model/aligner.md b/docs/models/acoustic_model/aligner.md new file mode 100644 index 0000000..0cde217 --- /dev/null +++ b/docs/models/acoustic_model/aligner.md @@ -0,0 +1 @@ +::: models.acoustic_model.aligner \ No newline at end of file diff --git a/docs/models/acoustic_model/embedding.md b/docs/models/acoustic_model/embedding.md new file mode 100644 index 0000000..72c784c --- /dev/null +++ b/docs/models/acoustic_model/embedding.md @@ -0,0 +1 @@ +::: models.acoustic_model.embedding \ No newline at end of file diff --git a/docs/models/acoustic_model/helpers.md b/docs/models/acoustic_model/helpers.md new file mode 100644 index 0000000..d14e7fb --- /dev/null +++ b/docs/models/acoustic_model/helpers.md @@ -0,0 +1 @@ +::: models.acoustic_model.helpers \ No newline at end of file diff --git a/docs/models/acoustic_model/length_adaptor.md b/docs/models/acoustic_model/length_adaptor.md new file mode 100644 index 0000000..6863884 --- /dev/null +++ b/docs/models/acoustic_model/length_adaptor.md @@ -0,0 +1 @@ +::: models.acoustic_model.length_adaptor \ No newline at end of file diff --git a/docs/models/acoustic_model/mas.md b/docs/models/acoustic_model/mas.md new file mode 100644 index 0000000..f3c6c17 --- /dev/null +++ b/docs/models/acoustic_model/mas.md @@ -0,0 +1 @@ +::: models.acoustic_model.mas \ No newline at end of file diff --git a/docs/models/acoustic_model/phoneme_prosody_predictor.md b/docs/models/acoustic_model/phoneme_prosody_predictor.md new file mode 100644 index 0000000..483538f --- /dev/null +++ b/docs/models/acoustic_model/phoneme_prosody_predictor.md @@ -0,0 +1 @@ +::: models.acoustic_model.phoneme_prosody_predictor \ No newline at end of file diff --git a/docs/models/acoustic_model/pitch_adaptor.md b/docs/models/acoustic_model/pitch_adaptor.md new file mode 100644 index 0000000..b758bf9 --- /dev/null +++ b/docs/models/acoustic_model/pitch_adaptor.md @@ -0,0 +1 @@ +::: models.acoustic_model.pitch_adaptor \ No newline at end of file diff --git a/docs/models/acoustic_model/pitch_adaptor2.md b/docs/models/acoustic_model/pitch_adaptor2.md new file mode 100644 index 0000000..77648c9 --- /dev/null +++ b/docs/models/acoustic_model/pitch_adaptor2.md @@ -0,0 +1 @@ +::: models.acoustic_model.pitch_adaptor2 \ No newline at end of file diff --git a/docs/model/acoustic_model/readme.md b/docs/models/acoustic_model/readme.md similarity index 100% rename from docs/model/acoustic_model/readme.md rename to docs/models/acoustic_model/readme.md diff --git a/docs/models/acoustic_model/variance_predictor.md b/docs/models/acoustic_model/variance_predictor.md new file mode 100644 index 0000000..3b52e24 --- /dev/null +++ b/docs/models/acoustic_model/variance_predictor.md @@ -0,0 +1 @@ +::: models.acoustic_model.variance_predictor \ No newline at end of file diff --git a/docs/models/attention/conformer.md b/docs/models/attention/conformer.md new file mode 100644 index 0000000..a29ab10 --- /dev/null +++ b/docs/models/attention/conformer.md @@ -0,0 +1 @@ +::: models.attention.conformer \ No newline at end of file diff --git a/docs/models/attention/conformer_block.md b/docs/models/attention/conformer_block.md new file mode 100644 index 0000000..b6eaff0 --- /dev/null +++ b/docs/models/attention/conformer_block.md @@ -0,0 +1 @@ +::: models.attention.conformer_block \ No newline at end of file diff --git a/docs/models/attention/conformer_conv_module.md b/docs/models/attention/conformer_conv_module.md new file mode 100644 index 0000000..32b08cc --- /dev/null +++ b/docs/models/attention/conformer_conv_module.md @@ -0,0 +1 @@ +::: models.attention.conformer_conv_module \ No newline at end of file diff --git a/docs/models/attention/conformer_multi_headed_self_attention.md b/docs/models/attention/conformer_multi_headed_self_attention.md new file mode 100644 index 0000000..ba6aea7 --- /dev/null +++ b/docs/models/attention/conformer_multi_headed_self_attention.md @@ -0,0 +1 @@ +::: models.attention.conformer_multi_headed_self_attention \ No newline at end of file diff --git a/docs/models/attention/feed_forward.md b/docs/models/attention/feed_forward.md new file mode 100644 index 0000000..7aefd86 --- /dev/null +++ b/docs/models/attention/feed_forward.md @@ -0,0 +1 @@ +::: models.attention.feed_forward \ No newline at end of file diff --git a/docs/models/attention/multi_head_attention.md b/docs/models/attention/multi_head_attention.md new file mode 100644 index 0000000..519981b --- /dev/null +++ b/docs/models/attention/multi_head_attention.md @@ -0,0 +1 @@ +::: models.attention.multi_head_attention \ No newline at end of file diff --git a/docs/model/attention/readme.md b/docs/models/attention/readme.md similarity index 100% rename from docs/model/attention/readme.md rename to docs/models/attention/readme.md diff --git a/docs/models/attention/relative_multi_head_attention.md b/docs/models/attention/relative_multi_head_attention.md new file mode 100644 index 0000000..4c0d685 --- /dev/null +++ b/docs/models/attention/relative_multi_head_attention.md @@ -0,0 +1 @@ +::: models.attention.relative_multi_head_attention \ No newline at end of file diff --git a/docs/models/attention/style_embed_attention.md b/docs/models/attention/style_embed_attention.md new file mode 100644 index 0000000..12c65bc --- /dev/null +++ b/docs/models/attention/style_embed_attention.md @@ -0,0 +1 @@ +::: models.attention.style_embed_attention \ No newline at end of file diff --git a/docs/models/config/langs.md b/docs/models/config/langs.md new file mode 100644 index 0000000..bc795fd --- /dev/null +++ b/docs/models/config/langs.md @@ -0,0 +1 @@ +::: models.config.langs \ No newline at end of file diff --git a/docs/model/config/readme.md b/docs/models/config/readme.md similarity index 100% rename from docs/model/config/readme.md rename to docs/models/config/readme.md diff --git a/docs/models/conv_blocks/activation.md b/docs/models/conv_blocks/activation.md new file mode 100644 index 0000000..4281ca1 --- /dev/null +++ b/docs/models/conv_blocks/activation.md @@ -0,0 +1 @@ +::: models.conv_blocks.activation \ No newline at end of file diff --git a/docs/models/conv_blocks/add_coords.md b/docs/models/conv_blocks/add_coords.md new file mode 100644 index 0000000..3dec502 --- /dev/null +++ b/docs/models/conv_blocks/add_coords.md @@ -0,0 +1 @@ +::: models.conv_blocks.add_coords \ No newline at end of file diff --git a/docs/models/conv_blocks/bsconv.md b/docs/models/conv_blocks/bsconv.md new file mode 100644 index 0000000..8d493ee --- /dev/null +++ b/docs/models/conv_blocks/bsconv.md @@ -0,0 +1 @@ +::: models.conv_blocks.bsconv \ No newline at end of file diff --git a/docs/models/conv_blocks/conv1d.md b/docs/models/conv_blocks/conv1d.md new file mode 100644 index 0000000..fdaf9ca --- /dev/null +++ b/docs/models/conv_blocks/conv1d.md @@ -0,0 +1 @@ +::: models.conv_blocks.conv1d \ No newline at end of file diff --git a/docs/models/conv_blocks/conv1d_glu.md b/docs/models/conv_blocks/conv1d_glu.md new file mode 100644 index 0000000..b1c0130 --- /dev/null +++ b/docs/models/conv_blocks/conv1d_glu.md @@ -0,0 +1 @@ +::: models.conv_blocks.conv1d_glu \ No newline at end of file diff --git a/docs/models/conv_blocks/conv_transposed.md b/docs/models/conv_blocks/conv_transposed.md new file mode 100644 index 0000000..7048c9b --- /dev/null +++ b/docs/models/conv_blocks/conv_transposed.md @@ -0,0 +1 @@ +::: models.conv_blocks.conv_transposed \ No newline at end of file diff --git a/docs/models/conv_blocks/coord_conv1d.md b/docs/models/conv_blocks/coord_conv1d.md new file mode 100644 index 0000000..5714703 --- /dev/null +++ b/docs/models/conv_blocks/coord_conv1d.md @@ -0,0 +1 @@ +::: models.conv_blocks.coord_conv1d \ No newline at end of file diff --git a/docs/model/conv_blocks/readme.md b/docs/models/conv_blocks/readme.md similarity index 100% rename from docs/model/conv_blocks/readme.md rename to docs/models/conv_blocks/readme.md diff --git a/docs/models/helpers/initializer.md b/docs/models/helpers/initializer.md new file mode 100644 index 0000000..906ef08 --- /dev/null +++ b/docs/models/helpers/initializer.md @@ -0,0 +1 @@ +::: models.helpers.initializer \ No newline at end of file diff --git a/docs/model/helpers/readme.md b/docs/models/helpers/readme.md similarity index 100% rename from docs/model/helpers/readme.md rename to docs/models/helpers/readme.md diff --git a/docs/models/helpers/tools.md b/docs/models/helpers/tools.md new file mode 100644 index 0000000..6914f70 --- /dev/null +++ b/docs/models/helpers/tools.md @@ -0,0 +1 @@ +::: models.helpers.tools \ No newline at end of file diff --git a/docs/models/reference_encoder/STL.md b/docs/models/reference_encoder/STL.md new file mode 100644 index 0000000..4a7b233 --- /dev/null +++ b/docs/models/reference_encoder/STL.md @@ -0,0 +1 @@ +::: models.reference_encoder.STL \ No newline at end of file diff --git a/docs/models/reference_encoder/phoneme_level_prosody_encoder.md b/docs/models/reference_encoder/phoneme_level_prosody_encoder.md new file mode 100644 index 0000000..71624bc --- /dev/null +++ b/docs/models/reference_encoder/phoneme_level_prosody_encoder.md @@ -0,0 +1 @@ +::: models.reference_encoder.phoneme_level_prosody_encoder \ No newline at end of file diff --git a/docs/model/reference_encoder/readme.md b/docs/models/reference_encoder/readme.md similarity index 100% rename from docs/model/reference_encoder/readme.md rename to docs/models/reference_encoder/readme.md diff --git a/docs/models/reference_encoder/reference_encoder.md b/docs/models/reference_encoder/reference_encoder.md new file mode 100644 index 0000000..9df85d6 --- /dev/null +++ b/docs/models/reference_encoder/reference_encoder.md @@ -0,0 +1 @@ +::: models.reference_encoder.reference_encoder \ No newline at end of file diff --git a/docs/models/reference_encoder/utterance_level_prosody_encoder.md b/docs/models/reference_encoder/utterance_level_prosody_encoder.md new file mode 100644 index 0000000..a3aa224 --- /dev/null +++ b/docs/models/reference_encoder/utterance_level_prosody_encoder.md @@ -0,0 +1 @@ +::: models.reference_encoder.utterance_level_prosody_encoder \ No newline at end of file diff --git a/docs/models/univnet/discriminator.md b/docs/models/univnet/discriminator.md new file mode 100644 index 0000000..b381a83 --- /dev/null +++ b/docs/models/univnet/discriminator.md @@ -0,0 +1 @@ +::: models.univnet.discriminator \ No newline at end of file diff --git a/docs/models/univnet/discriminator_p.md b/docs/models/univnet/discriminator_p.md new file mode 100644 index 0000000..038fb5b --- /dev/null +++ b/docs/models/univnet/discriminator_p.md @@ -0,0 +1 @@ +::: models.univnet.discriminator_p \ No newline at end of file diff --git a/docs/models/univnet/discriminator_r.md b/docs/models/univnet/discriminator_r.md new file mode 100644 index 0000000..3df361c --- /dev/null +++ b/docs/models/univnet/discriminator_r.md @@ -0,0 +1 @@ +::: models.univnet.discriminator_r \ No newline at end of file diff --git a/docs/models/univnet/kernel_predictor.md b/docs/models/univnet/kernel_predictor.md new file mode 100644 index 0000000..a555bd9 --- /dev/null +++ b/docs/models/univnet/kernel_predictor.md @@ -0,0 +1 @@ +::: models.univnet.kernel_predictor \ No newline at end of file diff --git a/docs/models/univnet/lvc_block.md b/docs/models/univnet/lvc_block.md new file mode 100644 index 0000000..a329303 --- /dev/null +++ b/docs/models/univnet/lvc_block.md @@ -0,0 +1 @@ +::: models.univnet.lvc_block \ No newline at end of file diff --git a/docs/models/univnet/multi_period_discriminator.md b/docs/models/univnet/multi_period_discriminator.md new file mode 100644 index 0000000..5449be9 --- /dev/null +++ b/docs/models/univnet/multi_period_discriminator.md @@ -0,0 +1 @@ +::: models.univnet.multi_period_discriminator \ No newline at end of file diff --git a/docs/models/univnet/multi_resolution_discriminator.md b/docs/models/univnet/multi_resolution_discriminator.md new file mode 100644 index 0000000..798a648 --- /dev/null +++ b/docs/models/univnet/multi_resolution_discriminator.md @@ -0,0 +1 @@ +::: models.univnet.multi_resolution_discriminator \ No newline at end of file diff --git a/docs/model/univnet/readme.md b/docs/models/univnet/readme.md similarity index 100% rename from docs/model/univnet/readme.md rename to docs/models/univnet/readme.md diff --git a/docs/models/univnet/traced_univnet.md b/docs/models/univnet/traced_univnet.md new file mode 100644 index 0000000..a66edae --- /dev/null +++ b/docs/models/univnet/traced_univnet.md @@ -0,0 +1 @@ +::: models.univnet.traced_univnet \ No newline at end of file diff --git a/docs/models/univnet/univnet.md b/docs/models/univnet/univnet.md new file mode 100644 index 0000000..ab69f16 --- /dev/null +++ b/docs/models/univnet/univnet.md @@ -0,0 +1 @@ +::: models.univnet.univnet \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index da47411..76b0cb8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -28,63 +28,63 @@ nav: - Advanced: - Configure hyperparameters from the CLI: dev/lightning/advanced/hyperparameters_from_the_cli.md - Customize training loop: dev/lightning/advanced/own_your_loop.md - - Model: + - Models: - Convolution Blocks: - - References: model/conv_blocks/readme.md - - Activation: model/conv_blocks/activation.md - - Conv1d: model/conv_blocks/conv1d.md - - BSConv: model/conv_blocks/bsconv.md - - Conv1dGLU: model/conv_blocks/conv1d_glu.md - - ConvTransposed: model/conv_blocks/conv_transposed.md - - CoordConv1d: model/conv_blocks/coord_conv1d.md - - AddCoords: model/conv_blocks/add_coords.md + - References: models/conv_blocks/readme.md + - Activation: models/conv_blocks/activation.md + - Conv1d: models/conv_blocks/conv1d.md + - BSConv: models/conv_blocks/bsconv.md + - Conv1dGLU: models/conv_blocks/conv1d_glu.md + - ConvTransposed: models/conv_blocks/conv_transposed.md + - CoordConv1d: models/conv_blocks/coord_conv1d.md + - AddCoords: models/conv_blocks/add_coords.md - Attention: - - References: model/attention/readme.md - - Conformer: model/attention/conformer.md - - Feed Forward: model/attention/feed_forward.md - - Style Embed Attention: model/attention/style_embed_attention.md - - Multi-Head Attention: model/attention/multi_head_attention.md - - Relative Multi-Head Attention: model/attention/relative_multi_head_attention.md - - Conformer Multi-Headed Self Attention: model/attention/conformer_multi_headed_self_attention.md - - Conformer Convolution Module: model/attention/conformer_conv_module.md - - Conformer Block: model/attention/conformer_block.md + - References: models/attention/readme.md + - Conformer: models/attention/conformer.md + - Feed Forward: models/attention/feed_forward.md + - Style Embed Attention: models/attention/style_embed_attention.md + - Multi-Head Attention: models/attention/multi_head_attention.md + - Relative Multi-Head Attention: models/attention/relative_multi_head_attention.md + - Conformer Multi-Headed Self Attention: models/attention/conformer_multi_headed_self_attention.md + - Conformer Convolution Module: models/attention/conformer_conv_module.md + - Conformer Block: models/attention/conformer_block.md - Acoustic Model: - - Aligner: model/acoustic_model/aligner.md - - References: model/acoustic_model/readme.md - - Accoustic Model: model/acoustic_model/acoustic_model.md - - Embedding: model/acoustic_model/embedding.md - - Helpers: model/acoustic_model/helpers.md - - Variance Predictor: model/acoustic_model/variance_predictor.md - - Pitch Adaptor: model/acoustic_model/pitch_adaptor.md - - Pitch Adaptor2: model/acoustic_model/pitch_adaptor2.md - - Length Adaptor: model/acoustic_model/length_adaptor.md - - Phoneme Prosody Predictor: model/acoustic_model/phoneme_prosody_predictor.md + - Aligner: models/acoustic_model/aligner.md + - References: models/acoustic_model/readme.md + - Accoustic Model: models/acoustic_model/acoustic_model.md + - Embedding: models/acoustic_model/embedding.md + - Helpers: models/acoustic_model/helpers.md + - Variance Predictor: models/acoustic_model/variance_predictor.md + - Pitch Adaptor: models/acoustic_model/pitch_adaptor.md + - Pitch Adaptor2: models/acoustic_model/pitch_adaptor2.md + - Length Adaptor: models/acoustic_model/length_adaptor.md + - Phoneme Prosody Predictor: models/acoustic_model/phoneme_prosody_predictor.md - Aligner: - - Monotonic Alignments Shrink: model/acoustic_model/mas.md + - Monotonic Alignments Shrink: models/acoustic_model/mas.md - Config: - - References: model/config/readme.md - - Langs: model/config/langs.md + - References: models/config/readme.md + - Langs: models/config/langs.md - Reference Encoder: - - References: model/reference_encoder/readme.md - - Style Token Layer (STL): model/reference_encoder/STL.md - - Reference Encoder: model/reference_encoder/reference_encoder.md - - Utterance Level Prosody Encoder: model/reference_encoder/utterance_level_prosody_encoder.md - - Phoneme Level Prosody Encoder: model/reference_encoder/phoneme_level_prosody_encoder.md + - References: models/reference_encoder/readme.md + - Style Token Layer (STL): models/reference_encoder/STL.md + - Reference Encoder: models/reference_encoder/reference_encoder.md + - Utterance Level Prosody Encoder: models/reference_encoder/utterance_level_prosody_encoder.md + - Phoneme Level Prosody Encoder: models/reference_encoder/phoneme_level_prosody_encoder.md - Univnet: - - References: model/univnet/readme.md - - Univnet: model/univnet/univnet.md - - Traced Univnet: model/univnet/traced_univnet.md - - Kernel Predictor: model/univnet/kernel_predictor.md - - LVC Block: model/univnet/lvc_block.md - - Discriminator: model/univnet/discriminator.md - - DiscriminatorP: model/univnet/discriminator_p.md - - DiscriminatorR: model/univnet/discriminator_r.md - - Multi Period Discriminator: model/univnet/multi_period_discriminator.md - - Multi Resolution Discriminator: model/univnet/multi_resolution_discriminator.md + - References: models/univnet/readme.md + - Univnet: models/univnet/univnet.md + - Traced Univnet: models/univnet/traced_univnet.md + - Kernel Predictor: models/univnet/kernel_predictor.md + - LVC Block: models/univnet/lvc_block.md + - Discriminator: models/univnet/discriminator.md + - DiscriminatorP: models/univnet/discriminator_p.md + - DiscriminatorR: models/univnet/discriminator_r.md + - Multi Period Discriminator: models/univnet/multi_period_discriminator.md + - Multi Resolution Discriminator: models/univnet/multi_resolution_discriminator.md - Helpers: - - References: model/helpers/readme.md - - Initializer: model/helpers/initializer.md - - Tools: model/helpers/tools.md + - References: models/helpers/readme.md + - Initializer: models/helpers/initializer.md + - Tools: models/helpers/tools.md - Training: - References: training/readme.md - Modules: diff --git a/model/__init__.py b/models/__init__.py similarity index 100% rename from model/__init__.py rename to models/__init__.py diff --git a/model/acoustic_model/__init__.py b/models/acoustic_model/__init__.py similarity index 100% rename from model/acoustic_model/__init__.py rename to models/acoustic_model/__init__.py diff --git a/model/acoustic_model/acoustic_model.py b/models/acoustic_model/acoustic_model.py similarity index 99% rename from model/acoustic_model/acoustic_model.py rename to models/acoustic_model/acoustic_model.py index bd1fe3e..af93358 100644 --- a/model/acoustic_model/acoustic_model.py +++ b/models/acoustic_model/acoustic_model.py @@ -6,15 +6,15 @@ import torch.nn.functional as F from torch.nn.parameter import Parameter -from model.attention import Conformer -from model.config import ( +from models.attention import Conformer +from models.config import ( SUPPORTED_LANGUAGES, AcousticModelConfigType, PreprocessingConfig, symbols, ) -from model.helpers import tools -from model.reference_encoder import ( +from models.helpers import tools +from models.reference_encoder import ( PhonemeLevelProsodyEncoder, UtteranceLevelProsodyEncoder, ) diff --git a/model/acoustic_model/aligner.py b/models/acoustic_model/aligner.py similarity index 99% rename from model/acoustic_model/aligner.py rename to models/acoustic_model/aligner.py index fa38aaa..1cf76b4 100644 --- a/model/acoustic_model/aligner.py +++ b/models/acoustic_model/aligner.py @@ -4,7 +4,7 @@ from torch import nn from torch.nn import Module -from model.constants import LEAKY_RELU_SLOPE +from models.constants import LEAKY_RELU_SLOPE from .mas import b_mas diff --git a/model/acoustic_model/embedding.py b/models/acoustic_model/embedding.py similarity index 100% rename from model/acoustic_model/embedding.py rename to models/acoustic_model/embedding.py diff --git a/model/acoustic_model/energy_adaptor.py b/models/acoustic_model/energy_adaptor.py similarity index 100% rename from model/acoustic_model/energy_adaptor.py rename to models/acoustic_model/energy_adaptor.py diff --git a/model/acoustic_model/helpers.py b/models/acoustic_model/helpers.py similarity index 100% rename from model/acoustic_model/helpers.py rename to models/acoustic_model/helpers.py diff --git a/model/acoustic_model/length_adaptor.py b/models/acoustic_model/length_adaptor.py similarity index 98% rename from model/acoustic_model/length_adaptor.py rename to models/acoustic_model/length_adaptor.py index 7e3bc59..023d263 100644 --- a/model/acoustic_model/length_adaptor.py +++ b/models/acoustic_model/length_adaptor.py @@ -3,8 +3,8 @@ import torch from torch.nn import Module -from model.config import AcousticModelConfigType -from model.helpers import tools +from models.config import AcousticModelConfigType +from models.helpers import tools from .variance_predictor import VariancePredictor diff --git a/model/acoustic_model/mas.py b/models/acoustic_model/mas.py similarity index 100% rename from model/acoustic_model/mas.py rename to models/acoustic_model/mas.py diff --git a/model/acoustic_model/phoneme_prosody_predictor.py b/models/acoustic_model/phoneme_prosody_predictor.py similarity index 96% rename from model/acoustic_model/phoneme_prosody_predictor.py rename to models/acoustic_model/phoneme_prosody_predictor.py index 15527b8..99ea36a 100644 --- a/model/acoustic_model/phoneme_prosody_predictor.py +++ b/models/acoustic_model/phoneme_prosody_predictor.py @@ -2,9 +2,9 @@ from torch import nn from torch.nn import Module -from model.config import AcousticModelConfigType -from model.constants import LEAKY_RELU_SLOPE -from model.conv_blocks import ConvTransposed +from models.config import AcousticModelConfigType +from models.constants import LEAKY_RELU_SLOPE +from models.conv_blocks import ConvTransposed class PhonemeProsodyPredictor(Module): diff --git a/model/acoustic_model/pitch_adaptor.py b/models/acoustic_model/pitch_adaptor.py similarity index 99% rename from model/acoustic_model/pitch_adaptor.py rename to models/acoustic_model/pitch_adaptor.py index 37e3aac..21d0764 100644 --- a/model/acoustic_model/pitch_adaptor.py +++ b/models/acoustic_model/pitch_adaptor.py @@ -5,7 +5,7 @@ import torch from torch.nn import Module -from model.config import AcousticModelConfigType +from models.config import AcousticModelConfigType from .embedding import Embedding from .variance_predictor import VariancePredictor diff --git a/model/acoustic_model/pitch_adaptor2.py b/models/acoustic_model/pitch_adaptor2.py similarity index 96% rename from model/acoustic_model/pitch_adaptor2.py rename to models/acoustic_model/pitch_adaptor2.py index ef8c573..19911a5 100644 --- a/model/acoustic_model/pitch_adaptor2.py +++ b/models/acoustic_model/pitch_adaptor2.py @@ -3,7 +3,7 @@ import torch from torch.nn import Module -from model.config import AcousticModelConfigType +from models.config import AcousticModelConfigType from .embedding import Embedding from .variance_predictor import VariancePredictor diff --git a/model/acoustic_model/tests/__init__.py b/models/acoustic_model/tests/__init__.py similarity index 100% rename from model/acoustic_model/tests/__init__.py rename to models/acoustic_model/tests/__init__.py diff --git a/model/acoustic_model/tests/mocks/speakers.json b/models/acoustic_model/tests/mocks/speakers.json similarity index 100% rename from model/acoustic_model/tests/mocks/speakers.json rename to models/acoustic_model/tests/mocks/speakers.json diff --git a/model/acoustic_model/tests/mocks/stats.json b/models/acoustic_model/tests/mocks/stats.json similarity index 100% rename from model/acoustic_model/tests/mocks/stats.json rename to models/acoustic_model/tests/mocks/stats.json diff --git a/model/acoustic_model/tests/test_accoustic_model.py b/models/acoustic_model/tests/test_accoustic_model.py similarity index 98% rename from model/acoustic_model/tests/test_accoustic_model.py rename to models/acoustic_model/tests/test_accoustic_model.py index 756f2e4..82a57e8 100644 --- a/model/acoustic_model/tests/test_accoustic_model.py +++ b/models/acoustic_model/tests/test_accoustic_model.py @@ -4,8 +4,8 @@ # TODO: profile deeply the memory usage # from torch.profiler import profile, record_function, ProfilerActivity -from model.helpers import tools -from model.helpers.initializer import ( +from models.helpers import tools +from models.helpers.initializer import ( get_test_configs, init_acoustic_model, init_forward_trains_params, diff --git a/model/acoustic_model/tests/test_aligner.py b/models/acoustic_model/tests/test_aligner.py similarity index 97% rename from model/acoustic_model/tests/test_aligner.py rename to models/acoustic_model/tests/test_aligner.py index 36866ef..24ff2d4 100644 --- a/model/acoustic_model/tests/test_aligner.py +++ b/models/acoustic_model/tests/test_aligner.py @@ -3,19 +3,19 @@ import torch from torch import nn -from model.acoustic_model.aligner import Aligner -from model.config import ( +from models.acoustic_model.aligner import Aligner +from models.config import ( AcousticENModelConfig, AcousticPretrainingConfig, PreprocessingConfig, ) -from model.helpers.initializer import ( +from models.helpers.initializer import ( init_acoustic_model, init_conformer, init_forward_trains_params, init_mask_input_embeddings_encoding_attn_mask, ) -from model.reference_encoder import ( +from models.reference_encoder import ( PhonemeLevelProsodyEncoder, UtteranceLevelProsodyEncoder, ) diff --git a/model/acoustic_model/tests/test_embedding.py b/models/acoustic_model/tests/test_embedding.py similarity index 96% rename from model/acoustic_model/tests/test_embedding.py rename to models/acoustic_model/tests/test_embedding.py index dc485da..b800118 100644 --- a/model/acoustic_model/tests/test_embedding.py +++ b/models/acoustic_model/tests/test_embedding.py @@ -2,7 +2,7 @@ import torch -from model.acoustic_model.embedding import Embedding +from models.acoustic_model.embedding import Embedding class TestEmbedding(unittest.TestCase): diff --git a/model/acoustic_model/tests/test_length_adaptor.py b/models/acoustic_model/tests/test_length_adaptor.py similarity index 98% rename from model/acoustic_model/tests/test_length_adaptor.py rename to models/acoustic_model/tests/test_length_adaptor.py index e5317a2..dee44cb 100644 --- a/model/acoustic_model/tests/test_length_adaptor.py +++ b/models/acoustic_model/tests/test_length_adaptor.py @@ -3,7 +3,7 @@ import torch -from model.acoustic_model.length_adaptor import LengthAdaptor +from models.acoustic_model.length_adaptor import LengthAdaptor class TestLengthAdaptor(unittest.TestCase): diff --git a/model/acoustic_model/tests/test_mas.py b/models/acoustic_model/tests/test_mas.py similarity index 97% rename from model/acoustic_model/tests/test_mas.py rename to models/acoustic_model/tests/test_mas.py index 004a5fb..f8c152b 100644 --- a/model/acoustic_model/tests/test_mas.py +++ b/models/acoustic_model/tests/test_mas.py @@ -3,7 +3,7 @@ from numba import prange import numpy as np -from model.acoustic_model.mas import b_mas, mas_width1 +from models.acoustic_model.mas import b_mas, mas_width1 class TestMasWidth1(unittest.TestCase): diff --git a/model/acoustic_model/tests/test_phoneme_prosody_predictor.py b/models/acoustic_model/tests/test_phoneme_prosody_predictor.py similarity index 95% rename from model/acoustic_model/tests/test_phoneme_prosody_predictor.py rename to models/acoustic_model/tests/test_phoneme_prosody_predictor.py index 68cb9c8..e1c9928 100644 --- a/model/acoustic_model/tests/test_phoneme_prosody_predictor.py +++ b/models/acoustic_model/tests/test_phoneme_prosody_predictor.py @@ -3,7 +3,7 @@ import torch -from model.acoustic_model import PhonemeProsodyPredictor +from models.acoustic_model import PhonemeProsodyPredictor class TestPhonemeProsodyPredictor(unittest.TestCase): diff --git a/model/acoustic_model/tests/test_pitch_adaptor.py b/models/acoustic_model/tests/test_pitch_adaptor.py similarity index 95% rename from model/acoustic_model/tests/test_pitch_adaptor.py rename to models/acoustic_model/tests/test_pitch_adaptor.py index 336e3b4..cdf6210 100644 --- a/model/acoustic_model/tests/test_pitch_adaptor.py +++ b/models/acoustic_model/tests/test_pitch_adaptor.py @@ -3,7 +3,7 @@ import torch -from model.acoustic_model import PitchAdaptor +from models.acoustic_model import PitchAdaptor class TestPitchAdaptor(unittest.TestCase): @@ -16,7 +16,7 @@ def setUp(self): model_config.variance_adaptor.p_dropout = 0.3 model_config.variance_adaptor.n_bins = 10 self.pitch_adaptor = PitchAdaptor( - model_config, "./model/acoustic_model/tests/mocks", + model_config, "./models/acoustic_model/tests/mocks", ) # Create a mock tensor for the inputs diff --git a/model/acoustic_model/tests/test_pitch_adaptor2.py b/models/acoustic_model/tests/test_pitch_adaptor2.py similarity index 92% rename from model/acoustic_model/tests/test_pitch_adaptor2.py rename to models/acoustic_model/tests/test_pitch_adaptor2.py index 8f04437..42affd3 100644 --- a/model/acoustic_model/tests/test_pitch_adaptor2.py +++ b/models/acoustic_model/tests/test_pitch_adaptor2.py @@ -2,8 +2,8 @@ import torch -from model.acoustic_model.pitch_adaptor2 import PitchAdaptor -from model.config import AcousticENModelConfig +from models.acoustic_model.pitch_adaptor2 import PitchAdaptor +from models.config import AcousticENModelConfig class TestPitchAdaptor(unittest.TestCase): diff --git a/model/acoustic_model/tests/test_pitch_phoneme_averaging.py b/models/acoustic_model/tests/test_pitch_phoneme_averaging.py similarity index 96% rename from model/acoustic_model/tests/test_pitch_phoneme_averaging.py rename to models/acoustic_model/tests/test_pitch_phoneme_averaging.py index 045d6f2..70cfb1c 100644 --- a/model/acoustic_model/tests/test_pitch_phoneme_averaging.py +++ b/models/acoustic_model/tests/test_pitch_phoneme_averaging.py @@ -2,7 +2,7 @@ import torch -from model.acoustic_model.helpers import ( +from models.acoustic_model.helpers import ( pitch_phoneme_averaging, ) diff --git a/model/acoustic_model/tests/test_position_encoding.py b/models/acoustic_model/tests/test_position_encoding.py similarity index 92% rename from model/acoustic_model/tests/test_position_encoding.py rename to models/acoustic_model/tests/test_position_encoding.py index f7c5379..8f18468 100644 --- a/model/acoustic_model/tests/test_position_encoding.py +++ b/models/acoustic_model/tests/test_position_encoding.py @@ -3,7 +3,7 @@ import torch -from model.acoustic_model.helpers import positional_encoding +from models.acoustic_model.helpers import positional_encoding class TestPositionalEncoding(unittest.TestCase): diff --git a/model/acoustic_model/tests/test_variance_predictor.py b/models/acoustic_model/tests/test_variance_predictor.py similarity index 96% rename from model/acoustic_model/tests/test_variance_predictor.py rename to models/acoustic_model/tests/test_variance_predictor.py index ee22a1b..1fb6b25 100644 --- a/model/acoustic_model/tests/test_variance_predictor.py +++ b/models/acoustic_model/tests/test_variance_predictor.py @@ -2,7 +2,7 @@ import torch -from model.acoustic_model.variance_predictor import VariancePredictor +from models.acoustic_model.variance_predictor import VariancePredictor class TestVariancePredictor(unittest.TestCase): diff --git a/model/acoustic_model/variance_predictor.py b/models/acoustic_model/variance_predictor.py similarity index 96% rename from model/acoustic_model/variance_predictor.py rename to models/acoustic_model/variance_predictor.py index 465729d..ef9e1b2 100644 --- a/model/acoustic_model/variance_predictor.py +++ b/models/acoustic_model/variance_predictor.py @@ -2,8 +2,8 @@ from torch import nn from torch.nn import Module -from model.constants import LEAKY_RELU_SLOPE -from model.conv_blocks import ConvTransposed +from models.constants import LEAKY_RELU_SLOPE +from models.conv_blocks import ConvTransposed class VariancePredictor(Module): diff --git a/model/attention/__init__.py b/models/attention/__init__.py similarity index 100% rename from model/attention/__init__.py rename to models/attention/__init__.py diff --git a/model/attention/conformer.py b/models/attention/conformer.py similarity index 100% rename from model/attention/conformer.py rename to models/attention/conformer.py diff --git a/model/attention/conformer_block.py b/models/attention/conformer_block.py similarity index 98% rename from model/attention/conformer_block.py rename to models/attention/conformer_block.py index 0f287fe..a53003b 100644 --- a/model/attention/conformer_block.py +++ b/models/attention/conformer_block.py @@ -2,7 +2,7 @@ from torch import nn from torch.nn import Module -from model.conv_blocks import Conv1dGLU +from models.conv_blocks import Conv1dGLU from .conformer_conv_module import ConformerConvModule from .conformer_multi_headed_self_attention import ConformerMultiHeadedSelfAttention diff --git a/model/attention/conformer_conv_module.py b/models/attention/conformer_conv_module.py similarity index 93% rename from model/attention/conformer_conv_module.py rename to models/attention/conformer_conv_module.py index 0a74aae..a472788 100644 --- a/model/attention/conformer_conv_module.py +++ b/models/attention/conformer_conv_module.py @@ -2,9 +2,9 @@ from torch import nn from torch.nn import Module -from model.constants import LEAKY_RELU_SLOPE -from model.conv_blocks import DepthWiseConv1d, GLUActivation, PointwiseConv1d -from model.helpers import tools +from models.constants import LEAKY_RELU_SLOPE +from models.conv_blocks import DepthWiseConv1d, GLUActivation, PointwiseConv1d +from models.helpers import tools class ConformerConvModule(Module): diff --git a/model/attention/conformer_multi_headed_self_attention.py b/models/attention/conformer_multi_headed_self_attention.py similarity index 100% rename from model/attention/conformer_multi_headed_self_attention.py rename to models/attention/conformer_multi_headed_self_attention.py diff --git a/model/attention/feed_forward.py b/models/attention/feed_forward.py similarity index 98% rename from model/attention/feed_forward.py rename to models/attention/feed_forward.py index ba5a0eb..78008d4 100644 --- a/model/attention/feed_forward.py +++ b/models/attention/feed_forward.py @@ -2,7 +2,7 @@ from torch import nn from torch.nn import Module -from model.constants import LEAKY_RELU_SLOPE +from models.constants import LEAKY_RELU_SLOPE class FeedForward(Module): diff --git a/model/attention/multi_head_attention.py b/models/attention/multi_head_attention.py similarity index 100% rename from model/attention/multi_head_attention.py rename to models/attention/multi_head_attention.py diff --git a/model/attention/relative_multi_head_attention.py b/models/attention/relative_multi_head_attention.py similarity index 100% rename from model/attention/relative_multi_head_attention.py rename to models/attention/relative_multi_head_attention.py diff --git a/model/attention/style_embed_attention.py b/models/attention/style_embed_attention.py similarity index 100% rename from model/attention/style_embed_attention.py rename to models/attention/style_embed_attention.py diff --git a/model/attention/tests/__init__.py b/models/attention/tests/__init__.py similarity index 100% rename from model/attention/tests/__init__.py rename to models/attention/tests/__init__.py diff --git a/model/attention/tests/test_conformer.py b/models/attention/tests/test_conformer.py similarity index 96% rename from model/attention/tests/test_conformer.py rename to models/attention/tests/test_conformer.py index d588c2f..5ab7395 100644 --- a/model/attention/tests/test_conformer.py +++ b/models/attention/tests/test_conformer.py @@ -2,13 +2,13 @@ import torch -from model.attention.conformer import Conformer -from model.config import ( +from models.attention.conformer import Conformer +from models.config import ( AcousticENModelConfig, AcousticPretrainingConfig, PreprocessingConfig, ) -from model.helpers.initializer import ( +from models.helpers.initializer import ( init_acoustic_model, init_conformer, init_forward_trains_params, diff --git a/model/attention/tests/test_conformer_block.py b/models/attention/tests/test_conformer_block.py similarity index 96% rename from model/attention/tests/test_conformer_block.py rename to models/attention/tests/test_conformer_block.py index c4c0e3d..a1ac46a 100644 --- a/model/attention/tests/test_conformer_block.py +++ b/models/attention/tests/test_conformer_block.py @@ -2,13 +2,13 @@ import torch -from model.attention.conformer_block import ConformerBlock -from model.config import ( +from models.attention.conformer_block import ConformerBlock +from models.config import ( AcousticENModelConfig, AcousticPretrainingConfig, PreprocessingConfig, ) -from model.helpers.initializer import ( +from models.helpers.initializer import ( init_acoustic_model, init_conformer, init_forward_trains_params, diff --git a/model/attention/tests/test_conformer_conv_module.py b/models/attention/tests/test_conformer_conv_module.py similarity index 92% rename from model/attention/tests/test_conformer_conv_module.py rename to models/attention/tests/test_conformer_conv_module.py index 5315621..ba9e099 100644 --- a/model/attention/tests/test_conformer_conv_module.py +++ b/models/attention/tests/test_conformer_conv_module.py @@ -2,7 +2,7 @@ import torch -from model.attention.conformer_conv_module import ConformerConvModule +from models.attention.conformer_conv_module import ConformerConvModule class TestConformerConvModule(unittest.TestCase): diff --git a/model/attention/tests/test_conformer_multi_headed_self_attention.py b/models/attention/tests/test_conformer_multi_headed_self_attention.py similarity index 95% rename from model/attention/tests/test_conformer_multi_headed_self_attention.py rename to models/attention/tests/test_conformer_multi_headed_self_attention.py index f2bf0cb..3a3ad47 100644 --- a/model/attention/tests/test_conformer_multi_headed_self_attention.py +++ b/models/attention/tests/test_conformer_multi_headed_self_attention.py @@ -2,7 +2,7 @@ import torch -from model.attention import ConformerMultiHeadedSelfAttention +from models.attention import ConformerMultiHeadedSelfAttention # Test class for the ConformerMultiHeadedSelfAttention class diff --git a/model/attention/tests/test_feed_forward.py b/models/attention/tests/test_feed_forward.py similarity index 94% rename from model/attention/tests/test_feed_forward.py rename to models/attention/tests/test_feed_forward.py index 1aa1392..692dc56 100644 --- a/model/attention/tests/test_feed_forward.py +++ b/models/attention/tests/test_feed_forward.py @@ -2,7 +2,7 @@ import torch -from model.attention.feed_forward import FeedForward +from models.attention.feed_forward import FeedForward class TestFeedForward(unittest.TestCase): diff --git a/model/attention/tests/test_multi_head_attention.py b/models/attention/tests/test_multi_head_attention.py similarity index 94% rename from model/attention/tests/test_multi_head_attention.py rename to models/attention/tests/test_multi_head_attention.py index 8061795..cb29895 100644 --- a/model/attention/tests/test_multi_head_attention.py +++ b/models/attention/tests/test_multi_head_attention.py @@ -2,7 +2,7 @@ import torch -from model.attention.multi_head_attention import MultiHeadAttention +from models.attention.multi_head_attention import MultiHeadAttention class TestMultiHeadAttention(unittest.TestCase): diff --git a/model/attention/tests/test_relative_multi_head_attention.py b/models/attention/tests/test_relative_multi_head_attention.py similarity index 96% rename from model/attention/tests/test_relative_multi_head_attention.py rename to models/attention/tests/test_relative_multi_head_attention.py index 9e2ef9a..7017fb7 100644 --- a/model/attention/tests/test_relative_multi_head_attention.py +++ b/models/attention/tests/test_relative_multi_head_attention.py @@ -2,7 +2,7 @@ import torch -from model.attention.relative_multi_head_attention import RelativeMultiHeadAttention +from models.attention.relative_multi_head_attention import RelativeMultiHeadAttention class TestRelativeMultiHeadAttention(unittest.TestCase): diff --git a/model/attention/tests/test_style_embed_attention.py b/models/attention/tests/test_style_embed_attention.py similarity index 93% rename from model/attention/tests/test_style_embed_attention.py rename to models/attention/tests/test_style_embed_attention.py index 64c8b52..ce33a71 100644 --- a/model/attention/tests/test_style_embed_attention.py +++ b/models/attention/tests/test_style_embed_attention.py @@ -2,7 +2,7 @@ import torch -from model.attention.style_embed_attention import StyleEmbedAttention +from models.attention.style_embed_attention import StyleEmbedAttention class TestStyleEmbedAttention(unittest.TestCase): diff --git a/model/checkpoints/.gitkeep b/models/checkpoints/.gitkeep similarity index 100% rename from model/checkpoints/.gitkeep rename to models/checkpoints/.gitkeep diff --git a/model/config/__init__.py b/models/config/__init__.py similarity index 100% rename from model/config/__init__.py rename to models/config/__init__.py diff --git a/model/config/configs.py b/models/config/configs.py similarity index 100% rename from model/config/configs.py rename to models/config/configs.py diff --git a/model/config/langs.py b/models/config/langs.py similarity index 96% rename from model/config/langs.py rename to models/config/langs.py index cc3597a..f943ac0 100644 --- a/model/config/langs.py +++ b/models/config/langs.py @@ -1,7 +1,7 @@ from dataclasses import dataclass from typing import Dict -from model.config import PreprocessLangType +from models.config import PreprocessLangType # TODO: now we only support english, but we need to support other languages! SUPPORTED_LANGUAGES = [ diff --git a/model/config/stats.json b/models/config/stats.json similarity index 100% rename from model/config/stats.json rename to models/config/stats.json diff --git a/model/config/symbols.py b/models/config/symbols.py similarity index 100% rename from model/config/symbols.py rename to models/config/symbols.py diff --git a/model/constants.py b/models/constants.py similarity index 100% rename from model/constants.py rename to models/constants.py diff --git a/model/conv_blocks/__init__.py b/models/conv_blocks/__init__.py similarity index 100% rename from model/conv_blocks/__init__.py rename to models/conv_blocks/__init__.py diff --git a/model/conv_blocks/activation.py b/models/conv_blocks/activation.py similarity index 97% rename from model/conv_blocks/activation.py rename to models/conv_blocks/activation.py index 3cac504..7bc2ac8 100644 --- a/model/conv_blocks/activation.py +++ b/models/conv_blocks/activation.py @@ -2,7 +2,7 @@ from torch import nn from torch.nn import Module -from model.constants import LEAKY_RELU_SLOPE +from models.constants import LEAKY_RELU_SLOPE class GLUActivation(Module): diff --git a/model/conv_blocks/add_coords.py b/models/conv_blocks/add_coords.py similarity index 100% rename from model/conv_blocks/add_coords.py rename to models/conv_blocks/add_coords.py diff --git a/model/conv_blocks/bsconv.py b/models/conv_blocks/bsconv.py similarity index 100% rename from model/conv_blocks/bsconv.py rename to models/conv_blocks/bsconv.py diff --git a/model/conv_blocks/conv1d.py b/models/conv_blocks/conv1d.py similarity index 100% rename from model/conv_blocks/conv1d.py rename to models/conv_blocks/conv1d.py diff --git a/model/conv_blocks/conv1d_glu.py b/models/conv_blocks/conv1d_glu.py similarity index 100% rename from model/conv_blocks/conv1d_glu.py rename to models/conv_blocks/conv1d_glu.py diff --git a/model/conv_blocks/conv_transposed.py b/models/conv_blocks/conv_transposed.py similarity index 100% rename from model/conv_blocks/conv_transposed.py rename to models/conv_blocks/conv_transposed.py diff --git a/model/conv_blocks/coord_conv1d.py b/models/conv_blocks/coord_conv1d.py similarity index 100% rename from model/conv_blocks/coord_conv1d.py rename to models/conv_blocks/coord_conv1d.py diff --git a/model/conv_blocks/tests/__init__.py b/models/conv_blocks/tests/__init__.py similarity index 100% rename from model/conv_blocks/tests/__init__.py rename to models/conv_blocks/tests/__init__.py diff --git a/model/conv_blocks/tests/test_activation.py b/models/conv_blocks/tests/test_activation.py similarity index 95% rename from model/conv_blocks/tests/test_activation.py rename to models/conv_blocks/tests/test_activation.py index dca2d3d..abe3ce5 100644 --- a/model/conv_blocks/tests/test_activation.py +++ b/models/conv_blocks/tests/test_activation.py @@ -3,7 +3,7 @@ import torch from torch.autograd.gradcheck import gradcheck -from model.conv_blocks.activation import GLUActivation +from models.conv_blocks.activation import GLUActivation # Unit Testing Class diff --git a/model/conv_blocks/tests/test_add_coords.py b/models/conv_blocks/tests/test_add_coords.py similarity index 97% rename from model/conv_blocks/tests/test_add_coords.py rename to models/conv_blocks/tests/test_add_coords.py index b8e274d..28afee8 100644 --- a/model/conv_blocks/tests/test_add_coords.py +++ b/models/conv_blocks/tests/test_add_coords.py @@ -2,7 +2,7 @@ import torch -from model.conv_blocks.add_coords import AddCoords +from models.conv_blocks.add_coords import AddCoords # Test case for the AddCoords class diff --git a/model/conv_blocks/tests/test_bsconv.py b/models/conv_blocks/tests/test_bsconv.py similarity index 97% rename from model/conv_blocks/tests/test_bsconv.py rename to models/conv_blocks/tests/test_bsconv.py index 7000e10..bed787c 100644 --- a/model/conv_blocks/tests/test_bsconv.py +++ b/models/conv_blocks/tests/test_bsconv.py @@ -2,7 +2,7 @@ import torch -from model.conv_blocks.bsconv import BSConv1d +from models.conv_blocks.bsconv import BSConv1d class TestBSConv1d(unittest.TestCase): diff --git a/model/conv_blocks/tests/test_conv1d.py b/models/conv_blocks/tests/test_conv1d.py similarity index 98% rename from model/conv_blocks/tests/test_conv1d.py rename to models/conv_blocks/tests/test_conv1d.py index bd28282..fa550c2 100644 --- a/model/conv_blocks/tests/test_conv1d.py +++ b/models/conv_blocks/tests/test_conv1d.py @@ -2,7 +2,7 @@ import torch -from model.conv_blocks.conv1d import DepthWiseConv1d, PointwiseConv1d +from models.conv_blocks.conv1d import DepthWiseConv1d, PointwiseConv1d class TestDepthwiseConv1d(unittest.TestCase): diff --git a/model/conv_blocks/tests/test_conv1d_glu.py b/models/conv_blocks/tests/test_conv1d_glu.py similarity index 94% rename from model/conv_blocks/tests/test_conv1d_glu.py rename to models/conv_blocks/tests/test_conv1d_glu.py index 96ecb32..603d6a2 100644 --- a/model/conv_blocks/tests/test_conv1d_glu.py +++ b/models/conv_blocks/tests/test_conv1d_glu.py @@ -3,9 +3,9 @@ import torch from torch import nn -from model.conv_blocks.bsconv import BSConv1d -from model.conv_blocks.conv1d import DepthWiseConv1d, PointwiseConv1d -from model.conv_blocks.conv1d_glu import Conv1dGLU +from models.conv_blocks.bsconv import BSConv1d +from models.conv_blocks.conv1d import DepthWiseConv1d, PointwiseConv1d +from models.conv_blocks.conv1d_glu import Conv1dGLU class TestConv1dGLU(unittest.TestCase): diff --git a/model/conv_blocks/tests/test_conv_transposed.py b/models/conv_blocks/tests/test_conv_transposed.py similarity index 96% rename from model/conv_blocks/tests/test_conv_transposed.py rename to models/conv_blocks/tests/test_conv_transposed.py index 8c7389d..35beaa2 100644 --- a/model/conv_blocks/tests/test_conv_transposed.py +++ b/models/conv_blocks/tests/test_conv_transposed.py @@ -2,8 +2,8 @@ import torch -from model.conv_blocks.bsconv import BSConv1d -from model.conv_blocks.conv_transposed import ConvTransposed +from models.conv_blocks.bsconv import BSConv1d +from models.conv_blocks.conv_transposed import ConvTransposed class TestConvTransposed(unittest.TestCase): diff --git a/model/conv_blocks/tests/test_coord_conv1d.py b/models/conv_blocks/tests/test_coord_conv1d.py similarity index 96% rename from model/conv_blocks/tests/test_coord_conv1d.py rename to models/conv_blocks/tests/test_coord_conv1d.py index acf2c15..f69aec5 100644 --- a/model/conv_blocks/tests/test_coord_conv1d.py +++ b/models/conv_blocks/tests/test_coord_conv1d.py @@ -2,7 +2,7 @@ import torch -from model.conv_blocks.coord_conv1d import CoordConv1d +from models.conv_blocks.coord_conv1d import CoordConv1d class TestCoordConv1d(unittest.TestCase): diff --git a/model/helpers/__init__.py b/models/helpers/__init__.py similarity index 100% rename from model/helpers/__init__.py rename to models/helpers/__init__.py diff --git a/model/helpers/initializer.py b/models/helpers/initializer.py similarity index 98% rename from model/helpers/initializer.py rename to models/helpers/initializer.py index 3b84b42..2a36646 100644 --- a/model/helpers/initializer.py +++ b/models/helpers/initializer.py @@ -3,17 +3,17 @@ import torch -from model.acoustic_model import AcousticModel -from model.acoustic_model.helpers import positional_encoding -from model.attention.conformer import Conformer -from model.config import ( +from models.acoustic_model import AcousticModel +from models.acoustic_model.helpers import positional_encoding +from models.attention.conformer import Conformer +from models.config import ( SUPPORTED_LANGUAGES, AcousticENModelConfig, AcousticModelConfigType, AcousticPretrainingConfig, PreprocessingConfig, ) -from model.helpers import tools +from models.helpers import tools @dataclass diff --git a/model/helpers/tests/__init__.py b/models/helpers/tests/__init__.py similarity index 100% rename from model/helpers/tests/__init__.py rename to models/helpers/tests/__init__.py diff --git a/model/helpers/tests/tests_tools/__init__.py b/models/helpers/tests/tests_tools/__init__.py similarity index 100% rename from model/helpers/tests/tests_tools/__init__.py rename to models/helpers/tests/tests_tools/__init__.py diff --git a/model/helpers/tests/tests_tools/test_calc_same_padding.py b/models/helpers/tests/tests_tools/test_calc_same_padding.py similarity index 96% rename from model/helpers/tests/tests_tools/test_calc_same_padding.py rename to models/helpers/tests/tests_tools/test_calc_same_padding.py index 69412e0..0c8b80f 100644 --- a/model/helpers/tests/tests_tools/test_calc_same_padding.py +++ b/models/helpers/tests/tests_tools/test_calc_same_padding.py @@ -1,6 +1,6 @@ import unittest -from model.helpers.tools import calc_same_padding +from models.helpers.tools import calc_same_padding class TestCalcSamePadding(unittest.TestCase): diff --git a/model/helpers/tests/tests_tools/test_get_mask_from_lengths.py b/models/helpers/tests/tests_tools/test_get_mask_from_lengths.py similarity index 94% rename from model/helpers/tests/tests_tools/test_get_mask_from_lengths.py rename to models/helpers/tests/tests_tools/test_get_mask_from_lengths.py index 3b406ca..b270c73 100644 --- a/model/helpers/tests/tests_tools/test_get_mask_from_lengths.py +++ b/models/helpers/tests/tests_tools/test_get_mask_from_lengths.py @@ -2,7 +2,7 @@ import torch -from model.helpers.tools import get_mask_from_lengths +from models.helpers.tools import get_mask_from_lengths class TestGetMaskFromLengths(unittest.TestCase): diff --git a/model/helpers/tests/tests_tools/test_initialize_embeddings.py b/models/helpers/tests/tests_tools/test_initialize_embeddings.py similarity index 96% rename from model/helpers/tests/tests_tools/test_initialize_embeddings.py rename to models/helpers/tests/tests_tools/test_initialize_embeddings.py index f8bcb06..b04514a 100644 --- a/model/helpers/tests/tests_tools/test_initialize_embeddings.py +++ b/models/helpers/tests/tests_tools/test_initialize_embeddings.py @@ -3,7 +3,7 @@ import numpy as np import torch -from model.helpers.tools import initialize_embeddings +from models.helpers.tools import initialize_embeddings class TestInitializeEmbeddings(unittest.TestCase): diff --git a/model/helpers/tests/tests_tools/test_pad.py b/models/helpers/tests/tests_tools/test_pad.py similarity index 96% rename from model/helpers/tests/tests_tools/test_pad.py rename to models/helpers/tests/tests_tools/test_pad.py index c0d5ae3..c6a3052 100644 --- a/model/helpers/tests/tests_tools/test_pad.py +++ b/models/helpers/tests/tests_tools/test_pad.py @@ -2,7 +2,7 @@ import torch -from model.helpers.tools import pad +from models.helpers.tools import pad class TestPad(unittest.TestCase): diff --git a/model/helpers/tests/tests_tools/test_stride_lens_downsampling.py b/models/helpers/tests/tests_tools/test_stride_lens_downsampling.py similarity index 98% rename from model/helpers/tests/tests_tools/test_stride_lens_downsampling.py rename to models/helpers/tests/tests_tools/test_stride_lens_downsampling.py index e1c08d7..41d8c1b 100644 --- a/model/helpers/tests/tests_tools/test_stride_lens_downsampling.py +++ b/models/helpers/tests/tests_tools/test_stride_lens_downsampling.py @@ -2,7 +2,7 @@ import torch -from model.helpers import ( +from models.helpers import ( stride_lens_downsampling, ) diff --git a/model/helpers/tools.py b/models/helpers/tools.py similarity index 100% rename from model/helpers/tools.py rename to models/helpers/tools.py diff --git a/model/reference_encoder/STL.py b/models/reference_encoder/STL.py similarity index 95% rename from model/reference_encoder/STL.py rename to models/reference_encoder/STL.py index 3817711..ca8596d 100644 --- a/model/reference_encoder/STL.py +++ b/models/reference_encoder/STL.py @@ -2,8 +2,8 @@ from torch import nn from torch.nn import Module -from model.attention import StyleEmbedAttention -from model.config import AcousticModelConfigType +from models.attention import StyleEmbedAttention +from models.config import AcousticModelConfigType class STL(Module): diff --git a/model/reference_encoder/__init__.py b/models/reference_encoder/__init__.py similarity index 100% rename from model/reference_encoder/__init__.py rename to models/reference_encoder/__init__.py diff --git a/model/reference_encoder/phoneme_level_prosody_encoder.py b/models/reference_encoder/phoneme_level_prosody_encoder.py similarity index 96% rename from model/reference_encoder/phoneme_level_prosody_encoder.py rename to models/reference_encoder/phoneme_level_prosody_encoder.py index 352c18f..c0afa00 100644 --- a/model/reference_encoder/phoneme_level_prosody_encoder.py +++ b/models/reference_encoder/phoneme_level_prosody_encoder.py @@ -2,8 +2,8 @@ from torch import nn from torch.nn import Module -from model.attention import ConformerMultiHeadedSelfAttention -from model.config import AcousticModelConfigType, PreprocessingConfig +from models.attention import ConformerMultiHeadedSelfAttention +from models.config import AcousticModelConfigType, PreprocessingConfig from .reference_encoder import ReferenceEncoder diff --git a/model/reference_encoder/reference_encoder.py b/models/reference_encoder/reference_encoder.py similarity index 96% rename from model/reference_encoder/reference_encoder.py rename to models/reference_encoder/reference_encoder.py index 019c99d..0bd384a 100644 --- a/model/reference_encoder/reference_encoder.py +++ b/models/reference_encoder/reference_encoder.py @@ -5,10 +5,10 @@ from torch.nn import Module import torch.nn.functional as F -from model.config import AcousticModelConfigType, PreprocessingConfig -from model.constants import LEAKY_RELU_SLOPE -from model.conv_blocks import CoordConv1d -from model.helpers import tools +from models.config import AcousticModelConfigType, PreprocessingConfig +from models.constants import LEAKY_RELU_SLOPE +from models.conv_blocks import CoordConv1d +from models.helpers import tools class ReferenceEncoder(Module): diff --git a/model/reference_encoder/tests/__init__.py b/models/reference_encoder/tests/__init__.py similarity index 100% rename from model/reference_encoder/tests/__init__.py rename to models/reference_encoder/tests/__init__.py diff --git a/model/reference_encoder/tests/test_STL.py b/models/reference_encoder/tests/test_STL.py similarity index 94% rename from model/reference_encoder/tests/test_STL.py rename to models/reference_encoder/tests/test_STL.py index 4af0d3e..b6733e4 100644 --- a/model/reference_encoder/tests/test_STL.py +++ b/models/reference_encoder/tests/test_STL.py @@ -3,7 +3,7 @@ import torch -from model.reference_encoder.STL import STL +from models.reference_encoder.STL import STL class TestSTL(unittest.TestCase): diff --git a/model/reference_encoder/tests/test_phoneme_level_prosody_encoder.py b/models/reference_encoder/tests/test_phoneme_level_prosody_encoder.py similarity index 95% rename from model/reference_encoder/tests/test_phoneme_level_prosody_encoder.py rename to models/reference_encoder/tests/test_phoneme_level_prosody_encoder.py index 945c5a0..332c673 100644 --- a/model/reference_encoder/tests/test_phoneme_level_prosody_encoder.py +++ b/models/reference_encoder/tests/test_phoneme_level_prosody_encoder.py @@ -3,25 +3,25 @@ import torch from torch import nn -from model.attention.conformer_multi_headed_self_attention import ( +from models.attention.conformer_multi_headed_self_attention import ( ConformerMultiHeadedSelfAttention, ) -from model.config import ( +from models.config import ( AcousticENModelConfig, AcousticPretrainingConfig, PreprocessingConfig, ) -from model.helpers.initializer import ( +from models.helpers.initializer import ( init_acoustic_model, init_conformer, init_forward_trains_params, init_mask_input_embeddings_encoding_attn_mask, ) -from model.reference_encoder import ( +from models.reference_encoder import ( PhonemeLevelProsodyEncoder, UtteranceLevelProsodyEncoder, ) -from model.reference_encoder.reference_encoder import ReferenceEncoder +from models.reference_encoder.reference_encoder import ReferenceEncoder # It checks for most of the acoustic model code diff --git a/model/reference_encoder/tests/test_reference_encoder.py b/models/reference_encoder/tests/test_reference_encoder.py similarity index 93% rename from model/reference_encoder/tests/test_reference_encoder.py rename to models/reference_encoder/tests/test_reference_encoder.py index c8532df..c0a85a0 100644 --- a/model/reference_encoder/tests/test_reference_encoder.py +++ b/models/reference_encoder/tests/test_reference_encoder.py @@ -2,8 +2,8 @@ import torch -from model.config import AcousticENModelConfig, PreprocessingConfig -from model.reference_encoder import ReferenceEncoder +from models.config import AcousticENModelConfig, PreprocessingConfig +from models.reference_encoder import ReferenceEncoder class TestReferenceEncoder(unittest.TestCase): diff --git a/model/reference_encoder/tests/test_utterance_level_prosody_encoder.py b/models/reference_encoder/tests/test_utterance_level_prosody_encoder.py similarity index 89% rename from model/reference_encoder/tests/test_utterance_level_prosody_encoder.py rename to models/reference_encoder/tests/test_utterance_level_prosody_encoder.py index 49b0094..6cc5c75 100644 --- a/model/reference_encoder/tests/test_utterance_level_prosody_encoder.py +++ b/models/reference_encoder/tests/test_utterance_level_prosody_encoder.py @@ -2,8 +2,8 @@ import torch -from model.config import AcousticENModelConfig, PreprocessingConfig -from model.reference_encoder import UtteranceLevelProsodyEncoder +from models.config import AcousticENModelConfig, PreprocessingConfig +from models.reference_encoder import UtteranceLevelProsodyEncoder class TestUtteranceLevelProsodyEncoder(unittest.TestCase): diff --git a/model/reference_encoder/utterance_level_prosody_encoder.py b/models/reference_encoder/utterance_level_prosody_encoder.py similarity index 97% rename from model/reference_encoder/utterance_level_prosody_encoder.py rename to models/reference_encoder/utterance_level_prosody_encoder.py index 1e8238c..59d866c 100644 --- a/model/reference_encoder/utterance_level_prosody_encoder.py +++ b/models/reference_encoder/utterance_level_prosody_encoder.py @@ -2,7 +2,7 @@ from torch import nn from torch.nn import Module -from model.config import AcousticModelConfigType, PreprocessingConfig +from models.config import AcousticModelConfigType, PreprocessingConfig from .reference_encoder import ReferenceEncoder from .STL import STL diff --git a/model/univnet/__init__.py b/models/univnet/__init__.py similarity index 100% rename from model/univnet/__init__.py rename to models/univnet/__init__.py diff --git a/model/univnet/discriminator.py b/models/univnet/discriminator.py similarity index 96% rename from model/univnet/discriminator.py rename to models/univnet/discriminator.py index c379223..657de09 100644 --- a/model/univnet/discriminator.py +++ b/models/univnet/discriminator.py @@ -1,7 +1,7 @@ import torch from torch.nn import Module -from model.config import VocoderModelConfig +from models.config import VocoderModelConfig from .multi_period_discriminator import MultiPeriodDiscriminator from .multi_resolution_discriminator import MultiResolutionDiscriminator diff --git a/model/univnet/discriminator_p.py b/models/univnet/discriminator_p.py similarity index 98% rename from model/univnet/discriminator_p.py rename to models/univnet/discriminator_p.py index f71cdef..08dcaab 100644 --- a/model/univnet/discriminator_p.py +++ b/models/univnet/discriminator_p.py @@ -6,7 +6,7 @@ import torch.nn.functional as F from torch.nn.utils.parametrizations import spectral_norm, weight_norm -from model.config import VocoderModelConfig +from models.config import VocoderModelConfig class DiscriminatorP(Module): diff --git a/model/univnet/discriminator_r.py b/models/univnet/discriminator_r.py similarity index 99% rename from model/univnet/discriminator_r.py rename to models/univnet/discriminator_r.py index ee40368..83a6944 100644 --- a/model/univnet/discriminator_r.py +++ b/models/univnet/discriminator_r.py @@ -6,7 +6,7 @@ import torch.nn.functional as F from torch.nn.utils.parametrizations import spectral_norm, weight_norm -from model.config import VocoderModelConfig +from models.config import VocoderModelConfig class DiscriminatorR(Module): diff --git a/model/univnet/kernel_predictor.py b/models/univnet/kernel_predictor.py similarity index 100% rename from model/univnet/kernel_predictor.py rename to models/univnet/kernel_predictor.py diff --git a/model/univnet/lvc_block.py b/models/univnet/lvc_block.py similarity index 100% rename from model/univnet/lvc_block.py rename to models/univnet/lvc_block.py diff --git a/model/univnet/multi_period_discriminator.py b/models/univnet/multi_period_discriminator.py similarity index 96% rename from model/univnet/multi_period_discriminator.py rename to models/univnet/multi_period_discriminator.py index 846b465..d6f7ebe 100644 --- a/model/univnet/multi_period_discriminator.py +++ b/models/univnet/multi_period_discriminator.py @@ -2,7 +2,7 @@ from torch import nn from torch.nn import Module -from model.config import VocoderModelConfig +from models.config import VocoderModelConfig from .discriminator_p import DiscriminatorP diff --git a/model/univnet/multi_resolution_discriminator.py b/models/univnet/multi_resolution_discriminator.py similarity index 97% rename from model/univnet/multi_resolution_discriminator.py rename to models/univnet/multi_resolution_discriminator.py index 7d944e3..582021e 100644 --- a/model/univnet/multi_resolution_discriminator.py +++ b/models/univnet/multi_resolution_discriminator.py @@ -2,7 +2,7 @@ from torch import nn from torch.nn import Module -from model.config import VocoderModelConfig +from models.config import VocoderModelConfig from .discriminator_r import DiscriminatorR diff --git a/model/univnet/tests/__init__.py b/models/univnet/tests/__init__.py similarity index 100% rename from model/univnet/tests/__init__.py rename to models/univnet/tests/__init__.py diff --git a/model/univnet/tests/test_discriminator.py b/models/univnet/tests/test_discriminator.py similarity index 97% rename from model/univnet/tests/test_discriminator.py rename to models/univnet/tests/test_discriminator.py index 4bb8a56..d11504d 100644 --- a/model/univnet/tests/test_discriminator.py +++ b/models/univnet/tests/test_discriminator.py @@ -2,8 +2,8 @@ import torch -from model.config import PreprocessingConfig, VocoderModelConfig -from model.univnet import Discriminator, UnivNet +from models.config import PreprocessingConfig, VocoderModelConfig +from models.univnet import Discriminator, UnivNet # One of the most important test case for univnet diff --git a/model/univnet/tests/test_discriminator_p.py b/models/univnet/tests/test_discriminator_p.py similarity index 98% rename from model/univnet/tests/test_discriminator_p.py rename to models/univnet/tests/test_discriminator_p.py index 95c6076..4dc6bc7 100644 --- a/model/univnet/tests/test_discriminator_p.py +++ b/models/univnet/tests/test_discriminator_p.py @@ -3,8 +3,8 @@ import torch -from model.config import VocoderModelConfig -from model.univnet import DiscriminatorP +from models.config import VocoderModelConfig +from models.univnet import DiscriminatorP class TestDiscriminatorP(unittest.TestCase): diff --git a/model/univnet/tests/test_discriminator_r.py b/models/univnet/tests/test_discriminator_r.py similarity index 94% rename from model/univnet/tests/test_discriminator_r.py rename to models/univnet/tests/test_discriminator_r.py index 4037383..8d43538 100644 --- a/model/univnet/tests/test_discriminator_r.py +++ b/models/univnet/tests/test_discriminator_r.py @@ -2,8 +2,8 @@ import torch -from model.config import VocoderModelConfig -from model.univnet.discriminator_r import DiscriminatorR +from models.config import VocoderModelConfig +from models.univnet.discriminator_r import DiscriminatorR class TestDiscriminatorR(unittest.TestCase): diff --git a/model/univnet/tests/test_kernel_predictor.py b/models/univnet/tests/test_kernel_predictor.py similarity index 96% rename from model/univnet/tests/test_kernel_predictor.py rename to models/univnet/tests/test_kernel_predictor.py index 4f5fc81..2e7f893 100644 --- a/model/univnet/tests/test_kernel_predictor.py +++ b/models/univnet/tests/test_kernel_predictor.py @@ -2,7 +2,7 @@ import torch -from model.univnet.kernel_predictor import KernelPredictor +from models.univnet.kernel_predictor import KernelPredictor class TestKernelPredictor(unittest.TestCase): diff --git a/model/univnet/tests/test_lvc_block.py b/models/univnet/tests/test_lvc_block.py similarity index 98% rename from model/univnet/tests/test_lvc_block.py rename to models/univnet/tests/test_lvc_block.py index f9380b3..4c19959 100644 --- a/model/univnet/tests/test_lvc_block.py +++ b/models/univnet/tests/test_lvc_block.py @@ -3,7 +3,7 @@ import torch from torch import nn -from model.univnet.lvc_block import LVCBlock +from models.univnet.lvc_block import LVCBlock class TestLVCBlock(unittest.TestCase): diff --git a/model/univnet/tests/test_multi_period_discriminator.py b/models/univnet/tests/test_multi_period_discriminator.py similarity index 97% rename from model/univnet/tests/test_multi_period_discriminator.py rename to models/univnet/tests/test_multi_period_discriminator.py index f7750a6..2990121 100644 --- a/model/univnet/tests/test_multi_period_discriminator.py +++ b/models/univnet/tests/test_multi_period_discriminator.py @@ -3,8 +3,8 @@ import torch -from model.config import VocoderModelConfig -from model.univnet import MultiPeriodDiscriminator +from models.config import VocoderModelConfig +from models.univnet import MultiPeriodDiscriminator class TestMultiPeriodDiscriminator(unittest.TestCase): diff --git a/model/univnet/tests/test_multi_resolution_discriminator.py b/models/univnet/tests/test_multi_resolution_discriminator.py similarity index 95% rename from model/univnet/tests/test_multi_resolution_discriminator.py rename to models/univnet/tests/test_multi_resolution_discriminator.py index 4a1df1c..c354f70 100644 --- a/model/univnet/tests/test_multi_resolution_discriminator.py +++ b/models/univnet/tests/test_multi_resolution_discriminator.py @@ -2,8 +2,8 @@ import torch -from model.config import VocoderModelConfig -from model.univnet import MultiResolutionDiscriminator +from models.config import VocoderModelConfig +from models.univnet import MultiResolutionDiscriminator class TestMultiResolutionDiscriminator(unittest.TestCase): diff --git a/model/univnet/tests/test_traced_univnet.py b/models/univnet/tests/test_traced_univnet.py similarity index 90% rename from model/univnet/tests/test_traced_univnet.py rename to models/univnet/tests/test_traced_univnet.py index 4f12a35..115c211 100644 --- a/model/univnet/tests/test_traced_univnet.py +++ b/models/univnet/tests/test_traced_univnet.py @@ -2,9 +2,9 @@ import torch -from model.config import PreprocessingConfig, VocoderModelConfig -from model.helpers.tools import get_mask_from_lengths -from model.univnet import TracedUnivNet, UnivNet +from models.config import PreprocessingConfig, VocoderModelConfig +from models.helpers.tools import get_mask_from_lengths +from models.univnet import TracedUnivNet, UnivNet class TestTracedUnivNet(unittest.TestCase): diff --git a/model/univnet/tests/test_univnet.py b/models/univnet/tests/test_univnet.py similarity index 94% rename from model/univnet/tests/test_univnet.py rename to models/univnet/tests/test_univnet.py index 1a1c52d..26cfe13 100644 --- a/model/univnet/tests/test_univnet.py +++ b/models/univnet/tests/test_univnet.py @@ -3,8 +3,8 @@ import torch from torch import nn -from model.config import PreprocessingConfig, VocoderModelConfig -from model.univnet.univnet import UnivNet +from models.config import PreprocessingConfig, VocoderModelConfig +from models.univnet.univnet import UnivNet class TestUnivNet(unittest.TestCase): diff --git a/model/univnet/traced_univnet.py b/models/univnet/traced_univnet.py similarity index 97% rename from model/univnet/traced_univnet.py rename to models/univnet/traced_univnet.py index 7fa468b..b1641e4 100644 --- a/model/univnet/traced_univnet.py +++ b/models/univnet/traced_univnet.py @@ -1,7 +1,7 @@ import torch from torch.nn import Module -from model.helpers.tools import get_mask_from_lengths +from models.helpers.tools import get_mask_from_lengths from .univnet import UnivNet diff --git a/model/univnet/univnet.py b/models/univnet/univnet.py similarity index 97% rename from model/univnet/univnet.py rename to models/univnet/univnet.py index 1d9b211..ac4b369 100644 --- a/model/univnet/univnet.py +++ b/models/univnet/univnet.py @@ -3,8 +3,8 @@ from torch.nn import Module from torch.nn.utils import parametrize -from model.config import PreprocessingConfig, VocoderModelConfig -from model.helpers.tools import get_mask_from_lengths +from models.config import PreprocessingConfig, VocoderModelConfig +from models.helpers.tools import get_mask_from_lengths from .lvc_block import LVCBlock diff --git a/notebooks/demo_voices.py b/notebooks/demo_voices.py index 657baba..cffb417 100644 --- a/notebooks/demo_voices.py +++ b/notebooks/demo_voices.py @@ -13,7 +13,7 @@ import pandas as pd import torch -# from model.univnet import Discriminator, UnivNet +# from models.univnet import Discriminator, UnivNet from training.modules import AcousticModule, VocoderModule # %% diff --git a/notebooks/experiments/conv_leaky_relu.py b/notebooks/experiments/conv_leaky_relu.py index 4156e07..13997d7 100644 --- a/notebooks/experiments/conv_leaky_relu.py +++ b/notebooks/experiments/conv_leaky_relu.py @@ -2,7 +2,7 @@ from torch import nn from torch.nn import Module -from model.constants import LEAKY_RELU_SLOPE +from models.constants import LEAKY_RELU_SLOPE # TODO: prepared for the refactoring of Aligner diff --git a/notebooks/experiments/optimizer/scheduled_optim_finetuning.py b/notebooks/experiments/optimizer/scheduled_optim_finetuning.py index db0f9a7..1138b6a 100644 --- a/notebooks/experiments/optimizer/scheduled_optim_finetuning.py +++ b/notebooks/experiments/optimizer/scheduled_optim_finetuning.py @@ -4,7 +4,7 @@ from torch.optim import Optimizer from torch.optim.lr_scheduler import ExponentialLR -from model.config import AcousticTrainingConfig +from models.config import AcousticTrainingConfig class ScheduledOptimFinetuning(Optimizer): diff --git a/notebooks/experiments/optimizer/scheduled_optim_pretraining.py b/notebooks/experiments/optimizer/scheduled_optim_pretraining.py index 72008c9..596d4d8 100644 --- a/notebooks/experiments/optimizer/scheduled_optim_pretraining.py +++ b/notebooks/experiments/optimizer/scheduled_optim_pretraining.py @@ -4,7 +4,7 @@ from torch.optim import Optimizer from torch.optim.lr_scheduler import LambdaLR -from model.config import ( +from models.config import ( AcousticModelConfigType, AcousticTrainingConfig, ) diff --git a/notebooks/experiments/optimizer/tests/test_scheduled_optim_finetuning.py b/notebooks/experiments/optimizer/tests/test_scheduled_optim_finetuning.py index f104d8b..9692df1 100644 --- a/notebooks/experiments/optimizer/tests/test_scheduled_optim_finetuning.py +++ b/notebooks/experiments/optimizer/tests/test_scheduled_optim_finetuning.py @@ -3,7 +3,7 @@ import torch from torch import nn -from model.config import AcousticFinetuningConfig +from models.config import AcousticFinetuningConfig from notebooks.experiments.optimizer.scheduled_optim_finetuning import ( ScheduledOptimFinetuning, ) diff --git a/notebooks/experiments/optimizer/tests/test_scheduled_optim_pretraining.py b/notebooks/experiments/optimizer/tests/test_scheduled_optim_pretraining.py index ecc0244..50545fe 100644 --- a/notebooks/experiments/optimizer/tests/test_scheduled_optim_pretraining.py +++ b/notebooks/experiments/optimizer/tests/test_scheduled_optim_pretraining.py @@ -3,7 +3,7 @@ import torch from torch import nn -from model.config import AcousticENModelConfig, AcousticPretrainingConfig +from models.config import AcousticENModelConfig, AcousticPretrainingConfig from notebooks.experiments.optimizer.scheduled_optim_pretraining import ( ScheduledOptimPretraining, get_lr_lambda, diff --git a/notebooks/experiments/scheduled_optim_finetuning.py b/notebooks/experiments/scheduled_optim_finetuning.py index fc219de..4ca12a4 100644 --- a/notebooks/experiments/scheduled_optim_finetuning.py +++ b/notebooks/experiments/scheduled_optim_finetuning.py @@ -2,7 +2,7 @@ import torch -from model.config import AcousticTrainingConfig +from models.config import AcousticTrainingConfig class ScheduledOptimFinetuning: diff --git a/notebooks/experiments/scheduled_optim_pretraining.py b/notebooks/experiments/scheduled_optim_pretraining.py index 7cfc3da..ac70b8c 100644 --- a/notebooks/experiments/scheduled_optim_pretraining.py +++ b/notebooks/experiments/scheduled_optim_pretraining.py @@ -3,7 +3,7 @@ import numpy as np import torch -from model.config import ( +from models.config import ( AcousticModelConfigType, AcousticTrainingConfig, ) diff --git a/notebooks/libritts_prepared.py b/notebooks/libritts_prepared.py index 3d39546..030b7ed 100644 --- a/notebooks/libritts_prepared.py +++ b/notebooks/libritts_prepared.py @@ -15,7 +15,7 @@ from torchaudio import datasets from tqdm import tqdm -from model.config import lang2id +from models.config import lang2id from training.preprocess import PreprocessLibriTTS diff --git a/notebooks/preprocess_libritts.py b/notebooks/preprocess_libritts.py index eab72a5..231ae34 100644 --- a/notebooks/preprocess_libritts.py +++ b/notebooks/preprocess_libritts.py @@ -15,7 +15,7 @@ from torchaudio import datasets from tqdm import tqdm -from model.config import lang2id +from models.config import lang2id from training.preprocess import PreprocessLibriTTS diff --git a/notebooks/weights_load_check.py b/notebooks/weights_load_check.py index 0307e4e..ef7027e 100644 --- a/notebooks/weights_load_check.py +++ b/notebooks/weights_load_check.py @@ -13,15 +13,15 @@ # %% import torch -from model.acoustic_model import AcousticModel -from model.config import ( +from models.acoustic_model import AcousticModel +from models.config import ( AcousticENModelConfig, AcousticPretrainingConfig, PreprocessingConfig, VocoderModelConfig, ) -from model.helpers import get_device -from model.univnet import UnivNet +from models.helpers import get_device +from models.univnet import UnivNet from training.optimizer import ScheduledOptimFinetuning, ScheduledOptimPretraining torch.cuda.is_available() diff --git a/training/datasets/libritts_dataset_acoustic.py b/training/datasets/libritts_dataset_acoustic.py index aec20cc..698e1f8 100644 --- a/training/datasets/libritts_dataset_acoustic.py +++ b/training/datasets/libritts_dataset_acoustic.py @@ -6,7 +6,7 @@ import torch from torch.utils.data import Dataset -from model.config import lang2id +from models.config import lang2id from training.preprocess import PreprocessLibriTTS from training.tools import pad_1D, pad_2D, pad_3D diff --git a/training/loss/metrics.py b/training/loss/metrics.py index 15085e8..327a83a 100644 --- a/training/loss/metrics.py +++ b/training/loss/metrics.py @@ -12,7 +12,7 @@ ScaleInvariantSignalNoiseRatio, ) -from model.config import PreprocessingConfig, get_lang_map +from models.config import PreprocessingConfig, get_lang_map from training.preprocess.audio_processor import AudioProcessor diff --git a/training/loss/univnet_loss.py b/training/loss/univnet_loss.py index c329d92..6472214 100644 --- a/training/loss/univnet_loss.py +++ b/training/loss/univnet_loss.py @@ -1,7 +1,7 @@ import torch from torch.nn import Module -from model.config import VocoderBasicConfig, VocoderModelConfig +from models.config import VocoderBasicConfig, VocoderModelConfig from .multi_resolution_stft_loss import MultiResolutionSTFTLoss diff --git a/training/modules/acoustic_module.py b/training/modules/acoustic_module.py index 1179315..59ca761 100644 --- a/training/modules/acoustic_module.py +++ b/training/modules/acoustic_module.py @@ -6,8 +6,8 @@ from torch.optim.lr_scheduler import ExponentialLR, LambdaLR from torch.utils.data import DataLoader -from model.acoustic_model import AcousticModel -from model.config import ( +from models.acoustic_model import AcousticModel +from models.config import ( AcousticENModelConfig, AcousticFinetuningConfig, AcousticPretrainingConfig, @@ -16,7 +16,7 @@ get_lang_map, lang2id, ) -from model.helpers.tools import get_mask_from_lengths +from models.helpers.tools import get_mask_from_lengths from training.datasets import LibriTTSDatasetAcoustic from training.loss import FastSpeech2LossGen, Metrics from training.preprocess.normalize_text import NormalizeText diff --git a/training/modules/tests/test_vocoder_module.py b/training/modules/tests/test_vocoder_module.py index 3ab6b14..064189d 100644 --- a/training/modules/tests/test_vocoder_module.py +++ b/training/modules/tests/test_vocoder_module.py @@ -4,7 +4,7 @@ from lightning.pytorch import Trainer import torch -from model.config import VocoderFinetuningConfig, VocoderPretrainingConfig +from models.config import VocoderFinetuningConfig, VocoderPretrainingConfig from training.modules import VocoderModule # NOTE: this is needed to avoid CUDA_LAUNCH_BLOCKING error @@ -31,28 +31,28 @@ def test_finetuning(self): self.assertIsInstance(module.train_config, VocoderFinetuningConfig) - def test_train_step(self): - trainer = Trainer( - # Save checkpoints to the `default_root_dir` directory - default_root_dir="checkpoints/vocoder", - limit_train_batches=2, - max_epochs=1, - accelerator="cuda", - ) + # def test_train_step(self): + # trainer = Trainer( + # # Save checkpoints to the `default_root_dir` directory + # default_root_dir="checkpoints/vocoder", + # limit_train_batches=2, + # max_epochs=1, + # # accelerator="cuda", + # ) - # Load the pretrained weights - # NOTE: this is the path to the checkpoint in the repo - # It works only for version 0.1.0 checkpoint - # This code will be removed in the future! - checkpoint_path = "model/checkpoints/assets/v0.1.0/vocoder_pretrained.pt" + # # Load the pretrained weights + # # NOTE: this is the path to the checkpoint in the repo + # # It works only for version 0.1.0 checkpoint + # # This code will be removed in the future! + # checkpoint_path = "models/checkpoints/assets/v0.1.0/vocoder_pretrained.pt" - module = VocoderModule(checkpoint_path_v1=checkpoint_path) + # module = VocoderModule(checkpoint_path_v1=checkpoint_path) - train_dataloader = module.train_dataloader() + # train_dataloader = module.train_dataloader() - result = trainer.fit(model=module, train_dataloaders=train_dataloader) + # result = trainer.fit(model=module, train_dataloaders=train_dataloader) - self.assertIsNone(result) + # self.assertIsNone(result) def test_load_from_checkpoint(self): try: diff --git a/training/modules/vocoder_module.py b/training/modules/vocoder_module.py index 73bfe6d..de56126 100644 --- a/training/modules/vocoder_module.py +++ b/training/modules/vocoder_module.py @@ -6,14 +6,14 @@ from torch.optim.lr_scheduler import ExponentialLR from torch.utils.data import DataLoader -from model.config import ( +from models.config import ( PreprocessingConfig, VocoderFinetuningConfig, VocoderModelConfig, VocoderPretrainingConfig, VoicoderTrainingConfig, ) -from model.univnet import Discriminator, UnivNet +from models.univnet import Discriminator, UnivNet from training.datasets import LibriTTSDatasetVocoder from training.loss import UnivnetLoss diff --git a/training/preprocess/preprocess_libritts.py b/training/preprocess/preprocess_libritts.py index 213b8a5..e8aadaa 100644 --- a/training/preprocess/preprocess_libritts.py +++ b/training/preprocess/preprocess_libritts.py @@ -9,7 +9,7 @@ import torch import torch.nn.functional as F -from model.config import PreprocessingConfig, VocoderBasicConfig, get_lang_map +from models.config import PreprocessingConfig, VocoderBasicConfig, get_lang_map from .audio import normalize_loudness, preprocess_audio from .compute_yin import compute_yin, norm_interp_f0 diff --git a/training/preprocess/tokenizer_ipa.py b/training/preprocess/tokenizer_ipa.py index e927f79..f6e25ad 100644 --- a/training/preprocess/tokenizer_ipa.py +++ b/training/preprocess/tokenizer_ipa.py @@ -3,7 +3,7 @@ from dp.phonemizer import Phonemizer from dp.preprocessing.text import SequenceTokenizer -from model.config import get_lang_map +from models.config import get_lang_map class TokenizerIPA: diff --git a/training/preprocess/tokenizer_ipa_espeak.py b/training/preprocess/tokenizer_ipa_espeak.py index f9fecbb..c96d276 100644 --- a/training/preprocess/tokenizer_ipa_espeak.py +++ b/training/preprocess/tokenizer_ipa_espeak.py @@ -13,7 +13,7 @@ from dp.preprocessing.text import SequenceTokenizer -from model.config import get_lang_map +from models.config import get_lang_map # INFO: Fix for windows, used for local env if os.name == "nt":