GigaAM-v2
Collection
unofficial transformers wrappers for SberDevices GigaAM-v2 ASR models
β’
3 items
β’
Updated
β’
1
This is an unofficial Transformers wrapper for the original GigaAM-v2-RNNT model released by SberDevices.
Russian ASR model GigaAM-v2-RNNT.
This is an original GigaAM-v2-RNNT with transformers library interface.
File gigaam_transformers.py contains model, feature extractor and tokenizer classes with usual transformers methods. Model can be initialized with transformers auto classes (see an example below).
my lib versions:
torch 2.7.1torchaudio 2.7.1transformers 4.49.0Usage is same as other transformers ASR models.
from transformers import AutoModel, AutoProcessor
import torch
import torchaudio
# load audio
wav, sr = torchaudio.load("audio.wav")
# resample if necessary
wav = torchaudio.functional.resample(wav, sr, 16000)
# load model and processor
processor = AutoProcessor.from_pretrained("waveletdeboshir/gigaam-rnnt", trust_remote_code=True)
model = AutoModel.from_pretrained("waveletdeboshir/gigaam-rnnt", trust_remote_code=True)
model.eval()
input_features = processor(wav[0], sampling_rate=16000, return_tensors="pt")
# greedy prediction
with torch.no_grad():
pred_ids = model.generate(**input_features)
# decode token ids to text
transcription = processor.batch_decode(pred_ids, group_tokens=False)[0]