Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
PocketSphinx
The pocketsphinx
crate provides a safe wrapper around the native libpocketsphinx
library.
Dependencies
In order to use the this crate, you must have the libpocketsphinx
library
installed where it can be found by pkg-config
.
On Debian-based Linux distributions, install the libpocketsphinx1
package:
sudo apt-get install libpocketsphinx1
On OS X, install cmu-pocketsphinx
with Homebrew:
brew install --HEAD cmu-sphinxbase
brew install --HEAD cmu-pocketsphinx
For building custom version of CMU PocketSphinx refer to official building documentation.
Usage
Add pocketsphinx
as a dependency in Cargo.toml
:
[]
= "0.5.0"
Import the pocketsphinx
crate, initialize PocketSphinx decoder:
let ps_config = try!;
let ps_decoder = init;
See PocketSphinx documentation to understand meaning of configuration parameters.
Start voice recognition:
try!
loop
Stop voice recognition and get result:
try!;
match ps_decoder.get_hyp
License
Copyright © 2016 Mikhail Trishchenkov
Distributed under the MIT License.
Note: By using this crate, your executable will link to the libpocketsphinx
C library, which is available
under the simplified BSD license.