Architecture details, training hyperparameters, and a description of the proposed technique will be added soon.
The model can be used with the
pipeline
class to transcribe audio files of arbitrary length.
1from transformers import pipeline
2
3model_id = "BUT-FIT/ED-small"
4pipe = pipeline("automatic-speech-recognition", model=model_id, feature_extractor=model_id, trust_remote_code=True)
5# In newer versions of transformers (>4.31.0), there is a bug in the pipeline inference type.
6# The warning can be ignored.
7pipe.type = "seq2seq"
8
9# Run beam search decoding with joint CTC-attention scorer
10result_beam = pipe("audio.wav")
11
12# Run greedy decoding without joint CTC-attention scorer
13pipe.model.generation_config.ctc_weight = 0.0
14pipe.model.generation_config.num_beams = 1
15
16result_greedy = pipe("audio.wav")
17