Run GigaAM-v4 on a recording

Start with a local WAV file and the rnnt revision. A saved clip lets you inspect the raw and formatted transcripts before adding live input. Put example.wav in your working directory or substitute the path to your recording.

Install and transcribe

pip install numpy "transformers<5" onnx onnxruntime hydra-core omegaconf sentencepiece tqdm

The model card uses trust_remote_code=True. This permits Python code from the model repository to execute in your environment. Review the code before you enable it.

from transformers import AutoModel

model = AutoModel.from_pretrained(
    "ai-sage/GigaAM-v4",
    revision="rnnt",
    trust_remote_code=True,
)
result = model.transcribe("example.wav")
print(result["raw"].text)
print(result["e2e"].text)

Try streaming

Create a stream with model.create_stream(future_context_ms=160). Use the stream's transcribe_partial method as audio arrives. Call flush() at the end to finish the transcript. The model card documents the streaming interface. When you compare the available lookahead settings, note how soon text appears and check the final text after the flush.

Frequently asked questions

Can I export the model?

Use model.to_onnx("onnx_fc") for a full-context ONNX export. The export method also accepts streaming=True for a streaming export.

Where do I find fine-tuning instructions?

See the GigaAM GitHub repository. Keep a set of recordings for evaluation so you can compare the fine-tuned model with the original revision under the same conditions.

Which transcript should I keep?

Read result["raw"].text for the raw transcript and result["e2e"].text for formatted text. For a model comparison, pick the output that matches your references and use the same scoring rules for every run.

Sources