Sphinxad hight-level wrapper, that allows to record voice from microphone and later recognize the speech by pocketsphinx
Cargo.toml
sphinxad = "*"
You need two libraries to recognize speech:
- first should record voice from microphone(this sphinxad-rs)
- and second should process sound and recognize the speech(pocketsphinx-rs)
They are based on low-level libraries: sphinxad-sys and pocketsphinx-sys. To discover how to use this libraries, look on examples.
You need HMM(Hidden Markov Model), dictionary and grammatics(or language model), to teach the pocketsphinx to understand phrases or run examples.
This should be helpful: list of acoustic models for few languages
- English. Download HMM and this dictionary, paste them into english directory as cmusphinx-en-us-ptm-5.2 and vocabulary.dict.
- Russian. Скачайте HMM отсюда и положите zero_ru.cd_cont_4000 в russian/. Для генерации словаря используйте text2dict проекта ru4sphinx.
In order to use the this crate, you must have the libpocketsphinx
, libsphinxad
, libsphinxbase
libraries installed, you should use you packet manager or follow this tutorial
MIT