Skip to content

Commit

Permalink
Move Tacotron2 out of prototype (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangarbiter committed Aug 18, 2021
1 parent 0f603eb commit 352d63c
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 43 deletions.
1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ The :mod:`torchaudio` package consists of I/O, popular datasets and common audio
kaldi_io
utils
rnnt_loss
tacotron2


.. toctree::
Expand Down
18 changes: 18 additions & 0 deletions docs/source/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ DeepSpeech
.. automethod:: forward


Tacotron2
~~~~~~~~~

.. autoclass:: Tacotron2

.. automethod:: forward

.. automethod:: infer

Factory Functions
-----------------

tacotron2
---------

.. autofunction:: tacotron2


Wav2Letter
~~~~~~~~~~

Expand Down
37 changes: 0 additions & 37 deletions docs/source/tacotron2.rst

This file was deleted.

6 changes: 3 additions & 3 deletions examples/pipeline_tacotron2/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import torch
import torchaudio
import numpy as np
from torchaudio.prototype.tacotron2 import Tacotron2
from torchaudio.prototype.tacotron2 import tacotron2 as pretrained_tacotron2
from torchaudio.models import Tacotron2
from torchaudio.models import tacotron2 as pretrained_tacotron2

from utils import prepare_input_sequence
from datasets import InverseSpectralNormalization
Expand All @@ -28,7 +28,7 @@ def parse_args():
r"""
Parse commandline arguments.
"""
from torchaudio.prototype.tacotron2 import _MODEL_CONFIG_AND_URLS as tacotron2_config_and_urls
from torchaudio.models.tacotron2 import _MODEL_CONFIG_AND_URLS as tacotron2_config_and_urls
from torchaudio.models.wavernn import _MODEL_CONFIG_AND_URLS as wavernn_config_and_urls

parser = argparse.ArgumentParser(description=__doc__)
Expand Down
2 changes: 1 addition & 1 deletion examples/pipeline_tacotron2/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from torch.utils.tensorboard import SummaryWriter
from torch.utils.data import DataLoader
from torch.optim import Adam
from torchaudio.prototype.tacotron2 import Tacotron2
from torchaudio.models import Tacotron2
from tqdm import tqdm
import matplotlib.pyplot as plt
plt.switch_backend('agg')
Expand Down
3 changes: 2 additions & 1 deletion test/torchaudio_unittest/models/tacotron2/model_test_impl.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from typing import Tuple
import torch
from torch import Tensor
from torchaudio.prototype.tacotron2 import Tacotron2, _Encoder, _Decoder
from torchaudio.models import Tacotron2
from torchaudio.models.tacotron2 import _Encoder, _Decoder
from torchaudio_unittest.common_utils import (
TestBaseMixin,
TempDirMixin,
Expand Down
3 changes: 3 additions & 0 deletions torchaudio/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from .wavernn import WaveRNN, wavernn
from .conv_tasnet import ConvTasNet
from .deepspeech import DeepSpeech
from .tacotron2 import Tacotron2, tacotron2
from .wav2vec2 import (
Wav2Vec2Model,
wav2vec2_base,
Expand All @@ -20,4 +21,6 @@
'wav2vec2_base',
'wav2vec2_large',
'wav2vec2_large_lv60k',
'Tacotron2',
'tacotron2',
]
File renamed without changes.

0 comments on commit 352d63c

Please sign in to comment.