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.3.tar.gz (17.0 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.3-cp38-abi3-win_amd64.whl (113.9 kB view details)

Uploaded CPython 3.8+Windows x86-64

voi_oiwer-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (224.0 kB view details)

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

voi_oiwer-0.1.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (220.8 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

voi_oiwer-0.1.3-cp38-abi3-macosx_11_0_arm64.whl (207.7 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

voi_oiwer-0.1.3-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.3.tar.gz.

File metadata

  • Download URL: voi_oiwer-0.1.3.tar.gz
  • Upload date:
  • Size: 17.0 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.3.tar.gz
Algorithm Hash digest
SHA256 84ef2ecf8b6cb81bb25918c8fb47c9475a0baacc2a57c6ab89c996258a055972
MD5 8b54bc863179a01f2058111cb313b9d5
BLAKE2b-256 46df20ae313c52266689228934a6aface3df50e4aee47209740028130eee8011

See more details on using hashes here.

Provenance

The following attestation bundles were made for voi_oiwer-0.1.3.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.3-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: voi_oiwer-0.1.3-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 113.9 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.3-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9a3911279d270fb1bbc82f56c325eac7579b3ac421f9ab478fb7eb371934e1a0
MD5 a6f8a1e0fcd6d91efd9dc069f7419ecf
BLAKE2b-256 bcdda8874a1b171a018f0486f5e55063782dd2cc033c2273367ed1af36845522

See more details on using hashes here.

Provenance

The following attestation bundles were made for voi_oiwer-0.1.3-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.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for voi_oiwer-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1313a232b6c0371f7a8b547bed8fdf7c9bafe0f1501f54bb0abb1bf73e754c9a
MD5 ab354c08a4d618faf273014714b94b8b
BLAKE2b-256 d477c5c3b589a29fa25f06129cc139fb7036d7f26dd2d1c35bb183ca40806122

See more details on using hashes here.

Provenance

The following attestation bundles were made for voi_oiwer-0.1.3-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.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for voi_oiwer-0.1.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9d80e5448d60f0981b396ea88f711057c4ef83fcb504aa49f73de5a880df21b5
MD5 a12e7ff293a10eeda68021eda8b4dde5
BLAKE2b-256 8b0049a841792171b9df01852513f3021cba1f273ed7c7aed283c611a9b3baa4

See more details on using hashes here.

Provenance

The following attestation bundles were made for voi_oiwer-0.1.3-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.3-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for voi_oiwer-0.1.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d652cc2415f05fa59d73719e77a2d37a536cf1da5cb2e65bbf621870f4a44ce8
MD5 1fef3f3d042f158a2a0cd91e6df41c63
BLAKE2b-256 7c74a36aff874458d912f807781b5e6e9d328139ca7e906d3cf639abcb583924

See more details on using hashes here.

Provenance

The following attestation bundles were made for voi_oiwer-0.1.3-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.3-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for voi_oiwer-0.1.3-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3924dc21dda8f9d0c477d721bd30ff97000e3c8af31fe7f4b455eae35bec60e3
MD5 a3d3f8b9f31c4e1a4f0ba7d8e7b82e70
BLAKE2b-256 b4e9853eac7ac013c3f80492d93bb574a53ea44bbced658e3ecea4d511ac280f

See more details on using hashes here.

Provenance

The following attestation bundles were made for voi_oiwer-0.1.3-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