GigaAM

salute-developersMIT活跃维护

面向语音识别任务的基础模型,支持自监督预训练,可完成语音转写与情感识别,适合搭建俄语等多场景语音推理服务。

Foundational Model for Speech Recognition Tasks

暂无版本911star114fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/salute-developers/GigaAM.git
cd GigaAM
pip install -e .[torch]
硬件要求按 README 说明

README 未说明具体显存要求;微调示例按不同 VRAM 约束提供,ONNX 推理可用 onnxruntime-gpu 走 GPU。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

开源 Conformer 语音识别模型家族,主打俄语及多语种 ASR 与情感识别

面向语音识别任务的基础模型,支持自监督预训练,可完成语音转写与情感识别,适合搭建俄语等多场景语音推理服务。

核心能力

  • 提供 220M–600M 参数的 Conformer 编码器,支持 CTC 与 RNNT 解码
  • v3 系列在电话客服、音乐等新领域 WER 平均降低 30%
  • multilingual 系列覆盖 70+ 语言,含 2M 小时预训练数据
  • 支持词级时间戳与基于 pyannote VAD 的长音频转写
  • 可导出 ONNX 并部署到 Triton Inference Server / TensorRT

容易踩的坑

需预先安装 ffmpeg 并加入 PATH;transcribe 仅支持 25 秒以内音频,长音频需额外安装 .[longform] 并配置 HF_TOKEN 接受 pyannote/segmentation-3.0 条款;GPU 跑 ONNX 需卸载 onnxruntime 改装 onnxruntime-gpu。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    GigaAM: the family of open-source acoustic models for speech processing

    License: MIT Python 3.10+ arXiv HuggingFace Open In Colab

    plot

    Latest News


    Setup

    Requirements

    • Python ≥ 3.10
    • ffmpeg installed and added to your system's PATH

    Install the GigaAM Package

    # Clone the repository
    git clone https://github.com/salute-developers/GigaAM.git
    cd GigaAM
    
    # Install the package requirements
    pip install -e .[torch]
    
    # (optionally) Verify the installation:
    pip install -e ".[tests]"
    pytest -v tests/test_loading.py -m partial  # or `-m full` to test all models
    

    GigaAM overview

    GigaAM is a Conformer-based foundational model (220M–600M parameters) pre-trained on diverse speech data — Russian for the v1–v3 lines, and 70+ languages for the multilingual line. It serves as the backbone for the entire GigaAM family, enabling state-of-the-art fine-tuned performance in speech recognition and emotion recognition. We fine-tuned the GigaAM encoder for ASR using CTC and RNNT decoders. The GigaAM family includes four lines of models:

    Pretrain MethodPretrain (hours)ASR (hours)Available Versions
    v1Wav2vec 2.050,0002,000v1_ssl, emo, v1_ctc, v1_rnnt
    v2HuBERT–CTC50,0002,000v2_ssl, v2_ctc, v2_rnnt
    v3HuBERT–CTC700,0004,000v3_ssl, v3_ctc, v3_rnnt, v3_e2e_ctc, v3_e2e_rnnt
    multilingualHuBERT–style2,000,00050,000multilingual_ssl, multilingual_large_ssl, multilingual_ctc, multilingual_large_ctc

    Where v3_e2e_ctc and v3_e2e_rnnt support punctuation and text normalization. The multilingual_* line provides 220M / 600M SSL backbones and charwise CTC ASR models covering multiple languages.

    Model Performance

    GigaAM-v3 training incorporates new internal datasets: callcenter, music, speech with atypical characteristics, and voice messages. As a result, the models perform on average 30% better on these new domains while maintaining the same quality as GigaAM-v2 on public benchmarks. In end-to-end ASR comparisons of e2e_ctc and e2e_rnnt against Whisper (judged via independent LLM-as-a-Judge side-by-side) GigaAM models win by an average margin of 70:30. Our emotion recognition model GigaAM-Emo outperforms existing models by 15% Macro F1-Score.

    For detailed results, see here.


    Usage

    Model inference

    Note: ASR with .transcribe function is applicable for audio only up to 25 seconds. To enable .transcribe_longform install the additional pyannote.audio dependencies

    pip install -e ".[longform]"
    # optionally run longform testing
    pip install -e ".[tests]"
    HF_TOKEN=<your hf token> pytest -v tests/test_longform.py
    
    import gigaam
    
    # Load test audio
    audio_path = gigaam.utils.download_short_audio()
    long_audio_path = gigaam.utils.download_long_audio()
    
    # Audio embeddings
    model_name = "v3_ssl"       # Options: `v1_ssl`, `v2_ssl`, `v3_ssl`, `multilingual_ssl`, `multilingual_large_ssl`
    model = gigaam.load_model(model_name)
    embedding, _ = model.embed_audio(audio_path)
    print(embedding)
    
    # ASR
    model_name = "v3_e2e_rnnt"  # Options: any model version with suffix `_ctc` or `_rnnt`
    model = gigaam.load_model(model_name)
    transcription = model.transcribe(audio_path)
    print(transcription)
    
    # ASR with word-level timestamps
    result = model.transcribe(audio_path, word_timestamps=True)
    for word in result.words:
        print(f"  [{word.start:.2f} - {word.end:.2f}] {word.text}")
    
    # and long-form ASR
    import os
    os.environ["HF_TOKEN"] = <HF_TOKEN with read access to "pyannote/segmentation-3.0">
    result = model.transcribe_longform(long_audio_path)
    for segment in result:
       print(f"[{gigaam.format_time(segment.start)} - {gigaam.format_time(segment.end)}]: {segment.text}")
    
    # Emotion recognition
    model = gigaam.load_model("emo")
    emotion2prob = model.get_probs(audio_path)
    print(", ".join([f"{emotion}: {prob:.3f}" for emotion, prob in emotion2prob.items()]))
    

    Model Fine-tuning

    CTC, RNNT, and SSL models can be fine-tuned on custom data using PyTorch Lightning. For a detailed description of all training arguments, see train_utils/README.md. End-to-end examples with different VRAM constraints are available in train_utils/example.ipynb.

    Loading from Hugging Face

    Note: Install requirements from the example.

    from transformers import AutoModel
    
    model = AutoModel.from_pretrained("ai-sage/GigaAM-v3", revision="e2e_rnnt", trust_remote_code=True)
    
    model = AutoModel.from_pretrained("ai-sage/GigaAM-Multilingual", revision="ctc", trust_remote_code=True)
    

    ONNX Export and Inference

    Note: to_onnx exports in fp32 by default. Pass dtype=torch.float16 for GPU deployment — it is faster and uses less VRAM. GPU support can be enabled with uninstalling onnxruntime and running pip install onnxruntime-gpu==1.22.*.

    1. Export the model to ONNX using the model.to_onnx method:

      onnx_dir = "onnx"
      model_version = "v3_ctc"  # Options: any version
      
      model = gigaam.load_model(model_version)
      model.to_onnx(dir_path=onnx_dir, dtype=torch.float32)  # or fp16 (recommended for GPU)
      
    2. Run ONNX inference:

      from gigaam.onnx_utils import load_onnx, infer_onnx
      
      sessions, model_cfg = load_onnx(onnx_dir, model_version)
      result = infer_onnx([audio_path], model_cfg, sessions)
      print(result[0])
      
      # or use the whole dataset
      texts = infer_onnx("/path/to/eval/manifest.tsv", model_cfg, sessions)
      print(texts[0])
      

    These and more advanced (e.g. custom audio loading, batching) examples can be found in the Colab notebook.

    Triton Inference Server and TensorRT

    All speech recognition models can also be used in a server environment in ONNX/TRT format through Triton Inference Server. For setup instructions, model conversion, and deployment details, see the Triton Inference Server documentation.


    Citation

    If you use GigaAM in your research, please cite our papers:

    @misc{gigaam_multilingual,
          title={GigaAM Multilingual: Foundation Model for Underrepresented Languages}, 
          author={Andrei Kuzmenko and Alexandr Maximenko and Aleksandr Kutsakov and Georgii Gospodinov and Dmitrii Bolotov and Oleg Kutuzov and Pavel Bogomolov and Fyodor Minkin},
          year={2026},
          eprint={2607.10371},
          archivePrefix={arXiv},
          primaryClass={eess.AS},
          url={https://arxiv.org/abs/2607.10371}
    }
    
    @inproceedings{kutsakov25_interspeech,
      title     = {{GigaAM: Efficient Self-Supervised Learner for Speech Recognition}},
      author    = {Aleksandr Kutsakov and Alexandr Maximenko and Georgii Gospodinov and Pavel Bogomolov and Fyodor Minkin},
      year      = {2025},
      booktitle = {{Interspeech 2025}},
      pages     = {1213--1217},
      doi       = {10.21437/Interspeech.2025-1616},
      issn      = {2958-1796},
    }
    

    Links