Open dpny518 opened 4 years ago
I have been meaning to add a simple example of direct usage, but haven't gotten around to it yet. You basically just need to build a graph describing your grammar and then call the decoding. Designing a good API for describing grammars more simply isn't easy.
Do you have an example of the grammar you want to decode with?
nothing specific just pick words from a word list
#JSGF V1.0;
grammar word;
public <wholeutt> = <words>+;
<words> = [sil] [word1] [ sil ] [word2] [ sil ] [word3] [ sil ] [word4] [ sil ] [word5] [ sil ] [word...] [ sil ];
That would be easy to encode in an FST. But in general, it would probably be easier to go through the dragonfly backend, once I get wave file reading implemented.
This is implemented in https://github.com/dictation-toolbox/dragonfly/pull/175 with KaldiEngine.recognize_wave_file()
.
I am leaving this open to remind me to implement something directly in this repo.
Do you have a simple demo, like the one in dragonfly that doesn't require dragonfly? I just want to transcribe an audio file with grammar weights added to the language model
Thanks