alphacep / unimrcp-vosk-plugin

Open source cross-platform implementation of MRCP protocol
http://www.unimrcp.org
Apache License 2.0
18 stars 11 forks source link

Freeswitch grammar #12

Open Hafiz-ATHAR opened 1 year ago

Hafiz-ATHAR commented 1 year ago

Hi Everyone, I have a question about grammar implemetation. If i send a grammar from freeswitch in the MRCP DEFINE-GRAMMAR method, does it has any effect on the result ? Does vosk plugin takes the grammar sent from the freeswitch into account ?

Any help is appreciated, thanks.

nshmyrev commented 1 year ago

Hi

Vosk doesn't account for grammars, it needs different way of domain adaptation. In general we recommend to avoid using grammars in voice interface since users can give any input in any point of time.

Hafiz-ATHAR commented 1 year ago

@nshmyrev thank you for replying. In my understanding for tasks like IVR or keyword recognition vosk-small models are a better choice. They support dynamic grammar. So if i use a small model in vosk-unimrcp-plugin, and dynamic grammar is being used with german digits, and user says something between eins(1) or meins(mine) , then there is a more chance that eins will have more confidence than meins.

Can you please shed some light on this matter?

nshmyrev commented 1 year ago

In my understanding for tasks like IVR or keyword recognition vosk-small models are a better choice.

No, you still need to use big model for telephony

They support dynamic grammar.

You can modify lm offline as in https://alphacephei.com/vosk/lm, there is no much need to do it in runtime.

haeferer commented 1 year ago

Hi,

@nshmyrev Thx for your support und your great work. I'am working together with hafiz on tyring to use vosk for KeyWordSpotting in "german".

Can i ask you a few (last) question to fully understand the problems.

Since we try to improve quality on Runtime (like names of people or household elments) we want to reduce the grammar as mutch as possible. this works great using the small model (mikrophone). But if we try to add this functionality to freeswitch it does not work.

It would be very nice if you can give us some hints to go further.