Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
352d63c5
Unverified
Commit
352d63c5
authored
Aug 17, 2021
by
yangarbiter
Committed by
GitHub
Aug 17, 2021
Browse files
Move Tacotron2 out of prototype (#1714)
parent
0f603eb9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
43 deletions
+27
-43
docs/source/index.rst
docs/source/index.rst
+0
-1
docs/source/models.rst
docs/source/models.rst
+18
-0
docs/source/tacotron2.rst
docs/source/tacotron2.rst
+0
-37
examples/pipeline_tacotron2/inference.py
examples/pipeline_tacotron2/inference.py
+3
-3
examples/pipeline_tacotron2/train.py
examples/pipeline_tacotron2/train.py
+1
-1
test/torchaudio_unittest/models/tacotron2/model_test_impl.py
test/torchaudio_unittest/models/tacotron2/model_test_impl.py
+2
-1
torchaudio/models/__init__.py
torchaudio/models/__init__.py
+3
-0
torchaudio/models/tacotron2.py
torchaudio/models/tacotron2.py
+0
-0
No files found.
docs/source/index.rst
View file @
352d63c5
...
@@ -40,7 +40,6 @@ The :mod:`torchaudio` package consists of I/O, popular datasets and common audio
...
@@ -40,7 +40,6 @@ The :mod:`torchaudio` package consists of I/O, popular datasets and common audio
kaldi_io
kaldi_io
utils
utils
rnnt_loss
rnnt_loss
tacotron2
.. toctree::
.. toctree::
...
...
docs/source/models.rst
View file @
352d63c5
...
@@ -25,6 +25,24 @@ DeepSpeech
...
@@ -25,6 +25,24 @@ DeepSpeech
.. automethod:: forward
.. automethod:: forward
Tacotron2
~~~~~~~~~
.. autoclass:: Tacotron2
.. automethod:: forward
.. automethod:: infer
Factory Functions
-----------------
tacotron2
---------
.. autofunction:: tacotron2
Wav2Letter
Wav2Letter
~~~~~~~~~~
~~~~~~~~~~
...
...
docs/source/tacotron2.rst
deleted
100644 → 0
View file @
0f603eb9
.. role:: hidden
:class: hidden-section
torchaudio.prototype.tacotron2
==============================
.. currentmodule:: torchaudio.prototype.tacotron2
.. note::
The Tacotron2 model is a prototype feature, see `here <https://pytorch.org/audio>`_ to learn more about the nomenclature.
It is only available within the nightlies, and also needs to be imported
explicitly using: :code:`from torchaudio.prototype.Tacotron2 import Tacotron2, tacotron2`.
Tacotron2
~~~~~~~~~
.. autoclass:: Tacotron2
.. automethod:: forward
.. automethod:: infer
Factory Functions
-----------------
tacotron2
---------
.. autofunction:: tacotron2
References
~~~~~~~~~~
.. footbibliography::
examples/pipeline_tacotron2/inference.py
View file @
352d63c5
...
@@ -11,8 +11,8 @@ import sys
...
@@ -11,8 +11,8 @@ import sys
import
torch
import
torch
import
torchaudio
import
torchaudio
import
numpy
as
np
import
numpy
as
np
from
torchaudio.
prototype.tacotron2
import
Tacotron2
from
torchaudio.
models
import
Tacotron2
from
torchaudio.
prototype.tacotron2
import
tacotron2
as
pretrained_tacotron2
from
torchaudio.
models
import
tacotron2
as
pretrained_tacotron2
from
utils
import
prepare_input_sequence
from
utils
import
prepare_input_sequence
from
datasets
import
InverseSpectralNormalization
from
datasets
import
InverseSpectralNormalization
...
@@ -28,7 +28,7 @@ def parse_args():
...
@@ -28,7 +28,7 @@ def parse_args():
r
"""
r
"""
Parse commandline arguments.
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
from
torchaudio.models.wavernn
import
_MODEL_CONFIG_AND_URLS
as
wavernn_config_and_urls
parser
=
argparse
.
ArgumentParser
(
description
=
__doc__
)
parser
=
argparse
.
ArgumentParser
(
description
=
__doc__
)
...
...
examples/pipeline_tacotron2/train.py
View file @
352d63c5
...
@@ -44,7 +44,7 @@ import torch.distributed as dist
...
@@ -44,7 +44,7 @@ import torch.distributed as dist
from
torch.utils.tensorboard
import
SummaryWriter
from
torch.utils.tensorboard
import
SummaryWriter
from
torch.utils.data
import
DataLoader
from
torch.utils.data
import
DataLoader
from
torch.optim
import
Adam
from
torch.optim
import
Adam
from
torchaudio.
prototype.tacotron2
import
Tacotron2
from
torchaudio.
models
import
Tacotron2
from
tqdm
import
tqdm
from
tqdm
import
tqdm
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
plt
.
switch_backend
(
'agg'
)
plt
.
switch_backend
(
'agg'
)
...
...
test/torchaudio_unittest/models/tacotron2/model_test_impl.py
View file @
352d63c5
from
typing
import
Tuple
from
typing
import
Tuple
import
torch
import
torch
from
torch
import
Tensor
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
(
from
torchaudio_unittest.common_utils
import
(
TestBaseMixin
,
TestBaseMixin
,
TempDirMixin
,
TempDirMixin
,
...
...
torchaudio/models/__init__.py
View file @
352d63c5
...
@@ -2,6 +2,7 @@ from .wav2letter import Wav2Letter
...
@@ -2,6 +2,7 @@ from .wav2letter import Wav2Letter
from
.wavernn
import
WaveRNN
,
wavernn
from
.wavernn
import
WaveRNN
,
wavernn
from
.conv_tasnet
import
ConvTasNet
from
.conv_tasnet
import
ConvTasNet
from
.deepspeech
import
DeepSpeech
from
.deepspeech
import
DeepSpeech
from
.tacotron2
import
Tacotron2
,
tacotron2
from
.wav2vec2
import
(
from
.wav2vec2
import
(
Wav2Vec2Model
,
Wav2Vec2Model
,
wav2vec2_base
,
wav2vec2_base
,
...
@@ -20,4 +21,6 @@ __all__ = [
...
@@ -20,4 +21,6 @@ __all__ = [
'wav2vec2_base'
,
'wav2vec2_base'
,
'wav2vec2_large'
,
'wav2vec2_large'
,
'wav2vec2_large_lv60k'
,
'wav2vec2_large_lv60k'
,
'Tacotron2'
,
'tacotron2'
,
]
]
torchaudio/
prototype
/tacotron2.py
→
torchaudio/
models
/tacotron2.py
View file @
352d63c5
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment