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.91k stars 1.1k forks source link

Phrase/Word model creation from standard model #704

Open dpny518 opened 3 years ago

dpny518 commented 3 years ago

What are the steps to convert a regular model into one that can handle phrase_list

https://alphacephei.com/nsh/2020/03/27/lookahead.html

Can we just do this, and what is needed in data/lang?

am=/path/to/am/
export LD_LIBRARY_PATH=${KALDI_ROOT}/tools/openfst/lib/fst
utils/mkgraph_lookahead.sh --self-loop-scale 1.0 --remove-oov --compose-graph \
    data/lang ${am} ${am}/graph_${lm}_lookahead
nshmyrev commented 3 years ago

Can we just do this

Yes

and what is needed in data/lang?

Regular Kaldi lang folder with lexicon fst L.fst, words.txt and phones.txt