Skip to content

Commit

Permalink
chore(transcription): enable CER evaluation
Browse files Browse the repository at this point in the history
Thanks to this recent fix in Jiwer <3
https://github.com/jitsi/jiwer/issues/873
  • Loading branch information
lutangar committed May 7, 2024
1 parent fcaaeca commit 3453b94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 6 additions & 2 deletions packages/transcription/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ Provide a common API to many transcription backend, currently :
And at least one of the following transcription backend:
- Python :
- `openai-whisper`
- `whisper-ctranslate2`
- `whisper-timestamped`
- `whisper-ctranslate2>=0.4.3`
- `whisper-timestamped>=1.15.4`

And to run the transcript evaluation tests :
- Python
- `jiwer>=3.04`

## Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,9 @@ export class TranscriptFileEvaluator {
* CER: Character Error Rate
*/
async cer () {
// @see https://github.com/jitsi/jiwer/issues/87
let result = {
stdout: undefined
}
try {
result = await $`jiwer ${this.buildArgs('--cer')}`
} catch {}
const { stdout: cer } = await $`jiwer ${this.buildArgs('--cer', '-g')}`

return result.stdout ? Number(result.stdout) : undefined
return cer
}

async alignement () {
Expand Down

0 comments on commit 3453b94

Please sign in to comment.