Skip to main content

Official scorer for the Voice of India (VoI) ASR benchmark — Orthographically Informed WER with a fast Rust core

Project description

voi_oiwer

The official scorer for OIWER (Orthographically Informed Word Error Rate) as used in the Voice of India (VoI) ASR benchmark (arXiv:2604.19151) — a large-scale evaluation of ASR across 15 Indian languages. This is the same implementation used to produce the benchmark's official results.

OIWER was introduced in prior work (see below) as an orthography-aware alternative to plain WER; VoI adapts it for the benchmark. Instead of penalizing legitimate spelling and transliteration variants, it scores a hypothesis against a lattice of accepted reference variations per word/phrase, so valid orthographic variants aren't counted as errors.

Normalization runs in Python (indicnlp-based); the edit-distance alignment over the lattice is implemented in Rust for speed.

Install

pip install voi_oiwer

Works on CPython 3.8+ (Linux, macOS, Windows). Prebuilt wheels — no Rust toolchain needed.

Usage

from voi_oiwer import oiwer

score, final_h, final_r, final_ops, (ins, dele, sub), \
    total_ref_words, metadata, std_refs = oiwer(
        hypothesis="नमस्ते दुनिया",
        reference_lists=[["नमस्ते"], ["दुनिया", "विश्व"]],   # lattice: variations per slot
        input_language="hindi",
    )
print(score)   # OIWER, as a percentage

Arguments

arg type description
hypothesis str the ASR output text
reference_lists list[list[str]] the reference lattice — one list of accepted variations per slot (a variation may span multiple words)
input_language str a language name, e.g. "hindi", "tamil", "urdu" (see list below)

Returns

A tuple:

(oiwer_score,                    # float — error percentage
 final_h,                        # list[str] — aligned hypothesis words
 final_r,                        # list[str] — aligned reference words (" " = insertion)
 final_ops,                      # list[str] — per slot: 'c' correct, 's' sub, 'd' del, 'i' ins
 (insertions, deletions, substitutions),
 total_reference_words,          # int
 final_metadata,                 # list — [lat_idx, var_idx, word_idx] per reference word (None for insertions)
 standardized_reference_lists)   # list[list[str]] — the normalized lattice used internally

Supported languages

assamese, bengali, bodo, dogri, gujarati, hindi, kannada, kashmiri, konkani, maithili, malayalam, manipuri, marathi, nepali, odia, punjabi, sanskrit, santali, sindhi, tamil, telugu, urdu, chattisgarhi, bhojpuri.

How it works

Scoring runs in two stages. First, text normalization (indicnlp-based) runs in Python — script-specific character handling, punctuation stripping, and Unicode normalization. Then the edit-distance alignment over the reference lattice runs in a compiled Rust core, which is where the speedup comes from. The normalized lattice used internally is returned as standardized_reference_lists so results are inspectable.

The metric, VoI's adaptation of OIWER, and the lattice-based reference design are described in full in the benchmark paper (arXiv:2604.19151).

Development

The Rust core is built with maturin:

pip install maturin
maturin develop --release   # compile the Rust core into your active venv
pytest -q                   # run the test suite

Citation

If you use this metric or the Voice of India benchmark, please cite:

@misc{bhogale2026voiceindialargescalebenchmark,
      title={Voice of India: A Large-Scale Benchmark for Real-World Speech Recognition in India}, 
      author={Kaushal Bhogale and Manas Dhir and Amritansh Walecha and Manmeet Kaur and Vanshika Chhabra and Aaditya Pareek and Hanuman Sidh and Mahima Manik and Sagar Jain and Bhaskar Singh and Utkarsh Singh and Tahir Javed and Shobhit Banga and Mitesh M. Khapra},
      year={2026},
      eprint={2604.19151},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2604.19151}, 
}

This metric builds on the original OIWER formulation:

@misc{bhogale2026orthographicallyinformedevaluationspeechrecognition,
      title={Towards Orthographically-Informed Evaluation of Speech Recognition Systems for Indian Languages}, 
      author={Kaushal Santosh Bhogale and Tahir Javed and Greeshma Susan John and Dhruv Rathi and Akshayasree Padmanaban and Niharika Parasa and Mitesh M. Khapra},
      year={2026},
      eprint={2603.00941},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2603.00941}, 
}

License

MIT © JoshTalks

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

voi_oiwer-0.1.4.tar.gz (16.9 kB view details)

Uploaded Source

Built Distributions

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

voi_oiwer-0.1.4-cp38-abi3-win_amd64.whl (113.7 kB view details)

Uploaded CPython 3.8+Windows x86-64

voi_oiwer-0.1.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (223.8 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

voi_oiwer-0.1.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (220.6 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

voi_oiwer-0.1.4-cp38-abi3-macosx_11_0_arm64.whl (207.6 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

voi_oiwer-0.1.4-cp38-abi3-macosx_10_12_x86_64.whl (214.6 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file voi_oiwer-0.1.4.tar.gz.

File metadata

  • Download URL: voi_oiwer-0.1.4.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for voi_oiwer-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8411a014685f7ac8b7718d370b779e218a7979ca562495863bba3b640b04eca3
MD5 cc8ff8ad7f84384223eacecb889a28e4
BLAKE2b-256 d4335cf10e9a50f046b93ae9104dc0c5af086b06958dd7814f8e78c936be454d

See more details on using hashes here.

Provenance

The following attestation bundles were made for voi_oiwer-0.1.4.tar.gz:

Publisher: release.yml on JoshTalks/voi_oiwer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file voi_oiwer-0.1.4-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: voi_oiwer-0.1.4-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 113.7 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for voi_oiwer-0.1.4-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 38a1fb9fb37821203afb9b1386864555ce755a5aa6999d0113b8d30f7d517df2
MD5 f10d8fb855a959b8b6fb29b4da128a63
BLAKE2b-256 bc0bb6b180d6631476a554ef2f6a9c10721cce508fc0e1eb002e5dbd8d767c75

See more details on using hashes here.

Provenance

The following attestation bundles were made for voi_oiwer-0.1.4-cp38-abi3-win_amd64.whl:

Publisher: release.yml on JoshTalks/voi_oiwer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file voi_oiwer-0.1.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for voi_oiwer-0.1.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b2754072634608b810fc62d153f93d94b33407ee82a22e6d8573e239dc30e3f
MD5 4c49f91e18fb1b2ac7704d6cb78d9728
BLAKE2b-256 6a008834ee02fc9418d0ae69f4c17815553d290d7aa4e8164c68e18631181da5

See more details on using hashes here.

Provenance

The following attestation bundles were made for voi_oiwer-0.1.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on JoshTalks/voi_oiwer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file voi_oiwer-0.1.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for voi_oiwer-0.1.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8ef52dd0c16a43a97e374dea32b41024458da668111cc730a443d41b1bcd508e
MD5 768828cae8e3ec09697cbdcf0d15f3fd
BLAKE2b-256 d9c34b65be148863c21351f1a4c8dab0c771af009fdd052bcb2d2230149265b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for voi_oiwer-0.1.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on JoshTalks/voi_oiwer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file voi_oiwer-0.1.4-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for voi_oiwer-0.1.4-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 435cca1691d671e3ebc5563749f93427297639de4d2ce61171de128e09be165c
MD5 abec16ffd05239fa9609ef60359cbc2a
BLAKE2b-256 fab5127e9070987ab108fc0e53f891eec6381b03e1ff52ffb0ca5db43c2d8773

See more details on using hashes here.

Provenance

The following attestation bundles were made for voi_oiwer-0.1.4-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on JoshTalks/voi_oiwer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file voi_oiwer-0.1.4-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for voi_oiwer-0.1.4-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5334f3c3ae3fc554e3aee6f74024d7555de58afa870fc1f0f642af51ab1a975a
MD5 0475dc86c5ced423065f5b939ab33f46
BLAKE2b-256 6b849ccf43db9105faf77988c1f67586ce8395701233ff426263f78eff726f74

See more details on using hashes here.

Provenance

The following attestation bundles were made for voi_oiwer-0.1.4-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on JoshTalks/voi_oiwer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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