My favorites | Sign in
Logo
                
Search
for
Updated Oct 18, 2009 by achaloyan
Labels: Id-42, Phase-Deploy
PocketSphinxPlugin  
How to integrate PocketSphinx ASR into UniMRCP server.


1. Overview

This guide describes how to use PocketSphinx ASR with UniMRCP server. It assumes you are already familiar with installation and configuration tips of UniMRCP server.


2. Requirements


Note: The libraries and model are borrowed from FreeSWITCH (http://svn.freeswitch.org/downloads/libs/). FreeSWITCH's users can reuse what they have already installed with FreeSWITCH.


3. Build

GNU Build (Linux and other Unix variants)

  1. Download SphinxBase and PocketSphinx libraries, unpack and build them. It's not required to install these libraries.
  2. ./configure
    make
  1. Configure UniMRCP as follows
  2. ./configure --enable-pocketsphinx-plugin --with-pocketsphinx=path-to-pocketsphinx --with-sphinxbase=path-to-sphinxbase
    make
    make install
  3. Download PocketSphinx model (communicator), unpack it to InstallDir/data next to wsj1 model and default.dic, which should be already there.


VS2005 Build (Windows XP, Vista, ...)

  1. Download SphinxBase and PocketSphinx libraries, unpack them into unimrcp\libs directory as follows
  2. Open sphinxbase.sln file and build the solution.
  3. Open pocketsphinx.sln file and build the solution.
  4. Open unimrcp.sln file, include mrcppocketsphinx project into build (Build -> Configuration Manager).
  5. Build the solution.
  6. Build utility projects to copy all the required data to output directory (prepare and/or preparesphinx in Solution Explorer -> tools).
  7. Download PocketSphinx model (communicator), unpack it to OutputDir\data next to wsj1 model and default.dic, which should be already there.


4. Configuration

Specify mrcppocketsphinx as a plugin in unimrcpserver.xml as follows:

    <plugin>
      <engine name="PocketSphinx-1" class="mrcppocketsphinx" enable="1"/>
    </plugin>

There can be multiple plugins of the same resource and it's possible to configure profile based plugins. However for the beginning you may want to enable only PocketSphinx ASR plugin and disable other ASR plugins.
PocketSphinx recognition related properties can be configured via pocketsphinx.xml

<!-- PocketSphinx Document -->
<pocketsphinx>
  <!-- Senstitivity level and timeout are used for voice activity (speech) detection 
       reasonable values: level is in [2..250] range, timeout is in [100..500] msec range
  -->
  <sensitivity level="50" timeout="300"/>

  <!-- Default values for noinput and recognition timeout,
       these values can be overriden by client's requests
  -->
  <timers noinput-timeout="10000" recognition-timeout="15000"/>


  <!-- PocketSphinx related model and dictionary data.
       Default dir (dir="") is InstallDir/data
  -->
  <model dir="" narrowband="communicator" wideband="wsj1" dictionary="default.dic" preferred="narrowband"/>
  <!-- <model dir="/usr/local/freeswitch/grammar" narrowband="model/communicator" wideband="model/wsj1" dictionary="default.dic"/> -->

  <!-- Enable to save utterance.
       Default dir (dir="") is InstallDir/data
  -->
  <save-waveform dir="" enable="0"/>
</pocketsphinx>

Sign in to add a comment
Hosted by Google Code