huggingface / huggingface/speechbox

Inverse text normalization of numbers etc.

Open
#24 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
357
Forks
40
PR merge metrics
No merged PRs in 30d

Description

The restorer in speechbox is very good at restoring punctuation and capitalization in sentences without spelled out numbers.

However, for CTC based ASR approaches like Wav2Vec2, numbers are spelled out as the vocabulary usually only contains alphabetical characters. In order to use the restorer on the output of a Wav2Vec2 model, one would therefore need to first do inverse normalization of numericals using e.g. language specific FSTs.

I wonder whether it is possible to use the output of Whisper (which is already alphanumerical) within this method to simultaneously do inverse normalization as well as punctuation and capitalization, thereby creating a universal post-processor for CTC models, which supports all languages included in Whisper.

Here are some examples (in Danish), using the Whisper-medium multilingual model:

An audio clip saying the words:
seksogtres tusind fem hundrede og enoghalvfjerds (66.571)
produces the following output with the restorer:
SEKSOGTRES TUSIND' FEM HUNDREDE OG enoghalvfjerds

otteogtres tusind tre hundrede og toogtyve (68.322)
becomes:
Otteogtres-tusind-trehundredeog-toogtyve

How feasible is it to have ITN as a first step in the method?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.