Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in asr_inference_with_cuda_ctc_decoder_tutorial.py #3737

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# with next possible characters, and maintaining only the hypotheses with the
# highest scores at each time step.
#
# The underlying implementation uses cuda to acclerate the whole decoding process
# The underlying implementation uses cuda to accelerate the whole decoding process
# A mathematical formula for the decoder can be
# found in the `paper <https://arxiv.org/pdf/1408.2873.pdf>`__, and
# a more detailed algorithm can be found in this `blog
Expand Down Expand Up @@ -201,7 +201,7 @@ def download_asset_external(url, key):
# Beam Search Decoder Parameters
# ------------------------------
#
# In this section, we go a little bit more in depth about some different
# In this section, we go a little bit more in-depth about some different
# parameters and tradeoffs. For the full list of customizable parameters,
# please refer to the
# :py:func:`documentation <torchaudio.models.decoder.cuda_ctc_decoder>`.
Expand Down Expand Up @@ -246,7 +246,7 @@ def print_decoded(cuda_decoder, bpe_model, log_prob, encoder_out_lens, param, pa
# hypotheses to hold after each decoding step. Using larger beam sizes
# allows for exploring a larger range of possible hypotheses which can
# produce hypotheses with higher scores, but it does not provide additional gains beyond a certain point.
# We recommend to set beam_size=10 for cuda beam search decoder.
# We recommend setting beam_size=10 for cuda beam search decoder.
#
# In the example below, we see improvement in decoding quality as we
# increase beam size from 1 to 3, but notice how using a beam size
Expand All @@ -269,12 +269,12 @@ def print_decoded(cuda_decoder, bpe_model, log_prob, encoder_out_lens, param, pa
# blank skip threshold
# ~~~~~~~~~~~~~~~~~~~~
#
# The ``blank_skip_threshold`` parameter is used to prune the frames which have large blank probability.
# Pruning these frames with a good blank_skip_threshold could speed up decoding
# process a lot while no accuracy drop.
# The ``blank_skip_threshold`` parameter is used to prune the frames with a larger blank probability than ``blank_skip_threshold``.
# Pruning these frames with a good blank_skip_threshold could speed up the decoding
# process a lot with no accuracy drop.
# Since the rule of CTC, we would keep at least one blank frame between two non-blank frames
# to avoid mistakenly merge two consecutive identical symbols.
# We recommend to set blank_skip_threshold=0.95 for cuda beam search decoder.
# to avoid mistakenly merging two consecutive identical symbols.
# We recommend setting blank_skip_threshold=0.95 for cuda beam search decoder.
#

blank_skip_probs = [0.25, 0.95, 1.0]
Expand Down
Loading