vosk-api icon indicating copy to clipboard operation
vosk-api copied to clipboard

How do I get to recognise abbreviations in Vosk ? Does enabling grammar help ?

Open sushanthika23 opened this issue 3 years ago • 8 comments

sushanthika23 avatar Jun 20 '22 05:06 sushanthika23

@sushanthika23 : one way is to create a grammar for single letter recognition. However, I also wonder if there is a better way. E.g., I am non-stop requiring abbreviations like "CPU" and "GPU"; thus, it would be nice if common abbreviations could be recognized directly within the full-language models... :) @nshmyrev, would this be feasible / are there any plans for this?

omlins avatar Jun 20 '22 09:06 omlins

@omlins I think CPU and GPU should be there and should work fine. Some others are problematic.

We plan to work on post-processing streaming framework some time soon, not there yet.

nshmyrev avatar Jun 20 '22 09:06 nshmyrev

We plan to work on post-processing streaming framework some time soon, not there yet.

Sounds exciting!

omlins avatar Jun 20 '22 09:06 omlins

I think CPU and GPU should be there and should work fine.

I just tried with the model vosk-model-en-us-daanzu-20200905 and it does indeed get CPU, but not GPU. "I would like to buy a new GPU today" is understood as: "I would like to buy a new g p you today" "I would like to buy a new cheap you today"

Maybe it would work with vosk-model-en-us-0.22, but there has been this issue that it often adds some "the" in front of word groups. Has this been fixed BTW?

omlins avatar Jun 20 '22 09:06 omlins

Don't ask us complex questions please ;)

nshmyrev avatar Jun 20 '22 16:06 nshmyrev

Sorry, if I my question

but there has been this issue that it often adds some "the" in front of word groups. Has this been fixed BTW?

was not clear ;) Searching through VOSK issues, I found that it still seems to be open: https://github.com/alphacep/vosk-api/issues/837

The "the"-issue is not urgent anyways, as long as some other models work fine :)

omlins avatar Jun 20 '22 18:06 omlins

It is not about clarity, I meant we will need a lot of effort to fix 'the' issue

nshmyrev avatar Jun 20 '22 18:06 nshmyrev

Nevermind anyway. GPU and CPU should work with recent models. If not, you can add them to LM as described in the docs

nshmyrev avatar Jun 20 '22 18:06 nshmyrev