Commit cab2bb44 authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Tweak tutorials (#2630)

Summary:
Resolves the following warnings

```
/torchaudio/docs/source/tutorials/asr_inference_with_ctc_decoder_tutorial.rst:195: WARNING: Unexpected indentation.
/torchaudio/docs/source/tutorials/asr_inference_with_ctc_decoder_tutorial.rst:446: WARNING: Unexpected indentation.
/torchaudio/docs/source/tutorials/audio_io_tutorial.rst:559: WARNING: Content block expected for the "note" directive; none found.
/torchaudio/docs/source/tutorials/mvdr_tutorial.rst:338: WARNING: Bullet list ends without a blank line; unexpected unindent.
```

Pull Request resolved: https://github.com/pytorch/audio/pull/2630

Reviewed By: nateanl

Differential Revision: D38816632

Pulled By: mthrok

fbshipit-source-id: 135ded4e064d136be67ce24439e96f5e9c9ce635
parent 265c09d8
...@@ -109,8 +109,10 @@ IPython.display.Audio(speech_file) ...@@ -109,8 +109,10 @@ IPython.display.Audio(speech_file)
###################################################################### ######################################################################
# The transcript corresponding to this audio file is # The transcript corresponding to this audio file is
# :: #
# i really was very much afraid of showing him how much shocked i was at some parts of what he said # .. code-block::
#
# i really was very much afraid of showing him how much shocked i was at some parts of what he said
# #
waveform, sample_rate = torchaudio.load(speech_file) waveform, sample_rate = torchaudio.load(speech_file)
...@@ -139,7 +141,7 @@ if sample_rate != bundle.sample_rate: ...@@ -139,7 +141,7 @@ if sample_rate != bundle.sample_rate:
# file, where each line consists of the tokens corresponding to the same # file, where each line consists of the tokens corresponding to the same
# index, or as a list of tokens, each mapping to a unique index. # index, or as a list of tokens, each mapping to a unique index.
# #
# :: # .. code-block::
# #
# # tokens.txt # # tokens.txt
# _ # _
...@@ -162,7 +164,7 @@ print(tokens) ...@@ -162,7 +164,7 @@ print(tokens)
# only words from the lexicon. The expected format of the lexicon file is # only words from the lexicon. The expected format of the lexicon file is
# a line per word, with a word followed by its space-split tokens. # a line per word, with a word followed by its space-split tokens.
# #
# :: # .. code-block::
# #
# # lexcion.txt # # lexcion.txt
# a a | # a a |
...@@ -283,8 +285,10 @@ greedy_decoder = GreedyCTCDecoder(tokens) ...@@ -283,8 +285,10 @@ greedy_decoder = GreedyCTCDecoder(tokens)
# predicted token IDs, corresponding words (if a lexicon is provided), hypothesis score, # predicted token IDs, corresponding words (if a lexicon is provided), hypothesis score,
# and timesteps corresponding to the token IDs. Recall the transcript corresponding to the # and timesteps corresponding to the token IDs. Recall the transcript corresponding to the
# waveform is # waveform is
# :: #
# i really was very much afraid of showing him how much shocked i was at some parts of what he said # .. code-block::
#
# i really was very much afraid of showing him how much shocked i was at some parts of what he said
# #
actual_transcript = "i really was very much afraid of showing him how much shocked i was at some parts of what he said" actual_transcript = "i really was very much afraid of showing him how much shocked i was at some parts of what he said"
......
...@@ -304,8 +304,8 @@ print("matched!") ...@@ -304,8 +304,8 @@ print("matched!")
# #
# .. note:: # .. note::
# #
# Saving data in encodings with a lower bit depth reduces the # Saving data in encodings with a lower bit depth reduces the
# resulting file size but also precision. # resulting file size but also precision.
# #
waveform, sample_rate = torchaudio.load(SAMPLE_WAV) waveform, sample_rate = torchaudio.load(SAMPLE_WAV)
......
...@@ -219,6 +219,7 @@ stft_noise = stft(waveform_noise) ...@@ -219,6 +219,7 @@ stft_noise = stft(waveform_noise)
# - signal-to-distortion ratio (SDR) # - signal-to-distortion ratio (SDR)
# - scale-invariant signal-to-noise ratio (Si-SNR, or Si-SDR in some papers) # - scale-invariant signal-to-noise ratio (Si-SNR, or Si-SDR in some papers)
# - Perceptual Evaluation of Speech Quality (PESQ) # - Perceptual Evaluation of Speech Quality (PESQ)
#
# We also evaluate the intelligibility of the speech with the Short-Time Objective Intelligibility # We also evaluate the intelligibility of the speech with the Short-Time Objective Intelligibility
# (STOI) metric. # (STOI) metric.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment