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.3.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: jiwer-3.0.3.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Linux/5.15.0-1041-azure

File hashes

Hashes for jiwer-3.0.3.tar.gz
Algorithm Hash digest
SHA256 a777f361a5a5f76012078d758e444e1da2a171fb685dad9cf8fb69181ea26ee6
MD5 e514e96113aa341fbe7caa2ccc08da9e
BLAKE2b-256 16e7bf582d69e01122c89571f993470519b87f8aaff5e409961293a448b6f051

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for jiwer-3.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 190d8238cb0262346781267d94f74c4fc8fc5094cf215a3d5d8317fb0954b842
MD5 d73f63fe13954c1d0f4ca059246a2d3c
BLAKE2b-256 0d4fee537ab20144811dd99321735ff92ef2b3a3230b77ed7454bed4c44d21fc

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