Skip to content

Commit

Permalink
Revert "update hypothesis when passed through cfg (#11366)" (#11373)
Browse files Browse the repository at this point in the history
This reverts commit 8ab46ff.
  • Loading branch information
pablo-garay authored Nov 22, 2024
1 parent 9ea442c commit e731d48
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions examples/asr/transcribe_speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,6 @@ def main(cfg: TranscriptionConfig) -> Union[TranscriptionConfig, List[Hypothesis

# we will adjust this flag if the model does not support it
compute_langs = cfg.compute_langs
if cfg.timestamps:
cfg.return_hypotheses = True

# Check whether model and decoder type match
if isinstance(asr_model, EncDecCTCModel):
Expand Down
1 change: 0 additions & 1 deletion nemo/collections/asr/models/ctc_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ def transcribe(
A list of transcriptions (or raw log probabilities if logprobs is True) in the same order as
paths2audio_files
"""
timestamps = timestamps or override_config.timestamps if override_config is not None else None
if timestamps is not None:
# else retain the decoder state (users can set it using change_decoding_strategy)
if timestamps or (override_config is not None and override_config.timestamps):
Expand Down
2 changes: 1 addition & 1 deletion nemo/collections/asr/models/rnnt_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def transcribe(
* A list of greedy transcript texts / Hypothesis
* An optional list of beam search transcript texts / Hypothesis / NBestHypothesis.
"""
timestamps = timestamps or override_config.timestamps if override_config is not None else None

if timestamps is not None:
if timestamps or (override_config is not None and override_config.timestamps):
logging.info(
Expand Down

0 comments on commit e731d48

Please sign in to comment.