Bug 1449244 Remove SphinxBase r=drno
authorTom Ritter <tom@mozilla.com>
Tue, 27 Mar 2018 12:04:10 -0500
changeset 463928 55370a40de63459ae718974d0f98756fcecd2ab6
parent 463927 baf5f13569695b9efbad29ead950218e0be027a8
child 463929 179e31d8306f46f9cecb459bab71abfc8d4c226d
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdrno
bugs1449244
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1449244 Remove SphinxBase r=drno MozReview-Commit-ID: AIcwcWAa4nV
.clang-format-ignore
dom/media/webspeech/recognition/moz.build
media/sphinxbase/config.h
media/sphinxbase/moz.build
media/sphinxbase/pocketsphinx-COPYING.txt
media/sphinxbase/sbthread.patch
media/sphinxbase/sphinx_config.h
media/sphinxbase/sphinxbase/ad.h
media/sphinxbase/sphinxbase/agc.h
media/sphinxbase/sphinxbase/bio.h
media/sphinxbase/sphinxbase/bitvec.h
media/sphinxbase/sphinxbase/byteorder.h
media/sphinxbase/sphinxbase/case.h
media/sphinxbase/sphinxbase/ckd_alloc.h
media/sphinxbase/sphinxbase/clapack_lite.h
media/sphinxbase/sphinxbase/cmd_ln.h
media/sphinxbase/sphinxbase/cmn.h
media/sphinxbase/sphinxbase/err.h
media/sphinxbase/sphinxbase/f2c.h
media/sphinxbase/sphinxbase/fe.h
media/sphinxbase/sphinxbase/feat.h
media/sphinxbase/sphinxbase/filename.h
media/sphinxbase/sphinxbase/fixpoint.h
media/sphinxbase/sphinxbase/fsg_model.h
media/sphinxbase/sphinxbase/genrand.h
media/sphinxbase/sphinxbase/glist.h
media/sphinxbase/sphinxbase/hash_table.h
media/sphinxbase/sphinxbase/heap.h
media/sphinxbase/sphinxbase/huff_code.h
media/sphinxbase/sphinxbase/jsgf.h
media/sphinxbase/sphinxbase/listelem_alloc.h
media/sphinxbase/sphinxbase/logmath.h
media/sphinxbase/sphinxbase/matrix.h
media/sphinxbase/sphinxbase/mmio.h
media/sphinxbase/sphinxbase/mulaw.h
media/sphinxbase/sphinxbase/ngram_model.h
media/sphinxbase/sphinxbase/pio.h
media/sphinxbase/sphinxbase/prim_type.h
media/sphinxbase/sphinxbase/profile.h
media/sphinxbase/sphinxbase/sbthread.h
media/sphinxbase/sphinxbase/sphinx_config.h
media/sphinxbase/sphinxbase/sphinxbase_export.h
media/sphinxbase/sphinxbase/strfuncs.h
media/sphinxbase/sphinxbase/yin.h
media/sphinxbase/src/libsphinxbase/fe/fe_interface.c
media/sphinxbase/src/libsphinxbase/fe/fe_internal.h
media/sphinxbase/src/libsphinxbase/fe/fe_noise.c
media/sphinxbase/src/libsphinxbase/fe/fe_noise.h
media/sphinxbase/src/libsphinxbase/fe/fe_prespch_buf.c
media/sphinxbase/src/libsphinxbase/fe/fe_prespch_buf.h
media/sphinxbase/src/libsphinxbase/fe/fe_sigproc.c
media/sphinxbase/src/libsphinxbase/fe/fe_type.h
media/sphinxbase/src/libsphinxbase/fe/fe_warp.c
media/sphinxbase/src/libsphinxbase/fe/fe_warp.h
media/sphinxbase/src/libsphinxbase/fe/fe_warp_affine.c
media/sphinxbase/src/libsphinxbase/fe/fe_warp_affine.h
media/sphinxbase/src/libsphinxbase/fe/fe_warp_inverse_linear.c
media/sphinxbase/src/libsphinxbase/fe/fe_warp_inverse_linear.h
media/sphinxbase/src/libsphinxbase/fe/fe_warp_piecewise_linear.c
media/sphinxbase/src/libsphinxbase/fe/fe_warp_piecewise_linear.h
media/sphinxbase/src/libsphinxbase/fe/fixlog.c
media/sphinxbase/src/libsphinxbase/fe/yin.c
media/sphinxbase/src/libsphinxbase/feat/agc.c
media/sphinxbase/src/libsphinxbase/feat/cmn.c
media/sphinxbase/src/libsphinxbase/feat/cmn_prior.c
media/sphinxbase/src/libsphinxbase/feat/feat.c
media/sphinxbase/src/libsphinxbase/feat/lda.c
media/sphinxbase/src/libsphinxbase/lm/fsg_model.c
media/sphinxbase/src/libsphinxbase/lm/jsgf.c
media/sphinxbase/src/libsphinxbase/lm/jsgf_internal.h
media/sphinxbase/src/libsphinxbase/lm/jsgf_parser.c
media/sphinxbase/src/libsphinxbase/lm/jsgf_parser.h
media/sphinxbase/src/libsphinxbase/lm/jsgf_scanner.c
media/sphinxbase/src/libsphinxbase/lm/jsgf_scanner.h
media/sphinxbase/src/libsphinxbase/lm/lm3g_model.c
media/sphinxbase/src/libsphinxbase/lm/lm3g_model.h
media/sphinxbase/src/libsphinxbase/lm/lm3g_templates.c
media/sphinxbase/src/libsphinxbase/lm/ngram_model.c
media/sphinxbase/src/libsphinxbase/lm/ngram_model_arpa.c
media/sphinxbase/src/libsphinxbase/lm/ngram_model_arpa.h
media/sphinxbase/src/libsphinxbase/lm/ngram_model_dmp.c
media/sphinxbase/src/libsphinxbase/lm/ngram_model_dmp.h
media/sphinxbase/src/libsphinxbase/lm/ngram_model_internal.h
media/sphinxbase/src/libsphinxbase/lm/ngram_model_set.c
media/sphinxbase/src/libsphinxbase/lm/ngram_model_set.h
media/sphinxbase/src/libsphinxbase/util/bio.c
media/sphinxbase/src/libsphinxbase/util/bitvec.c
media/sphinxbase/src/libsphinxbase/util/blas_lite.c
media/sphinxbase/src/libsphinxbase/util/case.c
media/sphinxbase/src/libsphinxbase/util/ckd_alloc.c
media/sphinxbase/src/libsphinxbase/util/cmd_ln.c
media/sphinxbase/src/libsphinxbase/util/dtoa.c
media/sphinxbase/src/libsphinxbase/util/err.c
media/sphinxbase/src/libsphinxbase/util/errno.c
media/sphinxbase/src/libsphinxbase/util/f2c_lite.c
media/sphinxbase/src/libsphinxbase/util/filename.c
media/sphinxbase/src/libsphinxbase/util/genrand.c
media/sphinxbase/src/libsphinxbase/util/glist.c
media/sphinxbase/src/libsphinxbase/util/hash_table.c
media/sphinxbase/src/libsphinxbase/util/heap.c
media/sphinxbase/src/libsphinxbase/util/huff_code.c
media/sphinxbase/src/libsphinxbase/util/listelem_alloc.c
media/sphinxbase/src/libsphinxbase/util/logmath.c
media/sphinxbase/src/libsphinxbase/util/matrix.c
media/sphinxbase/src/libsphinxbase/util/mmio.c
media/sphinxbase/src/libsphinxbase/util/pio.c
media/sphinxbase/src/libsphinxbase/util/profile.c
media/sphinxbase/src/libsphinxbase/util/sbthread.c
media/sphinxbase/src/libsphinxbase/util/slamch.c
media/sphinxbase/src/libsphinxbase/util/slapack_lite.c
media/sphinxbase/src/libsphinxbase/util/strfuncs.c
media/sphinxbase/src/libsphinxbase/util/utf8.c
media/sphinxbase/update.sh
tools/rewriting/ThirdPartyPaths.txt
--- a/.clang-format-ignore
+++ b/.clang-format-ignore
@@ -86,17 +86,16 @@ media/libsoundtouch/.*
 media/libspeex_resampler/.*
 media/libtheora/.*
 media/libtremor/.*
 media/libvorbis/.*
 media/libvpx/.*
 media/libyuv/.*
 media/mtransport/third_party/.*
 media/openmax_dl/.*
-media/sphinxbase/.*
 media/webrtc/signaling/src/sdp/sipcc/.*
 media/webrtc/trunk/.*
 mfbt/decimal/.*
 mfbt/double-conversion/double-conversion/.*
 mfbt/lz4.*
 mobile/android/geckoview/src/thirdparty/.*
 mobile/android/thirdparty/.*
 modules/brotli/.*
--- a/dom/media/webspeech/recognition/moz.build
+++ b/dom/media/webspeech/recognition/moz.build
@@ -41,17 +41,16 @@ UNIFIED_SOURCES += [
 
 if CONFIG['MOZ_WEBSPEECH_TEST_BACKEND']:
     UNIFIED_SOURCES += [
         'test/FakeSpeechRecognitionService.cpp',
     ]
 
 LOCAL_INCLUDES += [
     '/dom/base',
-    '/media/sphinxbase',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
     CXXFLAGS += ['-Wno-error=shadow']
deleted file mode 100644
--- a/media/sphinxbase/config.h
+++ /dev/null
@@ -1,160 +0,0 @@
-#if (  defined(_WIN32) || defined(__CYGWIN__) )
-/* include/sphinx_config.h, defaults for Win32 */
-/* sphinx_config.h: Externally visible configuration parameters for
- * SphinxBase.
- */
-
-/* Default radix point for fixed-point */
-/* #undef DEFAULT_RADIX */
-
-/* Enable thread safety */
-#define ENABLE_THREADS 
-
-/* The Thread Local Storage class */
-#define SPHINXBASE_TLS __declspec(thread)
-
-/* Use Q15 fixed-point computation */
-/* #undef FIXED16 */
-
-/* Use fixed-point computation */
-/* #undef FIXED_POINT */
-
-/* Enable matrix algebra with LAPACK */
-#define WITH_LAPACK
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
-
-/* We don't have popen, but we do have _popen */
-/* #define HAVE_POPEN 1 */
-
-/* We do have perror */
-#define HAVE_PERROR 1
-
-/* We have sys/stat.h */
-#define HAVE_SYS_STAT_H 1
-
-/* We do not have unistd.h. */
-#define YY_NO_UNISTD_H 1
-
-/* Extension for executables */
-#define EXEEXT ".exe"
-#else
-/* include/config.h.  Generated from config.h.in by configure.  */
-/* include/config.h.in.  Generated from configure.in by autoheader.  */
-
-/* Default radix point for fixed-point */
-/* #undef DEFAULT_RADIX */
-
-/* Enable thread safety */
-#define ENABLE_THREADS /**/
-
-/* Use Q15 fixed-point computation */
-/* #undef FIXED16 */
-
-/* Use fixed-point computation */
-/* #undef FIXED_POINT */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define if you have the iconv() function. */
-/* #define HAVE_ICONV 1 */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the `asound' library (-lasound). */
-/* #define HAVE_LIBASOUND 1 */
-
-/* Define to 1 if you have the `blas' library (-lblas). */
-/* #define HAVE_LIBBLAS 1 */
-
-/* Define to 1 if you have the `lapack' library (-llapack). */
-/* #define HAVE_LIBLAPACK 1 */
-
-/* Define to 1 if you have the `m' library (-lm). */
-#define HAVE_LIBM 1
-
-/* Define to 1 if you have the `pthread' library (-lpthread). */
-#define HAVE_LIBPTHREAD 1
-
-/* Define to 1 if the system has the type `long long'. */
-#define HAVE_LONG_LONG 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `perror' function. */
-#define HAVE_PERROR 1
-
-/* Define to 1 if you have the `popen' function. */
-#define HAVE_POPEN 1
-
-/* Define to 1 if you have the <pthread.h> header file. */
-#define HAVE_PTHREAD_H 1
-
-/* Define to 1 if you have the <sndfile.h> header file. */
-#define HAVE_SNDFILE_H 1
-
-/* Define to 1 if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define as const if the declaration of iconv() needs const. */
-#define ICONV_CONST 
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#define LT_OBJDIR ".libs/"
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 8
-
-/* The size of `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
-/* Enable debugging output */
-/* #undef SPHINX_DEBUG */
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Enable matrix algebra with LAPACK */
-/* #define WITH_LAPACK */
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-/* #  undef WORDS_BIGENDIAN */
-# endif
-#endif
-#endif
deleted file mode 100644
--- a/media/sphinxbase/moz.build
+++ /dev/null
@@ -1,85 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-with Files("**"):
-    BUG_COMPONENT = ("Core", "Web Speech")
-
-EXPORTS.sphinxbase += [
-    'sphinxbase/cmd_ln.h',
-    'sphinxbase/fe.h',
-    'sphinxbase/feat.h',
-    'sphinxbase/logmath.h',
-]
-
-SOURCES += [
-    'src/libsphinxbase/fe/fe_interface.c',
-    'src/libsphinxbase/fe/fe_noise.c',
-    'src/libsphinxbase/fe/fe_prespch_buf.c',
-    'src/libsphinxbase/fe/fe_sigproc.c',
-    'src/libsphinxbase/fe/fe_warp.c',
-    'src/libsphinxbase/fe/fe_warp_affine.c',
-    'src/libsphinxbase/fe/fe_warp_inverse_linear.c',
-    'src/libsphinxbase/fe/fe_warp_piecewise_linear.c',
-    'src/libsphinxbase/fe/fixlog.c',
-    'src/libsphinxbase/fe/yin.c',
-    'src/libsphinxbase/feat/agc.c',
-    'src/libsphinxbase/feat/cmn.c',
-    'src/libsphinxbase/feat/cmn_prior.c',
-    'src/libsphinxbase/feat/feat.c',
-    'src/libsphinxbase/feat/lda.c',
-    'src/libsphinxbase/lm/fsg_model.c',
-    'src/libsphinxbase/lm/jsgf.c',
-    'src/libsphinxbase/lm/jsgf_parser.c',
-    'src/libsphinxbase/lm/jsgf_scanner.c',
-    'src/libsphinxbase/lm/lm3g_model.c',
-    'src/libsphinxbase/lm/ngram_model.c',
-    'src/libsphinxbase/lm/ngram_model_arpa.c',
-    'src/libsphinxbase/lm/ngram_model_dmp.c',
-    'src/libsphinxbase/lm/ngram_model_set.c',
-    'src/libsphinxbase/util/bio.c',
-    'src/libsphinxbase/util/bitvec.c',
-    'src/libsphinxbase/util/blas_lite.c',
-    'src/libsphinxbase/util/case.c',
-    'src/libsphinxbase/util/ckd_alloc.c',
-    'src/libsphinxbase/util/cmd_ln.c',
-    'src/libsphinxbase/util/dtoa.c',
-    'src/libsphinxbase/util/err.c',
-    'src/libsphinxbase/util/errno.c',
-    'src/libsphinxbase/util/f2c_lite.c',
-    'src/libsphinxbase/util/filename.c',
-    'src/libsphinxbase/util/genrand.c',
-    'src/libsphinxbase/util/glist.c',
-    'src/libsphinxbase/util/hash_table.c',
-    'src/libsphinxbase/util/heap.c',
-    'src/libsphinxbase/util/huff_code.c',
-    'src/libsphinxbase/util/listelem_alloc.c',
-    'src/libsphinxbase/util/logmath.c',
-    'src/libsphinxbase/util/matrix.c',
-    'src/libsphinxbase/util/mmio.c',
-    'src/libsphinxbase/util/pio.c',
-    'src/libsphinxbase/util/profile.c',
-    'src/libsphinxbase/util/sbthread.c',
-    'src/libsphinxbase/util/slamch.c',
-    'src/libsphinxbase/util/slapack_lite.c',
-    'src/libsphinxbase/util/strfuncs.c',
-    'src/libsphinxbase/util/utf8.c',
-]
-
-# Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
-    CFLAGS += [
-        '-Wno-parentheses',
-        '-Wno-sign-compare',
-    ]
-
-# Add define required of third party code.
-if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
-    DEFINES['HAVE_CONFIG_H'] = True
-
-# We allow warnings for third-party code that can be updated from upstream.
-AllowCompilerWarnings()
-
-FINAL_LIBRARY = 'gkmedias'
deleted file mode 100644
--- a/media/sphinxbase/pocketsphinx-COPYING.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-/* ====================================================================
- * Copyright (c) 1999-2015 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
- 
deleted file mode 100644
--- a/media/sphinxbase/sbthread.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git b/src/libsphinxbase/util/sbthread.c a/src/libsphinxbase/util/sbthread.c
-index 14207cb..2f82c76 100644
---- b/src/libsphinxbase/util/sbthread.c
-+++ a/src/libsphinxbase/util/sbthread.c
-@@ -51,7 +51,9 @@
-  * Platform-specific parts: threads, mutexes, and signals.
-  */
- #if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(__SYMBIAN32__)
-+#ifndef _WIN32_WINNT
- #define _WIN32_WINNT 0x0400
-+#endif /* not _WIN32_WINNT */
- #include <windows.h>
- 
- struct sbthread_s {
deleted file mode 100644
--- a/media/sphinxbase/sphinx_config.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#if (  defined(_WIN32) || defined(__CYGWIN__) )
-/* include/sphinx_config.h, defaults for Win32 */
-/* sphinx_config.h: Externally visible configuration parameters for
- * SphinxBase.
- */
-
-/* Default radix point for fixed-point */
-/* #undef DEFAULT_RADIX */
-
-/* Use Q15 fixed-point computation */
-/* #undef FIXED16 */
-
-/* Use fixed-point computation */
-/* #undef FIXED_POINT */
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
-#else
-/* include/sphinx_config.h.  Generated from sphinx_config.h.in by configure.  */
-/* sphinx_config.h: Externally visible configuration parameters */
-
-/* Default radix point for fixed-point */
-/* #undef DEFAULT_RADIX */
-
-/* Use Q15 fixed-point computation */
-/* #undef FIXED16 */
-
-/* Use fixed-point computation */
-/* #undef FIXED_POINT */
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 8
-
-/* Define to 1 if the system has the type `long long'. */
-/*#define HAVE_LONG_LONG 1*/
-
-/* The size of `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
-/* Enable debugging output */
-/* #undef SPHINX_DEBUG */
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/ad.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2014 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/** \file ad.h
- * \brief generic live audio interface for recording and playback
- */
-
-#ifndef _AD_H_
-#define _AD_H_
-
-#include <sphinx_config.h>
-
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-#define DEFAULT_SAMPLES_PER_SEC	16000
-
-/* Return codes */
-#define AD_OK		0
-#define AD_EOF		-1
-#define AD_ERR_GEN	-1
-#define AD_ERR_NOT_OPEN	-2
-#define AD_ERR_WAVE	-3
-
-typedef struct ad_rec_s ad_rec_t;
-
-/**
- * Open a specific audio device for recording.
- *
- * The device is opened in non-blocking mode and placed in idle state.
- *
- * @return pointer to read-only ad_rec_t structure if successful, NULL
- * otherwise.  The return value to be used as the first argument to
- * other recording functions.
- */
-SPHINXBASE_EXPORT
-ad_rec_t *ad_open_dev (
-	const char *dev, /**< Device name (platform-specific) */
-	int32 samples_per_sec /**< Samples per second */
-	);
-
-/**
- * Open the default audio device with a given sampling rate.
- */
-SPHINXBASE_EXPORT
-ad_rec_t *ad_open_sps (
-		       int32 samples_per_sec /**< Samples per second */
-		       );
-
-
-/**
- * Open the default audio device.
- */
-SPHINXBASE_EXPORT
-ad_rec_t *ad_open ( void );
-
-
-/* Start audio recording.  Return value: 0 if successful, <0 otherwise */
-SPHINXBASE_EXPORT
-int32 ad_start_rec (ad_rec_t *);
-
-
-/* Stop audio recording.  Return value: 0 if successful, <0 otherwise */
-SPHINXBASE_EXPORT
-int32 ad_stop_rec (ad_rec_t *);
-
-
-/* Close the recording device.  Return value: 0 if successful, <0 otherwise */
-SPHINXBASE_EXPORT
-int32 ad_close (ad_rec_t *);
-
-/*
- * Read next block of audio samples while recording; read upto max samples into buf.
- * Return value: # samples actually read (could be 0 since non-blocking); -1 if not
- * recording and no more samples remaining to be read from most recent recording.
- */
-SPHINXBASE_EXPORT
-int32 ad_read (ad_rec_t *, int16 *buf, int32 max);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/agc.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * agc.h -- Various forms of automatic gain control (AGC)
- * 
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * $Log$
- * Revision 1.1  2006/04/05  20:27:30  dhdfu
- * A Great Reorganzation of header files and executables
- * 
- * Revision 1.8  2005/06/21 19:25:41  arthchan2003
- * 1, Fixed doxygen documentation. 2, Added $ keyword.
- *
- * Revision 1.4  2005/06/13 04:02:56  archan
- * Fixed most doxygen-style documentation under libs3decoder.
- *
- * Revision 1.3  2005/03/30 01:22:46  archan
- * Fixed mistakes in last updates. Add
- *
- * 
- * 28-Apr-1999	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Copied from previous version.
- */
-
-
-#ifndef _S3_AGC_H_
-#define _S3_AGC_H_
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-
-#include <sphinxbase/prim_type.h>
-#include <sphinxbase/fe.h>
-
-/** \file agc.h
- *  \brief routine that implements automatic gain control
- *  
- *  \warning This function may not be fully compatible with
- *  SphinxTrain's family of AGC. 
- *
- *  This implements AGC. 
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/**
- * Types of acoustic gain control to apply to the features.
- */
-typedef enum agc_type_e {
-    AGC_NONE = 0,
-    AGC_MAX,
-    AGC_EMAX,
-    AGC_NOISE
-} agc_type_t;
-
-/** Convert string representation (from command-line) to agc_type_t */
-SPHINXBASE_EXPORT
-agc_type_t agc_type_from_str(const char *str);
-
-/** String representations of agc_type_t values. */
-SPHINXBASE_EXPORT
-extern const char *agc_type_str[];
-
-/**
- * Structure holding data for doing AGC.
- **/
-typedef struct agc_s {
-    mfcc_t max;      /**< Estimated max for current utterance (for AGC_EMAX) */
-    mfcc_t obs_max;  /**< Observed max in current utterance */
-    int32 obs_frame; /**< Whether any data was observed after prev update */
-    int32 obs_utt;   /**< Whether any utterances have been observed */
-    mfcc_t obs_max_sum;
-    mfcc_t noise_thresh; /**< Noise threshold (for AGC_NOISE only) */
-} agc_t;
-
-/**
- * Initialize AGC structure with default values.
- */
-SPHINXBASE_EXPORT
-agc_t *agc_init(void);
-
-/**
- * Free AGC structure.
- */
-SPHINXBASE_EXPORT
-void agc_free(agc_t *agc);
-
-/**
- * Apply AGC to the given mfc vectors (normalize all C0 mfc coefficients in the given
- * input such that the max C0 value is 0, by subtracting the input max C0 from all).
- * This function operates on an entire utterance at a time.  Hence, the entire utterance
- * must be available beforehand (batchmode).
- */
-SPHINXBASE_EXPORT
-void agc_max(agc_t *agc,	/**< In: AGC structure (not used) */
-             mfcc_t **mfc,	/**< In/Out: mfc[f] = cepstrum vector in frame f */
-             int32 n_frame	/**< In: number of frames of cepstrum vectors supplied */
-    );
-
-/**
- * Apply AGC to the given block of MFC vectors. 
- * Unlike agc_max() this does not require the entire utterance to be
- * available.  Call agc_emax_update() at the end of each utterance to
- * update the AGC parameters. */
-SPHINXBASE_EXPORT
-void agc_emax(agc_t *agc,	/**< In: AGC structure */
-              mfcc_t **mfc,	/**< In/Out: mfc[f] = cepstrum vector in frame f */
-              int32 n_frame	/**< In: number of frames of cepstrum vectors supplied */
-    );
-
-/**
- * Update AGC parameters for next utterance.
- **/
-SPHINXBASE_EXPORT
-void agc_emax_update(agc_t *agc /**< In: AGC structure */
-    );
-
-/**
- * Get the current AGC maximum estimate.
- **/
-SPHINXBASE_EXPORT
-float32 agc_emax_get(agc_t *agc);
-
-/**
- * Set the current AGC maximum estimate.
- **/
-SPHINXBASE_EXPORT
-void agc_emax_set(agc_t *agc, float32 m);
-
-/**
- * Apply AGC using noise threshold to the given block of MFC vectors. 
- **/
-SPHINXBASE_EXPORT
-void agc_noise(agc_t *agc,	/**< In: AGC structure */
-               mfcc_t **mfc,	/**< In/Out: mfc[f] = cepstrum vector in frame f */
-               int32 n_frame	/**< In: number of frames of cepstrum vectors supplied */
-    );
-
-/**
- * Get the current AGC noise threshold.
- **/
-SPHINXBASE_EXPORT
-float32 agc_get_threshold(agc_t *agc);
-
-/**
- * Set the current AGC noise threshold.
- **/
-SPHINXBASE_EXPORT
-void agc_set_threshold(agc_t *agc, float32 threshold);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/bio.h
+++ /dev/null
@@ -1,304 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * bio.h -- Sphinx-3 binary file I/O functions.
- * 
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1996 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * $Log: bio.h,v $
- * Revision 1.8  2005/06/21 20:40:46  arthchan2003
- * 1, Fixed doxygen documentation, 2, Add the $ keyword.
- *
- * Revision 1.5  2005/06/13 04:02:57  archan
- * Fixed most doxygen-style documentation under libs3decoder.
- *
- * Revision 1.4  2005/05/10 21:21:52  archan
- * Three functionalities added but not tested. Code on 1) addition/deletion of LM in mode 4. 2) reading text-based LM 3) Converting txt-based LM to dmp-based LM.
- *
- * Revision 1.3  2005/03/30 01:22:46  archan
- * Fixed mistakes in last updates. Add
- *
- * 
- * 28-Apr-1999	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Created.
- */
-
-
-#ifndef _S3_BIO_H_
-#define _S3_BIO_H_
-
-#include <stdio.h>
-#include <stdarg.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-#include <sphinxbase/byteorder.h>
-
-/** \file bio.h
- * \brief Cross platform binary IO to process files in sphinx3 format. 
- * 
- *
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-#define BYTE_ORDER_MAGIC	(0x11223344)
-
-/** "reversed senses" SWAP, ARCHAN: This is still incorporated in
-    Sphinx 3 because lm3g2dmp used it.  Don't think that I am very
-    happy with it. */
-
-#if (__BIG_ENDIAN__)
-#define REVERSE_SENSE_SWAP_INT16(x)  x = ( (((x)<<8)&0x0000ff00) | (((x)>>8)&0x00ff) )
-#define REVERSE_SENSE_SWAP_INT32(x)  x = ( (((x)<<24)&0xff000000) | (((x)<<8)&0x00ff0000) | \
-                         (((x)>>8)&0x0000ff00) | (((x)>>24)&0x000000ff) )
-#else
-#define REVERSE_SENSE_SWAP_INT16(x)
-#define REVERSE_SENSE_SWAP_INT32(x)
-
-#endif
-
-
-
-/**
- * Read binary file format header: has the following format
- * <pre>
- *     s3
- *     <argument-name> <argument-value>
- *     <argument-name> <argument-value>
- *     ...
- *     endhdr
- *     4-byte byte-order word used to find file byte ordering relative to host machine.
- * </pre>
- * Lines beginning with # are ignored.
- * Memory for name and val allocated by this function; use bio_hdrarg_free to free them.
- * @return 0 if successful, -1 otherwise.
- */
-SPHINXBASE_EXPORT
-int32 bio_readhdr (FILE *fp,		/**< In: File to read */
-		   char ***name,	/**< Out: array of argument name strings read */
-		   char ***val,		/**< Out: corresponding value strings read */
-		   int32 *swap	/**< Out: file needs byteswapping iff (*swap) */
-		   );
-/**
- * Write a simple binary file header, containing only the version string.  Also write
- * the byte order magic word.
- * @return 0 if successful, -1 otherwise.
- */
-SPHINXBASE_EXPORT
-int32 bio_writehdr_version (FILE *fp,  /**< Output: File to write */
-			    char *version /**< Input: A string of version */
-	);
-
-
-/**
- * Write a simple binary file header with only byte order magic word.
- * @return 0 if successful, -1 otherwise.
- */
-SPHINXBASE_EXPORT
-int32 bio_writehdr(FILE *fp, ...);
-
-/**
- * Free name and value strings previously allocated and returned by bio_readhdr.
- */
-SPHINXBASE_EXPORT
-void bio_hdrarg_free (char **name,	/**< In: Array previously returned by bio_readhdr */
-		      char **val	/**< In: Array previously returned by bio_readhdr */
-		      );
-
-/**
- * Like fread but perform byteswapping and accumulate checksum (the 2 extra arguments).
- *
- * @return unlike fread, returns -1 if required number of elements (n_el) not read; also,
- * no byteswapping or checksum accumulation is performed in that case.
- */
-SPHINXBASE_EXPORT
-int32 bio_fread (void *buf,		/**< In: buffer to write */
-		 int32 el_sz,		/**< In: element size */
-		 int32 n_el,		/**< In: number of elements */
-		 FILE *fp,              /**< In: An input file pointer */
-		 int32 swap,		/**< In: Byteswap iff (swap != 0) */
-		 uint32 *chksum	/**< In/Out: Accumulated checksum */
-		 );
-
-/**
- * Like fwrite but perform byteswapping and accumulate checksum (the 2 extra arguments).
- *
- * @return the number of elemens written (like fwrite).
- */
-SPHINXBASE_EXPORT
-int32 bio_fwrite(const void *buf,	/**< In: buffer to write */
-		 int32 el_sz,		/**< In: element size */
-		 int32 n_el,		/**< In: number of elements */
-		 FILE *fp,              /**< In: An input file pointer */
-		 int32 swap,		/**< In: Byteswap iff (swap != 0) */
-		 uint32 *chksum	/**< In/Out: Accumulated checksum */
-		 );
-
-/**
- * Read a 1-d array (fashioned after fread):
- *
- *  - 4-byte array size (returned in n_el)
- *  - memory allocated for the array and read (returned in buf)
- * 
- * Byteswapping and checksum accumulation performed as necessary.
- * Fails fatally if expected data not read.
- * @return number of array elements allocated and read; -1 if error.
- */
-SPHINXBASE_EXPORT
-int32 bio_fread_1d (void **buf,		/**< Out: contains array data; allocated by this
-					   function; can be freed using ckd_free */
-		    size_t el_sz,	/**< In: Array element size */
-		    uint32 *n_el,	/**< Out: Number of array elements allocated/read */
-		    FILE *fp,		/**< In: File to read */
-		    int32 sw,		/**< In: Byteswap iff (swap != 0) */
-		    uint32 *ck	/**< In/Out: Accumulated checksum */
-		    );
-
-/**
- * Read a 2-d matrix:
- *
- * - 4-byte # rows, # columns (returned in d1, d2, d3)
- * - memory allocated for the array and read (returned in buf)
- *
- * Byteswapping and checksum accumulation performed as necessary.
- * Fails fatally if expected data not read.
- * @return number of array elements allocated and read; -1 if error.
- */
-SPHINXBASE_EXPORT
-int32 bio_fread_2d(void ***arr,
-                   size_t e_sz,
-                   uint32 *d1,
-                   uint32 *d2,
-                   FILE *fp,
-                   uint32 swap,
-                   uint32 *chksum);
-
-/**
- * Read a 3-d array (set of matrices)
- *
- * - 4-byte # matrices, # rows, # columns (returned in d1, d2, d3)
- * - memory allocated for the array and read (returned in buf)
- *
- * Byteswapping and checksum accumulation performed as necessary.
- * Fails fatally if expected data not read.
- * @return number of array elements allocated and read; -1 if error.
- */
-SPHINXBASE_EXPORT
-int32 bio_fread_3d(void ****arr,
-                   size_t e_sz,
-                   uint32 *d1,
-                   uint32 *d2,
-                   uint32 *d3,
-                   FILE *fp,
-                   uint32 swap,
-                   uint32 *chksum);
-
-/**
- * Read and verify checksum at the end of binary file.  Fails fatally if there is
- * a mismatch.
- */
-SPHINXBASE_EXPORT
-void bio_verify_chksum (FILE *fp,	/**< In: File to read */
-			int32 byteswap,	/**< In: Byteswap iff (swap != 0) */
-			uint32 chksum	/**< In: Value to compare with checksum in file */
-			);
-
-
-
-/**
- * Write a 1-d array.
- * Checksum accumulation performed as necessary.
- *
- * @return number of array elements successfully written or -1 if error.
- */
-SPHINXBASE_EXPORT
-int bio_fwrite_1d(void *arr,       /**< In: Data to write */
-                  size_t e_sz,     /**< In: Size of the elements in bytes */
-                  uint32 d1,       /**< In: First dimension */
-                  FILE *fp,        /**< In: File to write to */
-                  uint32 *chksum   /**< In/Out: Checksum accumulator */
-                  );
-
-/**
- * Write a 3-d array (set of matrices).
- * Checksum accumulation performed as necessary.
- *
- * @return number of array elements successfully written or -1 if error.
- */
-SPHINXBASE_EXPORT
-int bio_fwrite_3d(void ***arr,    /**< In: Data to write */
-                  size_t e_sz,    /**< In: Size of the elements in bytes */
-                  uint32 d1,      /**< In: First dimension */
-                  uint32 d2,      /**< In: Second dimension */
-                  uint32 d3,      /**< In: Third dimension */
-                  FILE *fp,       /**< In: File to write to */
-                  uint32 *chksum  /**< In/Out: Checksum accumulator */
-                  );
-
-/**
- * Read raw data from the wav file.
- *
- * @return pointer to the data.
- */
-SPHINXBASE_EXPORT
-int16* bio_read_wavfile(char const *directory, /**< In: the folder where the file is located */
-			char const *filename,  /**< In: the name of the file */
-			char const *extension, /**< In: file extension */
-			int32 header,          /**< In: the size of the header to skip usually 44 bytes */
-			int32 endian,          /**< In: endian of the data */
-			size_t *nsamps         /**< Out: number of samples read */
-			);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/bitvec.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-#ifndef _LIBUTIL_BITVEC_H_
-#define _LIBUTIL_BITVEC_H_
-
-#include <string.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-
-#include <sphinxbase/prim_type.h>
-#include <sphinxbase/ckd_alloc.h>
-
-/** 
- * @file bitvec.h
- * @brief An implementation of bit vectors.
- * 
- * Implementation of basic operations of bit vectors.  
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-#define BITVEC_BITS 32
-typedef uint32 bitvec_t;
-
-/**
- * Number of bitvec_t in a bit vector
- */
-#define bitvec_size(n)	        (((n)+BITVEC_BITS-1)/BITVEC_BITS)
-
-/**
- * Allocate a bit vector, all bits are clear
- */
-#define bitvec_alloc(n)		ckd_calloc(bitvec_size(n), sizeof(bitvec_t))
-
-/**
- * Resize a bit vector, clear the remaining bits
- */
-SPHINXBASE_EXPORT
-bitvec_t *bitvec_realloc(bitvec_t *vec,	/* In: Bit vector to search */
-			 size_t old_len, /* In: Old length */
-                         size_t new_len); /* In: New lenght of above bit vector */
-/**
- * Free a bit vector.
- */
-#define bitvec_free(v)		ckd_free(v)
-
-/**
- * Set the b-th bit of bit vector v
- * @param v is a vector
- * @param b is the bit which will be set
- */
-
-#define bitvec_set(v,b)		(v[(b)/BITVEC_BITS] |= (1UL << ((b) & (BITVEC_BITS-1))))
-
-/**
- * Set all n bits in bit vector v
- * @param v is a vector
- * @param n is the number of bits
- */
-
-#define bitvec_set_all(v,n)	memset(v, (bitvec_t)-1, \
-                                       (((n)+BITVEC_BITS-1)/BITVEC_BITS) * \
-                                       sizeof(bitvec_t))
-/**
- * Clear the b-th bit of bit vector v
- * @param v is a vector
- * @param b is the bit which will be set
- */
-
-#define bitvec_clear(v,b)	(v[(b)/BITVEC_BITS] &= ~(1UL << ((b) & (BITVEC_BITS-1))))
-
-/**
- * Clear all n bits in bit vector v
- * @param v is a vector
- * @param n is the number of bits
- */
-
-#define bitvec_clear_all(v,n)	memset(v, 0, (((n)+BITVEC_BITS-1)/BITVEC_BITS) * \
-                                       sizeof(bitvec_t))
-
-/**
- * Check whether the b-th bit is set in vector v
- * @param v is a vector
- * @param b is the bit which will be checked
- */
-
-#define bitvec_is_set(v,b)	(v[(b)/BITVEC_BITS] & (1UL << ((b) & (BITVEC_BITS-1))))
-
-/**
- * Check whether the b-th bit is cleared in vector v
- * @param v is a vector
- * @param b is the bit which will be checked
- */
-
-#define bitvec_is_clear(v,b)	(! (bitvec_is_set(v,b)))
-
-
-/**
- * Return the number of bits set in the given bitvector.
- *
- * @param vec is the bit vector
- * @param len is the length of bit vector <code>vec</code>
- * @return the number of bits being set in vector <code>vec</code>
- */
-SPHINXBASE_EXPORT
-size_t bitvec_count_set(bitvec_t *vec,	/* In: Bit vector to search */
-                        size_t len);	/* In: Lenght of above bit vector */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/byteorder.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2001 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-/*
- * byteorder.h -- Byte swapping ordering macros.
- * 
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1996 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * 
- * $Log: byteorder.h,v $
- * Revision 1.8  2005/09/01 21:09:54  dhdfu
- * Really, actually, truly consolidate byteswapping operations into
- * byteorder.h.  Where unconditional byteswapping is needed, SWAP_INT32()
- * and SWAP_INT16() are to be used.  The WORDS_BIGENDIAN macro from
- * autoconf controls the functioning of the conditional swap macros
- * (SWAP_?[LW]) whose names and semantics have been regularized.
- * Private, adhoc macros have been removed.
- *
- */
-
-#ifndef __S2_BYTEORDER_H__
-#define __S2_BYTEORDER_H__	1
-
-/* Macro to byteswap an int16 variable.  x = ptr to variable */
-#define SWAP_INT16(x)	*(x) = ((0x00ff & (*(x))>>8) | (0xff00 & (*(x))<<8))
-
-/* Macro to byteswap an int32 variable.  x = ptr to variable */
-#define SWAP_INT32(x)	*(x) = ((0x000000ff & (*(x))>>24) | \
-				(0x0000ff00 & (*(x))>>8) | \
-				(0x00ff0000 & (*(x))<<8) | \
-				(0xff000000 & (*(x))<<24))
-
-/* Macro to byteswap a float32 variable.  x = ptr to variable */
-#define SWAP_FLOAT32(x)	SWAP_INT32((int32 *) x)
-
-/* Macro to byteswap a float64 variable.  x = ptr to variable */
-#define SWAP_FLOAT64(x)	{ int *low = (int *) (x), *high = (int *) (x) + 1,\
-			      temp;\
-			  SWAP_INT32(low);  SWAP_INT32(high);\
-			  temp = *low; *low = *high; *high = temp;}
-
-#ifdef WORDS_BIGENDIAN
-#define SWAP_BE_64(x)
-#define SWAP_BE_32(x)
-#define SWAP_BE_16(x)
-#define SWAP_LE_64(x) SWAP_FLOAT64(x)
-#define SWAP_LE_32(x) SWAP_INT32(x)
-#define SWAP_LE_16(x) SWAP_INT16(x)
-#else
-#define SWAP_LE_64(x)
-#define SWAP_LE_32(x)
-#define SWAP_LE_16(x)
-#define SWAP_BE_64(x) SWAP_FLOAT64(x)
-#define SWAP_BE_32(x) SWAP_INT32(x)
-#define SWAP_BE_16(x) SWAP_INT16(x)
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/case.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * case.h -- Upper/lower case conversion routines
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * $Log: case.h,v $
- * Revision 1.7  2005/06/22 02:58:54  arthchan2003
- * Added  keyword
- *
- * Revision 1.3  2005/03/30 01:22:48  archan
- * Fixed mistakes in last updates. Add
- *
- * 
- * 18-Jun-97	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon
- * 		Added strcmp_nocase, UPPER_CASE and LOWER_CASE definitions.
- * 
- * 16-Feb-97	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon
- * 		Created.
- */
-
-
-/**
- * @file case.h
- * @brief Locale-independent implementation of case swapping operation. 
- *
- * This function implements ASCII-only case switching and comparison
- * related operations, which do not depend on the locale and are
- * guaranteed to exist on all versions of Windows.
- */
-
-#ifndef _LIBUTIL_CASE_H_
-#define _LIBUTIL_CASE_H_
-
-#include <string.h>
-
-#include <sphinxbase/prim_type.h>
-#include <sphinxbase/sphinxbase_export.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-  /** 
-   * Return upper case form for c 
-   */
-#define UPPER_CASE(c)	((((c) >= 'a') && ((c) <= 'z')) ? (c-32) : c)
-
-  /**
-   * Return lower case form for c 
-   */
-#define LOWER_CASE(c)	((((c) >= 'A') && ((c) <= 'Z')) ? (c+32) : c)
-
-
-  /** 
-   * Convert str to all upper case.
-   * @param str is a string.
-   */
-SPHINXBASE_EXPORT
-void ucase(char *str);
-
-  /** 
-   * Convert str to all lower case
-   * @param str is a string.
-   */
-SPHINXBASE_EXPORT
-void lcase(char *str);
-
-  /**
-   * (FIXME! The implementation is incorrect!) 
-   * Case insensitive string compare.  Return the usual -1, 0, +1, depending on
-   * str1 <, =, > str2 (case insensitive, of course).
-   * @param str1 is the first string.
-   * @param str2 is the second string. 
-   */
-SPHINXBASE_EXPORT
-int32 strcmp_nocase(const char *str1, const char *str2);
-
-/**
- * Like strcmp_nocase() but with a maximum length.
- */
-SPHINXBASE_EXPORT
-int32 strncmp_nocase(const char *str1, const char *str2, size_t len);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/ckd_alloc.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced
- * Research Projects Agency and the National Science Foundation of the
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * ckd_alloc.h -- Memory allocation package.
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- *
- * HISTORY
- * $Log: ckd_alloc.h,v $
- * Revision 1.10  2005/06/22 02:59:25  arthchan2003
- * Added  keyword
- *
- * Revision 1.3  2005/03/30 01:22:48  archan
- * Fixed mistakes in last updates. Add
- *
- *
- * 19-Jun-97	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Removed file,line arguments from free functions.
- *
- * 01-Jan-96	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Created.
- */
-
-
-/*********************************************************************
- *
- * $Header: /cvsroot/cmusphinx/sphinx3/src/libutil/ckd_alloc.h,v 1.10 2005/06/22 02:59:25 arthchan2003 Exp $
- *
- * Carnegie Mellon ARPA Speech Group
- *
- * Copyright (c) 1994 Carnegie Mellon University.
- * All rights reserved.
- *
- *********************************************************************
- *
- * file: ckd_alloc.h
- *
- * traceability:
- *
- * description:
- *
- * author:
- *
- *********************************************************************/
-
-
-#ifndef _LIBUTIL_CKD_ALLOC_H_
-#define _LIBUTIL_CKD_ALLOC_H_
-
-#include <stdlib.h>
-#include <setjmp.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-/** \file ckd_alloc.h
- *\brief Sphinx's memory allocation/deallocation routines.
- *
- *Implementation of efficient memory allocation deallocation for
- *multiple dimensional arrays.
- *
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/**
- * Control behaviour of the program when allocation fails.
- *
- * Although your program is probably toast when memory allocation
- * fails, it is also probably a good idea to be able to catch these
- * errors and alert the user in some way.  Either that, or you might
- * want the program to call abort() so that you can debug the failed
- * code.  This function allows you to control that behaviour.
- *
- * @param env Pointer to a <code>jmp_buf</code> initialized with
- * setjmp(), or NULL to remove a previously set jump target.
- * @param abort If non-zero, the program will call abort() when
- * allocation fails rather than exiting or calling longjmp().
- * @return Pointer to a previously set <code>jmp_buf</code>, if any.
- */
-jmp_buf *ckd_set_jump(jmp_buf *env, int abort);
-
-/**
- * Fail (with a message) according to behaviour specified by ckd_set_jump().
- */
-void ckd_fail(char *format, ...);
-
-/*
- * The following functions are similar to the malloc family, except
- * that they have two additional parameters, caller_file and
- * caller_line, for error reporting.  All functions print a diagnostic
- * message if any error occurs, with any other behaviour determined by
- * ckd_set_jump(), above.
- */
-
-SPHINXBASE_EXPORT
-void *__ckd_calloc__(size_t n_elem, size_t elem_size,
-		     const char *caller_file, int caller_line);
-
-SPHINXBASE_EXPORT
-void *__ckd_malloc__(size_t size,
-		     const char *caller_file, int caller_line);
-
-SPHINXBASE_EXPORT
-void *__ckd_realloc__(void *ptr, size_t new_size,
-		      const char *caller_file, int caller_line);
-
-/**
- * Like strdup, except that if an error occurs it prints a diagnostic message and
- * exits. If origin in NULL the function also returns NULL.
- */
-SPHINXBASE_EXPORT
-char *__ckd_salloc__(const char *origstr,
-		     const char *caller_file, int caller_line);
-
-/**
- * Allocate a 2-D array and return ptr to it (ie, ptr to vector of ptrs).
- * The data area is allocated in one block so it can also be treated as a 1-D array.
- */
-SPHINXBASE_EXPORT
-void *__ckd_calloc_2d__(size_t d1, size_t d2,	/* In: #elements in the 2 dimensions */
-                        size_t elemsize,	/* In: Size (#bytes) of each element */
-                        const char *caller_file, int caller_line);	/* In */
-
-/**
- * Allocate a 3-D array and return ptr to it.
- * The data area is allocated in one block so it can also be treated as a 1-D array.
- */
-SPHINXBASE_EXPORT
-void *__ckd_calloc_3d__(size_t d1, size_t d2, size_t d3,	/* In: #elems in the dims */
-                        size_t elemsize,		/* In: Size (#bytes) per element */
-                        const char *caller_file, int caller_line);	/* In */
-
-/**
- * Allocate a 34D array and return ptr to it.
- * The data area is allocated in one block so it can also be treated as a 1-D array.
- */
-SPHINXBASE_EXPORT
-void ****__ckd_calloc_4d__(size_t d1,
-			   size_t d2,
-			   size_t d3,
-			   size_t d4,
-			   size_t elem_size,
-			   char *caller_file,
-			   int caller_line);
-
-/**
- * Overlay a 3-D array over a previously allocated storage area.
- **/
-SPHINXBASE_EXPORT
-void * __ckd_alloc_3d_ptr(size_t d1,
-                          size_t d2,
-                          size_t d3,
-                          void *store,
-                          size_t elem_size,
-                          char *caller_file,
-                          int caller_line);
-
-/**
- * Overlay a s-D array over a previously allocated storage area.
- **/
-SPHINXBASE_EXPORT
-void *__ckd_alloc_2d_ptr(size_t d1,
-                         size_t d2,
-                         void *store,
-                         size_t elem_size,
-                         char *caller_file,
-                         int caller_line);
-
-/**
- * Test and free a 1-D array
- */
-SPHINXBASE_EXPORT
-void ckd_free(void *ptr);
-
-/**
- * Free a 2-D array (ptr) previously allocated by ckd_calloc_2d
- */
-SPHINXBASE_EXPORT
-void ckd_free_2d(void *ptr);
-
-/**
- * Free a 3-D array (ptr) previously allocated by ckd_calloc_3d
- */
-SPHINXBASE_EXPORT
-void ckd_free_3d(void *ptr);
-
-/**
- * Free a 4-D array (ptr) previously allocated by ckd_calloc_4d
- */
-SPHINXBASE_EXPORT
-void ckd_free_4d(void *ptr);
-
-/**
- * Macros to simplify the use of above functions.
- * One should use these, rather than target functions directly.
- */
-
-/**
- * Macro for __ckd_calloc__
- */
-#define ckd_calloc(n,sz)	__ckd_calloc__((n),(sz),__FILE__,__LINE__)
-
-/**
- * Macro for __ckd_malloc__
- */
-#define ckd_malloc(sz)		__ckd_malloc__((sz),__FILE__,__LINE__)
-
-/**
- * Macro for __ckd_realloc__
- */
-#define ckd_realloc(ptr,sz)	__ckd_realloc__(ptr,(sz),__FILE__,__LINE__)
-
-/**
- * Macro for __ckd_salloc__
- */
-
-#define ckd_salloc(ptr)		__ckd_salloc__(ptr,__FILE__,__LINE__)
-
-/**
- * Macro for __ckd_calloc_2d__
- */
-
-#define ckd_calloc_2d(d1,d2,sz)	__ckd_calloc_2d__((d1),(d2),(sz),__FILE__,__LINE__)
-
-/**
- * Macro for __ckd_calloc_3d__
- */
-
-#define ckd_calloc_3d(d1,d2,d3,sz) __ckd_calloc_3d__((d1),(d2),(d3),(sz),__FILE__,__LINE__)
-
-/**
- * Macro for __ckd_calloc_4d__
- */
-#define ckd_calloc_4d(d1, d2, d3, d4, s)  __ckd_calloc_4d__((d1), (d2), (d3), (d4), (s), __FILE__, __LINE__)
-
-/**
- * Macro for __ckd_alloc_2d_ptr__
- */
-
-#define ckd_alloc_2d_ptr(d1, d2, bf, sz)    __ckd_alloc_2d_ptr((d1), (d2), (bf), (sz), __FILE__, __LINE__)
-
-/**
- * Free only the pointer arrays allocated with ckd_alloc_2d_ptr().
- */
-#define ckd_free_2d_ptr(bf) ckd_free(bf)
-
-/**
- * Macro for __ckd_alloc_3d_ptr__
- */
-
-#define ckd_alloc_3d_ptr(d1, d2, d3, bf, sz) __ckd_alloc_3d_ptr((d1), (d2), (d3), (bf), (sz), __FILE__, __LINE__)
-
-/**
- * Free only the pointer arrays allocated with ckd_alloc_3d_ptr().
- */
-#define ckd_free_3d_ptr(bf) ckd_free_2d(bf)
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/clapack_lite.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#ifndef __CLAPACK_LITE_H
-#define __CLAPACK_LITE_H
-
-#include "f2c.h"
- 
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/* Subroutine */ int sgemm_(char *transa, char *transb, integer *m, integer *
-                            n, integer *k, real *alpha, real *a, integer *lda, real *b, integer *
-                            ldb, real *beta, real *c__, integer *ldc);
-/* Subroutine */ int sgemv_(char *trans, integer *m, integer *n, real *alpha,
-                            real *a, integer *lda, real *x, integer *incx, real *beta, real *y,
-                            integer *incy);
-/* Subroutine */ int ssymm_(char *side, char *uplo, integer *m, integer *n,
-                            real *alpha, real *a, integer *lda, real *b, integer *ldb, real *beta,
-                            real *c__, integer *ldc);
-
-/* Subroutine */ int sposv_(char *uplo, integer *n, integer *nrhs, real *a,
-                            integer *lda, real *b, integer *ldb, integer *info);
-/* Subroutine */ int spotrf_(char *uplo, integer *n, real *a, integer *lda,
-                             integer *info);
-
-#ifdef __cplusplus
-}
-#endif
-
- 
-#endif /* __CLAPACK_LITE_H */
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/cmd_ln.h
+++ /dev/null
@@ -1,587 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * cmd_ln.h -- Command line argument parsing.
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * 
- * 15-Jul-1997	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Added required arguments types.
- * 
- * 07-Dec-96	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Created, based on Eric's implementation.  Basically, combined several
- *		functions into one, eliminated validation, and simplified the interface.
- */
-
-
-#ifndef _LIBUTIL_CMD_LN_H_
-#define _LIBUTIL_CMD_LN_H_
-
-#include <stdio.h>
-#include <stdarg.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-/**
- * @file cmd_ln.h
- * @brief Command-line and other configurationparsing and handling.
- *  
- * Configuration parameters, optionally parsed from the command line.
- */
-  
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/**
- * @struct arg_t
- * Argument definition structure.
- */
-typedef struct arg_s {
-	char const *name;   /**< Name of the command line switch */
-	int type;           /**< Type of the argument in question */
-	char const *deflt;  /**< Default value (as a character string), or NULL if none */
-	char const *doc;    /**< Documentation/description string */
-} arg_t;
-
-/**
- * @name Values for arg_t::type
- */
-/* @{ */
-/**
- * Bit indicating a required argument.
- */
-#define ARG_REQUIRED (1<<0)
-/**
- * Integer argument (optional).
- */
-#define ARG_INTEGER  (1<<1)
-/**
- * Floating point argument (optional).
- */
-#define ARG_FLOATING (1<<2)
-/**
- * String argument (optional).
- */
-#define ARG_STRING   (1<<3)
-/**
- * Boolean (true/false) argument (optional).
- */
-#define ARG_BOOLEAN  (1<<4)
-/**
- * Boolean (true/false) argument (optional).
- */
-#define ARG_STRING_LIST  (1<<5)
-
-/**
- * Required integer argument.
- */
-#define REQARG_INTEGER (ARG_INTEGER | ARG_REQUIRED)
-/**
- * Required floating point argument.
- */
-#define REQARG_FLOATING (ARG_FLOATING | ARG_REQUIRED)
-/**
- * Required string argument.
- */
-#define REQARG_STRING (ARG_STRING | ARG_REQUIRED)
-/**
- * Required boolean argument.
- */
-#define REQARG_BOOLEAN (ARG_BOOLEAN | ARG_REQUIRED)
-
-/**
- * @deprecated Use ARG_INTEGER instead.
- */
-#define ARG_INT32   ARG_INTEGER
-/**
- * @deprecated Use ARG_FLOATING instead.
- */
-#define ARG_FLOAT32 ARG_FLOATING
-/**
- * @deprecated Use ARG_FLOATING instead.
- */
-#define ARG_FLOAT64 ARG_FLOATING
-/**
- * @deprecated Use REQARG_INTEGER instead.
- */
-#define REQARG_INT32 (ARG_INT32 | ARG_REQUIRED)
-/**
- * @deprecated Use REQARG_FLOATING instead.
- */
-#define REQARG_FLOAT32 (ARG_FLOAT32 | ARG_REQUIRED)
-/**
- * @deprecated Use REQARG_FLOATING instead.
- */
-#define REQARG_FLOAT64 (ARG_FLOAT64 | ARG_REQUIRED)
-/* @} */
-
-
-/**
- * Helper macro to stringify enums and other non-string values for
- * default arguments.
- **/
-#define ARG_STRINGIFY(s) ARG_STRINGIFY1(s)
-#define ARG_STRINGIFY1(s) #s
-
-/**
- * @struct cmd_ln_t
- * Opaque structure used to hold the results of command-line parsing.
- */
-typedef struct cmd_ln_s cmd_ln_t;
-
-/**
- * Create a cmd_ln_t from NULL-terminated list of arguments.
- *
- * This function creates a cmd_ln_t from a NULL-terminated list of
- * argument strings.  For example, to create the equivalent of passing
- * "-hmm foodir -dsratio 2 -lm bar.lm" on the command-line:
- *
- *  config = cmd_ln_init(NULL, defs, TRUE, "-hmm", "foodir", "-dsratio", "2",
- *                       "-lm", "bar.lm", NULL);
- *
- * Note that for simplicity, <strong>all</strong> arguments are passed
- * as strings, regardless of the actual underlying type.
- *
- * @param inout_cmdln Previous command-line to update, or NULL to create a new one.
- * @param defn Array of argument name definitions, or NULL to allow any arguments.
- * @param strict Whether to fail on duplicate or unknown arguments.
- * @return A cmd_ln_t* containing the results of command line parsing, or NULL on failure.
- */
-SPHINXBASE_EXPORT
-cmd_ln_t *cmd_ln_init(cmd_ln_t *inout_cmdln, arg_t const *defn, int32 strict, ...);
-
-/**
- * Retain ownership of a command-line argument set.
- *
- * @return pointer to retained command-line argument set.
- */
-SPHINXBASE_EXPORT
-cmd_ln_t *cmd_ln_retain(cmd_ln_t *cmdln);
-
-/**
- * Release a command-line argument set and all associated strings.
- *
- * @return new reference count (0 if freed completely)
- */
-SPHINXBASE_EXPORT
-int cmd_ln_free_r(cmd_ln_t *cmdln);
-
-/**
- * Parse a list of strings into argumetns.
- *
- * Parse the given list of arguments (name-value pairs) according to
- * the given definitions.  Argument values can be retrieved in future
- * using cmd_ln_access().  argv[0] is assumed to be the program name
- * and skipped.  Any unknown argument name causes a fatal error.  The
- * routine also prints the prevailing argument values (to stderr)
- * after parsing.
- *
- * @note It is currently assumed that the strings in argv are
- *       allocated statically, or at least that they will be valid as
- *       long as the cmd_ln_t returned from this function.
- *       Unpredictable behaviour will result if they are freed or
- *       otherwise become invalidated.
- *
- * @return A cmd_ln_t containing the results of command line parsing,
- *         or NULL on failure.
- **/
-SPHINXBASE_EXPORT
-cmd_ln_t *cmd_ln_parse_r(cmd_ln_t *inout_cmdln, /**< In/Out: Previous command-line to update,
-                                                     or NULL to create a new one. */
-                         arg_t const *defn,	/**< In: Array of argument name definitions */
-                         int32 argc,		/**< In: Number of actual arguments */
-                         char *argv[],		/**< In: Actual arguments */
-                         int32 strict           /**< In: Fail on duplicate or unknown
-                                                   arguments, or no arguments? */
-    );
-
-/**
- * Parse an arguments file by deliminating on " \r\t\n" and putting each tokens
- * into an argv[] for cmd_ln_parse().
- *
- * @return A cmd_ln_t containing the results of command line parsing, or NULL on failure.
- */
-SPHINXBASE_EXPORT
-cmd_ln_t *cmd_ln_parse_file_r(cmd_ln_t *inout_cmdln, /**< In/Out: Previous command-line to update,
-                                                     or NULL to create a new one. */
-                              arg_t const *defn,   /**< In: Array of argument name definitions*/
-                              char const *filename,/**< In: A file that contains all
-                                                     the arguments */ 
-                              int32 strict         /**< In: Fail on duplicate or unknown
-                                                     arguments, or no arguments? */
-    );
-
-/**
- * Access the generic type union for a command line argument.
- */
-SPHINXBASE_EXPORT
-anytype_t *cmd_ln_access_r(cmd_ln_t *cmdln, char const *name);
-
-/**
- * Retrieve a string from a command-line object.
- *
- * The command-line object retains ownership of this string, so you
- * should not attempt to free it manually.
- *
- * @param cmdln Command-line object.
- * @param name the command-line flag to retrieve.
- * @return the string value associated with <tt>name</tt>, or NULL if
- *         <tt>name</tt> does not exist.  You must use
- *         cmd_ln_exists_r() to distinguish between cases where a
- *         value is legitimately NULL and where the corresponding flag
- *         is unknown.
- */
-SPHINXBASE_EXPORT
-char const *cmd_ln_str_r(cmd_ln_t *cmdln, char const *name);
-
-/**
- * Retrieve an array of strings from a command-line object.
- *
- * The command-line object retains ownership of this array, so you
- * should not attempt to free it manually.
- *
- * @param cmdln Command-line object.
- * @param name the command-line flag to retrieve.
- * @return the array of strings associated with <tt>name</tt>, or NULL if
- *         <tt>name</tt> does not exist.  You must use
- *         cmd_ln_exists_r() to distinguish between cases where a
- *         value is legitimately NULL and where the corresponding flag
- *         is unknown.
- */
-SPHINXBASE_EXPORT
-char const **cmd_ln_str_list_r(cmd_ln_t *cmdln, char const *name);
-
-/**
- * Retrieve an integer from a command-line object.
- *
- * @param cmdln Command-line object.
- * @param name the command-line flag to retrieve.
- * @return the integer value associated with <tt>name</tt>, or 0 if
- *         <tt>name</tt> does not exist.  You must use
- *         cmd_ln_exists_r() to distinguish between cases where a
- *         value is legitimately zero and where the corresponding flag
- *         is unknown.
- */
-SPHINXBASE_EXPORT
-long cmd_ln_int_r(cmd_ln_t *cmdln, char const *name);
-
-/**
- * Retrieve a floating-point number from a command-line object.
- *
- * @param cmdln Command-line object.
- * @param name the command-line flag to retrieve.
- * @return the float value associated with <tt>name</tt>, or 0.0 if
- *         <tt>name</tt> does not exist.  You must use
- *         cmd_ln_exists_r() to distinguish between cases where a
- *         value is legitimately zero and where the corresponding flag
- *         is unknown.
- */
-SPHINXBASE_EXPORT
-double cmd_ln_float_r(cmd_ln_t *cmdln, char const *name);
-
-/**
- * Retrieve a boolean value from a command-line object.
- */
-#define cmd_ln_boolean_r(c,n) (cmd_ln_int_r(c,n) != 0)
-
-/**
- * Set a string in a command-line object.
- *
- * @param cmdln Command-line object.
- * @param name The command-line flag to set.
- * @param str String value to set.  The command-line object does not
- *            retain ownership of this pointer.
- */
-SPHINXBASE_EXPORT
-void cmd_ln_set_str_r(cmd_ln_t *cmdln, char const *name, char const *str);
-
-/**
- * Set an integer in a command-line object.
- *
- * @param cmdln Command-line object.
- * @param name The command-line flag to set.
- * @param iv Integer value to set.
- */
-SPHINXBASE_EXPORT
-void cmd_ln_set_int_r(cmd_ln_t *cmdln, char const *name, long iv);
-
-/**
- * Set a floating-point number in a command-line object.
- *
- * @param cmdln Command-line object.
- * @param name The command-line flag to set.
- * @param fv Integer value to set.
- */
-SPHINXBASE_EXPORT
-void cmd_ln_set_float_r(cmd_ln_t *cmdln, char const *name, double fv);
-
-/**
- * Set a boolean value in a command-line object.
- */
-#define cmd_ln_set_boolean_r(c,n,b) (cmd_ln_set_int_r(c,n,(b)!=0))
-
-/*
- * Compatibility macros
- */
-#define cmd_ln_int32_r(c,n)	(int32)cmd_ln_int_r(c,n)
-#define cmd_ln_float32_r(c,n)	(float32)cmd_ln_float_r(c,n)
-#define cmd_ln_float64_r(c,n)	(float64)cmd_ln_float_r(c,n)
-#define cmd_ln_set_int32_r(c,n,i)   cmd_ln_set_int_r(c,n,i)
-#define cmd_ln_set_float32_r(c,n,f) cmd_ln_set_float_r(c,n,(double)f)
-#define cmd_ln_set_float64_r(c,n,f) cmd_ln_set_float_r(c,n,(double)f)
-
-/**
- * Re-entrant version of cmd_ln_exists().
- *
- * @return True if the command line argument exists (i.e. it
- * was one of the arguments defined in the call to cmd_ln_parse_r().
- */
-SPHINXBASE_EXPORT
-int cmd_ln_exists_r(cmd_ln_t *cmdln, char const *name);
-
-/**
- * Print a help message listing the valid argument names, and the associated
- * attributes as given in defn.
- *
- * @param fp   output stream
- * @param defn Array of argument name definitions.
- */
-SPHINXBASE_EXPORT
-void cmd_ln_print_help_r (cmd_ln_t *cmdln, FILE *fp, const arg_t *defn);
-
-/**
- * Non-reentrant version of cmd_ln_parse().
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_parse_r().
- * @return 0 if successful, <0 if error.
- */
-SPHINXBASE_EXPORT
-int32 cmd_ln_parse(const arg_t *defn,  /**< In: Array of argument name definitions */
-                   int32 argc,	       /**< In: Number of actual arguments */
-                   char *argv[],       /**< In: Actual arguments */
-                   int32 strict        /**< In: Fail on duplicate or unknown
-                                          arguments, or no arguments? */
-	);
-
-/**
- * Parse an arguments file by deliminating on " \r\t\n" and putting each tokens
- * into an argv[] for cmd_ln_parse().
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_parse_file_r().
- *
- * @return 0 if successful, <0 on error.
- */
-SPHINXBASE_EXPORT
-int32 cmd_ln_parse_file(const arg_t *defn,   /**< In: Array of argument name definitions*/
-			char const *filename,/**< In: A file that contains all the arguments */ 
-                        int32 strict         /**< In: Fail on duplicate or unknown
-                                                arguments, or no arguments? */
-	);
-
-/**
- * Old application initialization routine for Sphinx3 code.
- *
- * @deprecated This is deprecated in favor of the re-entrant API.
- */
-SPHINXBASE_EXPORT
-void cmd_ln_appl_enter(int argc,   /**< In: Number of actual arguments */
-		       char *argv[], /**< In: Number of actual arguments */
-		       char const* default_argfn, /**< In: default argument file name*/
-		       const arg_t *defn /**< Command-line argument definition */
-	);
-
-
-/**
- * Finalization routine corresponding to cmd_ln_appl_enter().
- *
- * @deprecated This is deprecated in favor of the re-entrant API.
- */
-
-SPHINXBASE_EXPORT
-void cmd_ln_appl_exit(void);
-
-/**
- * Retrieve the global cmd_ln_t object used by non-re-entrant functions.
- *
- * @deprecated This is deprecated in favor of the re-entrant API.
- * @return global cmd_ln_t object.
- */
-SPHINXBASE_EXPORT
-cmd_ln_t *cmd_ln_get(void);
-
-/**
- * Test the existence of a command-line argument in the global set of
- * definitions.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_exists_r().
- *
- * @return True if the command line argument exists (i.e. it
- * was one of the arguments defined in the call to cmd_ln_parse().
- */
-#define cmd_ln_exists(name)	cmd_ln_exists_r(cmd_ln_get(), name)
-
-/**
- * Return a pointer to the previously parsed value for the given argument name.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_access_r().
- */
-#define cmd_ln_access(name)	cmd_ln_access_r(cmd_ln_get(), name)
-
-/**
- * Retrieve a string from the global command line.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_str_r().
- */
-#define cmd_ln_str(name)	cmd_ln_str_r(cmd_ln_get(), name)
-
-/**
- * Retrieve an array of strings in the global command line.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_str_list_r().
- */
-#define cmd_ln_str_list(name)	cmd_ln_str_list_r(cmd_ln_get(), name)
-
-/**
- * Retrieve a 32-bit integer from the global command line.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_int_r().
- */
-#define cmd_ln_int32(name)	(int32)cmd_ln_int_r(cmd_ln_get(), name)
-/**
- * Retrieve a 32-bit float from the global command line.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_float_r().
- */
-#define cmd_ln_float32(name)	(float32)cmd_ln_float_r(cmd_ln_get(), name)
-/**
- * Retrieve a 64-bit float from the global command line.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_float_r().
- */
-#define cmd_ln_float64(name)	(float64)cmd_ln_float_r(cmd_ln_get(), name)
-/**
- * Retrieve a boolean from the global command line.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_boolean_r().
- */
-#define cmd_ln_boolean(name)	cmd_ln_boolean_r(cmd_ln_get(), name)
-
-/**
- * Set a string in the global command line.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_set_str_r().
- */
-#define cmd_ln_set_str(n,s)     cmd_ln_set_str_r(cmd_ln_get(),n,s)
-/**
- * Set a 32-bit integer value in the global command line.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_set_int_r().
- */
-#define cmd_ln_set_int32(n,i)   cmd_ln_set_int_r(cmd_ln_get(),n,i)
-/**
- * Set a 32-bit float in the global command line.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_set_float_r().
- */
-#define cmd_ln_set_float32(n,f) cmd_ln_set_float_r(cmd_ln_get(),n,f)
-/**
- * Set a 64-bit float in the global command line.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_set_float_r().
- */
-#define cmd_ln_set_float64(n,f) cmd_ln_set_float_r(cmd_ln_get(),n,f)
-/**
- * Set a boolean value in the global command line.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_set_boolean_r().
- */
-#define cmd_ln_set_boolean(n,b) cmd_ln_set_boolean_r(cmd_ln_get(),n,b)
-
-/**
- * Print a help message listing the valid argument names, and the associated
- * attributes as given in defn.
- *
- * @deprecated This is deprecated in favor of the re-entrant API
- * function cmd_ln_print_help_r().
- */
-#define cmd_ln_print_help(f,d) cmd_ln_print_help_r(cmd_ln_get(),f,d)
-
-/**
- * Free the global command line, if any exists.
- * @deprecated Use the re-entrant API instead.
- */
-SPHINXBASE_EXPORT
-void cmd_ln_free (void);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/cmn.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * cmn.h -- Various forms of cepstral mean normalization
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * $Log$
- * Revision 1.1  2006/04/05  20:27:30  dhdfu
- * A Great Reorganzation of header files and executables
- * 
- * Revision 1.13  2006/02/23 03:48:27  arthchan2003
- * Resolved conflict in cmn.h
- *
- *
- * Revision 1.12  2006/02/22 23:43:55  arthchan2003
- * Merged from the branch SPHINX3_5_2_RCI_IRII_BRANCH: Put data structure into the cmn_t structure.
- *
- * Revision 1.11.4.2  2005/10/17 04:45:57  arthchan2003
- * Free stuffs in cmn and feat corectly.
- *
- * Revision 1.11.4.1  2005/07/05 06:25:08  arthchan2003
- * Fixed dox-doc.
- *
- * Revision 1.11  2005/06/21 19:28:00  arthchan2003
- * 1, Fixed doxygen documentation. 2, Added $ keyword.
- *
- * Revision 1.4  2005/06/13 04:02:56  archan
- * Fixed most doxygen-style documentation under libs3decoder.
- *
- * Revision 1.3  2005/03/30 01:22:46  archan
- * Fixed mistakes in last updates. Add
- *
- * 
- * 20.Apr.2001  RAH (rhoughton@mediasite.com, ricky.houghton@cs.cmu.edu)
- *              Added cmn_free() and moved *mean and *var out global space and named them cmn_mean and cmn_var
- * 
- * 28-Apr-1999	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Copied from previous version.
- */
-
-
-#ifndef _S3_CMN_H_
-#define _S3_CMN_H_
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-#include <sphinxbase/fe.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/** \file cmn.h
- * \brief Apply Cepstral Mean Normalization (CMN) to the set of input mfc frames.
- *
- * By subtractingthe mean of the input from each frame.  C0 is also included in this process.
- * This function operates on an entire utterance at a time.  Hence, the entire utterance
- * must be available beforehand (batchmode).
- */
-
-/**
- * Types of cepstral mean normalization to apply to the features.
- */
-typedef enum cmn_type_e {
-    CMN_NONE = 0,
-    CMN_CURRENT,
-    CMN_PRIOR
-} cmn_type_t;
-
-/** String representations of cmn_type_t values. */
-SPHINXBASE_EXPORT
-extern const char *cmn_type_str[];
-
-/** Convert string representation (from command-line) to cmn_type_t */
-SPHINXBASE_EXPORT
-cmn_type_t cmn_type_from_str(const char *str);
-
-/** \struct cmn_t
- *  \brief wrapper of operation of the cepstral mean normalization. 
- */
-
-typedef struct {
-    mfcc_t *cmn_mean;   /**< Temporary variable: current means */
-    mfcc_t *cmn_var;    /**< Temporary variables: stored the cmn variance */
-    mfcc_t *sum;        /**< The sum of the cmn frames */
-    int32 nframe;	/**< Number of frames */
-    int32 veclen;	/**< Length of cepstral vector */
-} cmn_t;
-
-SPHINXBASE_EXPORT
-cmn_t* cmn_init(int32 veclen);
-
-/**
- * CMN for the whole sentence
-*/
-SPHINXBASE_EXPORT
-void cmn (cmn_t *cmn,   /**< In/Out: cmn normalization, which contains the cmn_mean and cmn_var) */
-          mfcc_t **mfc,	/**< In/Out: mfc[f] = mfc vector in frame f */
-	  int32 varnorm,/**< In: if not FALSE, variance normalize the input vectors
-			   to have unit variance (along each dimension independently);
-			   Irrelevant if no cmn is performed */
-	  int32 n_frame /**< In: Number of frames of mfc vectors */
-	);
-
-#define CMN_WIN_HWM     800     /* #frames after which window shifted */
-#define CMN_WIN         500
-
-/**
- * CMN for one block of data, using prior mean
- */
-SPHINXBASE_EXPORT
-void cmn_prior(cmn_t *cmn,        /**< In/Out: cmn normalization, which contains
-                                    the cmn_mean and cmn_var) */
-               mfcc_t **incep,  /**< In/Out: mfc[f] = mfc vector in frame f*/
-	       int32 varnorm,    /**< This flag should always be 0 for live */
-	       int32 nfr         /**< Number of incoming frames */
-    );
-
-/**
- * Update prior mean based on observed data
- */
-SPHINXBASE_EXPORT
-void cmn_prior_update(cmn_t *cmn);
-
-/**
- * Set the prior mean.
- */
-SPHINXBASE_EXPORT
-void cmn_prior_set(cmn_t *cmn, mfcc_t const *vec);
-
-/**
- * Get the prior mean.
- */
-SPHINXBASE_EXPORT
-void cmn_prior_get(cmn_t *cmn, mfcc_t *vec);
-
-/* RAH, free previously allocated memory */
-SPHINXBASE_EXPORT
-void cmn_free (cmn_t *cmn);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/err.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced
- * Research Projects Agency and the National Science Foundation of the
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-#ifndef _LIBUTIL_ERR_H_
-#define _LIBUTIL_ERR_H_
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-
-/**
- * @file err.h
- * @brief Implementation of logging routines.
- *
- * Logging, warning, debug and error message output funtionality is provided in this file.
- * Sphinxbase defines several level of logging messages - INFO, WARNING, ERROR, FATAL. By
- * default output goes to standard error output.
- *
- * Logging is implemented through macros. They take same arguments as printf: format string and
- * values. By default source file name and source line are prepended to the message. Log output
- * could be redirected to any file using err_set_logfp() and err_set_logfile() functions. To disable
- * logging in your application, call err_set_logfp(NULL).
- *
- * It's possible to log multiline info messages, to do that you need to start message with
- * E_INFO and output other lines with E_INFOCONT.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-#define E_SYSCALL(stmt, ...)  if (stmt) E_FATAL_SYSTEM(__VA_ARGS__);
-
-#define FILELINE  __FILE__ , __LINE__
-
-/**
- * Exit with non-zero status after error message
- */
-#define E_FATAL(...)                               \
-    do {                                           \
-        err_msg(ERR_FATAL, FILELINE, __VA_ARGS__); \
-        exit(EXIT_FAILURE);                        \
-    } while (0)
-
-/**
- * Print error text; Call perror(""); exit(errno);
- */
-#define E_FATAL_SYSTEM(...)                                                  \
-    do {                                                                     \
-        err_msg_system(ERR_FATAL, FILELINE, __VA_ARGS__);		     \
-        exit(EXIT_FAILURE);                                                  \
-    } while (0)
-
-/**
- * Print error text; Call perror("");
- */
-#define E_ERROR_SYSTEM(...)     err_msg_system(ERR_ERROR, FILELINE, __VA_ARGS__)
-
-/**
- * Print error message to error log
- */
-#define E_ERROR(...)     err_msg(ERR_ERROR, FILELINE, __VA_ARGS__)
-
-/**
- * Print warning message to error log
- */
-#define E_WARN(...)      err_msg(ERR_WARN, FILELINE, __VA_ARGS__)
-
-/**
- * Print logging information to standard error stream
- */
-#define E_INFO(...)      err_msg(ERR_INFO, FILELINE, __VA_ARGS__)
-
-/**
- * Continue printing the information to standard error stream
- */
-#define E_INFOCONT(...)  err_msg(ERR_INFOCONT, NULL, 0, __VA_ARGS__)
-
-/**
- * Print logging information without filename.
- */
-#define E_INFO_NOFN(...)  err_msg(ERR_INFO, NULL, 0, __VA_ARGS__)
-
-/**
- * Print debugging information to standard error stream.
- *
- * This will only print a message if:
- *  1. Debugging is enabled at compile time
- *  2. The debug level is greater than or equal to \a level
- *
- * Note that for portability reasons the format and arguments must be
- * enclosed in an extra set of parentheses.
- */
-#ifdef SPHINX_DEBUG
-#define E_DEBUG(level, ...) \
-    if (err_get_debug_level() >= level) \
-        err_msg(ERR_DEBUG, FILELINE, __VA_ARGS__)
-#define E_DEBUGCONT(level, ...) \
-    if (err_get_debug_level() >= level) \
-        err_msg(ERR_DEBUG, NULL, 0, __VA_ARGS__)
-#else
-#define E_DEBUG(level,x)
-#define E_DEBUGCONT(level,x)
-#endif
-
-typedef enum err_e {
-    ERR_DEBUG,
-    ERR_INFO,
-    ERR_INFOCONT,
-    ERR_WARN,
-    ERR_ERROR,
-    ERR_FATAL,
-    ERR_MAX
-} err_lvl_t;
-
-SPHINXBASE_EXPORT void
-err_msg(err_lvl_t lvl, const char *path, long ln, const char *fmt, ...);
-
-SPHINXBASE_EXPORT void
-err_msg_system(err_lvl_t lvl, const char *path, long ln, const char *fmt, ...);
-
-SPHINXBASE_EXPORT void
-err_logfp_cb(void * user_data, err_lvl_t level, const char *fmt, ...);
-
-typedef void (*err_cb_f)(void* user_data, err_lvl_t, const char *, ...);
-
-/**
- * Sets function to output error messages. Use it to redirect the logging
- * to your application. By default the handler which dumps messages to
- * stderr is set.
- *
- * @param - callback to pass messages too.
- */
-SPHINXBASE_EXPORT void
-err_set_callback(err_cb_f callback, void *user_data);
-
-/**
- * Direct all logging to a given filehandle if default logfp callback is set.
- *
- * @param logfp Filehandle to send log messages to, or NULL to disable logging.
- */
-SPHINXBASE_EXPORT void
-err_set_logfp(FILE *stream);
-
-/**
- * Get the current logging filehandle.
- *
- * @return Current logging filehandle, NULL if logging is disabled. Initially
- * it returns stderr
- */
-SPHINXBASE_EXPORT FILE *
-err_get_logfp(void);
-
-/**
- * Append all log messages to a given file.
- *
- * Previous logging filehandle is closed (unless it was stdout or stderr).
- *
- * @param file File path to send log messages to
- * @return 0 for success, <0 for failure (e.g. if file does not exist)
- */
-SPHINXBASE_EXPORT int
-err_set_logfile(const char *path);
-
-/**
- * Set debugging verbosity level.
- *
- * Note that debugging messages are only enabled when compiled with -DDEBUG.
- *
- * @param level Verbosity level to set, or 0 to disable debug messages.
- */
-SPHINXBASE_EXPORT
-int err_set_debug_level(int level);
-
-/**
- * Get debugging verbosity level.
- *
- * Note that debugging messages are only enabled when compiled with -DDEBUG.
- */
-SPHINXBASE_EXPORT
-int err_get_debug_level(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_ERR_H */
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/f2c.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* f2c.h  --  Standard Fortran to C header file */
-
-/**  barf  [ba:rf]  2.  "He suggested using FORTRAN, and everybody barfed."
-
-	- From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
-
-#ifndef F2C_INCLUDE
-#define F2C_INCLUDE
-
-typedef int integer;
-typedef char *address;
-typedef short int shortint;
-typedef float real;
-typedef double doublereal;
-typedef struct { real r, i; } complex;
-typedef struct { doublereal r, i; } doublecomplex;
-typedef int logical;
-typedef short int shortlogical;
-typedef char logical1;
-typedef char integer1;
-
-#define TRUE_ (1)
-#define FALSE_ (0)
-
-/* Extern is for use with -E */
-#ifndef Extern
-#define Extern extern
-#endif
-
-/* I/O stuff */
-
-#ifdef f2c_i2
-/* for -i2 */
-typedef short flag;
-typedef short ftnlen;
-typedef short ftnint;
-#else
-typedef int flag;
-typedef int ftnlen;
-typedef int ftnint;
-#endif
-
-/*external read, write*/
-typedef struct
-{	flag cierr;
-	ftnint ciunit;
-	flag ciend;
-	char *cifmt;
-	ftnint cirec;
-} cilist;
-
-/*internal read, write*/
-typedef struct
-{	flag icierr;
-	char *iciunit;
-	flag iciend;
-	char *icifmt;
-	ftnint icirlen;
-	ftnint icirnum;
-} icilist;
-
-/*open*/
-typedef struct
-{	flag oerr;
-	ftnint ounit;
-	char *ofnm;
-	ftnlen ofnmlen;
-	char *osta;
-	char *oacc;
-	char *ofm;
-	ftnint orl;
-	char *oblnk;
-} olist;
-
-/*close*/
-typedef struct
-{	flag cerr;
-	ftnint cunit;
-	char *csta;
-} cllist;
-
-/*rewind, backspace, endfile*/
-typedef struct
-{	flag aerr;
-	ftnint aunit;
-} alist;
-
-/* inquire */
-typedef struct
-{	flag inerr;
-	ftnint inunit;
-	char *infile;
-	ftnlen infilen;
-	ftnint	*inex;	/*parameters in standard's order*/
-	ftnint	*inopen;
-	ftnint	*innum;
-	ftnint	*innamed;
-	char	*inname;
-	ftnlen	innamlen;
-	char	*inacc;
-	ftnlen	inacclen;
-	char	*inseq;
-	ftnlen	inseqlen;
-	char 	*indir;
-	ftnlen	indirlen;
-	char	*infmt;
-	ftnlen	infmtlen;
-	char	*inform;
-	ftnint	informlen;
-	char	*inunf;
-	ftnlen	inunflen;
-	ftnint	*inrecl;
-	ftnint	*innrec;
-	char	*inblank;
-	ftnlen	inblanklen;
-} inlist;
-
-#define VOID void
-
-union Multitype {	/* for multiple entry points */
-	shortint h;
-	integer i;
-	real r;
-	doublereal d;
-	complex c;
-	doublecomplex z;
-	};
-
-typedef union Multitype Multitype;
-
-typedef long Long;	/* No longer used; formerly in Namelist */
-
-struct Vardesc {	/* for Namelist */
-	char *name;
-	char *addr;
-	ftnlen *dims;
-	int  type;
-	};
-typedef struct Vardesc Vardesc;
-
-struct Namelist {
-	char *name;
-	Vardesc **vars;
-	int nvars;
-	};
-typedef struct Namelist Namelist;
-
-#ifndef abs
-#define abs(x) ((x) >= 0 ? (x) : -(x))
-#endif
-#define dabs(x) (doublereal)abs(x)
-#ifndef min
-#define min(a,b) ((a) <= (b) ? (a) : (b))
-#endif
-#ifndef max
-#define max(a,b) ((a) >= (b) ? (a) : (b))
-#endif
-#define dmin(a,b) (doublereal)min(a,b)
-#define dmax(a,b) (doublereal)max(a,b)
-
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef int /* Unknown procedure type */ (*U_fp)(...);
-typedef shortint (*J_fp)(...);
-typedef integer (*I_fp)(...);
-typedef real (*R_fp)(...);
-typedef doublereal (*D_fp)(...), (*E_fp)(...);
-typedef /* Complex */ VOID (*C_fp)(...);
-typedef /* Double Complex */ VOID (*Z_fp)(...);
-typedef logical (*L_fp)(...);
-typedef shortlogical (*K_fp)(...);
-typedef /* Character */ VOID (*H_fp)(...);
-typedef /* Subroutine */ int (*S_fp)(...);
-#else
-typedef int /* Unknown procedure type */ (*U_fp)(void);
-typedef shortint (*J_fp)(void);
-typedef integer (*I_fp)(void);
-typedef real (*R_fp)(void);
-typedef doublereal (*D_fp)(void), (*E_fp)(void);
-typedef /* Complex */ VOID (*C_fp)(void);
-typedef /* Double Complex */ VOID (*Z_fp)(void);
-typedef logical (*L_fp)(void);
-typedef shortlogical (*K_fp)(void);
-typedef /* Character */ VOID (*H_fp)(void);
-typedef /* Subroutine */ int (*S_fp)(void);
-#endif
-/* E_fp is for real functions when -R is not specified */
-typedef VOID C_f;	/* complex function */
-typedef VOID H_f;	/* character function */
-typedef VOID Z_f;	/* double complex function */
-typedef doublereal E_f;	/* real function with -R not specified */
-
-/* undef any lower-case symbols that your C compiler predefines, e.g.: */
-
-#ifndef Skip_f2c_Undefs
-#undef cray
-#undef gcos
-#undef mc68010
-#undef mc68020
-#undef mips
-#undef pdp11
-#undef sgi
-#undef sparc
-#undef sun
-#undef sun2
-#undef sun3
-#undef sun4
-#undef u370
-#undef u3b
-#undef u3b2
-#undef u3b5
-#undef unix
-#undef vax
-#endif
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/fe.h
+++ /dev/null
@@ -1,617 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1996-2004 Carnegie Mellon University.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-/*
- * fe.h
- * 
- * $Log: fe.h,v $
- * Revision 1.11  2005/02/05 02:15:02  egouvea
- * Removed fe_process(), never used
- *
- * Revision 1.10  2004/12/10 16:48:55  rkm
- * Added continuous density acoustic model handling
- *
- *
- */
-
-#if defined(_WIN32) && !defined(GNUWINCE)
-#define srand48(x) srand(x)
-#define lrand48() rand()
-#endif
-
-#ifndef _NEW_FE_H_
-#define _NEW_FE_H_
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-
-#include <sphinxbase/cmd_ln.h>
-#include <sphinxbase/fixpoint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-#ifdef WORDS_BIGENDIAN
-#define NATIVE_ENDIAN "big"
-#else
-#define NATIVE_ENDIAN "little"
-#endif
-
-/** Default number of samples per second. */
-#define DEFAULT_SAMPLING_RATE 16000
-/** Default number of frames per second. */
-#define DEFAULT_FRAME_RATE 100
-/** Default spacing between frame starts (equal to
- * DEFAULT_SAMPLING_RATE/DEFAULT_FRAME_RATE) */
-#define DEFAULT_FRAME_SHIFT 160
-/** Default size of each frame (410 samples @ 16000Hz). */
-#define DEFAULT_WINDOW_LENGTH 0.025625 
-/** Default number of FFT points. */
-#define DEFAULT_FFT_SIZE 512
-/** Default number of MFCC coefficients in output. */
-#define DEFAULT_NUM_CEPSTRA 13
-/** Default number of filter bands used to generate MFCCs. */
-#define DEFAULT_NUM_FILTERS 40
-/** Default prespeech state length */
-#define DEFAULT_PRESPCH_STATE_LEN 10
-/** Default postspeech state length */
-#define DEFAULT_POSTSPCH_STATE_LEN 50
-/** Default lower edge of mel filter bank. */
-#define DEFAULT_LOWER_FILT_FREQ 133.33334
-/** Default upper edge of mel filter bank. */
-#define DEFAULT_UPPER_FILT_FREQ 6855.4976
-/** Default pre-emphasis filter coefficient. */
-#define DEFAULT_PRE_EMPHASIS_ALPHA 0.97
-/** Default type of frequency warping to use for VTLN. */
-#define DEFAULT_WARP_TYPE "inverse_linear"
-/** Default random number seed to use for dithering. */
-#define SEED  -1
-
-#define waveform_to_cepstral_command_line_macro() \
-  { "-logspec", \
-    ARG_BOOLEAN, \
-    "no", \
-    "Write out logspectral files instead of cepstra" }, \
-   \
-  { "-smoothspec", \
-    ARG_BOOLEAN, \
-    "no", \
-    "Write out cepstral-smoothed logspectral files" }, \
-   \
-  { "-transform", \
-    ARG_STRING, \
-    "legacy", \
-    "Which type of transform to use to calculate cepstra (legacy, dct, or htk)" }, \
-   \
-  { "-alpha", \
-    ARG_FLOAT32, \
-    ARG_STRINGIFY(DEFAULT_PRE_EMPHASIS_ALPHA), \
-    "Preemphasis parameter" }, \
-   \
-  { "-samprate", \
-    ARG_FLOAT32, \
-    ARG_STRINGIFY(DEFAULT_SAMPLING_RATE), \
-    "Sampling rate" }, \
-   \
-  { "-frate", \
-    ARG_INT32, \
-    ARG_STRINGIFY(DEFAULT_FRAME_RATE), \
-    "Frame rate" }, \
-   \
-  { "-wlen", \
-    ARG_FLOAT32, \
-    ARG_STRINGIFY(DEFAULT_WINDOW_LENGTH), \
-    "Hamming window length" }, \
-   \
-  { "-nfft", \
-    ARG_INT32, \
-    ARG_STRINGIFY(DEFAULT_FFT_SIZE), \
-    "Size of FFT" }, \
-   \
-  { "-nfilt", \
-    ARG_INT32, \
-    ARG_STRINGIFY(DEFAULT_NUM_FILTERS), \
-    "Number of filter banks" }, \
-   \
-  { "-lowerf", \
-    ARG_FLOAT32, \
-    ARG_STRINGIFY(DEFAULT_LOWER_FILT_FREQ), \
-    "Lower edge of filters" }, \
-   \
-  { "-upperf", \
-    ARG_FLOAT32, \
-    ARG_STRINGIFY(DEFAULT_UPPER_FILT_FREQ), \
-    "Upper edge of filters" }, \
-   \
-  { "-unit_area", \
-    ARG_BOOLEAN, \
-    "yes", \
-    "Normalize mel filters to unit area" }, \
-   \
-  { "-round_filters", \
-    ARG_BOOLEAN, \
-    "yes", \
-    "Round mel filter frequencies to DFT points" }, \
-   \
-  { "-ncep", \
-    ARG_INT32, \
-    ARG_STRINGIFY(DEFAULT_NUM_CEPSTRA), \
-    "Number of cep coefficients" }, \
-   \
-  { "-doublebw", \
-    ARG_BOOLEAN, \
-    "no", \
-    "Use double bandwidth filters (same center freq)" }, \
-   \
-  { "-lifter", \
-    ARG_INT32, \
-    "0", \
-    "Length of sin-curve for liftering, or 0 for no liftering." }, \
-   \
-  { "-vad_prespeech", \
-    ARG_INT32, \
-    ARG_STRINGIFY(DEFAULT_PRESPCH_STATE_LEN), \
-    "Num of speech frames to trigger vad from silence to speech." }, \
-   \
-  { "-vad_postspeech", \
-    ARG_INT32, \
-    ARG_STRINGIFY(DEFAULT_POSTSPCH_STATE_LEN), \
-    "Num of silence frames to trigger vad from speech to silence." }, \
-   \
-  { "-vad_threshold", \
-    ARG_FLOAT32, \
-    "2.0", \
-    "Threshold for decision between noise and silence frames. Log-ratio between signal level and noise level." }, \
-   \
-  { "-input_endian", \
-    ARG_STRING, \
-    NATIVE_ENDIAN, \
-    "Endianness of input data, big or little, ignored if NIST or MS Wav" }, \
-   \
-  { "-warp_type", \
-    ARG_STRING, \
-    DEFAULT_WARP_TYPE, \
-    "Warping function type (or shape)" }, \
-   \
-  { "-warp_params", \
-    ARG_STRING, \
-    NULL, \
-    "Parameters defining the warping function" }, \
-   \
-  { "-dither", \
-    ARG_BOOLEAN, \
-    "no", \
-    "Add 1/2-bit noise" }, \
-   \
-  { "-seed", \
-    ARG_INT32, \
-    ARG_STRINGIFY(SEED), \
-    "Seed for random number generator; if less than zero, pick our own" }, \
-   \
-  { "-remove_dc", \
-    ARG_BOOLEAN, \
-    "no", \
-    "Remove DC offset from each frame" }, \
-                                          \
-  { "-remove_noise", \
-    ARG_BOOLEAN, \
-    "yes", \
-    "Remove noise with spectral subtraction in mel-energies" }, \
-                                                                \
-  { "-remove_silence", \
-    ARG_BOOLEAN, \
-    "yes", \
-    "Enables VAD, removes silence frames from processing" }, \
-                                                             \
-  { "-verbose", \
-    ARG_BOOLEAN, \
-    "no", \
-    "Show input filenames" } \
-  
-  
-#ifdef FIXED_POINT
-/** MFCC computation type. */
-typedef fixed32 mfcc_t;
-
-/** Convert a floating-point value to mfcc_t. */
-#define FLOAT2MFCC(x) FLOAT2FIX(x)
-/** Convert a mfcc_t value to floating-point. */
-#define MFCC2FLOAT(x) FIX2FLOAT(x)
-/** Multiply two mfcc_t values. */
-#define MFCCMUL(a,b) FIXMUL(a,b)
-#define MFCCLN(x,in,out) FIXLN_ANY(x,in,out)
-#else /* !FIXED_POINT */
-
-/** MFCC computation type. */
-typedef float32 mfcc_t;
-/** Convert a floating-point value to mfcc_t. */
-#define FLOAT2MFCC(x) (x)
-/** Convert a mfcc_t value to floating-point. */
-#define MFCC2FLOAT(x) (x)
-/** Multiply two mfcc_t values. */
-#define MFCCMUL(a,b) ((a)*(b))
-#define MFCCLN(x,in,out) log(x)
-#endif /* !FIXED_POINT */
-
-/**
- * Structure for the front-end computation.
- */
-typedef struct fe_s fe_t;
-
-/**
- * Error codes returned by stuff.
- */
-enum fe_error_e {
-	FE_SUCCESS = 0,
-	FE_OUTPUT_FILE_SUCCESS  = 0,
-	FE_CONTROL_FILE_ERROR = -1,
-	FE_START_ERROR = -2,
-	FE_UNKNOWN_SINGLE_OR_BATCH = -3,
-	FE_INPUT_FILE_OPEN_ERROR = -4,
-	FE_INPUT_FILE_READ_ERROR = -5,
-	FE_MEM_ALLOC_ERROR = -6,
-	FE_OUTPUT_FILE_WRITE_ERROR = -7,
-	FE_OUTPUT_FILE_OPEN_ERROR = -8,
-	FE_ZERO_ENERGY_ERROR = -9,
-	FE_INVALID_PARAM_ERROR =  -10
-};
-
-/**
- * Initialize a front-end object from global command-line.
- *
- * This is equivalent to calling fe_init_auto_r(cmd_ln_get()).
- *
- * @return Newly created front-end object.
- */
-SPHINXBASE_EXPORT
-fe_t* fe_init_auto(void);
-
-/**
- * Get the default set of arguments for fe_init_auto_r().
- *
- * @return Pointer to an argument structure which can be passed to
- * cmd_ln_init() in friends to create argument structures for
- * fe_init_auto_r().
- */
-SPHINXBASE_EXPORT
-arg_t const *fe_get_args(void);
-
-/**
- * Initialize a front-end object from a command-line parse.
- *
- * @param config Command-line object, as returned by cmd_ln_parse_r()
- *               or cmd_ln_parse_file().  Ownership of this object is
- *               claimed by the fe_t, so you must not attempt to free
- *               it manually.  Use cmd_ln_retain() if you wish to
- *               reuse it.
- * @return Newly created front-end object.
- */
-SPHINXBASE_EXPORT
-fe_t *fe_init_auto_r(cmd_ln_t *config);
-
-/**
- * Retrieve the command-line object used to initialize this front-end.
- *
- * @return command-line object for this front-end.  This pointer is
- *         retained by the fe_t, so you should not attempt to free it
- *         manually.
- */
-SPHINXBASE_EXPORT
-const cmd_ln_t *fe_get_config(fe_t *fe);
-
-/**
- * Start processing of the stream, resets processed frame counter
- */
-SPHINXBASE_EXPORT
-void fe_start_stream(fe_t *fe);
-
-/**
- * Start processing an utterance.
- * @return 0 for success, <0 for error (see enum fe_error_e)
- */
-SPHINXBASE_EXPORT
-int fe_start_utt(fe_t *fe);
-
-/**
- * Get the dimensionality of the output of this front-end object.
- *
- * This is guaranteed to be the number of values in one frame of
- * output from fe_end_utt() and fe_process_frames().  
- * It is usually the number of MFCC
- * coefficients, but it might be the number of log-spectrum bins, if
- * the <tt>-logspec</tt> or <tt>-smoothspec</tt> options to
- * fe_init_auto() were true.
- *
- * @return Dimensionality of front-end output.
- */
-SPHINXBASE_EXPORT
-int fe_get_output_size(fe_t *fe);
-
-/**
- * Get the dimensionality of the input to this front-end object.
- *
- * This function retrieves the number of input samples consumed by one
- * frame of processing.  To obtain one frame of output, you must have
- * at least <code>*out_frame_size</code> samples.  To obtain <i>N</i>
- * frames of output, you must have at least <code>(N-1) *
- * *out_frame_shift + *out_frame_size</code> input samples.
- *
- * @param out_frame_shift Output: Number of samples between each frame start.
- * @param out_frame_size Output: Number of samples in each frame.
- */
-SPHINXBASE_EXPORT
-void fe_get_input_size(fe_t *fe, int *out_frame_shift,
-                       int *out_frame_size);
-
-/**
- * Get vad state for the last processed frame
- *
- * @return 1 if speech, 0 if silence
- */
-SPHINXBASE_EXPORT
-uint8 fe_get_vad_state(fe_t *fe);
-
-/**
- * Finish processing an utterance.
- *
- * This function also collects any remaining samples and calculates a
- * final cepstral vector.  If there are overflow samples remaining, it
- * will pad with zeros to make a complete frame.
- *
- * @param fe Front-end object.
- * @param out_cepvector Buffer to hold a residual cepstral vector, or NULL
- *                      if you wish to ignore it.  Must be large enough
- * @param out_nframes Number of frames of residual cepstra created
- *                    (either 0 or 1).
- * @return 0 for success, <0 for error (see enum fe_error_e)
- */
-SPHINXBASE_EXPORT
-int fe_end_utt(fe_t *fe, mfcc_t *out_cepvector, int32 *out_nframes);
-
-/**
- * Retain ownership of a front end object.
- *
- * @return pointer to the retained front end.
- */
-SPHINXBASE_EXPORT
-fe_t *fe_retain(fe_t *fe);
-
-/**
- * Free the front end. 
- *
- * Releases resources associated with the front-end object.
- *
- * @return new reference count (0 if freed completely)
- */
-SPHINXBASE_EXPORT
-int fe_free(fe_t *fe);
-
-/*
- * Do same as fe_process_frames, but also returns
- * voiced audio. Output audio is valid till next
- * fe_process_frames call.
- *
- * DO NOT MIX fe_process_frames calls
- *
- * @param voiced_spch Output: obtain voiced audio samples here
- *
- * @param voiced_spch_nsamps Output: shows voiced_spch length
- *
- * @param out_frameidx Output: index of the utterance start
- */
-SPHINXBASE_EXPORT
-int fe_process_frames_ext(fe_t *fe,
-                      int16 const **inout_spch,
-                      size_t *inout_nsamps,
-                      mfcc_t **buf_cep,
-                      int32 *inout_nframes,
-                      int16 **voiced_spch,
-                      int32 *voiced_spch_nsamps,
-                      int32 *out_frameidx);
-
-/** 
- * Process a block of samples.
- *
- * This function generates up to <code>*inout_nframes</code> of
- * features, or as many as can be generated from
- * <code>*inout_nsamps</code> samples.
- *
- * On exit, the <code>inout_spch</code>, <code>inout_nsamps</code>,
- * and <code>inout_nframes</code> parameters are updated to point to
- * the remaining sample data, the number of remaining samples, and the
- * number of frames processed, respectively.  This allows you to call
- * this repeatedly to process a large block of audio in small (say,
- * 5-frame) chunks:
- *
- *  int16 *bigbuf, *p;
- *  mfcc_t **cepstra;
- *  int32 nsamps;
- *  int32 nframes = 5;
- *
- *  cepstra = (mfcc_t **)
- *      ckd_calloc_2d(nframes, fe_get_output_size(fe), sizeof(**cepstra));
- *  p = bigbuf;
- *  while (nsamps) {
- *      nframes = 5;
- *      fe_process_frames(fe, &p, &nsamps, cepstra, &nframes);
- *      // Now do something with these frames...
- *      if (nframes)
- *          do_some_stuff(cepstra, nframes);
- *  }
- *
- * @param inout_spch Input: Pointer to pointer to speech samples
- *                   (signed 16-bit linear PCM).
- *                   Output: Pointer to remaining samples.
- * @param inout_nsamps Input: Pointer to maximum number of samples to
- *                     process.
- *                     Output: Number of samples remaining in input buffer.
- * @param buf_cep Two-dimensional buffer (allocated with
- *                ckd_calloc_2d()) which will receive frames of output
- *                data.  If NULL, no actual processing will be done,
- *                and the maximum number of output frames which would
- *                be generated is returned in
- *                <code>*inout_nframes</code>.
- * @param inout_nframes Input: Pointer to maximum number of frames to
- *                      generate.
- *                      Output: Number of frames actually generated.
- * @param out_frameidx Index of the first frame returned in a stream
- *
- * @return 0 for success, <0 for failure (see enum fe_error_e)
- */
-SPHINXBASE_EXPORT
-int fe_process_frames(fe_t *fe,
-                      int16 const **inout_spch,
-                      size_t *inout_nsamps,
-                      mfcc_t **buf_cep,
-                      int32 *inout_nframes,
-                      int32 *out_frameidx);
-
-/** 
- * Process a block of samples, returning as many frames as possible.
- *
- * This function processes all the samples in a block of data and
- * returns a newly allocated block of feature vectors.  This block
- * needs to be freed with fe_free_2d() after use.
- *
- * It is possible for there to be some left-over data which could not
- * fit in a complete frame.  This data can be processed with
- * fe_end_utt().
- *
- * This function is deprecated in favor of fe_process_frames().
- *
- * @return 0 for success, <0 for failure (see enum fe_error_e)
- */
-SPHINXBASE_EXPORT
-int fe_process_utt(fe_t *fe,  /**< A front end object */
-                   int16 const *spch, /**< The speech samples */
-                   size_t nsamps, /**< number of samples*/
-                   mfcc_t ***cep_block, /**< Output pointer to cepstra */
-                   int32 *nframes /**< Number of frames processed */
-	);
-
-/**
- * Free the output pointer returned by fe_process_utt().
- **/
-SPHINXBASE_EXPORT
-void fe_free_2d(void *arr);
-
-/**
- * Convert a block of mfcc_t to float32 (can be done in-place)
- **/
-SPHINXBASE_EXPORT
-int fe_mfcc_to_float(fe_t *fe,
-                     mfcc_t **input,
-                     float32 **output,
-                     int32 nframes);
-
-/**
- * Convert a block of float32 to mfcc_t (can be done in-place)
- **/
-SPHINXBASE_EXPORT
-int fe_float_to_mfcc(fe_t *fe,
-                     float32 **input,
-                     mfcc_t **output,
-                     int32 nframes);
-
-/**
- * Process one frame of log spectra into MFCC using discrete cosine
- * transform.
- *
- * This uses a variant of the DCT-II where the first frequency bin is
- * scaled by 0.5.  Unless somebody misunderstood the DCT-III equations
- * and thought that's what they were implementing here, this is
- * ostensibly done to account for the symmetry properties of the
- * DCT-II versus the DFT - the first coefficient of the input is
- * assumed to be repeated in the negative frequencies, which is not
- * the case for the DFT.  (This begs the question, why not just use
- * the DCT-I, since it has the appropriate symmetry properties...)
- * Moreover, this is bogus since the mel-frequency bins on which we
- * are doing the DCT don't extend to the edge of the DFT anyway.
- *
- * This also means that the matrix used in computing this DCT can not
- * be made orthogonal, and thus inverting the transform is difficult.
- * Therefore if you want to do cepstral smoothing or have some other
- * reason to invert your MFCCs, use fe_logspec_dct2() and its inverse
- * fe_logspec_dct3() instead.
- *
- * Also, it normalizes by 1/nfilt rather than 2/nfilt, for some reason.
- **/
-SPHINXBASE_EXPORT
-int fe_logspec_to_mfcc(fe_t *fe,  /**< A fe structure */
-                       const mfcc_t *fr_spec, /**< One frame of spectrum */
-                       mfcc_t *fr_cep /**< One frame of cepstrum */
-        );
-
-/**
- * Convert log spectra to MFCC using DCT-II.
- *
- * This uses the "unitary" form of the DCT-II, i.e. with a scaling
- * factor of sqrt(2/N) and a "beta" factor of sqrt(1/2) applied to the
- * cos(0) basis vector (i.e. the one corresponding to the DC
- * coefficient in the output).
- **/
-SPHINXBASE_EXPORT
-int fe_logspec_dct2(fe_t *fe,  /**< A fe structure */
-                    const mfcc_t *fr_spec, /**< One frame of spectrum */
-                    mfcc_t *fr_cep /**< One frame of cepstrum */
-        );
-
-/**
- * Convert MFCC to log spectra using DCT-III.
- *
- * This uses the "unitary" form of the DCT-III, i.e. with a scaling
- * factor of sqrt(2/N) and a "beta" factor of sqrt(1/2) applied to the
- * cos(0) basis vector (i.e. the one corresponding to the DC
- * coefficient in the input).
- **/
-SPHINXBASE_EXPORT
-int fe_mfcc_dct3(fe_t *fe,  /**< A fe structure */
-                 const mfcc_t *fr_cep, /**< One frame of cepstrum */
-                 mfcc_t *fr_spec /**< One frame of spectrum */
-        );
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/feat.h
+++ /dev/null
@@ -1,469 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * feat.h -- Cepstral features computation.
- */
-
-#ifndef _S3_FEAT_H_
-#define _S3_FEAT_H_
-
-#include <stdio.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-#include <sphinxbase/fe.h>
-#include <sphinxbase/cmn.h>
-#include <sphinxbase/agc.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/** \file feat.h
- * \brief compute the dynamic coefficients from the cepstral vector. 
- */
-#define LIVEBUFBLOCKSIZE        256    /** Blocks of 256 vectors allocated 
-					   for livemode decoder */
-#define S3_MAX_FRAMES		15000    /* RAH, I believe this is still too large, but better than before */
-
-#define cepstral_to_feature_command_line_macro()                        \
-{ "-feat",                                                              \
-      ARG_STRING,                                                       \
-      "1s_c_d_dd",                                                      \
-      "Feature stream type, depends on the acoustic model" },           \
-{ "-ceplen",                                                            \
-      ARG_INT32,                                                        \
-      "13",                                                             \
-     "Number of components in the input feature vector" },              \
-{ "-cmn",                                                               \
-      ARG_STRING,                                                       \
-      "current",                                                        \
-      "Cepstral mean normalization scheme ('current', 'prior', or 'none')" }, \
-{ "-cmninit",                                                           \
-      ARG_STRING,                                                       \
-      "8.0",                                                            \
-      "Initial values (comma-separated) for cepstral mean when 'prior' is used" }, \
-{ "-varnorm",                                                           \
-      ARG_BOOLEAN,                                                      \
-      "no",                                                             \
-      "Variance normalize each utterance (only if CMN == current)" },   \
-{ "-agc",                                                               \
-      ARG_STRING,                                                       \
-      "none",                                                           \
-      "Automatic gain control for c0 ('max', 'emax', 'noise', or 'none')" }, \
-{ "-agcthresh",                                                         \
-      ARG_FLOAT32,                                                      \
-      "2.0",                                                            \
-      "Initial threshold for automatic gain control" },                 \
-{ "-lda",                                                               \
-      ARG_STRING,                                                       \
-      NULL,                                                             \
-      "File containing transformation matrix to be applied to features (single-stream features only)" }, \
-{ "-ldadim",                                                            \
-      ARG_INT32,                                                        \
-      "0",                                                              \
-      "Dimensionality of output of feature transformation (0 to use entire matrix)" }, \
-{"-svspec",                                                             \
-     ARG_STRING,                                                        \
-     NULL,                                                           \
-     "Subvector specification (e.g., 24,0-11/25,12-23/26-38 or 0-12/13-25/26-38)"}
-
-/**
- * \struct feat_t
- * \brief Structure for describing a speech feature type
- * Structure for describing a speech feature type (no. of streams and stream widths),
- * as well as the computation for converting the input speech (e.g., Sphinx-II format
- * MFC cepstra) into this type of feature vectors.
- */
-typedef struct feat_s {
-    int refcount;       /**< Reference count. */
-    char *name;		/**< Printable name for this feature type */
-    int32 cepsize;	/**< Size of input speech vector (typically, a cepstrum vector) */
-    int32 n_stream;	/**< Number of feature streams; e.g., 4 in Sphinx-II */
-    uint32 *stream_len;	/**< Vector length of each feature stream */
-    int32 window_size;	/**< Number of extra frames around given input frame needed to compute
-                           corresponding output feature (so total = window_size*2 + 1) */
-    int32 n_sv;         /**< Number of subvectors */
-    uint32 *sv_len;      /**< Vector length of each subvector */
-    int32 **subvecs;    /**< Subvector specification (or NULL for none) */
-    mfcc_t *sv_buf;      /**< Temporary copy buffer for subvector projection */
-    int32 sv_dim;       /**< Total dimensionality of subvector (length of sv_buf) */
-
-    cmn_type_t cmn;	/**< Type of CMN to be performed on each utterance */
-    int32 varnorm;	/**< Whether variance normalization is to be performed on each utt;
-                           Irrelevant if no CMN is performed */
-    agc_type_t agc;	/**< Type of AGC to be performed on each utterance */
-
-    /**
-     * Feature computation function. 
-     * @param fcb the feat_t describing this feature type
-     * @param input pointer into the input cepstra
-     * @param feat a 2-d array of output features (n_stream x stream_len)
-     * @return 0 if successful, -ve otherwise.
-     *
-     * Function for converting window of input speech vector
-     * (input[-window_size..window_size]) to output feature vector
-     * (feat[stream][]).  If NULL, no conversion available, the
-     * speech input must be feature vector itself.
-     **/
-    void (*compute_feat)(struct feat_s *fcb, mfcc_t **input, mfcc_t **feat);
-    cmn_t *cmn_struct;	/**< Structure that stores the temporary variables for cepstral 
-                           means normalization*/
-    agc_t *agc_struct;	/**< Structure that stores the temporary variables for acoustic
-                           gain control*/
-
-    mfcc_t **cepbuf;    /**< Circular buffer of MFCC frames for live feature computation. */
-    mfcc_t **tmpcepbuf; /**< Array of pointers into cepbuf to handle border cases. */
-    int32   bufpos;     /**< Write index in cepbuf. */
-    int32   curpos;     /**< Read index in cepbuf. */
-
-    mfcc_t ***lda; /**< Array of linear transformations (for LDA, MLLT, or whatever) */
-    uint32 n_lda;   /**< Number of linear transformations in lda. */
-    uint32 out_dim; /**< Output dimensionality */
-} feat_t;
-
-/**
- * Name of feature type.
- */
-#define feat_name(f)		((f)->name)
-/**
- * Input dimensionality of feature.
- */
-#define feat_cepsize(f)		((f)->cepsize)
-/**
- * Size of dynamic feature window.
- */
-#define feat_window_size(f)	((f)->window_size)
-/**
- * Number of feature streams.
- *
- * @deprecated Do not use this, use feat_dimension1() instead.
- */
-#define feat_n_stream(f)	((f)->n_stream)
-/**
- * Length of feature stream i.
- *
- * @deprecated Do not use this, use feat_dimension2() instead.
- */
-#define feat_stream_len(f,i)	((f)->stream_len[i])
-/**
- * Number of streams or subvectors in feature output.
- */
-#define feat_dimension1(f)	((f)->n_sv ? (f)->n_sv : f->n_stream)
-/**
- * Dimensionality of stream/subvector i in feature output.
- */
-#define feat_dimension2(f,i)	((f)->lda ? (f)->out_dim : ((f)->sv_len ? (f)->sv_len[i] : f->stream_len[i]))
-/**
- * Total dimensionality of feature output.
- */
-#define feat_dimension(f)	((f)->out_dim)
-/**
- * Array with stream/subvector lengths
- */
-#define feat_stream_lengths(f)  ((f)->lda ? (&(f)->out_dim) : (f)->sv_len ? (f)->sv_len : f->stream_len)
-
-/**
- * Parse subvector specification string.
- *
- * Format of specification:
- *   \li '/' separated list of subvectors
- *   \li each subvector is a ',' separated list of subranges
- *   \li each subrange is a single \verbatim <number> \endverbatim or
- *       \verbatim <number>-<number> \endverbatim (inclusive), where
- *       \verbatim <number> \endverbatim is a feature vector dimension
- *       specifier.
- *
- * E.g., "24,0-11/25,12-23/26,27-38" has:
- *   \li 3 subvectors
- *   \li the 1st subvector has feature dims: 24, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, and 11.
- *   \li etc.
- *
- * @param str subvector specification string.
- * @return allocated 2-D array of subvector specs (free with
- * subvecs_free()).  If there are N subvectors specified, subvec[N] =
- * NULL; and each subvec[0]..subvec[N-1] is -1 terminated vector of
- * feature dims.
- */
-SPHINXBASE_EXPORT
-int32 **parse_subvecs(char const *str);
-
-/**
- * Free array of subvector specs.
- */
-SPHINXBASE_EXPORT
-void subvecs_free(int32 **subvecs);
-
-
-/**
- * Allocate an array to hold several frames worth of feature vectors.  The returned value
- * is the mfcc_t ***data array, organized as follows:
- *
- * - data[0][0] = frame 0 stream 0 vector, data[0][1] = frame 0 stream 1 vector, ...
- * - data[1][0] = frame 1 stream 0 vector, data[0][1] = frame 1 stream 1 vector, ...
- * - data[2][0] = frame 2 stream 0 vector, data[0][1] = frame 2 stream 1 vector, ...
- * - ...
- *
- * NOTE: For I/O convenience, the entire data area is allocated as one contiguous block.
- * @return pointer to the allocated space if successful, NULL if any error.
- */
-SPHINXBASE_EXPORT
-mfcc_t ***feat_array_alloc(feat_t *fcb,	/**< In: Descriptor from feat_init(), used
-					     to obtain number of streams and stream sizes */
-                           int32 nfr	/**< In: Number of frames for which to allocate */
-    );
-
-/**
- * Realloate the array of features. Requires us to know the old size
- */
-SPHINXBASE_EXPORT
-mfcc_t ***feat_array_realloc(feat_t *fcb, /**< In: Descriptor from feat_init(), used
-					      to obtain number of streams and stream sizes */
-			     mfcc_t ***old_feat, /**< Feature array. Freed */
-                             int32 ofr,	/**< In: Previous number of frames */
-                             int32 nfr	/**< In: Number of frames for which to allocate */
-    );
-
-/**
- * Free a buffer allocated with feat_array_alloc()
- */
-SPHINXBASE_EXPORT
-void feat_array_free(mfcc_t ***feat);
-
-
-/**
- * Initialize feature module to use the selected type of feature stream.  
- * One-time only initialization at the beginning of the program.  Input type 
- * is a string defining the  kind of input->feature conversion desired:
- *
- * - "s2_4x":     s2mfc->Sphinx-II 4-feature stream,
- * - "1s_c_d_dd": s2mfc->Sphinx 3.x single feature stream,
- * - "s3_1x39":   s2mfc->Sphinx 3.0 single feature stream,
- * - "n1,n2,n3,...": Explicit feature vector layout spec. with comma-separated 
- *   feature stream lengths.  In this case, the input data is already in the 
- *   feature format and there is no conversion necessary.
- *
- * @return (feat_t *) descriptor if successful, NULL if error.  Caller 
- * must not directly modify the contents of the returned value.
- */
-SPHINXBASE_EXPORT
-feat_t *feat_init(char const *type,/**< In: Type of feature stream */
-                  cmn_type_t cmn, /**< In: Type of cepstram mean normalization to 
-                                     be done before feature computation; can be 
-                                     CMN_NONE (for none) */
-                  int32 varnorm,  /**< In: (boolean) Whether variance 
-                                     normalization done on each utt; only 
-                                     applicable if CMN also done */
-                  agc_type_t agc, /**< In: Type of automatic gain control to be 
-                                     done before feature computation */
-                  int32 breport, /**< In: Whether to show a report for feat_t */
-                  int32 cepsize  /**< Number of components in the input vector
-                                    (or 0 for the default for this feature type,
-                                    which is usually 13) */
-    );
-
-/**
- * Add an LDA transformation to the feature module from a file.
- * @return 0 for success or -1 if reading the LDA file failed.
- **/
-SPHINXBASE_EXPORT
-int32 feat_read_lda(feat_t *feat,	 /**< In: Descriptor from feat_init() */
-                    const char *ldafile, /**< In: File to read the LDA matrix from. */
-                    int32 dim		 /**< In: Dimensionality of LDA output. */
-    );
-
-/**
- * Transform a block of features using the feature module's LDA transform.
- **/
-SPHINXBASE_EXPORT
-void feat_lda_transform(feat_t *fcb,		/**< In: Descriptor from feat_init() */
-                        mfcc_t ***inout_feat,	/**< Feature block to transform. */
-                        uint32 nfr		/**< In: Number of frames in inout_feat. */
-    );
-
-/**
- * Add a subvector specification to the feature module.
- *
- * The subvector splitting will be performed after dynamic feature
- * computation, CMN, AGC, and any LDA transformation.  The number of
- * streams in the dynamic feature type must be one, as with LDA.
- *
- * After adding a subvector specification, the output of feature
- * computation will be split into multiple subvectors, and
- * feat_array_alloc() will allocate pointers accordingly.  The number
- * of <em>streams</em> will remain the 
- *
- * @param fcb the feature descriptor.
- * @param subvecs subvector specification.  This pointer is retained
- * by the feat_t and should not be freed manually.
- * @return 0 for success or -1 if the subvector specification was
- * invalid.
- */
-SPHINXBASE_EXPORT
-int feat_set_subvecs(feat_t *fcb, int32 **subvecs);
-
-/**
- * Print the given block of feature vectors to the given FILE.
- */
-SPHINXBASE_EXPORT
-void feat_print(feat_t *fcb,		/**< In: Descriptor from feat_init() */
-		mfcc_t ***feat,		/**< In: Feature data to be printed */
-		int32 nfr,		/**< In: Number of frames of feature data above */
-		FILE *fp		/**< In: Output file pointer */
-    );
-
-  
-/**
- * Read a specified MFC file (or given segment within it), perform
- * CMN/AGC as indicated by <code>fcb</code>, and compute feature
- * vectors.  Feature vectors are computed for the entire segment
- * specified, by including additional surrounding or padding frames to
- * accommodate the feature windows.
- *
- * @return Number of frames of feature vectors computed if successful;
- * -1 if any error.  <code>If</code> feat is NULL, then no actual
- * computation will be done, and the number of frames which must be
- * allocated will be returned.
- * 
- * A note on how the file path is constructed: If the control file
- * already specifies extension or absolute path, then these are not
- * applied. The default extension is defined by the application.
- */
-SPHINXBASE_EXPORT
-int32 feat_s2mfc2feat(feat_t *fcb,	/**< In: Descriptor from feat_init() */
-		      const char *file,	/**< In: File to be read */
-		      const char *dir,	/**< In: Directory prefix for file, 
-					   if needed; can be NULL */
-		      const char *cepext,/**< In: Extension of the
-					   cepstrum file.It cannot be
-					   NULL */
-		      int32 sf, int32 ef,   /* Start/End frames
-                                               within file to be read. Use
-                                               0,-1 to process entire
-                                               file */
-		      mfcc_t ***feat,	/**< Out: Computed feature vectors; 
-					   caller must allocate this space */
-		      int32 maxfr	/**< In: Available space (number of frames) in 
-					   above feat array; it must be 
-					   sufficient to hold the result.
-                                           Pass -1 for no limit. */
-    );
-
-
-/**
- * Feature computation routine for live mode decoder.
- *
- * This function computes features for blocks of incoming data. It
- * retains an internal buffer for computing deltas, which means that
- * the number of output frames will not necessarily equal the number
- * of input frames.
- *
- * <strong>It is very important</strong> to realize that the number of
- * output frames can be <strong>greater than</strong> the number of
- * input frames, specifically when <code>endutt</code> is true.  It is
- * guaranteed to never exceed <code>*inout_ncep +
- * feat_window_size(fcb)</code>.  You <strong>MUST</strong> have
- * allocated at least that many frames in <code>ofeat</code>, or you
- * will experience a buffer overflow.
- *
- * If beginutt and endutt are both true, CMN_CURRENT and AGC_MAX will
- * be done.  Otherwise only CMN_PRIOR and AGC_EMAX will be done.
- *
- * If beginutt is false, endutt is true, and the number of input
- * frames exceeds the input size, then end-of-utterance processing
- * won't actually be done.  This condition can easily be checked,
- * because <code>*inout_ncep</code> will equal the return value on
- * exit, and will also be smaller than the value of
- * <code>*inout_ncep</code> on entry.
- *
- * @return The number of output frames actually computed.
- **/
-SPHINXBASE_EXPORT
-int32 feat_s2mfc2feat_live(feat_t  *fcb,     /**< In: Descriptor from feat_init() */
-                           mfcc_t **uttcep,  /**< In: Incoming cepstral buffer */
-                           int32 *inout_ncep,/**< In: Size of incoming buffer.
-                                                Out: Number of incoming frames consumed. */
-                           int32 beginutt,   /**< In: Begining of utterance flag */
-                           int32 endutt,     /**< In: End of utterance flag */
-                           mfcc_t ***ofeat   /**< In: Output feature buffer.  See
-                                                <strong>VERY IMPORTANT</strong> note
-                                                about the size of this buffer above. */
-    );
-
-
-/**
- * Update the normalization stats, possibly in the end of utterance
- *
- */
-SPHINXBASE_EXPORT
-void feat_update_stats(feat_t *fcb);
-
-
-/**
- * Retain ownership of feat_t.
- *
- * @return pointer to retained feat_t.
- */
-SPHINXBASE_EXPORT
-feat_t *feat_retain(feat_t *f);
-
-/**
- * Release resource associated with feat_t
- *
- * @return new reference count (0 if freed)
- */
-SPHINXBASE_EXPORT
-int feat_free(feat_t *f /**< In: feat_t */
-    );
-
-/**
- * Report the feat_t data structure 
- */
-SPHINXBASE_EXPORT
-void feat_report(feat_t *f /**< In: feat_t */
-    );
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/filename.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * filename.h -- File and path name operations.
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * $Log: filename.h,v $
- * Revision 1.7  2005/06/22 03:01:07  arthchan2003
- * Added  keyword
- *
- * Revision 1.3  2005/03/30 01:22:48  archan
- * Fixed mistakes in last updates. Add
- *
- * 
- * 30-Oct-1997	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University.
- * 		Started.
- */
-
-
-#ifndef _LIBUTIL_FILENAME_H_
-#define _LIBUTIL_FILENAME_H_
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-/**\file filename.h
- *\brief File names related operation
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/**
- * Returns the last part of the path, without modifying anything in memory.
- */
-SPHINXBASE_EXPORT
-const char *path2basename(const char *path);
-
-/**
- * Strip off filename from the given path and copy the directory name into dir
- * Caller must have allocated dir (hint: it's always shorter than path).
- */
-SPHINXBASE_EXPORT
-void path2dirname(const char *path, char *dir);
-
-
-/**
- * Strip off the smallest trailing file-extension suffix and copy
- * the rest into the given root argument.  Caller must have
- * allocated root.
- */
-SPHINXBASE_EXPORT
-void strip_fileext(const char *file, char *root);
-
-/**
- * Test whether a pathname is absolute for the current OS.
- */
-SPHINXBASE_EXPORT
-int path_is_absolute(const char *file);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/fixpoint.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 2005 Carnegie Mellon University.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ==================================================================== */
-
-/* Fixed-point arithmetic macros.
- *
- * Author: David Huggins-Daines <dhuggins@cs.cmu.edu>
- */
-
-#ifndef _FIXPOINT_H_
-#define _FIXPOINT_H_
-
-#include <limits.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-#ifndef DEFAULT_RADIX
-#define DEFAULT_RADIX 12
-#endif
-
-/** Fixed-point computation type. */
-typedef int32 fixed32;
-
-/** Convert floating point to fixed point. */
-#define FLOAT2FIX_ANY(x,radix) \
-	(((x)<0.0) ? \
-	((fixed32)((x)*(float32)(1<<(radix)) - 0.5)) \
-	: ((fixed32)((x)*(float32)(1<<(radix)) + 0.5)))
-#define FLOAT2FIX(x) FLOAT2FIX_ANY(x,DEFAULT_RADIX)
-/** Convert fixed point to floating point. */
-#define FIX2FLOAT_ANY(x,radix) ((float32)(x)/(1<<(radix)))
-#define FIX2FLOAT(x) FIX2FLOAT_ANY(x,DEFAULT_RADIX)
-
-/**
- * Multiply two fixed point numbers with an arbitrary radix point.
- *
- * A veritable multiplicity of implementations exist, starting with
- * the fastest ones...
- */
-
-#if defined(__arm__) && !defined(__thumb__)
-/* 
- * This works on most modern ARMs but *only* in ARM mode (for obvious
- * reasons), so don't use it in Thumb mode (but why are you building
- * signal processing code in Thumb mode?!)
- */
-#define FIXMUL(a,b) FIXMUL_ANY(a,b,DEFAULT_RADIX)
-#define FIXMUL_ANY(a,b,r) ({				\
-      int cl, ch, _a = a, _b = b;			\
-      __asm__ ("smull %0, %1, %2, %3\n"			\
-	   "mov %0, %0, lsr %4\n"			\
-	   "orr %0, %0, %1, lsl %5\n"			\
-	   : "=&r" (cl), "=&r" (ch)			\
-	   : "r" (_a), "r" (_b), "i" (r), "i" (32-(r)));\
-      cl; })
-
-#elif defined(_MSC_VER) || (defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8) 
-/* Standard systems*/
-#define FIXMUL(a,b) FIXMUL_ANY(a,b,DEFAULT_RADIX)
-#define FIXMUL_ANY(a,b,radix) ((fixed32)(((int64)(a)*(b))>>(radix)))
-
-#else
-/* Most general case where 'long long' doesn't exist or is slow. */
-#define FIXMUL(a,b) FIXMUL_ANY(a,b,DEFAULT_RADIX)
-#define FIXMUL_ANY(a,b,radix) ({ \
-	int32 _ah, _bh; \
-	uint32 _al, _bl, _t, c; \
-	_ah = ((int32)(a)) >> 16; \
-	_bh = ((int32)(b)) >> 16; \
-	_al = ((uint32)(a)) & 0xffff; \
-	_bl = ((uint32)(b)) & 0xffff; \
-	_t = _ah * _bl + _al * _bh; \
-	c = (fixed32)(((_al * _bl) >> (radix)) \
-		      + ((_ah * _bh) << (32 - (radix))) \
-		      + ((radix) > 16 ? (_t >> (radix - 16)) : (_t << (16 - radix)))); \
-	c;})
-#endif
-
-/* Various fixed-point logarithmic functions that we need. */
-/** Minimum value representable in log format. */
-#define MIN_FIXLOG -2829416  /* log(1e-300) * (1<<DEFAULT_RADIX) */
-#define MIN_FIXLOG2 -4081985 /* log2(1e-300) * (1<<DEFAULT_RADIX) */
-/** Fixed-point representation of log(2) */
-#define FIXLN_2		((fixed32)(0.693147180559945 * (1<<DEFAULT_RADIX)))
-/** Take natural logarithm of a fixedpoint number. */
-#define FIXLN(x) (fixlog(x) - (FIXLN_2 * DEFAULT_RADIX))
-
-/**
- * Take natural logarithm of an integer, yielding a fixedpoint number
- * with DEFAULT_RADIX as radix point.
- */
-int32 fixlog(uint32 x);
-/**
- * Take base-2 logarithm of an integer, yielding a fixedpoint number
- * with DEFAULT_RADIX as radix point.
- */
-int32 fixlog2(uint32 x);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _FIXPOINT_H_ */
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/fsg_model.h
+++ /dev/null
@@ -1,364 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-/*
- * fsg_model.h -- Word-level finite state graph
- * 
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 2003 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- */
-
-
-#ifndef __FSG_MODEL_H__
-#define __FSG_MODEL_H__
-
-/* System headers. */
-#include <stdio.h>
-#include <string.h>
-
-/* SphinxBase headers. */
-#include <sphinxbase/prim_type.h>
-#include <sphinxbase/glist.h>
-#include <sphinxbase/logmath.h>
-#include <sphinxbase/bitvec.h>
-#include <sphinxbase/hash_table.h>
-#include <sphinxbase/listelem_alloc.h>
-#include <sphinxbase/sphinxbase_export.h>
-
-/*
- * A single transition in the FSG.
- */
-typedef struct fsg_link_s {
-    int32 from_state;
-    int32 to_state;
-    int32 logs2prob;	/**< log(transition probability)*lw */
-    int32 wid;		/**< Word-ID; <0 if epsilon or null transition */
-} fsg_link_t;
-
-/* Access macros */
-#define fsg_link_from_state(l)	((l)->from_state)
-#define fsg_link_to_state(l)	((l)->to_state)
-#define fsg_link_wid(l)		((l)->wid)
-#define fsg_link_logs2prob(l)	((l)->logs2prob)
-
-/**
- * Adjacency list (opaque) for a state in an FSG.
- */
-typedef struct trans_list_s trans_list_t;
-
-/**
- * Word level FSG definition.
- * States are simply integers 0..n_state-1.
- * A transition emits a word and has a given probability of being taken.
- * There can also be null or epsilon transitions, with no associated emitted
- * word.
- */
-typedef struct fsg_model_s {
-    int refcount;       /**< Reference count. */
-    char *name;		/**< A unique string identifier for this FSG */
-    int32 n_word;       /**< Number of unique words in this FSG */
-    int32 n_word_alloc; /**< Number of words allocated in vocab */
-    char **vocab;       /**< Vocabulary for this FSG. */
-    bitvec_t *silwords; /**< Indicates which words are silence/fillers. */
-    bitvec_t *altwords; /**< Indicates which words are pronunciation alternates. */
-    logmath_t *lmath;	/**< Pointer to log math computation object. */
-    int32 n_state;	/**< number of states in FSG */
-    int32 start_state;	/**< Must be in the range [0..n_state-1] */
-    int32 final_state;	/**< Must be in the range [0..n_state-1] */
-    float32 lw;		/**< Language weight that's been applied to transition
-			   logprobs */
-    trans_list_t *trans; /**< Transitions out of each state, if any. */
-    listelem_alloc_t *link_alloc; /**< Allocator for FSG links. */
-} fsg_model_t;
-
-/* Access macros */
-#define fsg_model_name(f)		((f)->name)
-#define fsg_model_n_state(f)		((f)->n_state)
-#define fsg_model_start_state(f)	((f)->start_state)
-#define fsg_model_final_state(f)	((f)->final_state)
-#define fsg_model_log(f,p)		logmath_log((f)->lmath, p)
-#define fsg_model_lw(f)			((f)->lw)
-#define fsg_model_n_word(f)		((f)->n_word)
-#define fsg_model_word_str(f,wid)       (wid == -1 ? "(NULL)" : (f)->vocab[wid])
-
-/**
- * Iterator over arcs.
- */
-typedef struct fsg_arciter_s fsg_arciter_t;
-
-/**
- * Have silence transitions been added?
- */
-#define fsg_model_has_sil(f)            ((f)->silwords != NULL)
-
-/**
- * Have alternate word transitions been added?
- */
-#define fsg_model_has_alt(f)            ((f)->altwords != NULL)
-
-#define fsg_model_is_filler(f,wid) \
-    (fsg_model_has_sil(f) ? bitvec_is_set((f)->silwords, wid) : FALSE)
-#define fsg_model_is_alt(f,wid) \
-    (fsg_model_has_alt(f) ? bitvec_is_set((f)->altwords, wid) : FALSE)
-
-/**
- * Create a new FSG.
- */
-SPHINXBASE_EXPORT
-fsg_model_t *fsg_model_init(char const *name, logmath_t *lmath,
-                            float32 lw, int32 n_state);
-
-/**
- * Read a word FSG from the given file and return a pointer to the structure
- * created.  Return NULL if any error occurred.
- * 
- * File format:
- * 
- * <pre>
- *   Any number of comment lines; ignored
- *   FSG_BEGIN [<fsgname>]
- *   N <#states>
- *   S <start-state ID>
- *   F <final-state ID>
- *   T <from-state> <to-state> <prob> [<word-string>]
- *   T ...
- *   ... (any number of state transitions)
- *   FSG_END
- *   Any number of comment lines; ignored
- * </pre>
- * 
- * The FSG spec begins with the line containing the keyword FSG_BEGIN.
- * It has an optional fsg name string.  If not present, the FSG has the empty
- * string as its name.
- * 
- * Following the FSG_BEGIN declaration is the number of states, the start
- * state, and the final state, each on a separate line.  States are numbered
- * in the range [0 .. <numberofstate>-1].
- * 
- * These are followed by all the state transitions, each on a separate line,
- * and terminated by the FSG_END line.  A state transition has the given
- * probability of being taken, and emits the given word.  The word emission
- * is optional; if word-string omitted, it is an epsilon or null transition.
- * 
- * Comments can also be embedded within the FSG body proper (i.e. between
- * FSG_BEGIN and FSG_END): any line with a # character in col 1 is treated
- * as a comment line.
- * 
- * Return value: a new fsg_model_t structure if the file is successfully
- * read, NULL otherwise.
- */
-SPHINXBASE_EXPORT
-fsg_model_t *fsg_model_readfile(const char *file, logmath_t *lmath, float32 lw);
-
-/**
- * Like fsg_model_readfile(), but from an already open stream.
- */
-SPHINXBASE_EXPORT
-fsg_model_t *fsg_model_read(FILE *fp, logmath_t *lmath, float32 lw);
-
-/**
- * Retain ownership of an FSG.
- *
- * @return Pointer to retained FSG.
- */
-SPHINXBASE_EXPORT
-fsg_model_t *fsg_model_retain(fsg_model_t *fsg);
-
-/**
- * Free the given word FSG.
- *
- * @return new reference count (0 if freed completely)
- */
-SPHINXBASE_EXPORT
-int fsg_model_free(fsg_model_t *fsg);
-
-/**
- * Add a word to the FSG vocabulary.
- *
- * @return Word ID for this new word.
- */
-SPHINXBASE_EXPORT
-int fsg_model_word_add(fsg_model_t *fsg, char const *word);
-
-/**
- * Look up a word in the FSG vocabulary.
- *
- * @return Word ID for this word
- */
-SPHINXBASE_EXPORT
-int fsg_model_word_id(fsg_model_t *fsg, char const *word);
-
-/**
- * Add the given transition to the FSG transition matrix.
- *
- * Duplicates (i.e., two transitions between the same states, with the
- * same word label) are flagged and only the highest prob retained.
- */
-SPHINXBASE_EXPORT
-void fsg_model_trans_add(fsg_model_t * fsg,
-                         int32 from, int32 to, int32 logp, int32 wid);
-
-/**
- * Add a null transition between the given states.
- *
- * There can be at most one null transition between the given states;
- * duplicates are flagged and only the best prob retained.  Transition
- * probs must be <= 1 (i.e., logprob <= 0).
- *
- * @return 1 if a new transition was added, 0 if the prob of an existing
- * transition was upgraded; -1 if nothing was changed.
- */
-SPHINXBASE_EXPORT
-int32 fsg_model_null_trans_add(fsg_model_t * fsg, int32 from, int32 to, int32 logp);
-
-/**
- * Add a "tag" transition between the given states.
- *
- * A "tag" transition is a null transition with a non-null word ID,
- * which corresponds to a semantic tag or other symbol to be output
- * when this transition is taken.
- *
- * As above, there can be at most one null or tag transition between
- * the given states; duplicates are flagged and only the best prob
- * retained.  Transition probs must be <= 1 (i.e., logprob <= 0).
- *
- * @return 1 if a new transition was added, 0 if the prob of an existing
- * transition was upgraded; -1 if nothing was changed.
- */
-SPHINXBASE_EXPORT
-int32 fsg_model_tag_trans_add(fsg_model_t * fsg, int32 from, int32 to,
-                              int32 logp, int32 wid);
-
-/**
- * Obtain transitive closure of null transitions in the given FSG.
- *
- * @param nulls List of null transitions, or NULL to find them automatically.
- * @return Updated list of null transitions.
- */
-SPHINXBASE_EXPORT
-glist_t fsg_model_null_trans_closure(fsg_model_t * fsg, glist_t nulls);
-
-/**
- * Get the list of transitions (if any) from state i to j.
- */
-SPHINXBASE_EXPORT
-glist_t fsg_model_trans(fsg_model_t *fsg, int32 i, int32 j);
-
-/**
- * Get an iterator over the outgoing transitions from state i.
- */
-SPHINXBASE_EXPORT
-fsg_arciter_t *fsg_model_arcs(fsg_model_t *fsg, int32 i);
-
-/**
- * Get the current arc from the arc iterator.
- */
-SPHINXBASE_EXPORT
-fsg_link_t *fsg_arciter_get(fsg_arciter_t *itor);
-
-/**
- * Move the arc iterator forward.
- */
-SPHINXBASE_EXPORT
-fsg_arciter_t *fsg_arciter_next(fsg_arciter_t *itor);
-
-/**
- * Free the arc iterator (early termination)
- */
-SPHINXBASE_EXPORT
-void fsg_arciter_free(fsg_arciter_t *itor);
-/**
- * Get the null transition (if any) from state i to j.
- */
-SPHINXBASE_EXPORT
-fsg_link_t *fsg_model_null_trans(fsg_model_t *fsg, int32 i, int32 j);
-
-/**
- * Add silence word transitions to each state in given FSG.
- *
- * @param state state to add a self-loop to, or -1 for all states.
- * @param silprob probability of silence transition.
- */
-SPHINXBASE_EXPORT
-int fsg_model_add_silence(fsg_model_t * fsg, char const *silword,
-                          int state, float32 silprob);
-
-/**
- * Add alternate pronunciation transitions for a word in given FSG.
- */
-SPHINXBASE_EXPORT
-int fsg_model_add_alt(fsg_model_t * fsg, char const *baseword,
-                      char const *altword);
-
-/**
- * Write FSG to a file.
- */
-SPHINXBASE_EXPORT
-void fsg_model_write(fsg_model_t *fsg, FILE *fp);
-
-/**
- * Write FSG to a file.
- */
-SPHINXBASE_EXPORT
-void fsg_model_writefile(fsg_model_t *fsg, char const *file);
-
-/**
- * Write FSG to a file in AT&T FSM format.
- */
-SPHINXBASE_EXPORT
-void fsg_model_write_fsm(fsg_model_t *fsg, FILE *fp);
-
-/**
- * Write FSG to a file in AT&T FSM format.
- */
-SPHINXBASE_EXPORT
-void fsg_model_writefile_fsm(fsg_model_t *fsg, char const *file);
-
-/**
- * Write FSG symbol table to a file (for AT&T FSM)
- */
-SPHINXBASE_EXPORT
-void fsg_model_write_symtab(fsg_model_t *fsg, FILE *file);
-
-/**
- * Write FSG symbol table to a file (for AT&T FSM)
- */
-SPHINXBASE_EXPORT
-void fsg_model_writefile_symtab(fsg_model_t *fsg, char const *file);
-
-#endif /* __FSG_MODEL_H__ */
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/genrand.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* 
-   A C-program for MT19937, with initialization improved 2002/1/26.
-   Coded by Takuji Nishimura and Makoto Matsumoto.
-
-   Before using, initialize the state by using init_genrand(seed)  
-   or init_by_array(init_key, key_length).
-
-   Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
-   All rights reserved.                          
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-     1. Redistributions of source code must retain the above copyright
-        notice, this list of conditions and the following disclaimer.
-
-     2. Redistributions in binary form must reproduce the above copyright
-`        notice, this list of conditions and the following disclaimer in the
-        documentation and/or other materials provided with the distribution.
-
-     3. The names of its contributors may not be used to endorse or promote 
-        products derived from this software without specific prior written 
-        permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-   Any feedback is very welcome.
-   http://www.math.keio.ac.jp/matumoto/emt.html
-   email: matumoto@math.keio.ac.jp
-*/
-
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-/*
- * randgen.c   : a portable random generator 
- * 
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * $Log: genrand.h,v $
- * Revision 1.3  2005/06/22 03:01:50  arthchan2003
- * Added  keyword
- *
- * Revision 1.3  2005/03/30 01:22:48  archan
- * Fixed mistakes in last updates. Add
- *
- * 
- * 18-Nov-04 ARCHAN (archan@cs.cmu.edu) at Carnegie Mellon University
- *              First incorporated from the Mersenne Twister Random
- *              Number Generator package. It was chosen because it is
- *              in BSD-license and its performance is quite
- *              reasonable. Of course if you look at the inventors's
- *              page.  This random generator can actually gives
- *              19937-bits period.  This is already far from we need. 
- *              This will possibly good enough for the next 10 years. 
- *
- *              I also downgrade the code a little bit to avoid Sphinx's
- *              developers misused it. 
- */
-
-#ifndef _LIBUTIL_GENRAND_H_
-#define _LIBUTIL_GENRAND_H_
-
-#define S3_RAND_MAX_INT32 0x7fffffff
-#include <stdio.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-
-/** \file genrand.h
- *\brief High performance prortable random generator created by Takuji
- *Nishimura and Makoto Matsumoto.  
- * 
- * A high performance which applied Mersene twister primes to generate
- * random number. If probably seeded, the random generator can achieve 
- * 19937-bits period.  For technical detail.  Please take a look at 
- * (FIXME! Need to search for the web site.) http://www.
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/**
- * Macros to simplify calling of random generator function.
- *
- */
-#define s3_rand_seed(s) genrand_seed(s);
-#define s3_rand_int31()  genrand_int31()
-#define s3_rand_real() genrand_real3()
-#define s3_rand_res53()  genrand_res53()
-
-/**
- *Initialize the seed of the random generator. 
- */
-SPHINXBASE_EXPORT
-void genrand_seed(unsigned long s);
-
-/**
- *generates a random number on [0,0x7fffffff]-interval 
- */
-SPHINXBASE_EXPORT
-long genrand_int31(void);
-
-/**
- *generates a random number on (0,1)-real-interval 
- */
-SPHINXBASE_EXPORT
-double genrand_real3(void);
-
-/**
- *generates a random number on [0,1) with 53-bit resolution
- */
-SPHINXBASE_EXPORT
-double genrand_res53(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*_LIBUTIL_GENRAND_H_*/
-
-
-
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/glist.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * glist.h -- Module for maintaining a generic, linear linked-list structure.
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * $Log: glist.h,v $
- * Revision 1.9  2005/06/22 03:02:51  arthchan2003
- * 1, Fixed doxygen documentation, 2, add  keyword.
- *
- * Revision 1.4  2005/05/03 04:09:11  archan
- * Implemented the heart of word copy search. For every ci-phone, every word end, a tree will be allocated to preserve its pathscore.  This is different from 3.5 or below, only the best score for a particular ci-phone, regardless of the word-ends will be preserved at every frame.  The graph propagation will not collect unused word tree at this point. srch_WST_propagate_wd_lv2 is also as the most stupid in the century.  But well, after all, everything needs a start.  I will then really get the results from the search and see how it looks.
- *
- * Revision 1.3  2005/03/30 01:22:48  archan
- * Fixed mistakes in last updates. Add
- *
- * 
- * 09-Mar-1999	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Added glist_chkdup_*().
- * 
- * 13-Feb-1999	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Created from earlier version.
- */
-
-
-/**
- * \file glist.h
- * \brief Generic linked-lists maintenance.
- *
- * Only insert at the head of the list.  A convenient little
- * linked-list package, but a double-edged sword: the user must keep
- * track of the data type within the linked list elements.  When it
- * was first written, there was no selective deletions except to
- * destroy the entire list.  This is modified in later version. 
- * 
- * 
- * (C++ would be good for this, but that's a double-edged sword as well.)
- */
-
-
-#ifndef _LIBUTIL_GLIST_H_
-#define _LIBUTIL_GLIST_H_
-
-#include <stdlib.h>
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/** A node in a generic list 
- */
-typedef struct gnode_s {
-	anytype_t data;		/** See prim_type.h */
-	struct gnode_s *next;	/** Next node in list */
-} gnode_t;
-typedef gnode_t *glist_t;	/** Head of a list of gnodes */
-
-
-/** Access macros, for convenience 
- */
-#define gnode_ptr(g)		((g)->data.ptr)
-#define gnode_int32(g)		((g)->data.i)
-#define gnode_uint32(g)		((g)->data.ui)
-#define gnode_float32(g)	((float32)(g)->data.fl)
-#define gnode_float64(g)	((g)->data.fl)
-#define gnode_next(g)		((g)->next)
-
-
-/**
- * Create and prepend a new list node, with the given user-defined data, at the HEAD
- * of the given generic list.  Return the new list thus formed.
- * g may be NULL to indicate an initially empty list.
- */
-SPHINXBASE_EXPORT
-glist_t glist_add_ptr (glist_t g,  /**< a link list */
-		       void *ptr   /**< a pointer */
-	);
-
-/**
- * Create and prepend a new list node containing an integer.
- */  
-SPHINXBASE_EXPORT
-glist_t glist_add_int32 (glist_t g, /**< a link list */
-			 int32 val  /**< an integer value */
-	);
-/**
- * Create and prepend a new list node containing an unsigned integer.
- */  
-SPHINXBASE_EXPORT
-glist_t glist_add_uint32 (glist_t g,  /**< a link list */
-			  uint32 val  /**< an unsigned integer value */
-	);
-/**
- * Create and prepend a new list node containing a single-precision float.
- */  
-SPHINXBASE_EXPORT
-glist_t glist_add_float32 (glist_t g, /**< a link list */
-			   float32 val /**< a float32 vlaue */
-	);
-/**
- * Create and prepend a new list node containing a double-precision float.
- */  
-SPHINXBASE_EXPORT
-glist_t glist_add_float64 (glist_t g, /**< a link list */
-			   float64 val  /**< a float64 vlaue */
-	);
-
-
-
-/**
- * Create and insert a new list node, with the given user-defined data, after
- * the given generic node gn.  gn cannot be NULL.
- * Return ptr to the newly created gnode_t.
- */
-SPHINXBASE_EXPORT
-gnode_t *glist_insert_ptr (gnode_t *gn, /**< a generic node which ptr will be inserted after it*/
-			   void *ptr /**< pointer inserted */
-	);
-/**
- * Create and insert a new list node containing an integer.
- */  
-SPHINXBASE_EXPORT
-gnode_t *glist_insert_int32 (gnode_t *gn, /**< a generic node which a value will be inserted after it*/
-			     int32 val /**< int32 inserted */
-	);
-/**
- * Create and insert a new list node containing an unsigned integer.
- */  
-SPHINXBASE_EXPORT
-gnode_t *glist_insert_uint32 (gnode_t *gn, /**< a generic node which a value will be inserted after it*/
-			      uint32 val /**< uint32 inserted */
-	);
-/**
- * Create and insert a new list node containing a single-precision float.
- */  
-SPHINXBASE_EXPORT
-gnode_t *glist_insert_float32 (gnode_t *gn, /**< a generic node which a value will be inserted after it*/
-			       float32 val /**< float32 inserted */
-	);
-/**
- * Create and insert a new list node containing a double-precision float.
- */  
-SPHINXBASE_EXPORT
-gnode_t *glist_insert_float64 (gnode_t *gn, /**< a generic node which a value will be inserted after it*/
-			       float64 val /**< float64 inserted */
-	);
-
-/**
- * Reverse the order of the given glist.  (glist_add() adds to the head; one might
- * ultimately want the reverse of that.)
- * NOTE: The list is reversed "in place"; i.e., no new memory is allocated.
- * @return: The head of the new list.
- */
-SPHINXBASE_EXPORT
-glist_t glist_reverse (glist_t g /**< input link list */
-	);
-
-
-/**
-   Count the number of element in a given link list 
-   @return the number of elements in the given glist_t 
-*/
-SPHINXBASE_EXPORT
-int32 glist_count (glist_t g /**< input link list */
-	);
-
-/**
- * Free the given generic list; user-defined data contained within is not
- * automatically freed.  The caller must have done that already.
- */
-SPHINXBASE_EXPORT
-void glist_free (glist_t g);
-
-
-/**
- * Free the given node, gn, of a glist, pred being its predecessor in the list.
- * Return ptr to the next node in the list after the freed node.
- */
-SPHINXBASE_EXPORT
-gnode_t *gnode_free(gnode_t *gn, 
-		    gnode_t *pred
-	);
-
-/**
- * Return the last node in the given list.
- */
-SPHINXBASE_EXPORT
-gnode_t *glist_tail (glist_t g);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/hash_table.h
+++ /dev/null
@@ -1,443 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * hash.h -- Hash table module.
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * $Log: hash.h,v $
- * Revision 1.7  2005/06/22 03:04:01  arthchan2003
- * 1, Implemented hash_delete and hash_display, 2, Fixed doxygen documentation, 3, Added  keyword.
- *
- * Revision 1.8  2005/05/24 01:10:54  archan
- * Fix a bug when the value only appear in the hash but there is no chain.   Also make sure that prev was initialized to NULL. All success cases were tested, but not tested with the deletion is tested.
- *
- * Revision 1.7  2005/05/24 00:12:31  archan
- * Also add function prototype for hash_display in hash.h
- *
- * Revision 1.4  2005/05/03 04:09:11  archan
- * Implemented the heart of word copy search. For every ci-phone, every word end, a tree will be allocated to preserve its pathscore.  This is different from 3.5 or below, only the best score for a particular ci-phone, regardless of the word-ends will be preserved at every frame.  The graph propagation will not collect unused word tree at this point. srch_WST_propagate_wd_lv2 is also as the most stupid in the century.  But well, after all, everything needs a start.  I will then really get the results from the search and see how it looks.
- *
- * Revision 1.3  2005/03/30 01:22:48  archan
- * Fixed mistakes in last updates. Add
- *
- * 
- * 05-May-1999	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon
- * 		Removed hash_key2hash().  Added hash_enter_bkey() and hash_lookup_bkey(),
- * 		and len attribute to hash_entry_t.
- * 
- * 30-Apr-1999	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon
- * 		Added hash_key2hash().
- * 
- * 18-Jun-97	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon
- * 		Included case sensitive/insensitive option.
- * 
- * 08-31-95	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon
- * 		Created.
- */
-
-
-/**
- * @file hash_table.h
- * @brief Hash table implementation
- *
- * This hash tables are intended for associating a pointer/integer
- * "value" with a char string "key", (e.g., an ID with a word string).
- * Subsequently, one can retrieve the value by providing the string
- * key.  (The reverse functionality--obtaining the string given the
- * value--is not provided with the hash table module.)
- */
-
-/**
- * A note by ARCHAN at 20050510: Technically what we use is so-called
- * "hash table with buckets" which is very nice way to deal with
- * external hashing.  There are definitely better ways to do internal
- * hashing (i.e. when everything is stored in the memory.)  In Sphinx
- * 3, this is a reasonable practice because hash table is only used in
- * lookup in initialization or in lookups which is not critical for
- * speed.
- */
-
-/**
- * Another note by ARCHAN at 20050703: To use this data structure
- * properly, it is very important to realize that the users are
- * required to handle memory allocation of the C-style keys.  The hash
- * table will not make a copy of the memory allocated for any of the
- * C-style key. It will not allocate memory for it. It will not delete
- * memory for it.  As a result, the following code sniplet will cause
- * memory leak.  
- *
- * while (1){
- * str=(char*)ckd_calloc(str_length,sizeof(char*))
- * if(hash_enter(ht,str,id)!=id){ printf("fail to add key str %s with val id %d\n",str,id)} 
- * }
- *
- */
-
-/**
- * A note by dhuggins on 20061010: Changed this to use void * instead
- * of int32 as the value type, so that arbitrary objects can be
- * inserted into a hash table (in a way that won't crash on 64-bit
- * machines ;)
- */
-
-#ifndef _LIBUTIL_HASH_H_
-#define _LIBUTIL_HASH_H_
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-#include <sphinxbase/glist.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/**
- * The hash table structures.
- * Each hash table is identified by a hash_table_t structure.  hash_table_t.table is
- * pre-allocated for a user-controlled max size, and is initially empty.  As new
- * entries are created (using hash_enter()), the empty entries get filled.  If multiple
- * keys hash to the same entry, new entries are allocated and linked together in a
- * linear list.
- */
-
-typedef struct hash_entry_s {
-	const char *key;		/** Key string, NULL if this is an empty slot.
-					    NOTE that the key must not be changed once the entry
-					    has been made. */
-	size_t len;			/** Key-length; the key string does not have to be a C-style NULL
-					    terminated string; it can have arbitrary binary bytes */
-	void *val;			/** Value associated with above key */
-	struct hash_entry_s *next;	/** For collision resolution */
-} hash_entry_t;
-
-typedef struct {
-	hash_entry_t *table;	/**Primary hash table, excluding entries that collide */
-	int32 size;		/** Primary hash table size, (is a prime#); NOTE: This is the
-				    number of primary entries ALLOCATED, NOT the number of valid
-				    entries in the table */
-	int32 inuse;		/** Number of valid entries in the table. */
-	int32 nocase;		/** Whether case insensitive for key comparisons */
-} hash_table_t;
-
-typedef struct hash_iter_s {
-	hash_table_t *ht;  /**< Hash table we are iterating over. */
-	hash_entry_t *ent; /**< Current entry in that table. */
-	size_t idx;        /**< Index of next bucket to search. */
-} hash_iter_t;
-
-/** Access macros */
-#define hash_entry_val(e)	((e)->val)
-#define hash_entry_key(e)	((e)->key)
-#define hash_entry_len(e)	((e)->len)
-#define hash_table_inuse(h)	((h)->inuse)
-#define hash_table_size(h)	((h)->size)
-
-
-/**
- * Allocate a new hash table for a given expected size.
- *
- * @note Case sensitivity of hash keys applies to 7-bit ASCII
- * characters only, and is not locale-dependent.
- *
- * @return handle to allocated hash table.
- */
-SPHINXBASE_EXPORT
-hash_table_t * hash_table_new(int32 size,	/**< In: Expected number of entries in the table */
-                              int32 casearg  	/**< In: Whether case insensitive for key
-                                                   comparisons. When 1, case is insentitive,
-                                                   0, case is sensitive. */
-    );
-
-#define HASH_CASE_YES		0
-#define HASH_CASE_NO		1
-
-/**
- * Free the specified hash table; the caller is responsible for freeing the key strings
- * pointed to by the table entries.
- */
-SPHINXBASE_EXPORT
-void hash_table_free(hash_table_t *h /**< In: Handle of hash table to free */
-    );
-
-
-/**
- * Try to add a new entry with given key and associated value to hash table h.  If key doesn't
- * already exist in hash table, the addition is successful, and the return value is val.  But
- * if key already exists, return its existing associated value.  (The hash table is unchanged;
- * it is up to the caller to resolve the conflict.)
- */
-SPHINXBASE_EXPORT
-void *hash_table_enter(hash_table_t *h, /**< In: Handle of hash table in which to create entry */
-                       const char *key, /**< In: C-style NULL-terminated key string
-                                           for the new entry */
-                       void *val	  /**< In: Value to be associated with above key */
-    );
-
-/**
- * Add a 32-bit integer value to a hash table.
- *
- * This macro is the clean way to do this and avoid compiler warnings
- * on 64-bit platforms.
- */
-#define hash_table_enter_int32(h,k,v) \
-    ((int32)(long)hash_table_enter((h),(k),(void *)(long)(v)))
-
-/**
- * Add a new entry with given key and value to hash table h.  If the
- * key already exists, its value is replaced with the given value, and
- * the previous value is returned, otherwise val is returned.
- *
- * A very important but subtle point: The key pointer in the hash
- * table is <b>replaced</b> with the pointer passed to this function.
- * In general you should always pass a pointer to hash_table_enter()
- * whose lifetime matches or exceeds that of the hash table.  In some
- * rare cases it is convenient to initially enter a value with a
- * short-lived key, then later replace that with a long-lived one.
- * This behaviour allows this to happen.
- */
-SPHINXBASE_EXPORT
-void *hash_table_replace(hash_table_t *h, /**< In: Handle of hash table in which to create entry */
-                         const char *key, /**< In: C-style NULL-terminated key string
-                                             for the new entry */
-                         void *val	  /**< In: Value to be associated with above key */
-    );
-
-/**
- * Replace a 32-bit integer value in a hash table.
- *
- * This macro is the clean way to do this and avoid compiler warnings
- * on 64-bit platforms.
- */
-#define hash_table_replace_int32(h,k,v) \
-    ((int32)(long)hash_table_replace((h),(k),(void *)(long)(v)))
-
-/**
- * Delete an entry with given key and associated value to hash table
- * h.  Return the value associated with the key (NULL if it did not exist)
- */
-
-SPHINXBASE_EXPORT
-void *hash_table_delete(hash_table_t *h,    /**< In: Handle of hash table in
-                                               which a key will be deleted */
-                        const char *key     /**< In: C-style NULL-terminated
-                                               key string for the new entry */
-	);
-
-/**
- * Like hash_table_delete, but with an explicitly specified key length,
- * instead of a NULL-terminated, C-style key string.  So the key
- * string is a binary key (or bkey).  Hash tables containing such keys
- * should be created with the HASH_CASE_YES option.  Otherwise, the
- * results are unpredictable.
- */
-SPHINXBASE_EXPORT
-void *hash_table_delete_bkey(hash_table_t *h,    /**< In: Handle of hash table in
-                                               which a key will be deleted */
-                             const char *key,     /**< In: C-style NULL-terminated
-                                               key string for the new entry */
-                             size_t len
-	);
-
-/**
- * Delete all entries from a hash_table.
- */
-SPHINXBASE_EXPORT
-void hash_table_empty(hash_table_t *h    /**< In: Handle of hash table */
-    );
-
-/**
- * Like hash_table_enter, but with an explicitly specified key length,
- * instead of a NULL-terminated, C-style key string.  So the key
- * string is a binary key (or bkey).  Hash tables containing such keys
- * should be created with the HASH_CASE_YES option.  Otherwise, the
- * results are unpredictable.
- */
-SPHINXBASE_EXPORT
-void *hash_table_enter_bkey(hash_table_t *h,	/**< In: Handle of hash table
-                                                   in which to create entry */
-                              const char *key,	/**< In: Key buffer */
-                              size_t len,	/**< In: Length of above key buffer */
-                              void *val		/**< In: Value to be associated with above key */
-	);
-
-/**
- * Enter a 32-bit integer value in a hash table.
- *
- * This macro is the clean way to do this and avoid compiler warnings
- * on 64-bit platforms.
- */
-#define hash_table_enter_bkey_int32(h,k,l,v) \
-    ((int32)(long)hash_table_enter_bkey((h),(k),(l),(void *)(long)(v)))
-
-/**
- * Like hash_table_replace, but with an explicitly specified key length,
- * instead of a NULL-terminated, C-style key string.  So the key
- * string is a binary key (or bkey).  Hash tables containing such keys
- * should be created with the HASH_CASE_YES option.  Otherwise, the
- * results are unpredictable.
- */
-SPHINXBASE_EXPORT
-void *hash_table_replace_bkey(hash_table_t *h, /**< In: Handle of hash table in which to create entry */
-                              const char *key, /**< In: Key buffer */
-                              size_t len,	/**< In: Length of above key buffer */
-                              void *val	  /**< In: Value to be associated with above key */
-    );
-
-/**
- * Replace a 32-bit integer value in a hash table.
- *
- * This macro is the clean way to do this and avoid compiler warnings
- * on 64-bit platforms.
- */
-#define hash_table_replace_bkey_int32(h,k,l,v)                          \
-    ((int32)(long)hash_table_replace_bkey((h),(k),(l),(void *)(long)(v)))
-
-/**
- * Look up a key in a hash table and optionally return the associated
- * value.
- * @return 0 if key found in hash table, else -1.
- */
-SPHINXBASE_EXPORT
-int32 hash_table_lookup(hash_table_t *h,	/**< In: Handle of hash table being searched */
-                        const char *key,	/**< In: C-style NULL-terminated string whose value is sought */
-                        void **val	  	/**< Out: *val = value associated with key.
-                                                   If this is NULL, no value will be returned. */
-	);
-
-/**
- * Look up a 32-bit integer value in a hash table.
- *
- * This function is the clean way to do this and avoid compiler warnings
- * on 64-bit platforms.
- */
-SPHINXBASE_EXPORT
-int32 hash_table_lookup_int32(hash_table_t *h,	/**< In: Handle of hash table being searched */
-                              const char *key,	/**< In: C-style NULL-terminated string whose value is sought */
-                              int32 *val	/**< Out: *val = value associated with key.
-                                                   If this is NULL, no value will be returned. */
-	);
-
-/**
- * Like hash_lookup, but with an explicitly specified key length, instead of a NULL-terminated,
- * C-style key string.  So the key string is a binary key (or bkey).  Hash tables containing
- * such keys should be created with the HASH_CASE_YES option.  Otherwise, the results are
- * unpredictable.
- */
-SPHINXBASE_EXPORT
-int32 hash_table_lookup_bkey(hash_table_t *h,	/**< In: Handle of hash table being searched */
-                             const char *key,	/**< In: Key buffer */
-                             size_t len,	/**< In: Length of above key buffer */
-                             void **val		/**< Out: *val = value associated with key.
-                                                   If this is NULL, no value will be returned. */
-	);
-
-/**
- * Look up a 32-bit integer value in a hash table.
- *
- * This function is the clean way to do this and avoid compiler warnings
- * on 64-bit platforms.
- */
-SPHINXBASE_EXPORT
-int32 hash_table_lookup_bkey_int32(hash_table_t *h,/**< In: Handle of hash table being searched */
-                                   const char *key,/**< In: Key buffer */
-                                   size_t len,	/**< In: Length of above key buffer */
-                                   int32 *val	/**< Out: *val = value associated with key.
-                                                   If this is NULL, no value will be returned. */
-	);
-
-/**
- * Start iterating over key-value pairs in a hash table.
- */
-SPHINXBASE_EXPORT
-hash_iter_t *hash_table_iter(hash_table_t *h);
-
-/**
- * Get the next key-value pair in iteration.
- *
- * This function automatically frees the iterator object upon reaching
- * the final entry.
- *
- * @return the next entry in the hash table, or NULL if done.
- */
-SPHINXBASE_EXPORT
-hash_iter_t *hash_table_iter_next(hash_iter_t *itor);
-
-/**
- * Delete an unfinished iterator.
- */
-SPHINXBASE_EXPORT
-void hash_table_iter_free(hash_iter_t *itor);
-
-/**
- * Build a glist of valid hash_entry_t pointers from the given hash table.  Return the list.
- */
-SPHINXBASE_EXPORT
-glist_t hash_table_tolist(hash_table_t *h,	/**< In: Hash table from which list is to be generated */
-                          int32 *count		/**< Out: Number of entries in the list.
-                                                   If this is NULL, no count will be returned. */
-
-	);
-
-/**
- * Display a hash-with-chaining representation on the screen.
- * Currently, it will only works for situation where hash_enter was
- * used to enter the keys. 
- */
-SPHINXBASE_EXPORT
-void  hash_table_display(hash_table_t *h, /**< In: Hash table to display */
-                         int32 showkey    /**< In: Show the string or not,
-                                             Use 0 if hash_enter_bkey was
-                                             used. */
-	);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/heap.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * heap.h -- Generic heap structure for inserting in any and popping in sorted
- * 		order.
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * $Log: heap.h,v $
- * Revision 1.7  2005/06/22 03:05:49  arthchan2003
- * 1, Fixed doxygen documentation, 2, Add  keyword.
- *
- * Revision 1.4  2005/06/15 04:21:46  archan
- * 1, Fixed doxygen-documentation, 2, Add  keyword such that changes will be logged into a file.
- *
- * Revision 1.3  2005/03/30 01:22:48  archan
- * Fixed mistakes in last updates. Add
- *
- * 
- * 23-Dec-96	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Started.
- */
-
-
-#ifndef _LIBUTIL_HEAP_H_
-#define _LIBUTIL_HEAP_H_
-
-#include <stdlib.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-  /** \file heap.h
-   * \brief Heap Implementation. 
-   *
-   * General Comment: Sorted heap structure with three main operations:
-   * 
-   *   1. Insert a data item (with two attributes: an application supplied pointer and an
-   *      integer value; the heap is maintained in ascending order of the integer value).
-   *   2. Return the currently topmost item (i.e., item with smallest associated value).
-   *   3. Return the currently topmost item and pop it off the heap.
-   */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-
-typedef struct heap_s heap_t;
-
-
-/**
- * Allocate a new heap and return handle to it.
- */
-SPHINXBASE_EXPORT
-heap_t *heap_new(void);
-
-
-/**
- * Insert a new item into the given heap.
- * Return value: 0 if successful, -1 otherwise.
- */
-SPHINXBASE_EXPORT
-int heap_insert(heap_t *heap,	/**< In: Heap into which item is to be inserted */
-                void *data,	/**< In: Application-determined data pointer */
-                int32 val	/**< In: According to item entered in sorted heap */
-	);
-/**
- * Return the topmost item in the heap.
- * Return value: 1 if heap is not empty and the topmost value is returned;
- * 0 if heap is empty; -1 if some error occurred.
- */
-SPHINXBASE_EXPORT
-int heap_top(heap_t *heap,	/**< In: Heap whose topmost item is to be returned */
-             void **data,	/**< Out: Data pointer associated with the topmost item */
-             int32 *val		/**< Out: Value associated with the topmost item */
-	);
-/**
- * Like heap_top but also pop the top item off the heap.
- */
-SPHINXBASE_EXPORT
-int heap_pop(heap_t *heap, void **data, int32 *val);
-
-/**
- * Remove an item from the heap.
- */
-SPHINXBASE_EXPORT
-int heap_remove(heap_t *heap, void *data);
-
-/**
- * Return the number of items in the heap.
- */
-SPHINXBASE_EXPORT
-size_t heap_size(heap_t *heap);
-
-/**
- * Destroy the given heap; free the heap nodes.  NOTE: Data pointers in the nodes are NOT freed.
- * Return value: 0 if successful, -1 otherwise.
- */
-
-SPHINXBASE_EXPORT
-int heap_destroy(heap_t *heap);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/huff_code.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 2009 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-/**
- * @file huff_code.h
- * @brief Huffman code and bitstream implementation
- *
- * This interface supports building canonical Huffman codes from
- * string and integer values.  It also provides support for encoding
- * and decoding from strings and files, and for reading and writing
- * codebooks from files.
- */
-
-#ifndef __HUFF_CODE_H__
-#define __HUFF_CODE_H__
-
-#include <stdio.h>
-
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-#include <sphinxbase/cmd_ln.h>
-
-typedef struct huff_code_s huff_code_t;
-
-/**
- * Create a codebook from 32-bit integer data.
- */
-SPHINXBASE_EXPORT
-huff_code_t *huff_code_build_int(int32 const *values, int32 const *frequencies, int nvals);
-
-/**
- * Create a codebook from string data.
- */
-SPHINXBASE_EXPORT
-huff_code_t *huff_code_build_str(char * const *values, int32 const *frequencies, int nvals);
-
-/**
- * Read a codebook from a file.
- */
-SPHINXBASE_EXPORT
-huff_code_t *huff_code_read(FILE *infh);
-
-/**
- * Write a codebook to a file.
- */
-SPHINXBASE_EXPORT
-int huff_code_write(huff_code_t *hc, FILE *outfh);
-
-/**
- * Print a codebook to a file as text (for debugging)
- */
-SPHINXBASE_EXPORT
-int huff_code_dump(huff_code_t *hc, FILE *dumpfh);
-
-/**
- * Retain a pointer to a Huffman codec object.
- */
-SPHINXBASE_EXPORT
-huff_code_t *huff_code_retain(huff_code_t *hc);
-
-/**
- * Release a pointer to a Huffman codec object.
- */
-SPHINXBASE_EXPORT
-int huff_code_free(huff_code_t *hc);
-
-/**
- * Attach a Huffman codec to a file handle for input/output.
- */
-SPHINXBASE_EXPORT
-FILE *huff_code_attach(huff_code_t *hc, FILE *fh, char const *mode);
-
-/**
- * Detach a Huffman codec from its file handle.
- */
-SPHINXBASE_EXPORT
-FILE *huff_code_detach(huff_code_t *hc);
-
-/**
- * Encode an integer, writing it to the file handle, if any.
- */
-SPHINXBASE_EXPORT
-int huff_code_encode_int(huff_code_t *hc, int32 sym, uint32 *outcw);
-
-/**
- * Encode a string, writing it to the file handle, if any.
- */
-SPHINXBASE_EXPORT
-int huff_code_encode_str(huff_code_t *hc, char const *sym, uint32 *outcw);
-
-/**
- * Decode an integer, reading it from the file if no data given.
- */
-SPHINXBASE_EXPORT
-int huff_code_decode_int(huff_code_t *hc, int *outval,
-                         char const **inout_data,
-                         size_t *inout_data_len,
-                         int *inout_offset);
-
-/**
- * Decode a string, reading it from the file if no data given.
- */
-SPHINXBASE_EXPORT
-char const *huff_code_decode_str(huff_code_t *hc,
-                                 char const **inout_data,
-                                 size_t *inout_data_len,
-                                 int *inout_offset);
-
-#endif /* __HUFF_CODE_H__ */
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/jsgf.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 2007 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-#ifndef __JSGF_H__
-#define __JSGF_H__
-
-/**
- * @file jsgf.h JSGF grammar compiler
- *
- * This file defines the data structures for parsing JSGF grammars
- * into Sphinx finite-state grammars.
- **/
-
-#include <stdio.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/hash_table.h>
-#include <sphinxbase/fsg_model.h>
-#include <sphinxbase/logmath.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-typedef struct jsgf_s jsgf_t;
-typedef struct jsgf_rule_s jsgf_rule_t;
-
-/**
- * Create a new JSGF grammar.
- *
- * @param parent optional parent grammar for this one (NULL, usually).
- * @return new JSGF grammar object, or NULL on failure.
- */
-SPHINXBASE_EXPORT
-jsgf_t *jsgf_grammar_new(jsgf_t *parent);
-
-/**
- * Parse a JSGF grammar from a file.
- *
- * @param filename the name of the file to parse.
- * @param parent optional parent grammar for this one (NULL, usually).
- * @return new JSGF grammar object, or NULL on failure.
- */
-SPHINXBASE_EXPORT
-jsgf_t *jsgf_parse_file(const char *filename, jsgf_t *parent);
-
-/**
- * Parse a JSGF grammar from a string.
- *
- * @param 0-terminated string with grammar.
- * @param parent optional parent grammar for this one (NULL, usually).
- * @return new JSGF grammar object, or NULL on failure.
- */
-SPHINXBASE_EXPORT
-jsgf_t *jsgf_parse_string(const char *string, jsgf_t *parent);
-
-/**
- * Get the grammar name from the file.
- */
-SPHINXBASE_EXPORT
-char const *jsgf_grammar_name(jsgf_t *jsgf);
-
-/**
- * Free a JSGF grammar.
- */
-SPHINXBASE_EXPORT
-void jsgf_grammar_free(jsgf_t *jsgf);
-
-/**
- * Iterator over rules in a grammar.
- */
-typedef hash_iter_t jsgf_rule_iter_t;
-
-/**
- * Get an iterator over all rules in a grammar.
- */
-SPHINXBASE_EXPORT
-jsgf_rule_iter_t *jsgf_rule_iter(jsgf_t *grammar);
-
-/**
- * Advance an iterator to the next rule in the grammar.
- */
-#define jsgf_rule_iter_next(itor) hash_table_iter_next(itor)
-
-/**
- * Get the current rule in a rule iterator.
- */
-#define jsgf_rule_iter_rule(itor) ((jsgf_rule_t *)(itor)->ent->val)
-
-/**
- * Free a rule iterator (if the end hasn't been reached).
- */
-#define jsgf_rule_iter_free(itor) hash_table_iter_free(itor)
-
-/**
- * Get a rule by name from a grammar. Name should not contain brackets.
- */
-SPHINXBASE_EXPORT
-jsgf_rule_t *jsgf_get_rule(jsgf_t *grammar, const char *name);
-
-/**
- * Returns the first public rule of the grammar
- */ 
-SPHINXBASE_EXPORT
-jsgf_rule_t *jsgf_get_public_rule(jsgf_t *grammar);
-
-/**
- * Get the rule name from a rule.
- */
-SPHINXBASE_EXPORT
-char const *jsgf_rule_name(jsgf_rule_t *rule);
-
-/**
- * Test if a rule is public or not.
- */
-SPHINXBASE_EXPORT
-int jsgf_rule_public(jsgf_rule_t *rule);
-
-/**
- * Build a Sphinx FSG object from a JSGF rule.
- */
-SPHINXBASE_EXPORT
-fsg_model_t *jsgf_build_fsg(jsgf_t *grammar, jsgf_rule_t *rule,
-                            logmath_t *lmath, float32 lw);
-
-/**
- * Build a Sphinx FSG object from a JSGF rule.
- *
- * This differs from jsgf_build_fsg() in that it does not do closure
- * on epsilon transitions or any other postprocessing.  For the time
- * being this is necessary in order to write it to a file - the FSG
- * code will be fixed soon.
- */
-SPHINXBASE_EXPORT
-fsg_model_t *jsgf_build_fsg_raw(jsgf_t *grammar, jsgf_rule_t *rule,
-                                logmath_t *lmath, float32 lw);
-
-
-/**
- * Read JSGF from file and return FSG object from it.
- *
- * This function looks for a first public rule in jsgf and constructs JSGF from it.
- */
-SPHINXBASE_EXPORT
-fsg_model_t *jsgf_read_file(const char *file, logmath_t * lmath, float32 lw);
-
-/**
- * Read JSGF from string and return FSG object from it.
- *
- * This function looks for a first public rule in jsgf and constructs JSGF from it.
- */
-SPHINXBASE_EXPORT
-fsg_model_t *jsgf_read_string(const char *string, logmath_t * lmath, float32 lw);
-
-
-/**
- * Convert a JSGF rule to Sphinx FSG text form.
- *
- * This does a direct conversion without doing transitive closure on
- * null transitions and so forth.
- */
-SPHINXBASE_EXPORT
-int jsgf_write_fsg(jsgf_t *grammar, jsgf_rule_t *rule, FILE *outfh);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __JSGF_H__ */
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/listelem_alloc.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-#ifndef __LISTELEM_ALLOC_H__
-#define __LISTELEM_ALLOC_H__
-
-/** @file listelem_alloc.h
- * @brief Fast memory allocator for uniformly sized objects
- * @author M K Ravishankar <rkm@cs.cmu.edu>
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-#include <stdlib.h>
-#ifdef S60
-#include <types.h>
-#endif
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-/**
- * List element allocator object.
- */
-typedef struct listelem_alloc_s listelem_alloc_t;
-
-/**
- * Initialize and return a list element allocator.
- */
-SPHINXBASE_EXPORT
-listelem_alloc_t * listelem_alloc_init(size_t elemsize);
-
-/**
- * Finalize and release all memory associated with a list element allocator.
- */
-SPHINXBASE_EXPORT
-void listelem_alloc_free(listelem_alloc_t *le);
-
-
-SPHINXBASE_EXPORT
-void *__listelem_malloc__(listelem_alloc_t *le, char *file, int line);
-
-/** 
- * Allocate a list element and return pointer to it.
- */
-#define listelem_malloc(le)	__listelem_malloc__((le),__FILE__,__LINE__)
-
-SPHINXBASE_EXPORT
-void *__listelem_malloc_id__(listelem_alloc_t *le, char *file, int line,
-                             int32 *out_id);
-
-/**
- * Allocate a list element, returning a unique identifier.
- */
-#define listelem_malloc_id(le, oid)	__listelem_malloc_id__((le),__FILE__,__LINE__,(oid))
-
-/**
- * Retrieve a list element by its identifier.
- */
-SPHINXBASE_EXPORT
-void *listelem_get_item(listelem_alloc_t *le, int32 id);
-
-/**
- * Free list element of given size 
- */
-SPHINXBASE_EXPORT
-void __listelem_free__(listelem_alloc_t *le, void *elem, char *file, int line);
-
-/** 
- * Macro of __listelem_free__
- */
-#define listelem_free(le,el)	__listelem_free__((le),(el),__FILE__,__LINE__)
-
-/**
-   Print number of allocation, numer of free operation stats 
-*/
-SPHINXBASE_EXPORT
-void listelem_stats(listelem_alloc_t *le);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/logmath.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 2007 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/**
- * @file logmath.h
- * @brief Fast integer logarithmic addition operations.
- *
- * In evaluating HMM models, probability values are often kept in log
- * domain, to avoid overflow.  To enable these logprob values to be
- * held in int32 variables without significant loss of precision, a
- * logbase of (1+epsilon) (where epsilon < 0.01 or so) is used.  This
- * module maintains this logbase (B).
- * 
- * However, maintaining probabilities in log domain creates a problem
- * when adding two probability values.  This problem can be solved by
- * table lookup.  Note that:
- *
- *  - \f$ b^z = b^x + b^y \f$
- *  - \f$ b^z = b^x(1 + b^{y-x})     = b^y(1 + e^{x-y}) \f$
- *  - \f$ z   = x + log_b(1 + b^{y-x}) = y + log_b(1 + b^{x-y}) \f$
- *
- * So:
- * 
- *  - when \f$ y > x, z = y + logadd\_table[-(x-y)] \f$
- *  - when \f$ x > y, z = x + logadd\_table[-(y-x)] \f$
- *  - where \f$ logadd\_table[n] = log_b(1 + b^{-n}) \f$
- *
- * The first entry in <i>logadd_table</i> is
- * simply \f$ log_b(2.0) \f$, for
- * the case where \f$ y = x \f$ and thus
- * \f$ z = log_b(2x) = log_b(2) + x \f$.  The last entry is zero,
- * where \f$ log_b(x+y) = x = y \f$ due to loss of precision.
- *
- * Since this table can be quite large particularly for small
- * logbases, an option is provided to compress it by dropping the
- * least significant bits of the table.
- */
-
-#ifndef __LOGMATH_H__
-#define __LOGMATH_H__
-
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-#include <sphinxbase/cmd_ln.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/**
- * Integer log math computation table.
- *
- * This is exposed here to allow log-add computations to be inlined.
- */
-typedef struct logadd_s logadd_t;
-struct logadd_s {
-    /** Table, in unsigned integers of (width) bytes. */
-    void *table;
-    /** Number of elements in (table).  This is never smaller than 256 (important!) */
-    uint32 table_size;
-    /** Width of elements of (table). */
-    uint8 width;
-    /** Right shift applied to elements in (table). */
-    int8 shift;
-};
-
-/**
- * Integer log math computation class.
- */
-typedef struct logmath_s logmath_t;
-
-/**
- * Obtain the log-add table from a logmath_t *
- */
-#define LOGMATH_TABLE(lm) ((logadd_t *)lm)
-
-/**
- * Initialize a log math computation table.
- * @param base The base B in which computation is to be done.
- * @param shift Log values are shifted right by this many bits.
- * @param use_table Whether to use an add table or not
- * @return The newly created log math table.
- */
-SPHINXBASE_EXPORT
-logmath_t *logmath_init(float64 base, int shift, int use_table);
-
-/**
- * Memory-map (or read) a log table from a file.
- */
-SPHINXBASE_EXPORT
-logmath_t *logmath_read(const char *filename);
-
-/**
- * Write a log table to a file.
- */
-SPHINXBASE_EXPORT
-int32 logmath_write(logmath_t *lmath, const char *filename);
-
-/**
- * Get the log table size and dimensions.
- */
-SPHINXBASE_EXPORT
-int32 logmath_get_table_shape(logmath_t *lmath, uint32 *out_size,
-                              uint32 *out_width, uint32 *out_shift);
-
-/**
- * Get the log base.
- */
-SPHINXBASE_EXPORT
-float64 logmath_get_base(logmath_t *lmath);
-
-/**
- * Get the smallest possible value represented in this base.
- */
-SPHINXBASE_EXPORT
-int logmath_get_zero(logmath_t *lmath);
-
-/**
- * Get the width of the values in a log table.
- */
-SPHINXBASE_EXPORT
-int logmath_get_width(logmath_t *lmath);
-
-/**
- * Get the shift of the values in a log table.
- */
-SPHINXBASE_EXPORT
-int logmath_get_shift(logmath_t *lmath);
-
-/**
- * Retain ownership of a log table.
- *
- * @return pointer to retained log table.
- */
-SPHINXBASE_EXPORT
-logmath_t *logmath_retain(logmath_t *lmath);
-
-/**
- * Free a log table.
- *
- * @return new reference count (0 if freed completely)
- */
-SPHINXBASE_EXPORT
-int logmath_free(logmath_t *lmath);
-
-/**
- * Add two values in log space exactly and slowly (without using add table).
- */
-SPHINXBASE_EXPORT
-int logmath_add_exact(logmath_t *lmath, int logb_p, int logb_q);
-
-/**
- * Add two values in log space (i.e. return log(exp(p)+exp(q)))
- */
-SPHINXBASE_EXPORT
-int logmath_add(logmath_t *lmath, int logb_p, int logb_q);
-
-/**
- * Convert linear floating point number to integer log in base B.
- */
-SPHINXBASE_EXPORT
-int logmath_log(logmath_t *lmath, float64 p);
-
-/**
- * Convert integer log in base B to linear floating point.
- */
-SPHINXBASE_EXPORT
-float64 logmath_exp(logmath_t *lmath, int logb_p);
-
-/**
- * Convert natural log (in floating point) to integer log in base B.
- */
-SPHINXBASE_EXPORT
-int logmath_ln_to_log(logmath_t *lmath, float64 log_p);
-
-/**
- * Convert integer log in base B to natural log (in floating point).
- */
-SPHINXBASE_EXPORT
-float64 logmath_log_to_ln(logmath_t *lmath, int logb_p);
-
-/**
- * Convert base 10 log (in floating point) to integer log in base B.
- */
-SPHINXBASE_EXPORT
-int logmath_log10_to_log(logmath_t *lmath, float64 log_p);
-
-/**
- * Convert integer log in base B to base 10 log (in floating point).
- */
-SPHINXBASE_EXPORT
-float64 logmath_log_to_log10(logmath_t *lmath, int logb_p);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /*  __LOGMATH_H__ */
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/matrix.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1997-2000 Carnegie Mellon University.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*********************************************************************
- *
- * File: matrix.h
- * 
- * Description: Matrix and linear algebra functions
- * 
- * Author: 
- * 
- *********************************************************************/
-
-#ifndef MATRIX_H
-#define MATRIX_H
-
-/** \file matrix.h
- * \brief Matrix and linear algebra functions.
- *
- * This file contains some basic matrix and linear algebra operations.
- * In general these operate on positive definite matrices ONLY,
- * because all matrices we're likely to encounter are either
- * covariance matrices or are derived from them, and therefore a
- * non-positive-definite matrix indicates some kind of pathological
- * condition.
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-
-/**
- * Norm an array
- * @param arr array
- * @param d1 dimension
- * @param d2 dimension
- * @param d3 dimension
- **/
-SPHINXBASE_EXPORT void norm_3d(float32 ***arr, uint32 d1, uint32 d2, uint32 d3);
-
-/**
- * Floor 3-d array
- * @param out output array
- * @para in input array
- * @param d1 dimension
- * @param d2 dimension
- * @param d3 dimension
- **/
-SPHINXBASE_EXPORT void
-accum_3d(float32 ***out, float32 ***in, uint32 d1, uint32 d2, uint32 d3);
-
-/** Ensures that non-zero values x such that -band < x < band, band > 0 are set to -band if x < 0 and band if x > 0.
- * @param v array
- * @param d1 array size
- * @param band band value
- */
-SPHINXBASE_EXPORT void band_nz_1d(float32 *v, uint32 d1, float32 band);
-
-/**
- * Floor 3-d array
- * @param m array
- * @param d1 dimension
- * @param d2 dimension
- * @param d3 dimension
- * @param floor floor value
- **/
-SPHINXBASE_EXPORT void floor_nz_3d(float32 ***m, uint32 d1, uint32 d2, uint32 d3, float32 floor);
-
-/**
- * Floor 1-d array
- * @param m array
- * @param d1 dimension
- * @param floor floor value
- **/
-SPHINXBASE_EXPORT void floor_nz_1d(float32 *v, uint32 d1, float32 floor);
-
-/**
- * Calculate the determinant of a positive definite matrix.
- * @param a The input matrix, must be positive definite.
- * @param len The dimension of the input matrix.
- * @return The determinant of the input matrix, or -1.0 if the matrix is
- * not positive definite.
- *
- * \note These can be vanishingly small hence the float64 return type.
- * Also note that only the upper triangular portion of a is
- * considered, therefore the check for positive-definiteness is not
- * reliable.
- **/
-SPHINXBASE_EXPORT
-float64 determinant(float32 **a, int32 len);
-
-/**
- * Invert (if possible) a positive definite matrix.
- * @param out_ainv The inverse of a will be stored here.
- * @param a The input matrix, must be positive definite.
- * @param len The dimension of the input matrix.
- * @return 0 for success or -1 for a non-positive-definite matrix.
- *
- * \note Only the upper triangular portion of a is considered,
- * therefore the check for positive-definiteness is not reliable.
- **/
-SPHINXBASE_EXPORT
-int32 invert(float32 **out_ainv, float32 **a, int32 len);
-
-/**
- * Solve (if possible) a positive-definite system of linear equations AX=B for X.
- * @param a The A matrix on the left-hand side of the equation, must be positive-definite.
- * @param b The B vector on the right-hand side of the equation.
- * @param out_x The X vector will be stored here.
- * @param n The dimension of the A matrix (n by n) and the B and X vectors.
- * @return 0 for success or -1 for a non-positive-definite matrix.
- *
- * \note Only the upper triangular portion of a is considered,
- * therefore the check for positive-definiteness is not reliable.
- **/
-SPHINXBASE_EXPORT
-int32 solve(float32 **a, float32 *b,
-            float32 *out_x, int32 n);
-
-/**
- * Calculate the outer product of two vectors.
- * @param out_a A (pre-allocated) len x len array. The outer product
- * will be stored here.
- * @param x A vector of length len.
- * @param y A vector of length len.
- * @param len The length of the input vectors.
- **/
-SPHINXBASE_EXPORT
-void outerproduct(float32 **out_a, float32 *x, float32 *y, int32 len);
-
-/**
- * Multiply C=AB where A and B are symmetric matrices.
- * @param out_c The output matrix C.
- * @param a The input matrix A.
- * @param b The input matrix B.
- * @param n Dimensionality of A and B.
- **/
-SPHINXBASE_EXPORT
-void matrixmultiply(float32 **out_c, /* = */
-                    float32 **a, /* * */ float32 **b,
-                    int32 n);
-
-/**
- * Multiply a symmetric matrix by a constant in-place.
- * @param inout_a The matrix to multiply.
- * @param x The constant to multiply it by.
- * @param n dimension of a.
- **/
-SPHINXBASE_EXPORT
-void scalarmultiply(float32 **inout_a, float32 x, int32 n);
-
-/**
- * Add A += B.
- * @param inout_a The A matrix to add.
- * @param b The B matrix to add to A.
- * @param n dimension of a and b.
- **/
-SPHINXBASE_EXPORT
-void matrixadd(float32 **inout_a, float32 **b, int32 n);
-
-#if 0
-{ /* Fool indent. */
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* MATRIX_H */ 
-
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/mmio.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 2006-2007 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/**
- * @file mmio.h 
- * @brief Memory-mapped I/O wrappers for files.
- * @author David Huggins-Daines <dhuggins@cs.cmu.edu>
- **/
-
-#ifndef __MMIO_H__
-#define __MMIO_H__
-
-#include <sphinxbase/sphinxbase_export.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/**
- * Abstract structure representing a memory-mapped file.
- **/
-typedef struct mmio_file_s mmio_file_t;
-
-/**
- * Memory-map a file for reading.
- * @return a mmio_file_t * or NULL for failure.
- **/
-SPHINXBASE_EXPORT
-mmio_file_t *mmio_file_read(const char *filename);
-
-/**
- * Get a pointer to the memory mapped for a file.
- **/
-SPHINXBASE_EXPORT
-void *mmio_file_ptr(mmio_file_t *mf);
-
-/**
- * Unmap a file, releasing memory associated with it.
- **/
-SPHINXBASE_EXPORT
-void mmio_file_unmap(mmio_file_t *mf);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __MMIO_H__ */
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/mulaw.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2001 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * muLaw.h -- Table for converting mu-law data into 16-bit linear PCM format.
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1996 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * 
- * 21-Jul-97	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Created from Sunil Issar's version.
- */
-
-/**
- * \file mulaw.h
- * \brief Table for converting mu-law data into 16-bit linear PCM format.
- */
-
-
-#ifndef _MULAW_H_
-#define _MULAW_H_
-
-
-static int16 muLaw[256] = {
- -0x1f5f, -0x1e5f, -0x1d5f, -0x1c5f, -0x1b5f, -0x1a5f, -0x195f, -0x185f,
- -0x175f, -0x165f, -0x155f, -0x145f, -0x135f, -0x125f, -0x115f, -0x105f,
- -0x0f9f, -0x0f1f, -0x0e9f, -0x0e1f, -0x0d9f, -0x0d1f, -0x0c9f, -0x0c1f,
- -0x0b9f, -0x0b1f, -0x0a9f, -0x0a1f, -0x099f, -0x091f, -0x089f, -0x081f,
- -0x07bf, -0x077f, -0x073f, -0x06ff, -0x06bf, -0x067f, -0x063f, -0x05ff,
- -0x05bf, -0x057f, -0x053f, -0x04ff, -0x04bf, -0x047f, -0x043f, -0x03ff,
- -0x03cf, -0x03af, -0x038f, -0x036f, -0x034f, -0x032f, -0x030f, -0x02ef,
- -0x02cf, -0x02af, -0x028f, -0x026f, -0x024f, -0x022f, -0x020f, -0x01ef,
- -0x01d7, -0x01c7, -0x01b7, -0x01a7, -0x0197, -0x0187, -0x0177, -0x0167,
- -0x0157, -0x0147, -0x0137, -0x0127, -0x0117, -0x0107, -0x00f7, -0x00e7,
- -0x00db, -0x00d3, -0x00cb, -0x00c3, -0x00bb, -0x00b3, -0x00ab, -0x00a3,
- -0x009b, -0x0093, -0x008b, -0x0083, -0x007b, -0x0073, -0x006b, -0x0063,
- -0x005d, -0x0059, -0x0055, -0x0051, -0x004d, -0x0049, -0x0045, -0x0041,
- -0x003d, -0x0039, -0x0035, -0x0031, -0x002d, -0x0029, -0x0025, -0x0021,
- -0x001e, -0x001c, -0x001a, -0x0018, -0x0016, -0x0014, -0x0012, -0x0010,
- -0x000e, -0x000c, -0x000a, -0x0008, -0x0006, -0x0004, -0x0002,  0x0000,
-  0x1f5f,  0x1e5f,  0x1d5f,  0x1c5f,  0x1b5f,  0x1a5f,  0x195f,  0x185f,
-  0x175f,  0x165f,  0x155f,  0x145f,  0x135f,  0x125f,  0x115f,  0x105f,
-  0x0f9f,  0x0f1f,  0x0e9f,  0x0e1f,  0x0d9f,  0x0d1f,  0x0c9f,  0x0c1f,
-  0x0b9f,  0x0b1f,  0x0a9f,  0x0a1f,  0x099f,  0x091f,  0x089f,  0x081f,
-  0x07bf,  0x077f,  0x073f,  0x06ff,  0x06bf,  0x067f,  0x063f,  0x05ff,
-  0x05bf,  0x057f,  0x053f,  0x04ff,  0x04bf,  0x047f,  0x043f,  0x03ff,
-  0x03cf,  0x03af,  0x038f,  0x036f,  0x034f,  0x032f,  0x030f,  0x02ef,
-  0x02cf,  0x02af,  0x028f,  0x026f,  0x024f,  0x022f,  0x020f,  0x01ef,
-  0x01d7,  0x01c7,  0x01b7,  0x01a7,  0x0197,  0x0187,  0x0177,  0x0167,
-  0x0157,  0x0147,  0x0137,  0x0127,  0x0117,  0x0107,  0x00f7,  0x00e7,
-  0x00db,  0x00d3,  0x00cb,  0x00c3,  0x00bb,  0x00b3,  0x00ab,  0x00a3,
-  0x009b,  0x0093,  0x008b,  0x0083,  0x007b,  0x0073,  0x006b,  0x0063,
-  0x005d,  0x0059,  0x0055,  0x0051,  0x004d,  0x0049,  0x0045,  0x0041,
-  0x003d,  0x0039,  0x0035,  0x0031,  0x002d,  0x0029,  0x0025,  0x0021,
-  0x001e,  0x001c,  0x001a,  0x0018,  0x0016,  0x0014,  0x0012,  0x0010,
-  0x000e,  0x000c,  0x000a,  0x0008,  0x0006,  0x0004,  0x0002,  0x0000,
-};
-
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/ngram_model.h
+++ /dev/null
@@ -1,711 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 2007 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/**
- * @file ngram_model.h
- * @brief N-Gram language models
- * @author David Huggins-Daines <dhuggins@cs.cmu.edu>
- */
-
-#ifndef __NGRAM_MODEL_H__
-#define __NGRAM_MODEL_H__
-
-#include <stdarg.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-#include <sphinxbase/cmd_ln.h>
-#include <sphinxbase/logmath.h>
-#include <sphinxbase/mmio.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/**
- * Abstract type representing an N-Gram based language model.
- */
-typedef struct ngram_model_s ngram_model_t;
-
-/**
- * Abstract type representing a word class in an N-Gram model.
- */
-typedef struct ngram_class_s ngram_class_t;
-
-/**
- * File types for N-Gram files
- */
-typedef enum ngram_file_type_e {
-    NGRAM_INVALID = -1, /**< Not a valid file type. */
-    NGRAM_AUTO,  /**< Determine file type automatically. */
-    NGRAM_ARPA,  /**< ARPABO text format (the standard). */
-    NGRAM_DMP,   /**< Sphinx .DMP format. */
-    NGRAM_DMP32, /**< Sphinx .DMP32 format (NOT SUPPORTED) */
-} ngram_file_type_t;
-
-#define NGRAM_INVALID_WID -1 /**< Impossible word ID */
-
-/**
- * Read an N-Gram model from a file on disk.
- *
- * @param config Optional pointer to a set of command-line arguments.
- * Recognized arguments are:
- *
- *  - -mmap (boolean) whether to use memory-mapped I/O
- *  - -lw (float32) language weight to apply to the model
- *  - -wip (float32) word insertion penalty to apply to the model
- *  - -uw (float32) unigram weight to apply to the model
- *
- * @param file_name path to the file to read.
- * @param file_type type of the file, or NGRAM_AUTO to determine automatically.
- * @param lmath Log-math parameters to use for probability
- *              calculations.  Ownership of this object is assumed by
- *              the newly created ngram_model_t, and you should not
- *              attempt to free it manually.  If you wish to reuse it
- *              elsewhere, you must retain it with logmath_retain().
- * @return newly created ngram_model_t.
- */
-SPHINXBASE_EXPORT
-ngram_model_t *ngram_model_read(cmd_ln_t *config,
-				const char *file_name,
-                                ngram_file_type_t file_type,
-				logmath_t *lmath);
-
-/**
- * Write an N-Gram model to disk.
- *
- * @return 0 for success, <0 on error
- */
-SPHINXBASE_EXPORT
-int ngram_model_write(ngram_model_t *model, const char *file_name,
-		      ngram_file_type_t format);
-
-/**
- * Guess the file type for an N-Gram model from the filename.
- *
- * @return the guessed file type, or NGRAM_INVALID if none could be guessed.
- */
-SPHINXBASE_EXPORT
-ngram_file_type_t ngram_file_name_to_type(const char *file_name);
-
-/**
- * Get the N-Gram file type from a string.
- *
- * @return file type, or NGRAM_INVALID if no such file type exists.
- */
-SPHINXBASE_EXPORT
-ngram_file_type_t ngram_str_to_type(const char *str_name);
-
-/**
- * Get the canonical name for an N-Gram file type.
- *
- * @return read-only string with the name for this file type, or NULL
- * if no such type exists.
- */
-SPHINXBASE_EXPORT
-char const *ngram_type_to_str(int type);
-
-/**
- * Retain ownership of an N-Gram model.
- *
- * @return Pointer to retained model.
- */
-SPHINXBASE_EXPORT
-ngram_model_t *ngram_model_retain(ngram_model_t *model);
-
-/**
- * Release memory associated with an N-Gram model.
- *
- * @return new reference count (0 if freed completely)
- */
-SPHINXBASE_EXPORT
-int ngram_model_free(ngram_model_t *model);
-
-/**
- * Constants for case folding.
- */
-typedef enum ngram_case_e {
-    NGRAM_UPPER,
-    NGRAM_LOWER
-} ngram_case_t;
-
-/**
- * Case-fold word strings in an N-Gram model.
- *
- * WARNING: This is not Unicode aware, so any non-ASCII characters
- * will not be converted.
- */
-SPHINXBASE_EXPORT
-int ngram_model_casefold(ngram_model_t *model, int kase);
-
-/**
- * Apply a language weight, insertion penalty, and unigram weight to a
- * language model.
- *
- * This will change the values output by ngram_score() and friends.
- * This is done for efficiency since in decoding, these are the only
- * values we actually need.  Call ngram_prob() if you want the "raw"
- * N-Gram probability estimate.
- *
- * To remove all weighting, call ngram_apply_weights(model, 1.0, 1.0, 1.0).
- */
-SPHINXBASE_EXPORT
-int ngram_model_apply_weights(ngram_model_t *model,
-                              float32 lw, float32 wip, float32 uw);
-
-/**
- * Get the current weights from a language model.
- *
- * @param model The model in question.
- * @param out_log_wip Output: (optional) logarithm of word insertion penalty.
- * @param out_log_uw Output: (optional) logarithm of unigram weight.
- * @return language weight.
- */
-SPHINXBASE_EXPORT
-float32 ngram_model_get_weights(ngram_model_t *model, int32 *out_log_wip,
-                                int32 *out_log_uw);
-
-/**
- * Get the score (scaled, interpolated log-probability) for a general
- * N-Gram.
- *
- * The argument list consists of the history words (as null-terminated
- * strings) of the N-Gram, <b>in reverse order</b>, followed by NULL.
- * Therefore, if you wanted to get the N-Gram score for "a whole joy",
- * you would call:
- *
- * <pre>
- *  score = ngram_score(model, "joy", "whole", "a", NULL);
- * </pre>
- *
- * This is not the function to use in decoding, because it has some
- * overhead for looking up words.  Use ngram_ng_score(),
- * ngram_tg_score(), or ngram_bg_score() instead.  In the future there
- * will probably be a version that takes a general language model
- * state object, to support suffix-array LM and things like that.
- *
- * If one of the words is not in the LM's vocabulary, the result will
- * depend on whether this is an open or closed vocabulary language
- * model.  For an open-vocabulary model, unknown words are all mapped
- * to the unigram &lt;UNK&gt; which has a non-zero probability and also
- * participates in higher-order N-Grams.  Therefore, you will get a
- * score of some sort in this case.
- *
- * For a closed-vocabulary model, unknown words are impossible and
- * thus have zero probability.  Therefore, if <code>word</code> is
- * unknown, this function will return a "zero" log-probability, i.e. a
- * large negative number.  To obtain this number for comparison, call
- * ngram_zero().
- */
-SPHINXBASE_EXPORT
-int32 ngram_score(ngram_model_t *model, const char *word, ...);
-
-/**
- * Quick trigram score lookup.
- */
-SPHINXBASE_EXPORT
-int32 ngram_tg_score(ngram_model_t *model,
-                     int32 w3, int32 w2, int32 w1,
-                     int32 *n_used);
-
-/**
- * Quick bigram score lookup.
- */
-SPHINXBASE_EXPORT
-int32 ngram_bg_score(ngram_model_t *model,
-                     int32 w2, int32 w1,
-                     int32 *n_used);
-
-/**
- * Quick general N-Gram score lookup.
- */
-SPHINXBASE_EXPORT
-int32 ngram_ng_score(ngram_model_t *model, int32 wid, int32 *history,
-                     int32 n_hist, int32 *n_used);
-
-/**
- * Get the "raw" log-probability for a general N-Gram.
- *
- * This returns the log-probability of an N-Gram, as defined in the
- * language model file, before any language weighting, interpolation,
- * or insertion penalty has been applied.
- *
- * @note When backing off to a unigram from a bigram or trigram, the
- * unigram weight (interpolation with uniform) is not removed.
- */
-SPHINXBASE_EXPORT
-int32 ngram_probv(ngram_model_t *model, const char *word, ...);
-
-/**
- * Get the "raw" log-probability for a general N-Gram.
- *
- * This returns the log-probability of an N-Gram, as defined in the
- * language model file, before any language weighting, interpolation,
- * or insertion penalty has been applied.
- *
- * @note When backing off to a unigram from a bigram or trigram, the
- * unigram weight (interpolation with uniform) is not removed.
- */
-SPHINXBASE_EXPORT
-int32 ngram_prob(ngram_model_t *model, const char *const *words, int32 n);
-
-/**
- * Quick "raw" probability lookup for a general N-Gram.
- *
- * See documentation for ngram_ng_score() and ngram_apply_weights()
- * for an explanation of this.
- */
-SPHINXBASE_EXPORT
-int32 ngram_ng_prob(ngram_model_t *model, int32 wid, int32 *history,
-                    int32 n_hist, int32 *n_used);
-
-/**
- * Convert score to "raw" log-probability.
- *
- * @note The unigram weight (interpolation with uniform) is not
- * removed, since there is no way to know which order of N-Gram
- * generated <code>score</code>.
- * 
- * @param model The N-Gram model from which score was obtained.
- * @param score The N-Gram score to convert
- * @return The raw log-probability value.
- */
-SPHINXBASE_EXPORT
-int32 ngram_score_to_prob(ngram_model_t *model, int32 score);
-
-/**
- * Look up numerical word ID.
- */
-SPHINXBASE_EXPORT
-int32 ngram_wid(ngram_model_t *model, const char *word);
-
-/**
- * Look up word string for numerical word ID.
- */
-SPHINXBASE_EXPORT
-const char *ngram_word(ngram_model_t *model, int32 wid);
-
-/**
- * Get the unknown word ID for a language model.
- *
- * Language models can be either "open vocabulary" or "closed
- * vocabulary".  The difference is that the former assigns a fixed
- * non-zero unigram probability to unknown words, while the latter
- * does not allow unknown words (or, equivalently, it assigns them
- * zero probability).  If this is a closed vocabulary model, this
- * function will return NGRAM_INVALID_WID.
- *
- * @return The ID for the unknown word, or NGRAM_INVALID_WID if none
- * exists.
- */
-SPHINXBASE_EXPORT
-int32 ngram_unknown_wid(ngram_model_t *model);
-
-/**
- * Get the "zero" log-probability value for a language model.
- */
-SPHINXBASE_EXPORT
-int32 ngram_zero(ngram_model_t *model);
-
-/**
- * Get the order of the N-gram model (i.e. the "N" in "N-gram")
- */
-SPHINXBASE_EXPORT
-int32 ngram_model_get_size(ngram_model_t *model);
-
-/**
- * Get the counts of the various N-grams in the model.
- */
-SPHINXBASE_EXPORT
-int32 const *ngram_model_get_counts(ngram_model_t *model);
-
-/**
- * M-gram iterator object.
- */
-typedef struct ngram_iter_s ngram_iter_t;
-
-/**
- * Iterate over all M-grams.
- *
- * @param model Language model to query.
- * @param m Order of the M-Grams requested minus one (i.e. order of the history)
- * @return An iterator over the requested M, or NULL if no N-grams of
- * order M+1 exist.
- */
-SPHINXBASE_EXPORT
-ngram_iter_t *ngram_model_mgrams(ngram_model_t *model, int m);
-
-/**
- * Get an iterator over M-grams pointing to the specified M-gram.
- */
-SPHINXBASE_EXPORT
-ngram_iter_t *ngram_iter(ngram_model_t *model, const char *word, ...);
-
-/**
- * Get an iterator over M-grams pointing to the specified M-gram.
- */
-SPHINXBASE_EXPORT
-ngram_iter_t *ngram_ng_iter(ngram_model_t *model, int32 wid, int32 *history, int32 n_hist);
-
-/**
- * Get information from the current M-gram in an iterator.
- *
- * @param out_score Output: Score for this M-gram (including any word
- *                          penalty and language weight).
- * @param out_bowt Output: Backoff weight for this M-gram.
- * @return read-only array of word IDs.
- */
-SPHINXBASE_EXPORT
-int32 const *ngram_iter_get(ngram_iter_t *itor,
-                            int32 *out_score,
-                            int32 *out_bowt);
-
-/**
- * Iterate over all M-gram successors of an M-1-gram.
- *
- * @param itor Iterator pointing to the M-1-gram to get successors of.
- */
-SPHINXBASE_EXPORT
-ngram_iter_t *ngram_iter_successors(ngram_iter_t *itor);
-
-/**
- * Advance an M-gram iterator.
- */
-SPHINXBASE_EXPORT
-ngram_iter_t *ngram_iter_next(ngram_iter_t *itor);
-
-/**
- * Terminate an M-gram iterator.
- */
-SPHINXBASE_EXPORT
-void ngram_iter_free(ngram_iter_t *itor);
-
-/**
- * Add a word (unigram) to the language model.
- *
- * @note The semantics of this are not particularly well-defined for
- * model sets, and may be subject to change.  Currently this will add
- * the word to all of the submodels
- *
- * @param model The model to add a word to.
- * @param word Text of the word to add.
- * @param weight Weight of this word relative to the uniform distribution.
- * @return The word ID for the new word.
- */
-SPHINXBASE_EXPORT
-int32 ngram_model_add_word(ngram_model_t *model,
-                           const char *word, float32 weight);
-
-/**
- * Read a class definition file and add classes to a language model.
- *
- * This function assumes that the class tags have already been defined
- * as unigrams in the language model.  All words in the class
- * definition will be added to the vocabulary as special in-class words.
- * For this reason is is necessary that they not have the same names
- * as any words in the general unigram distribution.  The convention
- * is to suffix them with ":class_tag", where class_tag is the class
- * tag minus the enclosing square brackets.
- *
- * @return 0 for success, <0 for error
- */
-SPHINXBASE_EXPORT
-int32 ngram_model_read_classdef(ngram_model_t *model,
-                                const char *file_name);
-
-/**
- * Add a new class to a language model.
- *
- * If <code>classname</code> already exists in the unigram set for
- * <code>model</code>, then it will be converted to a class tag, and
- * <code>classweight</code> will be ignored.  Otherwise, a new unigram
- * will be created as in ngram_model_add_word().
- */
-SPHINXBASE_EXPORT
-int32 ngram_model_add_class(ngram_model_t *model,
-                            const char *classname,
-                            float32 classweight,
-                            char **words,
-                            const float32 *weights,
-                            int32 n_words);
-
-/**
- * Add a word to a class in a language model.
- *
- * @param model The model to add a word to.
- * @param classname Name of the class to add this word to.
- * @param word Text of the word to add.
- * @param weight Weight of this word relative to the within-class uniform distribution.
- * @return The word ID for the new word.
- */
-SPHINXBASE_EXPORT
-int32 ngram_model_add_class_word(ngram_model_t *model,
-                                 const char *classname,
-                                 const char *word,
-                                 float32 weight);
-
-/**
- * Create a set of language models sharing a common space of word IDs.
- *
- * This function creates a meta-language model which groups together a
- * set of language models, synchronizing word IDs between them.  To
- * use this language model, you can either select a submodel to use
- * exclusively using ngram_model_set_select(), or interpolate
- * between scores from all models.  To do the latter, you can either
- * pass a non-NULL value of the <code>weights</code> parameter, or
- * re-activate interpolation later on by calling
- * ngram_model_set_interp().
- *
- * In order to make this efficient, there are some restrictions on the
- * models that can be grouped together.  The most important (and
- * currently the only) one is that they <strong>must</strong> all
- * share the same log-math parameters.
- *
- * @param config Any configuration parameters to be shared between models.
- * @param models Array of pointers to previously created language models.
- * @param names Array of strings to use as unique identifiers for LMs.
- * @param weights Array of weights to use in interpolating LMs, or NULL
- *                for no interpolation.
- * @param n_models Number of elements in the arrays passed to this function.
- */
-SPHINXBASE_EXPORT
-ngram_model_t *ngram_model_set_init(cmd_ln_t *config,
-                                    ngram_model_t **models,
-                                    char **names,
-                                    const float32 *weights,
-                                    int32 n_models);
-
-/**
- * Read a set of language models from a control file.
- *
- * This file creates a language model set from a "control file" of
- * the type used in Sphinx-II and Sphinx-III.
- * File format (optional stuff is indicated by enclosing in []):
- * 
- * <pre>
- *   [{ LMClassFileName LMClassFilename ... }]
- *   TrigramLMFileName LMName [{ LMClassName LMClassName ... }]
- *   TrigramLMFileName LMName [{ LMClassName LMClassName ... }]
- *   ...
- * (There should be whitespace around the { and } delimiters.)
- * </pre>
- * 
- * This is an extension of the older format that had only TrigramLMFilenName
- * and LMName pairs.  The new format allows a set of LMClass files to be read
- * in and referred to by the trigram LMs.
- * 
- * No "comments" allowed in this file.
- *
- * @param config Configuration parameters.
- * @param lmctlfile Path to the language model control file.
- * @param lmath Log-math parameters to use for probability
- *              calculations.  Ownership of this object is assumed by
- *              the newly created ngram_model_t, and you should not
- *              attempt to free it manually.  If you wish to reuse it
- *              elsewhere, you must retain it with logmath_retain().
- * @return newly created language model set.
- */
-SPHINXBASE_EXPORT
-ngram_model_t *ngram_model_set_read(cmd_ln_t *config,
-                                    const char *lmctlfile,
-                                    logmath_t *lmath);
-
-/**
- * Returns the number of language models in a set.
- */
-SPHINXBASE_EXPORT
-int32 ngram_model_set_count(ngram_model_t *set);
-
-/**
- * Iterator over language models in a set.
- */
-typedef struct ngram_model_set_iter_s ngram_model_set_iter_t;
-
-/**
- * Begin iterating over language models in a set.
- *
- * @return iterator pointing to the first language model, or NULL if no models remain.
- */
-SPHINXBASE_EXPORT
-ngram_model_set_iter_t *ngram_model_set_iter(ngram_model_t *set);
-
-/**
- * Move to the next language model in a set.
- *
- * @return iterator pointing to the next language model, or NULL if no models remain.
- */
-SPHINXBASE_EXPORT
-ngram_model_set_iter_t *ngram_model_set_iter_next(ngram_model_set_iter_t *itor);
-
-/**
- * Finish iteration over a langauge model set.
- */
-SPHINXBASE_EXPORT
-void ngram_model_set_iter_free(ngram_model_set_iter_t *itor);
-
-/**
- * Get language model and associated name from an iterator.
- *
- * @param itor the iterator
- * @param lmname Output: string name associated with this language model.
- * @return Language model pointed to by this iterator.
- */
-SPHINXBASE_EXPORT
-ngram_model_t *ngram_model_set_iter_model(ngram_model_set_iter_t *itor,
-                                          char const **lmname);
-
-/**
- * Select a single language model from a set for scoring.
- *
- * @return the newly selected language model, or NULL if no language
- * model by that name exists.
- */
-SPHINXBASE_EXPORT
-ngram_model_t *ngram_model_set_select(ngram_model_t *set,
-                                      const char *name);
-
-/**
- * Look up a language model by name from a set.
- *
- * @return language model corresponding to <code>name</code>, or NULL
- * if no language model by that name exists.
- */
-SPHINXBASE_EXPORT
-ngram_model_t *ngram_model_set_lookup(ngram_model_t *set,
-                                      const char *name);
-
-/**
- * Get the current language model name, if any.
- */
-SPHINXBASE_EXPORT
-const char *ngram_model_set_current(ngram_model_t *set);
-
-/**
- * Set interpolation weights for a set and enables interpolation.
- *
- * If <code>weights</code> is NULL, any previously initialized set of
- * weights will be used.  If no weights were specified to
- * ngram_model_set_init(), then a uniform distribution will be used.
- */
-SPHINXBASE_EXPORT
-ngram_model_t *ngram_model_set_interp(ngram_model_t *set,
-                                      const char **names,
-                                      const float32 *weights);
-
-/**
- * Add a language model to a set.
- *
- * @param set The language model set to add to.
- * @param model The language model to add.
- * @param name The name to associate with this model.
- * @param weight Interpolation weight for this model, relative to the
- *               uniform distribution.  1.0 is a safe value.
- * @param reuse_widmap Reuse the existing word-ID mapping in
- * <code>set</code>.  Any new words present in <code>model</code>
- * will not be added to the word-ID mapping in this case.
- */
-SPHINXBASE_EXPORT
-ngram_model_t *ngram_model_set_add(ngram_model_t *set,
-                                   ngram_model_t *model,
-                                   const char *name,
-                                   float32 weight,
-                                   int reuse_widmap);
-
-/**
- * Remove a language model from a set.
- *
- * @param set The language model set to remove from.
- * @param name The name associated with the model to remove.
- * @param reuse_widmap Reuse the existing word-ID mapping in
- *                     <code>set</code>.
- */
-SPHINXBASE_EXPORT
-ngram_model_t *ngram_model_set_remove(ngram_model_t *set,
-                                      const char *name,
-                                      int reuse_widmap);
-
-/**
- * Set the word-to-ID mapping for this model set.
- */
-SPHINXBASE_EXPORT
-void ngram_model_set_map_words(ngram_model_t *set,
-                               const char **words,
-                               int32 n_words);
-
-/**
- * Query the word-ID mapping for the current language model.
- *
- * @return the local word ID in the current language model, or
- * NGRAM_INVALID_WID if <code>set_wid</code> is invalid or
- * interpolation is enabled.
- */
-SPHINXBASE_EXPORT
-int32 ngram_model_set_current_wid(ngram_model_t *set,
-                                  int32 set_wid);
-
-/**
- * Test whether a word ID corresponds to a known word in the current
- * state of the language model set.
- *
- * @return If there is a current language model, returns non-zero if
- * <code>set_wid</code> corresponds to a known word in that language
- * model.  Otherwise, returns non-zero if <code>set_wid</code>
- * corresponds to a known word in any language model.
- */
-SPHINXBASE_EXPORT
-int32 ngram_model_set_known_wid(ngram_model_t *set, int32 set_wid);
-
-/**
- * Flush any cached N-Gram information 
- *
- * Some types of models cache trigram or other N-Gram information to
- * speed repeated access to N-Grams with shared histories.  This
- * function flushes the cache so as to avoid dynamic memory leaks.
- */
-SPHINXBASE_EXPORT
-void ngram_model_flush(ngram_model_t *lm);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __NGRAM_MODEL_H__ */
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/pio.h
+++ /dev/null
@@ -1,302 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * pio.h -- Packaged I/O routines.
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * $Log: pio.h,v $
- * Revision 1.3  2005/06/22 08:00:09  arthchan2003
- * Completed all doxygen documentation on file description for libs3decoder/libutil/libs3audio and programs.
- *
- * Revision 1.2  2005/06/22 03:09:52  arthchan2003
- * 1, Fixed doxygen documentation, 2, Added  keyword.
- *
- * Revision 1.2  2005/06/16 00:14:08  archan
- * Added const keyword to file argument for file_open
- *
- * Revision 1.1  2005/06/15 06:11:03  archan
- * sphinx3 to s3.generic: change io.[ch] to pio.[ch]
- *
- * Revision 1.5  2005/06/15 04:21:46  archan
- * 1, Fixed doxygen-documentation, 2, Add  keyword such that changes will be logged into a file.
- *
- * Revision 1.4  2005/04/20 03:49:32  archan
- * Add const to string argument of myfopen.
- *
- * Revision 1.3  2005/03/30 01:22:48  archan
- * Fixed mistakes in last updates. Add
- *
- * 
- * 08-Dec-1999	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Added stat_mtime().
- * 
- * 11-Mar-1999	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Added _myfopen() and myfopen macro.
- * 
- * 05-Sep-97	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Started.
- */
-
-
-#ifndef _LIBUTIL_IO_H_
-#define _LIBUTIL_IO_H_
-
-#include <stdio.h>
-#if !defined(_WIN32_WCE) && !(defined(__ADSPBLACKFIN__) && !defined(__linux__))
-#include <sys/stat.h>
-#endif
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-/** \file pio.h
- * \brief file IO related operations.  
- *
- * Custom fopen with error checking is implemented. fopen_comp can
- * open a file with .z, .Z, .gz or .GZ extension
- *  
- * WARNING: Usage of stat_retry will results in 100s of waiting time
- * if the file doesn't exist.  
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/**
- * Like fopen, but use popen and zcat if it is determined that "file" is compressed
- * (i.e., has a .z, .Z, .gz, or .GZ extension).
- */
-SPHINXBASE_EXPORT
-FILE *fopen_comp (const char *file,		/**< In: File to be opened */
-		  const char *mode,		/**< In: "r" or "w", as with normal fopen */
-		  int32 *ispipe	/**< Out: On return *ispipe is TRUE iff file
-				   was opened via a pipe */
-	);
-
-/**
- * Close a file opened using fopen_comp.
- */
-SPHINXBASE_EXPORT
-void fclose_comp (FILE *fp,		/**< In: File pointer to be closed */
-		  int32 ispipe	/**< In: ispipe argument that was returned by the
-				   corresponding fopen_comp() call */
-	);
-
-/**
- * Open a file for reading, but if file not present try to open compressed version (if
- * file is uncompressed, and vice versa).
- */
-SPHINXBASE_EXPORT
-FILE *fopen_compchk (const char *file,	/**< In: File to be opened */
-		     int32 *ispipe	/**< Out: On return *ispipe is TRUE iff file
-					   was opened via a pipe */
-	);
-
-/**
- * Wrapper around fopen to check for failure and E_FATAL if failed.
- */
-SPHINXBASE_EXPORT
-FILE *_myfopen(const char *file, const char *mode,
-	       const char *pgm, int32 line);	/* In: __FILE__, __LINE__ from where called */
-#define myfopen(file,mode)	_myfopen((file),(mode),__FILE__,__LINE__)
-
-
-/**
- * NFS file reads seem to fail now and then.  Use the following functions in place of
- * the regular fread.  It retries failed freads several times and quits only if all of
- * them fail.  Be aware, however, that even normal failures such as attempting to read
- * beyond EOF will trigger such retries, wasting about a minute in retries.
- * Arguments identical to regular fread.
- */
-SPHINXBASE_EXPORT
-int32 fread_retry(void *pointer, int32 size, int32 num_items, FILE *stream);
-
-/**
- * Read a line of arbitrary length from a file and return it as a
- * newly allocated string.
- *
- * @deprecated Use line iterators instead.
- *
- * @param stream The file handle to read from.
- * @param out_len Output: if not NULL, length of the string read.
- * @return allocated string containing the line, or NULL on error or EOF.
- */
-SPHINXBASE_EXPORT
-char *fread_line(FILE *stream, size_t *out_len);
-
-/**
- * Line iterator for files.
- */
-typedef struct lineiter_t {
-    char *buf;
-    FILE *fh;
-    int32 bsiz;
-    int32 len;
-    int32 clean;
-    int32 lineno;
-} lineiter_t;
-
-/**
- * Start reading lines from a file.
- */
-SPHINXBASE_EXPORT
-lineiter_t *lineiter_start(FILE *fh);
-
-/**
- * Start reading lines from a file, skip comments and trim lines.
- */
-SPHINXBASE_EXPORT
-lineiter_t *lineiter_start_clean(FILE *fh);
-
-/**
- * Move to the next line in the file.
- */
-SPHINXBASE_EXPORT
-lineiter_t *lineiter_next(lineiter_t *li);
-
-/**
- * Stop reading lines from a file.
- */
-SPHINXBASE_EXPORT
-void lineiter_free(lineiter_t *li);
-
-/**
- * Returns current line number.
- */
-SPHINXBASE_EXPORT
-int lineiter_lineno(lineiter_t *li);
-
-
-#ifdef _WIN32_WCE
-/* Fake this for WinCE which has no stat() */
-#include <windows.h>
-struct stat {
-    DWORD st_mtime;
-    DWORD st_size;
-};
-#endif /* _WIN32_WCE */
-
-#if defined(__ADSPBLACKFIN__) && !defined(__linux__)
-struct stat {
-    int32 st_mtime;
-    int32 st_size;
-};
-
-#endif
-
-/**
- * Bitstream encoder - for writing compressed files.
- */
-typedef struct bit_encode_s bit_encode_t;
-
-/**
- * Attach bitstream encoder to a file.
- */
-bit_encode_t *bit_encode_attach(FILE *outfh);
-
-/**
- * Retain pointer to a bit encoder.
- */
-bit_encode_t *bit_encode_retain(bit_encode_t *be);
-
-/**
- * Release pointer to a bit encoder.
- *
- * Note that this does NOT flush any leftover bits.
- */
-int bit_encode_free(bit_encode_t *be);
-
-/**
- * Write bits to encoder.
- */
-int bit_encode_write(bit_encode_t *be, unsigned char const *bits, int nbits);
-
-/**
- * Write lowest-order bits of codeword to encoder.
- */
-int bit_encode_write_cw(bit_encode_t *be, uint32 codeword, int nbits);
-
-/**
- * Flush any unwritten bits, zero-padding if necessary.
- */
-int bit_encode_flush(bit_encode_t *be);
-
-/**
- * There is no bitstream decoder, because a stream abstraction is too
- * slow.  Instead we read blocks of bits and treat them as bitvectors.
- */
-
-/**
- * Like fread_retry, but for stat.  Arguments identical to regular stat.
- * Return value: 0 if successful, -1 if stat failed several attempts.
- */
-SPHINXBASE_EXPORT
-int32 stat_retry (const char *file, struct stat *statbuf);
-
-/**
- * Return time of last modification for the given file, or -1 if stat fails.
- */
-
-SPHINXBASE_EXPORT
-int32 stat_mtime (const char *file);
-
-/**
- * Create a directory and all of its parent directories, as needed.
- *
- * @return 0 on success, <0 on failure.
- */
-SPHINXBASE_EXPORT
-int build_directory(const char *path);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/prim_type.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * prim_type.h -- Primitive types; more machine-independent.
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * $Log: prim_type.h,v $
- * Revision 1.12  2005/10/05 00:31:14  dhdfu
- * Make int8 be explicitly signed (signedness of 'char' is
- * architecture-dependent).  Then make a bunch of things use uint8 where
- * signedness is unimportant, because on the architecture where 'char' is
- * unsigned, it is that way for a reason (signed chars are slower).
- *
- * Revision 1.11  2005/06/22 03:10:23  arthchan2003
- * Added  keyword.
- *
- * Revision 1.3  2005/03/30 01:22:48  archan
- * Fixed mistakes in last updates. Add
- *
- * 
- * 12-Mar-1999	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon
- * 		Added arraysize_t, point_t, fpoint_t.
- * 
- * 01-Feb-1999	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon
- * 		Added anytype_t.
- * 
- * 08-31-95	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon
- * 		Created.
- */
-
-
-#ifndef _LIBUTIL_PRIM_TYPE_H_
-#define _LIBUTIL_PRIM_TYPE_H_
-
-/**
- * @file prim_type.h
- * @brief Basic type definitions used in Sphinx. 
- */
- 
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-} /* Fool Emacs into not indenting things. */
-#endif
-
-#include <sphinx_config.h>
-
-/* Define some things for VisualDSP++ */
-#if defined(__ADSPBLACKFIN__) && !defined(__GNUC__)
-# ifndef HAVE_LONG_LONG
-#  define HAVE_LONG_LONG
-# endif
-# ifndef ssize_t
-typedef signed int ssize_t;
-# endif
-# define SIZEOF_LONG_LONG 8
-# define __BIGSTACKVARIABLE__ static
-#else /* Not VisualDSP++ */
-# define __BIGSTACKVARIABLE__
-#endif
-
-/**
- * Union of basic types.
- */
-typedef union anytype_s {
-    void *ptr;
-    long i;
-    unsigned long ui;
-    double fl;
-} anytype_t;
-
-/*
- * Assume P64 or LP64.  If you need to port this to a DSP, let us know.
- */
-typedef int		int32;
-typedef short		int16;
-typedef signed char	int8;
-typedef unsigned int	uint32;
-typedef unsigned short	uint16;
-typedef unsigned char	uint8;
-typedef float		float32;
-typedef double		float64;
-#if defined(_MSC_VER)
-typedef __int64	         int64;
-typedef unsigned __int64 uint64;
-#elif defined(HAVE_LONG_LONG) && (SIZEOF_LONG_LONG == 8)
-typedef long long	   int64;
-typedef unsigned long long uint64;
-#else /* !HAVE_LONG_LONG && SIZEOF_LONG_LONG == 8 */
-typedef double          int64;
-typedef double          uint64;
-#endif /* !HAVE_LONG_LONG && SIZEOF_LONG_LONG == 8 */
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef NULL
-#define NULL (void *)0
-#endif
-
-/* These really ought to come from <limits.h>, but not everybody has that. */
-/* Useful constants */
-#define MAX_INT32		((int32) 0x7fffffff)
-#define MAX_INT16		((int16) 0x00007fff)
-#define MAX_INT8		((int8)  0x0000007f)
-
-#define MAX_NEG_INT32		((int32) 0x80000000)
-#define MAX_NEG_INT16		((int16) 0xffff8000)
-#define MAX_NEG_INT8		((int8)  0xffffff80)
-
-#define MAX_UINT32		((uint32) 0xffffffff)
-#define MAX_UINT16		((uint16) 0x0000ffff)
-#define MAX_UINT8		((uint8)  0x000000ff)
-
-/* The following are approximate; IEEE floating point standards might quibble! */
-#define MAX_POS_FLOAT32		3.4e+38f
-#define MIN_POS_FLOAT32		1.2e-38f	/* But not 0 */
-#define MAX_POS_FLOAT64		1.8e+307
-#define MIN_POS_FLOAT64		2.2e-308
-
-#define MAX_IEEE_NORM_POS_FLOAT32        3.4e+38f
-#define MIN_IEEE_NORM_POS_FLOAT32        1.2e-38f
-#define MIN_IEEE_NORM_NEG_FLOAT32       -3.4e+38f
-#define MAX_IEEE_NORM_POS_FLOAT64        1.8e+307
-#define MIN_IEEE_NORM_POS_FLOAT64        2.2e-308
-#define MIN_IEEE_NORM_NEG_FLOAT64       -1.8e+307
-
-/* Will the following really work?? */
-#define MIN_NEG_FLOAT32		((float32) (-MIN_POS_FLOAT32))
-#define MIN_NEG_FLOAT64		((float64) (-MIN_POS_FLOAT64))
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/profile.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1999-2001 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- * profile.h -- For timing and event counting.
- *
- * **********************************************
- * CMU ARPA Speech Project
- *
- * Copyright (c) 1999 Carnegie Mellon University.
- * ALL RIGHTS RESERVED.
- * **********************************************
- * 
- * HISTORY
- * $Log: profile.h,v $
- * Revision 1.10  2005/06/22 03:10:59  arthchan2003
- * 1, Fixed doxygen documentation, 2, Added  keyword.
- *
- * Revision 1.5  2005/06/15 04:21:47  archan
- * 1, Fixed doxygen-documentation, 2, Add  keyword such that changes will be logged into a file.
- *
- * Revision 1.4  2005/04/25 19:22:48  archan
- * Refactor out the code of rescoring from lexical tree. Potentially we want to turn off the rescoring if we need.
- *
- * Revision 1.3  2005/03/30 01:22:48  archan
- * Fixed mistakes in last updates. Add
- *
- * 
- * 11-Mar-1999	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Added ptmr_init().
- * 
- * 19-Jun-97	M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
- * 		Created from earlier Sphinx-3 version.
- */
-
-
-#ifndef _LIBUTIL_PROFILE_H_
-#define _LIBUTIL_PROFILE_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-} /* Fool Emacs into not indenting things. */
-#endif
-  
-/** \file profile.h
- * \brief Implementation of profiling, include counting , timing, cpu clock checking
- *  
- * Currently, function host_endian is also in this function. It is
- * not documented.  
- */
-
-#include <stdio.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-
-/**
- * \struct pctr_t 
- *
- * Generic event counter for profiling.  User is responsible for allocating an array
- * of the desired number.  There should be a sentinel with name = NULL.
- */
-typedef struct {
-	char *name;		/**< Counter print name; NULL 
-				   terminates array of counters
-				   Used by pctr_print_all */
-	int32 count;		/**< Counter value */
-} pctr_t;
-
-/**
- * operations of pctr_t
- */
-
-/**
- * Initialize a counter
- * @return an initialized counter 
- */ 
-SPHINXBASE_EXPORT
-pctr_t* pctr_new (
-	char *name   /**< The name of the counter */
-	);
-
-/**
- * Reset a counter
- */ 
-
-SPHINXBASE_EXPORT
-void pctr_reset (pctr_t *ctr  /**< A pointer of a counter */
-	);
-
-/**
- * Print a counter
- */ 
-SPHINXBASE_EXPORT
-void pctr_print(FILE *fp,      /**< A file pointer */
-		pctr_t *ctr   /**< A pointer of a counter */
-	);
-
-/**
- * Increment a counter
- */ 
-SPHINXBASE_EXPORT
-void pctr_increment (pctr_t *ctr, /**< A pointer of a counter */
-		     int32 inc   /**< The increment of the counter */
-	);
-
-/**
-   Free the counter 
-*/
-SPHINXBASE_EXPORT
-void pctr_free(pctr_t* ctr /**< A pointer of a counter */ 
-	);
-
-
-/**
- * \struct ptmr_t
- * Generic timer structures and functions for coarse-grained performance measurements
- * using standard system calls.
- */
-typedef struct {
-	const char *name;		/**< Timer print name; NULL terminates an array of timers.
-					   Used by ptmr_print_all */
-	float64 t_cpu;		/**< CPU time accumulated since most recent reset op */
-	float64 t_elapsed;		/**< Elapsed time accumulated since most recent reset */
-	float64 t_tot_cpu;		/**< Total CPU time since creation */
-	float64 t_tot_elapsed;	/**< Total elapsed time since creation */
-	float64 start_cpu;		/**< ---- FOR INTERNAL USE ONLY ---- */
-	float64 start_elapsed;	/**< ---- FOR INTERNAL USE ONLY ---- */
-} ptmr_t;
-
-
-
-/** Start timing using tmr */
-SPHINXBASE_EXPORT
-void ptmr_start (ptmr_t *tmr /**< The timer*/
-	);
-
-/** Stop timing and accumulate tmr->{t_cpu, t_elapsed, t_tot_cpu, t_tot_elapsed} */
-SPHINXBASE_EXPORT
-void ptmr_stop (ptmr_t *tmr  /**< The timer*/
-	);
-
-/** Reset tmr->{t_cpu, t_elapsed} to 0.0 */
-SPHINXBASE_EXPORT
-void ptmr_reset (ptmr_t *tmr  /**< The timer*/
-	);
-
-/** Reset tmr->{t_cpu, t_elapsed, t_tot_cpu, t_tot_elapsed} to 0.0 
- */
-SPHINXBASE_EXPORT
-void ptmr_init (ptmr_t *tmr /**< The timer*/
-	);
-
-
-/**
- * Reset t_cpu, t_elapsed of all timer modules in array tmr[] to 0.0.
- * The array should be terminated with a sentinel with .name = NULL.
- */
-SPHINXBASE_EXPORT
-void ptmr_reset_all (ptmr_t *tmr /**< The timer*/
-	);
-
-/**
- * Print t_cpu for all timer modules in tmr[], normalized by norm (i.e., t_cpu/norm).
- * The array should be terminated with a sentinel with .name = NULL.
- */
-SPHINXBASE_EXPORT
-void ptmr_print_all (FILE *fp,    /**< The file pointer */
-		     ptmr_t *tmr, /**< The timer*/
-		     float64 norm
-	);
-
-
-/**
- * Return the processor clock speed (in MHz); only available on some machines (Alphas).
- * The dummy argument can be any integer value.
- */
-SPHINXBASE_EXPORT
-int32 host_pclk (int32 dummy);
-
-
-/*
- * Check the native byte-ordering of the machine by writing a magic
- * number to a temporary file and reading it back.  * Return value:
- * 0 if BIG-ENDIAN, 1 if LITTLE-ENDIAN, -1 if error.  
- */
-SPHINXBASE_EXPORT
-int32 host_endian ( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/sbthread.h
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 2008 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/**
- * @file sbthread.h 
- * @brief Simple portable thread functions.
- * @author David Huggins-Daines <dhuggins@cs.cmu.edu>
- **/
-
-#ifndef __SBTHREAD_H__
-#define __SBTHREAD_H__
-
-#include <sphinx_config.h>
-
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/cmd_ln.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/**
- * Thread object.
- */
-typedef struct sbthread_s sbthread_t;
-
-/**
- * Asynchronous message queue object.
- */
-typedef struct sbmsgq_s sbmsgq_t;
-
-/**
- * Mutex (critical section) object.
- */
-typedef struct sbmtx_s sbmtx_t;
-
-/**
- * Event object.
- */
-typedef struct sbevent_s sbevent_t;
-
-/**
- * Entry point for a thread.
- */
-typedef int (*sbthread_main)(sbthread_t *th);
-
-/**
- * Start a new thread.
- */
-SPHINXBASE_EXPORT
-sbthread_t *sbthread_start(cmd_ln_t *config, sbthread_main func, void *arg);
-
-/**
- * Wait for a thread to complete.
- */
-SPHINXBASE_EXPORT
-int sbthread_wait(sbthread_t *th);
-
-/**
- * Free a thread object.
- */
-SPHINXBASE_EXPORT
-void sbthread_free(sbthread_t *th);
-
-/**
- * Get configuration object from a thread.
- */
-SPHINXBASE_EXPORT
-cmd_ln_t *sbthread_config(sbthread_t *th);
-
-/**
- * Get argument pointer from a thread.
- */
-SPHINXBASE_EXPORT
-void *sbthread_arg(sbthread_t *th);
-
-/**
- * Get message queue from a thread.
- */
-SPHINXBASE_EXPORT
-sbmsgq_t *sbthread_msgq(sbthread_t *th);
-
-/**
- * Wait for a thread to complete.
- */
-SPHINXBASE_EXPORT
-int sbthread_wait(sbthread_t *th);
-
-/**
- * Send an asynchronous message to a thread.
- *
- * Each thread gets a message queue by default, so this is just a
- * wrapper around sbmsgq_send().
- */
-SPHINXBASE_EXPORT
-int sbthread_send(sbthread_t *th, size_t len, void const *data);
-
-/**
- * Create a message queue.
- *
- * @param depth Depth of the queue.
- */
-SPHINXBASE_EXPORT
-sbmsgq_t *sbmsgq_init(size_t depth);
-
-/**
- * Free a message queue.
- */
-SPHINXBASE_EXPORT
-void sbmsgq_free(sbmsgq_t *q);
-
-/**
- * Post a message to a queue.
- */
-SPHINXBASE_EXPORT
-int sbmsgq_send(sbmsgq_t *q, size_t len, void const *data);
-
-/**
- * Wait for a message from a queue.
- */
-SPHINXBASE_EXPORT
-void *sbmsgq_wait(sbmsgq_t *q, size_t *out_len, int sec, int nsec);
-
-/**
- * Create a mutex.
- */
-SPHINXBASE_EXPORT
-sbmtx_t *sbmtx_init(void);
-
-/**
- * Try to acquire a mutex.
- */
-SPHINXBASE_EXPORT
-int sbmtx_trylock(sbmtx_t *mtx);
-
-/**
- * Acquire a mutex.
- */
-SPHINXBASE_EXPORT
-int sbmtx_lock(sbmtx_t *mtx);
-
-/**
- * Release a mutex.
- */
-SPHINXBASE_EXPORT
-int sbmtx_unlock(sbmtx_t *mtx);
-
-/**
- * Dispose of a mutex.
- */
-SPHINXBASE_EXPORT
-void sbmtx_free(sbmtx_t *mtx);
-
-/**
- * Initialize an event.
- */
-SPHINXBASE_EXPORT
-sbevent_t *sbevent_init(void);
-
-/**
- * Free an event.
- */
-SPHINXBASE_EXPORT
-void sbevent_free(sbevent_t *evt);
-
-/**
- * Signal an event.
- */
-SPHINXBASE_EXPORT
-int sbevent_signal(sbevent_t *evt);
-
-/**
- * Wait for an event to be signalled.
- */
-SPHINXBASE_EXPORT
-int sbevent_wait(sbevent_t *evt, int sec, int nsec);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __SBTHREAD_H__ */
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/sphinx_config.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#if (  defined(_WIN32) || defined(__CYGWIN__) )
-/* include/sphinx_config.h, defaults for Win32 */
-/* sphinx_config.h: Externally visible configuration parameters for
- * SphinxBase.
- */
-
-/* Default radix point for fixed-point */
-/* #undef DEFAULT_RADIX */
-
-/* Use Q15 fixed-point computation */
-/* #undef FIXED16 */
-
-/* Use fixed-point computation */
-/* #undef FIXED_POINT */
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
-#else
-/* include/sphinx_config.h.  Generated from sphinx_config.h.in by configure.  */
-/* sphinx_config.h: Externally visible configuration parameters */
-
-/* Default radix point for fixed-point */
-/* #undef DEFAULT_RADIX */
-
-/* Use Q15 fixed-point computation */
-/* #undef FIXED16 */
-
-/* Use fixed-point computation */
-/* #undef FIXED_POINT */
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 8
-
-/* Define to 1 if the system has the type `long long'. */
-/*#define HAVE_LONG_LONG 1*/
-
-/* The size of `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
-/* Enable debugging output */
-/* #undef SPHINX_DEBUG */
-#endif
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/sphinxbase_export.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef __SPHINXBASE_EXPORT_H__
-#define __SPHINXBASE_EXPORT_H__
-
-/* Win32/WinCE DLL gunk */
-#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(_WIN32_WP) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__WINSCW__) && !defined(__SYMBIAN32__)
-#if defined(SPHINXBASE_EXPORTS) /* Visual Studio */
-#define SPHINXBASE_EXPORT __declspec(dllexport)
-#else
-#define SPHINXBASE_EXPORT __declspec(dllimport)
-#endif
-#else /* !_WIN32 */
-#define SPHINXBASE_EXPORT
-#endif
-
-#endif /* __SPHINXBASE_EXPORT_H__ */
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/strfuncs.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1995-2004 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/**
- * @file strfuncs.h
- * @brief Miscellaneous useful string functions
- */
-
-#ifndef __SB_STRFUNCS_H__
-#define __SB_STRFUNCS_H__
-
-#include <stdarg.h>
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if 0
-/* Fool Emacs. */
-}
-#endif
-
-/**
- * Concatenate a NULL-terminated argument list of strings, returning a
- * newly allocated string.
- **/
-SPHINXBASE_EXPORT
-char *string_join(const char *base, ...);
-
-/**
- * Which end of a string to operate on for string_trim().
- */
-enum string_edge_e {
-    STRING_START,	/**< Beginning of string. */
-    STRING_END,		/**< End of string. */
-    STRING_BOTH		/**< Both ends of string. */
-};
-
-/**
- * Remove whitespace from a string, modifying it in-place.
- *
- * @param string string to trim, contents will be modified.
- * @param which one of STRING_START, STRING_END, or STRING_BOTH.
- */
-SPHINXBASE_EXPORT
-char *string_trim(char *string, enum string_edge_e which);
-
-/**
- * Locale independent version of atof().
- *
- * This function behaves like atof() in the "C" locale.  Switching
- * locale in a threaded program is extremely uncool, therefore we need
- * this since we pass floats as strings in 1000 different places.
- */
-SPHINXBASE_EXPORT
-double atof_c(char const *str);
-
-/* FIXME: Both of these string splitting functions basically suck.  I
- have attempted to fix them as best I can.  (dhuggins@cs, 20070808) */
-
-/** 
- * Convert a line to an array of "words", based on whitespace separators.  A word
- * is a string with no whitespace chars in it.
- * Note that the string line is modified as a result: NULL chars are placed after
- * every word in the line.
- * Return value: No. of words found; -1 if no. of words in line exceeds n_wptr.
- */
-SPHINXBASE_EXPORT
-int32 str2words (char *line,	/**< In/Out: line to be parsed.  This
-				   string will be modified! (NUL
-				   characters inserted at word
-				   boundaries) */
-		 char **wptr,	/**< In/Out: Array of pointers to
-				   words found in line.  The array
-				   must be allocated by the caller.
-				   It may be NULL in which case the
-				   number of words will be counted.
-				   This allows you to allcate it to
-				   the proper size, e.g.:
-				   
-				   n = str2words(line, NULL, 0);
-				   wptr = ckd_calloc(n, sizeof(*wptr));
-				   str2words(line, wptr, n);
-				*/
-		 int32 n_wptr	/**< In: Size of wptr array, ignored
-				   if wptr == NULL */
-	);
-
-/**
- * Yet another attempt at a clean "next-word-in-string" function.  See arguments below.
- * @return Length of word returned, or -1 if nothing found.
- * This allows you to scan through a line:
- *
- * <pre>
- * while ((n = nextword(line, delim, &word, &delimfound)) >= 0) {
- *     ... do something with word ..
- *     word[n] = delimfound;
- *     line = word + n;
- * }
- * </pre>
- */
-SPHINXBASE_EXPORT
-int32 nextword (char *line, /**< Input: String being searched for next word.
-			       Will be modified by this function (NUL characters inserted) */
-		const char *delim, /**< Input: A word, if found, must be delimited at either
-			         end by a character from this string (or at the end
-			         by the NULL char) */
-		char **word,/**< Output: *word = ptr within line to beginning of first
-			         word, if found.  Delimiter at the end of word replaced
-			         with the NULL char. */
-		char *delimfound /**< Output: *delimfound = original delimiter found at the end
-				    of the word.  (This way, the caller can restore the
-				    delimiter, preserving the original string.) */
-	);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __SB_STRFUNCS_H__ */
deleted file mode 100644
--- a/media/sphinxbase/sphinxbase/yin.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/*
- * Copyright (c) 2008 Beyond Access, Inc.  All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 
- * THIS SOFTWARE IS PROVIDED BY BEYOND ACCESS, INC. ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL BEYOND ACCESS, INC.  NOR
- * ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @file yin.h
- * @brief Implementation of pitch estimation
- * @author David Huggins-Daines <dhuggins@cs.cmu.edu>
- *
- * This implements part of the YIN algorithm:
- *
- * "YIN, a fundamental frequency estimator for speech and music".
- * Alain de Cheveigné and Hideki Kawahara.  Journal of the Acoustical
- * Society of America, 111 (4), April 2002.
- */
-
-#ifndef __YIN_H__
-#define __YIN_H__
-
-#ifdef __cplusplus
-extern "C"
-#endif
-#if 0
-} /* Fool Emacs. */
-#endif
-
-/* Win32/WinCE DLL gunk */
-#include <sphinxbase/sphinxbase_export.h>
-#include <sphinxbase/prim_type.h>
-
-/**
- * Frame-based moving-window pitch estimator.
- */
-typedef struct yin_s yin_t;
-
-/**
- * Initialize moving-window pitch estimation.
- */
-SPHINXBASE_EXPORT
-yin_t *yin_init(int frame_size, float search_threshold,
-                float search_range, int smooth_window);
-
-/**
- * Free a moving-window pitch estimator.
- */
-SPHINXBASE_EXPORT
-void yin_free(yin_t *pe);
-
-/**
- * Start processing an utterance.
- */
-SPHINXBASE_EXPORT
-void yin_start(yin_t *pe);
-
-/**
- * Mark the end of an utterance.
- */
-SPHINXBASE_EXPORT
-void yin_end(yin_t *pe);
-
-/**
- * Store a frame of data to the pitch estimator.
- *
- * @param pe Pitch estimator.
- * @param frame Frame of <code>frame_size</code> (see
- * yin_init()) samples of audio data.
- */
-SPHINXBASE_EXPORT
-void yin_store(yin_t *pe, int16 const *frame);
-
-/**
- * Feed a frame of data to the pitch estimator.
- *
- * @param pe Pitch estimator.
- * @param frame Frame of <code>frame_size</code> (see
- * yin_init()) samples of audio data.
- */
-SPHINXBASE_EXPORT
-void yin_write(yin_t *pe, int16 const *frame);
-
-/**
- * Feed stored frame of data to the pitch estimator.
- * (see yin_store())
- *
- * @param pe Pitch estimator.
- */
-SPHINXBASE_EXPORT
-void yin_write_stored(yin_t *pe);
-
-/**
- * Read a raw estimated pitch value from the pitch estimator.
- *
- * @param pe Pitch estimator.
- * @param out_period Output: an estimate of the period (*not* the pitch)
- *                  of the signal in samples.
- * @param out_bestdiff Output: the minimum normalized difference value
- *                     associated with <code>*out_pitch</code>, in Q15
- *                     format (i.e. scaled by 32768).  This can be
- *                     interpreted as one minus the probability of voicing.
- * @return Non-zero if enough data was avaliable to return a pitch
- *         estimate, zero otherwise.
- */
-SPHINXBASE_EXPORT
-int yin_read(yin_t *pe, uint16 *out_period, float *out_bestdiff);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __YIN_H__ */
-
deleted file mode 100644
--- a/media/sphinxbase/src/libsphinxbase/fe/fe_interface.c
+++ /dev/null
@@ -1,776 +0,0 @@
-/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* ====================================================================
- * Copyright (c) 1996-2004 Carnegie Mellon University.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * This work was supported in part by funding from the Defense Advanced 
- * Research Projects Agency and the National Science Foundation of the 
- * United States of America, and the CMU Sphinx Speech Consortium.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-#include <stdlib.h>
-#include <assert.h>
-#ifdef _WIN32_WCE
-#include <windows.h>
-#else
-#include <time.h>
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "sphinxbase/prim_type.h"
-#include "sphinxbase/byteorder.h"
-#include "sphinxbase/fixpoint.h"
-#include "sphinxbase/genrand.h"
-#include "sphinxbase/err.h"
-#include "sphinxbase/cmd_ln.h"
-#include "sphinxbase/ckd_alloc.h"
-
-#include "fe_internal.h"
-#include "fe_warp.h"
-
-static const arg_t fe_args[] = {
-    waveform_to_cepstral_command_line_macro(),
-    { NULL, 0, NULL, NULL }
-};
-
-int
-fe_parse_general_params(cmd_ln_t *config, fe_t * fe)
-{
-    int j, frate;
-
-    fe->config = config;
-    fe->sampling_rate = cmd_ln_float32_r(config, "-samprate");
-    frate = cmd_ln_int32_r(config, "-frate");
-    if (frate > MAX_INT16 || frate > fe->sampling_rate || frate < 1) {
-        E_ERROR
-            ("Frame rate %d can not be bigger than sample rate %.02f\n",
-             frate, fe->sampling_rate);
-        return -1;
-    }
-
-    fe->frame_rate = (int16)frate;
-    if (cmd_ln_boolean_r(config, "-dither")) {
-        fe->dither = 1;
-        fe->seed = cmd_ln_int32_r(config, "-seed");
-    }
-#ifdef WORDS_BIGENDIAN
-    fe->swap = strcmp("big", cmd_ln_str_r(config, "-input_endian")) == 0 ? 0 : 1;
-#else        
-    fe->swap = strcmp("little", cmd_ln_str_r(config, "-input_endian")) == 0 ? 0 : 1;
-#endif
-    fe->window_length = cmd_ln_float32_r(config, "-wlen");
-    fe->pre_emphasis_alpha = cmd_ln_float32_r(config, "-alpha");
-
-    fe->num_cepstra = (uint8)cmd_ln_int32_r(config, "-ncep");
-    fe->fft_size = (int16)cmd_ln_int32_r(config, "-nfft");
-
-    /* Check FFT size, compute FFT order (log_2(n)) */
-    for (j = fe->fft_size, fe->fft_order = 0; j > 1; j >>= 1, fe->fft_order++) {
-        if (((j % 2) != 0) || (fe->fft_size <= 0)) {
-            E_ERROR("fft: number of points must be a power of 2 (is %d)\n",
-                    fe->fft_size);
-            return -1;
-        }
-    }
-    /* Verify that FFT size is greater or equal to window length. */
-    if (fe->fft_size < (int)(fe->window_length * fe->sampling_rate)) {
-        E_ERROR("FFT: Number of points must be greater or equal to frame size (%d samples)\n",
-                (int)(fe->window_length * fe->sampling_rate));
-        return -1;
-    }
-
-    fe->prespch_len = (int16)cmd_ln_int32_r(config, "-vad_prespeech");
-    fe->postspch_len = (int16)cmd_ln_int32_r(config, "-vad_postspeech");
-    fe->vad_threshold = cmd_ln_float32_r(config, "-vad_threshold");
-
-    fe->remove_dc = cmd_ln_boolean_r(config, "-remove_dc");
-    fe->remove_noise = cmd_ln_boolean_r(config, "-remove_noise");
-    fe->remove_silence = cmd_ln_boolean_r(config, "-remove_silence");
-
-    if (0 == strcmp(cmd_ln_str_r(config, "-transform"), "dct"))
-        fe->transform = DCT_II;
-    else if (0 == strcmp(cmd_ln_str_r(config, "-transform"), "legacy"))
-        fe->transform = LEGACY_DCT;
-    else if (0 == strcmp(cmd_ln_str_r(config, "-transform"), "htk"))
-        fe->transform = DCT_HTK;
-    else {
-        E_ERROR("Invalid transform type (values are 'dct', 'legacy', 'htk')\n");
-        return -1;
-    }
-
-    if (cmd_ln_boolean_r(config, "-logspec"))
-        fe->log_spec = RAW_LOG_SPEC;
-    if (cmd_ln_boolean_r(config, "-smoothspec"))
-        fe->log_spec = SMOOTH_LOG_SPEC;
-
-    return 0;
-}
-
-static int
-fe_parse_melfb_params(cmd_ln_t *config, fe_t *fe, melfb_t * mel)
-{
-    mel->sampling_rate = fe->sampling_rate;
-    mel->fft_size = fe->fft_size;
-    mel->num_cepstra = fe->num_cepstra;
-    mel->num_filters = cmd_ln_int32_r(config, "-nfilt");
-
-    if (fe->log_spec)
-        fe->feature_dimension = mel->num_filters;
-    else
-        fe->feature_dimension = fe->num_cepstra;
-
-    mel->upper_filt_freq = cmd_ln_float32_r(config, "-upperf");
-    mel->lower_filt_freq = cmd_ln_float32_r(config, "-lowerf");
-
-    mel->doublewide = cmd_ln_boolean_r(config, "-doublebw");
-
-    mel->warp_type = cmd_ln_str_r(config, "-warp_type");
-    mel->warp_params = cmd_ln_str_r(config, "-warp_params");
-    mel->lifter_val = cmd_ln_int32_r(config, "-lifter");
-
-    mel->unit_area = cmd_ln_boolean_r(config, "-unit_area");
-    mel->round_filters = cmd_ln_boolean_r(config, "-round_filters");
-
-    if (fe_warp_set(mel, mel->warp_type) != FE_SUCCESS) {
-        E_ERROR("Failed to initialize the warping function.\n");
-        return -1;
-    }
-    fe_warp_set_parameters(mel, mel->warp_params, mel->sampling_rate);
-    return 0;
-}
-
-void
-fe_print_current(fe_t const *fe)
-{
-    E_INFO("Current FE Parameters:\n");
-    E_INFO("\tSampling Rate:             %f\n", fe->sampling_rate);
-    E_INFO("\tFrame Size:                %d\n", fe->frame_size);
-    E_INFO("\tFrame Shift:               %d\n", fe->frame_shift);
-    E_INFO("\tFFT Size:                  %d\n", fe->fft_size);
-    E_INFO("\tLower Frequency:           %g\n",
-           fe->mel_fb->lower_filt_freq);
-    E_INFO("\tUpper Frequency:           %g\n",
-           fe->mel_fb->upper_filt_freq);
-    E_INFO("\tNumber of filters:         %d\n", fe->mel_fb->num_filters);
-    E_INFO("\tNumber of Overflow Samps:  %d\n", fe->num_overflow_samps);
-    E_INFO("\tStart Utt Status:          %d\n", fe->start_flag);
-    E_INFO("Will %sremove DC offset at frame level\n",
-           fe->remove_dc ? "" : "not ");
-    if (fe->dither) {
-        E_INFO("Will add dither to audio\n");
-        E_INFO("Dither seeded with %d\n", fe->seed);
-    }
-    else {
-        E_INFO("Will not add dither to audio\n");
-    }
-    if (fe->mel_fb->lifter_val) {
-        E_INFO("Will apply sine-curve liftering, period %d\n",
-               fe->mel_fb->lifter_val);
-    }
-    E_INFO("Will %snormalize filters to unit area\n",
-           fe->mel_fb->unit_area ? "" : "not ");
-    E_INFO("Will %sround filter frequencies to DFT points\n",
-           fe->mel_fb->round_filters ? "" : "not ");
-    E_INFO("Will %suse double bandwidth in mel filter\n",
-           fe->mel_fb->doublewide ? "" : "not ");
-}
-
-fe_t *
-fe_init_auto()
-{
-    return fe_init_auto_r(cmd_ln_get());
-}
-
-fe_t *
-fe_init_auto_r(cmd_ln_t *config)
-{
-    fe_t *fe;
-    int prespch_frame_len;
-
-    fe = (fe_t*)ckd_calloc(1, sizeof(*fe));
-    fe->refcount = 1;
-
-    /* transfer params to front end */
-    if (fe_parse_general_params(cmd_ln_retain(config), fe) < 0) {
-        fe_free(fe);
-        return NULL;
-    }
-
-    /* compute remaining fe parameters */
-    /* We add 0.5 so approximate the float with the closest
-     * integer. E.g., 2.3 is truncate to 2, whereas 3.7 becomes 4
-     */
-    fe->frame_shift = (int32) (fe->sampling_rate / fe->frame_rate + 0.5);
-    fe->frame_size = (int32) (fe->window_length * fe->sampling_rate + 0.5);
-    fe->prior = 0;
-    
-    fe_start_stream(fe);
-
-    assert (fe->frame_shift > 1);
-
-    if (fe->frame_size > (fe->fft_size)) {
-        E_ERROR
-            ("Number of FFT points has to be a power of 2 higher than %d, it is %d\n",
-             fe->frame_size, fe->fft_size);
-        fe_free(fe);
-        return NULL;
-    }
-
-    if (fe->dither)
-        fe_init_dither(fe->seed);
-
-    /* establish buffers for overflow samps and hamming window */
-    fe->overflow_samps = ckd_calloc(fe->frame_size, sizeof(int16));
-    fe->hamming_window = ckd_calloc(fe->frame_size/2, sizeof(window_t));
-
-    /* create hamming window */
<