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:
- word error rate (WER)
- match error rate (MER)
- word information lost (WIL)
- word information preserved (WIP)
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file jiwer-3.0.2.tar.gz
.
File metadata
- Download URL: jiwer-3.0.2.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1039-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52bb2a3dba0589e85e6598c40c413e1f2a6a2f7f7c57ce9f7b2c094039618235 |
|
MD5 | 290eb549e23d121fc7d538ada3bf5bfe |
|
BLAKE2b-256 | 61f3f207a51f270b6dc0fe2ed1f91cf5b7d86e29648df383865a0ed9bc41398b |
File details
Details for the file jiwer-3.0.2-py3-none-any.whl
.
File metadata
- Download URL: jiwer-3.0.2-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1039-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbf5872e0431942847765e444b338cd74ed9a96682532da87e46575010b76fd2 |
|
MD5 | c0ab381b77c69f6c4366fcc7c9733fb8 |
|
BLAKE2b-256 | 23a392c29a5e422acd87e3b4f2e6dc0ce877070cc9b2f81d30fe84122032338a |