This card describes the current Track A production candidate from the repo. The public-facing training-data summary omits restricted internal sources, but this does not imply a fresh clean-release retrain.
1import torch
2from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
3
4model_id = "msingiai/sauti-asr"
5device = "cuda:0" if torch.cuda.is_available() else "cpu"
6torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
7
8model = AutoModelForSpeechSeq2Seq.from_pretrained(
9 model_id,
10 torch_dtype=torch_dtype,
11 low_cpu_mem_usage=True,
12 use_safetensors=True,
13)
14model.to(device)
15
16processor = AutoProcessor.from_pretrained(model_id)
17pipe = pipeline(
18 "automatic-speech-recognition",
19 model=model,
20 tokenizer=processor.tokenizer,
21 feature_extractor=processor.feature_extractor,
22 torch_dtype=torch_dtype,
23 device=device,
24 chunk_length_s=25,
25)
26
27result = pipe("audio.wav")
28print(result["text"])
This model transcribes speech. Users are responsible for obtaining rights and
consent for audio they process, especially for clinical, customer-support, or
other sensitive recordings.