Difference between revisions of "Third-party"

From HemeraBook
Jump to: navigation, search
(General)
(Tools available with package manager)
Line 30: Line 30:
 
* Build tool (Java-based): [http://ant.apache.org Apache Ant]<br />
 
* Build tool (Java-based): [http://ant.apache.org Apache Ant]<br />
 
* FileSystem events monitor: [http://inotify-tools.sourceforge.net/ inotify-tools]
 
* FileSystem events monitor: [http://inotify-tools.sourceforge.net/ inotify-tools]
* Speech sound player: [http://sox.sourceforge.net/ SoX] (Hemera requires '''v14.2.0''' or later)
+
* Speech sound player: [http://sox.sourceforge.net/ SoX] (Hemera requires '''v14.2.0''' or later, if your operating system doesn't provide it, [[Install_third-party_tools#SoX_v14.2.2B |install it from source]])
 
* (optional) Fast incremental file transfer tool: [http://rsync.samba.org/ rsync]
 
* (optional) Fast incremental file transfer tool: [http://rsync.samba.org/ rsync]
 
<br />
 
<br />

Revision as of 10:30, 29 May 2011

Foreword

If ever you have problem while installing Hemera or third-party tools, check the Troubleshooting page.
If you don't find solution, post a request on the Help Forum.


Quick install

To perform a very quick start (not recommended), you may install all packages with default behaviour from your operating system repositories.
Under RedHat-like GNU/Linux distribution:

yum install subversion ant inotify-tools sox espeak cmusphinx3

Under Debian-like GNU/Linux distribution (cmusphinx3 is not available):

sudo apt-get install subversion ant inotify-tools sox espeak mbrola mbrola-fr4


It's strongly recommended you consider following instructions for optimal efficiencies.


Binary and Library paths

At any time, according to your needs, you can define binary and library paths in your configuration file:

hemera.path.*

In addition, you can configure some configuration elements to update third-party tools environment, used by Hemera:

environment.*


General

Tools available with package manager

You must install:


Under RedHat-like GNU/Linux distribution:

yum install ant inotify-tools sox rsync

Under Debian-like GNU/Linux distribution:

sudo apt-get install ant inotify-tools sox rsync


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

hemera.core.iomanager.inputMonitor.*
hemera.core.iomanager.ioProcessorMonitor.*
hemera.core.speech.soundPlayer.*
hemera.core.speechRecognition.soundRecorder.*


To complete Apache Ant installation, you must:



Other tools

Java

You need a Java 6 version or later.
You can use OpenJDK version, or Oracle/Sun one.
If you are an Hemera user, you only need a Java Runtime Environment (JRE); if you are an Hemera developer/contributor, you need a Java Development Kit (JDK).

After the installation of the version of your choice, you must:

  • ensure JAVA_HOME environment variable is set on your system
  • OR define the configuration element environment.java.home


OpenJDK version

OpenJDK is now available in lots of distribution package manager.

For Hemera user:
Under RedHat-like GNU/Linux distribution:

yum install java-1.6.0-openjdk

Under Debian-like GNU/Linux distribution (cmusphinx3 is not available):

sudo apt-get install openjdk-6-jre


For Hemera developer/contributor:
Under RedHat-like GNU/Linux distribution:

yum install java-1.6.0-openjdk-devel

Under Debian-like GNU/Linux distribution (cmusphinx3 is not available):

sudo apt-get install openjdk-6-jdk

Oracle/Sun version

Download the version matching your Operating System and architecture, from the Oracle/Sun.


GNU which

On Debian-like distribution, GNU which is not available by default.
You must install it from source, following these instructions:

./configure
make -s
sudo make install

GNU version of which will now be available in PATH.


SoX v14.2+

If your operating system doesn't provide SoX v14.2.0 or later, you must install it from source, following these instructions:

  • prepare your machine to compile source
  • download v14.3.2 or later
  • uncompress it 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)
  • rename the directory from sox-14.3.2 (or anything else) to sox, such a way you can use directly the binary and library paths configuration provided by the sample
  • compile:
./configure
make -s
  • check/update your 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/sox/src
    • add following paths, separated by colon, to hemera.path.lib (or get everything from configuration file sample):
      • _fromSource/sox/src/.libs
hemera.core.speech.soundPlayer.*
hemera.core.speechRecognition.soundRecorder.*

Web services module

Since Hemera v0.2.

Tomcat availability

Hemera Web services module uses several third-party tools, including Apache Struts 2 and Apache Tomcat.
All third-party tools used by the web services module are embedded, but the Tomcat.
The module requires Servlet API 2.4 or higher and JSP 2.0 or higher; so you must have an installation of Apache Tomcat 5.5 or later.

N.B.: it can be a Tomcat installation on a remote computer BUT some information like processing systems given by the Web services module will only regard local activities.

Existing installation

If you already have such installation, you can go to configuration part.

From binary distribution

If you want to install a dedicated Tomcat for Hemera, it is recommended to:

  • download the binary distribution of Apache Tomcat 7 or later
  • uncompress the archive under HEMERA_TP_PATH/webServices/bin/
  • create a symbolic link named tomcat to the just created directory (e.g. apache-tomcat-7.0.12)


With package manager

If you prefer, you can install Tomcat with package manager (for instance to use others web applications on it).

For instance, under RedHat-like GNU/Linux distribution:

yum install tomcat6 tomcat6-admin-webapps

Under Debian-like GNU/Linux distribution:

sudo apt-get install tomcat6 tomcat6-admin


Configuration

Tomcat user

In any case, you must define a tomcat user with the manager role, in the $TOMCAT_HOME/conf/tomcat-users.xml file.
For instance, you can add this line:

<user username="hemera" password="hemera" roles="manager"/>


Hemera configuration

After the installation of the version of your choice, check/update the following configuration elements

hemera.web.tomcat.*


Automatic start/stop

In case of local installation of a binary version, Hemera start/stop system can manage Tomcat start/stop.
If activated it will look for HEMERA_TP_PATH/webServices/bin/tomcat/bin/startup.sh (and shutdown.sh); if not found a warning (NOT fatal) will be printed.
For that, check/update the following configuration element

hemera.run.activation.tomcat


Speech core module

espeak mode

Since Hemera v0.1.

You must install:


For instance, under RedHat-like GNU/Linux distribution:

yum install espeak

Under Debian-like GNU/Linux distribution:

sudo apt-get install espeak


Check/update the following configuration elements

hemera.core.speech.tool.*


espeak+mbrola mode

Since Hemera v0.1.

To improve quality, it is interesting to use eSpeak as Phoneme mnemonics writer and MBROLA Project as speech synthesizer.

mbrola binary

Under RedHat-like GNU/Linux distribution, mbrola is not available with package manager.
To get it, follow these instructions:


Under Debian-like GNU/Linux distribution, mbrola binary and data files are available with package manager:

sudo apt-get install mbrola


After mbrola setup, check/update the following configuration element

hemera.core.speech.mbrola.path


Models

You can use any model compatible with mbrola.

This is specific instructions for tested models: English, French

Speech Recognition core module

requirements

  • Speech sound recorder/converter: SoX

Under RedHat-like GNU/Linux distribution:

yum install sox

Under Debian-like GNU/Linux distribution:

sudo apt-get install sox


Check/update the following configuration elements

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

sphinx3 mode

Since Hemera v0.1.

cmusphinx3 installation

From package

For instance, under RedHat-like GNU/Linux distribution:

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
  • sphinx3 compilation instructions:
 cd ../sphinx3
 ./autogen.sh
 make
  • SphinxTrain compilation instructions:
 cd ../SphinxTrain
 ./configure
 make
  • check/update your 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

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