Skip to main content

A whisper stt plugin for OVOS

Project description

Description

OpenVoiceOS STT plugin for Whisper-LM-transformers, KenLM and Large language model integration with Whisper ASR models implemented in Hugging Face library.

Install

pip install ovos-stt-plugin-whisper-lm

⚠️ only python <=3.11 supported by some of the dependencies

Models

Pretrained ngram models are provided by HiTZ

Each lm_model is built using the KenLM toolkit and is based on n-gram statistics extracted from large, domain-specific corpora. The models available are:

  • Basque (eu): 5gram-eu.bin (11G)
  • Galician (gl): 5gram-gl.bin (8.4G)
  • Catalan (ca): 5gram-ca.bin (20G)
  • Spanish (es): 5gram-es.bin (13G)

Finetuned whisper models are also available from Xabier Zuazo for those languages

Instead of a ngram model it is also possible to use a LLM such as latxa

Configuration

In the example below, we use HiTZ Basque KenLM model. Optimize the lm_alpha, lm_beta, etc., for best results with your own models.

  "stt": {
    "module": "ovos-stt-plugin-whisper-lm",
    "ovos-stt-plugin-whisper-lm": {
        "model": "zuazo/whisper-medium-eu",
        "lm_repo": "HiTZ/whisper-lm-ngrams",
        "lm_model": "5gram-eu.bin",
        "lm_alpha": 0.33582369,
        "lm_beta": 0.68825565,
        "use_cuda": true
    }
  }

💡 lm_repo only needs to be set if you want to specify a specific filename in lm_model

To use an LLM instead of a ngram model

  "stt": {
    "module": "ovos-stt-plugin-whisper-lm",
    "ovos-stt-plugin-whisper-lm": {
        "model": "zuazo/whisper-medium-eu",
        "lm_model": "HiTZ/latxa-7b-v1.2",
        "lm_alpha": 2.73329396,
        "lm_beta": 0.00178595,
        "use_cuda": true
    }
  }

⚠️ Running large LMs side-by-side with Whisper requires sufficient GPU memory.

Credits

This plugin was developed by TigreGotico for OpenVoiceOS under the ILENIA project.

This plugin was funded by the Ministerio para la Transformación Digital y de la Función Pública and Plan de Recuperación, Transformación y Resiliencia - Funded by EU – NextGenerationEU within the framework of the project ILENIA with reference 2022/TL22/00215337

The pretrained Ngram models are available under the Creative Commons Attribution 4.0 International License (CC BY 4.0). You are free to use, modify, and distribute this model as long as you credit the original creators.

@misc{dezuazo2025whisperlmimprovingasrmodels,
      title={Whisper-LM: Improving ASR Models with Language Models for Low-Resource Languages}, 
      author={Xabier de Zuazo and Eva Navas and Ibon Saratxaga and Inma Hernáez Rioja},
      year={2025},
      eprint={2503.23542},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2503.23542}, 
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos_stt_plugin_whisper_lm-0.0.6a9.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovos_stt_plugin_whisper_lm-0.0.6a9-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file ovos_stt_plugin_whisper_lm-0.0.6a9.tar.gz.

File metadata

File hashes

Hashes for ovos_stt_plugin_whisper_lm-0.0.6a9.tar.gz
Algorithm Hash digest
SHA256 e5a0849eac0541a562f97d4e8c787a5421f0d8a9194db43ae4792b0ca09768a8
MD5 6dae13fb6d83c868c00bd16e882a7d0a
BLAKE2b-256 ae47d669114c44ea56f31c5ebc22b4e13cd7bb43f275c3e86fa2dfc6cb2764de

See more details on using hashes here.

File details

Details for the file ovos_stt_plugin_whisper_lm-0.0.6a9-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_stt_plugin_whisper_lm-0.0.6a9-py3-none-any.whl
Algorithm Hash digest
SHA256 5c15e3e7e3089d871ecef9748862a383cfa87e6bc2677d71c4fd667daa694da7
MD5 1c8e43f5fa94b5ff0eb2119abb0ae45e
BLAKE2b-256 b0871edaf226b81ff3a6bec2f2a105c23b9dbda70e36481ae05523456f91ff26

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page