0.1.1 • Published 5 years ago

@mcvlad/speech-metrics v0.1.1

Weekly downloads
-
License
-
Repository
github
Last release
5 years ago

@mcvlad/speech-metrics

npm (scoped) npm bundle size (minified)

Calculates metrics for Speech-To-Text systems. Available metrics: WER, WCR, SER.

Install

$ npm install @mcvlad/speech-metrics

Usage

const calculateMetrics = require("@mcvlad/speech-metrics");

// Each pair consists of: "reference" (input string) and "hypothesis" (output string)
const inputData = [
	[`Indigenous Australians have eaten kangaroos for millenia.`, `Indigenous australian sevington kangaroos for millennia`],
	[`Welcome to Australia.`,`Welcome to australia`]
];

const metrics = calculateMetrics(inputData);
console.log(metrics);

//=>
{ 
	results: [{
	  hypothesis: "indigenous australian sevington kangaroos for millennia",
	  reference: "indigenous australians have eaten kangaroos for millenia",
	  WCR: 0,
	  WER: 0.5714285714285714
	}, {
	  hypothesis: "welcome to australia",
	  reference: "welcome to australia",
	  WCR: 1,
	  WER: 0
	}],
	SER: 0.5555555555555556,
	WER: 0.22857142857142854,
	WCR: 0.3333333333333335
}
0.1.1

5 years ago

0.1.0

5 years ago

1.0.0

5 years ago