Skip to main content

Evaluate your speech-to-text system with similarity measures such as word error rate (WER)

Project description

JiWER

JiWER is a simple and fast python package to evaluate an automatic speech recognition system. It supports the following measures:

  1. word error rate (WER)
  2. match error rate (MER)
  3. word information lost (WIL)
  4. word information preserved (WIP)
  5. character error rate (CER)

These measures are computed with the use of the minimum-edit distance between one or more reference and hypothesis sentences. The minimum-edit distance is calculated using RapidFuzz, which uses C++ under the hood, and is therefore faster than a pure python implementation.

Documentation

For further info, see the documentation at jitsi.github.io/jiwer.

Installation

You should be able to install this package using poetry:

$ poetry add jiwer

Or, if you prefer old-fashioned pip and you're using Python >= 3.7:

$ pip install jiwer

Usage

The most simple use-case is computing the word error rate between two strings:

from jiwer import wer

reference = "hello world"
hypothesis = "hello duck"

error = wer(reference, hypothesis)

Licence

The jiwer package is released under the Apache License, Version 2.0 licence by 8x8.

For further information, see LICENCE.

Reference

For a comparison between WER, MER and WIL, see:
Morris, Andrew & Maier, Viktoria & Green, Phil. (2004). From WER and RIL to MER and WIL: improved evaluation measures for connected speech recognition.

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

jiwer-3.0.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

jiwer-3.0.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file jiwer-3.0.0.tar.gz.

File metadata

  • Download URL: jiwer-3.0.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.11.2 Linux/5.15.0-1034-azure

File hashes

Hashes for jiwer-3.0.0.tar.gz
Algorithm Hash digest
SHA256 cb6d6bfbb0c630dab49d3828f17873dd1dfbd2f7c0bcf26c1092f4e6eaa68062
MD5 704b13a1c61c46fa1d0cfc406040ac29
BLAKE2b-256 7354ee73efc03fffe2db7accece31ce21762ec46c23840c8855f5efe7d12d28e

See more details on using hashes here.

File details

Details for the file jiwer-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: jiwer-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.11.2 Linux/5.15.0-1034-azure

File hashes

Hashes for jiwer-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6f51a9c90270503545c6fdd38815b41e2ef240a450541994b089c50242b33c2
MD5 a6b959f5f074ef7dc4e80f16d25f5242
BLAKE2b-256 222e055d91e0d4182d15dd9bc7cdd97ed00839208082c23dcdd91465fae1815f

See more details on using hashes here.

Supported by

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