train_asr

Recipe for training a Transformer ASR system with librispeech, from the SpeechBrain LibriSpeech/ASR recipe. The SpeechBrain version used in this work is: https://github.com/speechbrain/speechbrain/tree/1eddf66eea01866d3cf9dfe61b00bb48d2062236

class recipes.cpc1.e029_sheffield.train_asr.ASR(*args: Any, **kwargs: Any)[source]

Bases: Brain

check_and_reset_optimizer()[source]

reset the optimizer if training enters stage 2

compute_forward(batch, stage)[source]

Forward computations from waveform batches to the output probabilities.

compute_objectives(predictions, batch, stage)[source]

Computes the loss (CTC+NLL) given predictions and targets.

evaluate_batch(batch, stage)[source]

Computations needed for validation/test batches

fit_batch(batch)[source]

Train the parameters given a single batch in input

on_evaluate_start(max_key=None, min_key=None)[source]

perform checkpoint averge if needed

on_fit_start()[source]

Initialize the right optimizer on the training start

on_stage_end(stage, stage_loss, epoch=None)[source]

Gets called at the end of a epoch.

on_stage_start(stage, epoch=None)[source]

Gets called at the beginning of each epoch

recipes.cpc1.e029_sheffield.train_asr.dataio_prepare(hparams)[source]

This function prepares the datasets to be used in the brain class. It also defines the data processing pipeline through user-defined functions.

recipes.cpc1.e029_sheffield.train_asr.main()[source]