Third-party:SpeechRecognition

From HemeraBook
Jump to: navigation, search

Default (and recommended) mode is sphinx3.

requirements

Ensure to have installed SoX v14.2 or later; then check/update the following configuration elements

hemera.core.speechRecognition.soundRecorder.*
hemera.core.speechRecognition.soundConverter.*

sphinx3 mode

Since Hemera v0.1.

cmusphinx3 installation

From package

RedHat-based distributions

yum install cmusphinx3


Check/update the following configuration elements (See binary and library paths):

hemera.core.speechRecognition.tool.*

From source

To begin, you need to prepare your computer for compiling source code.

Trick: you should put source in HEMERA_TP_PATH/_fromSource which has been created to help you keeping track on third-party tools you have installed for Hemera, and for more ease updating configuration file (sample gives ready-to-use paths)


Important:

  • you MUST checkout sphinxbase, sphinx3 and SphinxTrain into the same root directory, such a way, the configuration system will automagically find sphinxbase headers and libraries
  • you must get the recommended revision (embedded to following links)
svn co https://cmusphinx.svn.sourceforge.net/svnroot/cmusphinx/trunk/sphinxbase@10959
svn co https://cmusphinx.svn.sourceforge.net/svnroot/cmusphinx/trunk/sphinx3@10959
svn co https://cmusphinx.svn.sourceforge.net/svnroot/cmusphinx/trunk/SphinxTrain@10835
  • sphinxbase compilation instructions:
cd sphinxbase
./autogen.sh
make -s
  • sphinx3 compilation instructions:
 cd ../sphinx3
 ./autogen.sh
 make -s
  • SphinxTrain compilation instructions:
 cd ../SphinxTrain
 ./configure
 make -s
  • check/update configuration file 1/2 (See binary and library paths):
    • add following paths, separated by colon, to hemera.path.bin (or get everything from configuration file sample):
      • _fromSource/SphinxTrain/bin*
      • _fromSource/sphinx3/src/programs
    • add following paths, separated by colon, to hemera.path.lib (or get everything from configuration file sample):
      • _fromSource/sphinxbase/src/libsphinxbase/.libs
      • _fromSource/sphinxbase/src/libsphinxad/.libs
      • _fromSource/sphinx3/src/programs/.libs
      • _fromSource/sphinx3/src/libs3decoder/.libs
hemera.core.speechRecognition.tool.*
hemera.core.speechRecognition.soundFeatureCreator.*


Models

Any models must be encoded in UTF-8.
For better efficiencies, you should create your own models.

As quick start, you may install existing models; theoretically you can use any model compatible with sphinx3.

This is specific instructions for tested models: English, French