Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
test only librispeech
  • Loading branch information
Adel-Moumen committed Feb 22, 2023
commit f866899c005296925bf1bd8602ee3f0919cdb0cb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ language: english
# Normalize the english inputs with
# the same normalization done in the paper
normalized_transcripts: True
test_only: False # Set it to True if you only want to do the evaluation

# Data files
data_folder: !PLACEHOLDER # e,g./path/to/LibriSpeech
Expand Down
18 changes: 10 additions & 8 deletions recipes/LibriSpeech/ASR/transformer/train_with_whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,16 @@ def text_pipeline(wrd):
asr_brain.tokenizer = tokenizer

# Training
asr_brain.fit(
asr_brain.hparams.epoch_counter,
train_data,
valid_data,
train_loader_kwargs=hparams["train_loader_kwargs"],
valid_loader_kwargs=hparams["valid_loader_kwargs"],
)

if hparams["test_only"] is False:
# Training
asr_brain.fit(
asr_brain.hparams.epoch_counter,
train_data,
valid_data,
train_loader_kwargs=hparams["train_loader_kwargs"],
valid_loader_kwargs=hparams["valid_loader_kwargs"],
)

# Testing
for k in test_datasets.keys(): # keys are test_clean, test_other etc
asr_brain.hparams.wer_file = os.path.join(
Expand Down