Skip to content

Commit b076abd

Browse files
mthrokfacebook-github-bot
authored andcommitted
Tweak tutorials (#2733)
Summary: * Port downstream change pytorch/tutorials#2060 * Fix inter-tutorial links and references Pull Request resolved: #2733 Reviewed By: hwangjeff Differential Revision: D40086902 Pulled By: hwangjeff fbshipit-source-id: 00b04c6a1b68fb9fadd52b610b26ecaab15d52d8
1 parent fda00bf commit b076abd

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def _get_pattern():
123123
],
124124
**_get_pattern(),
125125
"backreferences_dir": "gen_modules/backreferences",
126+
"promote_jupyter_magic": True,
126127
"first_notebook_cell": None,
127128
"doc_module": ("torchaudio",),
128129
}

examples/tutorials/device_asr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#
3737
# For the basic usage of the streaming API and Emformer RNN-T
3838
# please refer to
39-
# `Media Stream API tutorial <./streaming_api_tutorial.html>`__ and
39+
# `StreamReader Basic Usage <./streamreader_basic_tutorial.html>`__ and
4040
# `Online ASR with Emformer RNN-T <./online_asr_tutorial.html>`__.
4141
#
4242

examples/tutorials/online_asr_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
# Next, we configure the input audio stream using :py:class:`torchaudio.io.StreamReader`.
116116
#
117117
# For the detail of this API, please refer to the
118-
# `Media Stream API tutorial <./streaming_api_tutorial.html>`__.
118+
# `StreamReader Basic Usage <./streamreader_basic_tutorial.html>`__.
119119
#
120120

121121
######################################################################

examples/tutorials/streamreader_advanced_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
============================
44
55
This tutorial is the continuation of
6-
`StreamReader Basic Usages <./streaming_api_tutorial.html>`__.
6+
`StreamReader Basic Usages <./streamreader_basic_tutorial.html>`__.
77
88
This shows how to use :py:class:`~torchaudio.io.StreamReader` for
99

examples/tutorials/streamreader_basic_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
#
106106
# The following section covers how to open common media formats.
107107
# For the other streams, please refer to the
108-
# `Media Stream API - Pt.2 <./streaming_api2_tutorial.html>`__.
108+
# `StreamReader Advanced Usage <./streamreader_advanced_tutorial.html>`__.
109109
#
110110
# .. note::
111111
#

examples/tutorials/tacotron2_pipeline_tutorial.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@
3535
# The last step is converting the spectrogram into the waveform. The
3636
# process to generate speech from spectrogram is also called Vocoder.
3737
# In this tutorial, three different vocoders are used,
38-
# `WaveRNN <https://pytorch.org/audio/stable/models/wavernn.html>`__,
39-
# `Griffin-Lim <https://pytorch.org/audio/stable/transforms.html#griffinlim>`__,
40-
# and
38+
# :py:class:`~torchaudio.models.WaveRNN`,
39+
# :py:class:`~torchaudio.transforms.GriffinLim`, and
4140
# `Nvidia's WaveGlow <https://pytorch.org/hub/nvidia_deeplearningexamples_tacotron2/>`__.
4241
#
4342
#
@@ -57,8 +56,11 @@
5756
# encoding.
5857
#
5958

60-
# When running this example in notebook, install DeepPhonemizer
61-
# !pip3 install deep_phonemizer
59+
# %%
60+
# .. code-block:: bash
61+
#
62+
# %%bash
63+
# pip3 install deep_phonemizer
6264

6365
import torch
6466
import torchaudio
@@ -216,7 +218,7 @@ def text_to_sequence(text):
216218
spec, _, _ = tacotron2.infer(processed, lengths)
217219

218220

219-
plt.imshow(spec[0].cpu().detach())
221+
_ = plt.imshow(spec[0].cpu().detach())
220222

221223

222224
######################################################################

0 commit comments

Comments
 (0)