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.6a10.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.6a10-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.6a10.tar.gz.

File metadata

File hashes

Hashes for ovos_stt_plugin_whisper_lm-0.0.6a10.tar.gz
Algorithm Hash digest
SHA256 bb724885ad5c1a5aaf79ad26934c5537a802d697935a47cf5e06af4883fd4134
MD5 939ed08b884db6283067327cf3cd637b
BLAKE2b-256 6886af63f62b50dae3e89fe71e6135c260600e32f791cf311a543546ef398a14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ovos_stt_plugin_whisper_lm-0.0.6a10-py3-none-any.whl
Algorithm Hash digest
SHA256 c72a7a054767908a698913f68390a7308233a043b138db51a012d633a7421dfe
MD5 51a1dfd6550eebf5cc85b077e74c9a25
BLAKE2b-256 1c44dbfb46bbc585ba3731bee12d56a2185d8d54ef1c30304b4d531a904d4ad0

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