alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
7.39k stars 1.04k forks source link

Implement OOV transcription #221

Open nshmyrev opened 3 years ago

nshmyrev commented 3 years ago

This is a bigger project, this approach to handle OOV has some potential:

https://github.com/alumae/kaldi-offline-transcriber/blob/master/local/get_ctm_unk.sh

https://deepai.org/publication/advanced-rich-transcription-system-for-estonian-speech

it will require G2P model and some hacks though.

shashankmc commented 2 years ago

Hi,

I'm trying to include OOVs to the recognizer vocabulary in real time as seen here - https://github.com/alphacep/vosk-api/blob/master/python/example/test_words.py and add more OOVs like so -

rec = KaldiRecognizer(model, wf.getframerate(), '["paleoanthropology", "[unk]"]')

I'm primarily adding technical words into the recognizer but WER isn't changing. I'm a noob at this and trying to get better results compared to the pre-trained model.

  1. First off, is this the right approach of doing it without training the language model?
  2. If this is incorrect, what should I be doing to add OOVs to the vocabulary without having to retrain the model?

Any help would be really appreciated, thank you!

nshmyrev commented 2 years ago

@shashankmc your question is not related to this issue

shashankmc commented 2 years ago

Sorry, will raise another issue!