Skip to content

LASR

This model was released on {release_date} and added to Hugging Face Transformers on 2025-12-05.

PyTorch SDPA

TODO

from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="path/to/lasr-model")
out = pipe("path/to/audio.mp3")
print(out)
from transformers import AutoModelForCTC, AutoProcessor
from datasets import load_dataset, Audio
import torch
device = "cuda" if torch.cuda.is_available() else "cpu"
processor = AutoProcessor.from_pretrained("path/to/lasr-model")
model = AutoModelForCTC.from_pretrained("path/to/lasr-model", dtype="auto", device_map=device)
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
ds = ds.cast_column("audio", Audio(sampling_rate=processor.feature_extractor.sampling_rate))
speech_samples = [el['array'] for el in ds["audio"][:5]]
inputs = processor(speech_samples, sampling_rate=processor.feature_extractor.sampling_rate)
inputs.to(model.device, dtype=model.dtype)
outputs = model.generate(**inputs)
print(processor.batch_decode(outputs))

TODO

TODO

[[autodoc]] LasrTokenizer

[[autodoc]] LasrFeatureExtractor - call

[[autodoc]] LasrProcessor - call - batch_decode - decode

[[autodoc]] LasrEncoderConfig

[[autodoc]] LasrCTCConfig

[[autodoc]] LasrEncoder

[[autodoc]] LasrForCTC