STT icon indicating copy to clipboard operation
STT copied to clipboard

Feature request: scorer callback function

Open droundy opened this issue 4 years ago • 0 comments

I think this would be a pretty small and relatively noninvasive patch and would be happy to code it up and submit a pull request if the change would be welcome.

Is your feature request related to a problem? Please describe.

I have a grammar that I would like to support without the trouble if generating a kenlm language model. The grammar might be dynamically updated as speech is processed.

Describe the solution you'd like

I'd like to be able to pass on the C API a scorer function with a void * which returns the score for a given possible phrase.

Describe alternatives you've considered

I considered dynamically generating a kenlm model by linking with kenlm as a library, which seems quite cumbersome. Or calling the kenlm executable. Either way I would need to generate a corpus of possible expressions which is both inefficient and cumbersome.

droundy avatar Apr 14 '22 16:04 droundy