提交 ba1aee8e authored 作者: Michael Jerris's avatar Michael Jerris

update to current unimrcp https://unimrcp.googlecode.com/svn/trunk@1014

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Fri Jun 26 18:17:10 2009 +0000

    Implemented START-INPUT-TIMERS

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1014 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Fri Jun 26 16:56:38 2009 +0000

    Fixed grammar file creation (the existing file must be truncated/overridden)

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1013 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Fri Jun 26 15:31:47 2009 +0000

    Added GET-RESULT processing, properly set completion causes in the responses to DEFINE-GRAMMAR and RECOGNIZE requests

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1012 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Thu Jun 25 19:21:34 2009 +0000

    Implemented grammar load/unload (DEFINE-GRAMMAR requests), implemented recognition complete timeout, introduced properties (to be loaded from config file)

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1011 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Wed Jun 24 14:31:37 2009 +0000

    Added the NOTICE corresponding to the section 4 d of the Apache License, Version 2.0

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1010 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Tue Jun 23 21:04:44 2009 +0000

    Added identifier@pocketsphinx traces

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1009 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Tue Jun 23 21:03:02 2009 +0000

   Added session identifier to engine channel (to be used for traces)

   git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1008 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Tue Jun 23 19:58:48 2009 +0000

   Properly handled race between STOP request and RECOGNITION-COMPLETE event, other enhancements

   git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1007 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Tue Jun 23 19:55:57 2009 +0000

   Added mpf_activity_detector_reset()

   git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1006 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Tue Jun 23 16:41:51 2009 +0000

   Added 32kHz and 48kHz sampling rates (still no resampling support in MPF, also make sure RTP packet length <= 1500 bytes)

   git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1005 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Mon Jun 22 20:13:29 2009 +0000

   Added flite m4 configure stuff

   git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1004 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Mon Jun 22 19:31:32 2009 +0000

    Added pocketsphinx.vcproj and flite.vcproj project files into unimrcp.sln (disabled by default)

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1003 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Mon Jun 22 19:26:38 2009 +0000

    Integrated utterance detection stuff (start-of-input, end-of-input), triggered partial and final recognition results

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1002 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: garmt.noname@gmail.com <garmt.noname@gmail.com@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Sun Jun 21 22:12:37 2009 +0000

    First implementation of flite plugin - voice awb only

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1001 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Sun Jun 21 06:23:58 2009 +0000

    Added framework for the development of flite plugin

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@1000 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Sat Jun 20 19:52:22 2009 +0000

    Added missing include paths and libs required for pocketsphinx

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@999 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Sat Jun 20 17:32:37 2009 +0000

    Started actual implementation of pocketsphinx plugin

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@998 f001bc3a-424a-0410-80a0-a715b8f413a8

Author: achaloyan <achaloyan@f001bc3a-424a-0410-80a0-a715b8f413a8>
Date:   Sat Jun 20 13:55:41 2009 +0000

    Added acmacros for pocketsphinx libs (src and installed dirs are suppored), cleaned up ./configure related stuff a bit

    git-svn-id: https://unimrcp.googlecode.com/svn/trunk@997 f001bc3a-424a-0410-80a0-a715b8f413a8





git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13987 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 fd8106af
Fri Jun 19 22:39:34 CDT 2009
Fri Jun 26 15:16:40 CDT 2009
The UniMRCP Project (http://www.unimrcp.org)
Copyright (C) 2008 Arsen Chaloyan
Licensed under the Apache License, Version 2.0 (the "License").
This product includes a number of subcomponents with
separate copyright notices and license terms.
Notice for APR (Apache Portable Runtime) library
---------------------------------------------------
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
Portions of this software were developed at the National Center
for Supercomputing Applications (NCSA) at the University of
Illinois at Urbana-Champaign.
This software contains code derived from the RSA Data Security
Inc. MD5 Message-Digest Algorithm.
---------------------------------------------------
Notice for Sofia-SIP library
---------------------------------------------------
Copyright (C) 2005-2006 Nokia Corporation and others (see the
in individual files for a detailed list of copyright holders).
Contact: Pekka Pessi <Pekka.Pessi@nokia.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.
---------------------------------------------------
Notice for G711 implementation
---------------------------------------------------
g711.h/g711.c - A-law and u-law transcoding routines
Written by Steve Underwood <steveu@coppice.org>
Copyright (C) 2006 Steve Underwood
Despite my general liking of the GPL, I place this code in the
public domain for the benefit of all mankind - even the slimy
ones who might try to proprietize my work and use it to my
detriment.
---------------------------------------------------
......@@ -4,3 +4,6 @@ m4_include([build/acmacros/find_apr.m4])
m4_include([build/acmacros/find_apu.m4])
m4_include([build/acmacros/sofia-sip.m4])
m4_include([build/acmacros/swift.m4])
m4_include([build/acmacros/sphinxbase.m4])
m4_include([build/acmacros/pocketsphinx.m4])
m4_include([build/acmacros/flite.m4])
dnl UNIMRCP_CHECK_FLITE
AC_DEFUN([UNIMRCP_CHECK_FLITE],
[
AC_MSG_NOTICE([Flite library configuration])
AC_MSG_CHECKING([for Flite])
AC_ARG_WITH(flite,
[ --with-flite=PATH prefix for installed Flite or
path to Flite build tree],
[flite_path=$withval],
[flite_path="/usr/local"]
)
found_flite="no"
dnl TO BE DONE
flite_libdir="build/libs"
for dir in $flite_path ; do
cd $dir && flite_dir=`pwd` && cd - > /dev/null
if test -d "$dir/$flite_libdir"; then
found_flite="yes"
UNIMRCP_FLITE_INCLUDES="-I$flite_dir/include"
UNIMRCP_FLITE_LIBS="$dir/$flite_libdir/libflite_cmu_us_awb.a \
$dir/$flite_libdir/libflite_cmu_us_kal.a \
$dir/$flite_libdir/libflite_cmu_us_rms.a \
$dir/$flite_libdir/libflite_cmu_us_slt.a \
$dir/$flite_libdir/libflite_cmulex.a \
$dir/$flite_libdir/libflite_usenglish.a \
$dir/$flite_libdir/libflite.a"
break
fi
done
if test x_$found_flite != x_yes; then
AC_MSG_ERROR(Cannot find Flite - looked for srcdir:$flite_srcdir in $flite_path)
else
AC_MSG_RESULT([$found_flite])
case "$host" in
*darwin*)
UNIMRCP_FLITE_LIBS="$UNIMRCP_FLITE_LIBS -framework CoreFoundation -framework SystemConfiguration" ;;
esac
AC_SUBST(UNIMRCP_FLITE_INCLUDES)
AC_SUBST(UNIMRCP_FLITE_LIBS)
fi
])
dnl UNIMRCP_CHECK_POCKETSPHINX
AC_DEFUN([UNIMRCP_CHECK_POCKETSPHINX],
[
AC_MSG_NOTICE([PocketSphinx library configuration])
AC_MSG_CHECKING([for PocketSphinx])
AC_ARG_WITH(pocketsphinx,
[ --with-pocketsphinx=PATH prefix for installed PocketSphinx or
path to PocketSphinx build tree],
[pocketsphinx_path=$withval],
[pocketsphinx_path="/usr/local"]
)
found_pocketsphinx="no"
pocketsphinx_config="lib/pkgconfig/pocketsphinx.pc"
pocketsphinx_srcdir="src"
for dir in $pocketsphinx_path ; do
cd $dir && pocketsphinx_dir=`pwd` && cd - > /dev/null
if test -f "$dir/$pocketsphinx_config"; then
found_pocketsphinx="yes"
UNIMRCP_POCKETSPHINX_INCLUDES="`pkg-config --cflags $dir/$pocketsphinx_config`"
UNIMRCP_POCKETSPHINX_LIBS="`pkg-config --libs $dir/$pocketsphinx_config`"
pocketsphinx_version="`pkg-config --modversion $dir/$pocketsphinx_config`"
break
fi
if test -d "$dir/$pocketsphinx_srcdir"; then
found_pocketsphinx="yes"
UNIMRCP_POCKETSPHINX_INCLUDES="-I$pocketsphinx_dir/include"
UNIMRCP_POCKETSPHINX_LIBS="$pocketsphinx_dir/$pocketsphinx_srcdir/libpocketsphinx/libpocketsphinx.la"
pocketsphinx_version="`pkg-config --modversion $pocketsphinx_dir/pocketsphinx.pc`"
break
fi
done
if test x_$found_pocketsphinx != x_yes; then
AC_MSG_ERROR(Cannot find PocketSphinx - looked for pocketsphinx-config:$pocketsphinx_config and srcdir:$pocketsphinx_srcdir in $pocketsphinx_path)
else
AC_MSG_RESULT([$found_pocketsphinx])
AC_MSG_RESULT([$pocketsphinx_version])
case "$host" in
*darwin*)
UNIMRCP_POCKETSPHINX_LIBS="$UNIMRCP_POCKETSPHINX_LIBS -framework CoreFoundation -framework SystemConfiguration" ;;
esac
AC_SUBST(UNIMRCP_POCKETSPHINX_INCLUDES)
AC_SUBST(UNIMRCP_POCKETSPHINX_LIBS)
fi
])
......@@ -12,6 +12,7 @@ AC_DEFUN([UNIMRCP_CHECK_SOFIA],
[sofia_path="/usr/local"]
)
found_sofia="no"
sofiaconfig="lib/pkgconfig/sofia-sip-ua.pc"
sofiasrcdir="libsofia-sip-ua"
for dir in $sofia_path ; do
......
dnl UNIMRCP_CHECK_SPHINXBASE
AC_DEFUN([UNIMRCP_CHECK_SPHINXBASE],
[
AC_MSG_NOTICE([SphinxBase library configuration])
AC_MSG_CHECKING([for SphinxBase])
AC_ARG_WITH(sphinxbase,
[ --with-sphinxbase=PATH prefix for installed SphinxBase or
path to SphinxBase build tree],
[sphinxbase_path=$withval],
[sphinxbase_path="/usr/local"]
)
found_sphinxbase="no"
sphinxbase_config="lib/pkgconfig/sphinxbase.pc"
sphinxbase_srcdir="src"
for dir in $sphinxbase_path ; do
cd $dir && sphinxbase_dir=`pwd` && cd - > /dev/null
if test -f "$dir/$sphinxbase_config"; then
found_sphinxbase="yes"
UNIMRCP_SPHINXBASE_INCLUDES="`pkg-config --cflags $dir/$sphinxbase_config`"
UNIMRCP_SPHINXBASE_LIBS="`pkg-config --libs $dir/$sphinxbase_config`"
sphinxbase_version="`pkg-config --modversion $dir/$sphinxbase_config`"
break
fi
if test -d "$dir/$sphinxbase_srcdir"; then
found_sphinxbase="yes"
UNIMRCP_SPHINXBASE_INCLUDES="-I$sphinxbase_dir/include"
UNIMRCP_SPHINXBASE_LIBS="$sphinxbase_dir/$sphinxbase_srcdir/libsphinxbase/libsphinxbase.la $sphinxbase_dir/$sphinxbase_srcdir/libsphinxad/libsphinxad.la"
sphinxbase_version="`pkg-config --modversion $sphinxbase_dir/sphinxbase.pc`"
break
fi
done
if test x_$found_sphinxbase != x_yes; then
AC_MSG_ERROR(Cannot find SphinxBase - looked for sphinxbase-config:$sphinxbase_config and srcdir:$sphinxbase_srcdir in $sphinxbase_path)
else
AC_MSG_RESULT([$found_sphinxbase])
AC_MSG_RESULT([$sphinxbase_version])
case "$host" in
*darwin*)
UNIMRCP_SPHINXBASE_LIBS="$UNIMRCP_SPHINXBASE_LIBS -framework CoreFoundation -framework SystemConfiguration" ;;
esac
AC_SUBST(UNIMRCP_SPHINXBASE_INCLUDES)
AC_SUBST(UNIMRCP_SPHINXBASE_LIBS)
fi
])
......@@ -25,6 +25,4 @@ AC_DEFUN([UNIMRCP_CHECK_SWIFT],
else
AC_MSG_WARN([not found - looked for $swift_path])
fi
AM_CONDITIONAL([CEPSTRAL_PLUGIN], [test x_$found_swift = x_yes])
])
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="flite"
InheritedPropertySheets=".\unibase.vsprops"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(FliteDir)\include&quot;"
PreprocessorDefinitions="APT_LIB_EXPORT"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="flite.lib"
AdditionalLibraryDirectories="&quot;$(FliteDir)\$(ConfigurationName)&quot;"
/>
<UserMacro
Name="FliteDir"
Value="$(LibRootDir)libs\flite"
/>
</VisualStudioPropertySheet>
......@@ -16,19 +16,19 @@ datadir='${prefix}/data'
AM_INIT_AUTOMAKE(foreign)
#Set default language
# Set default language
AC_LANG_C
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
#skip detection of Fortran
# Skip detection of Fortran
m4_undefine([AC_PROG_F77])
m4_defun([AC_PROG_F77],[])
AC_PROG_LIBTOOL
# get version information
# Get version information
get_version="build/get-version.sh"
version_hdr="build/uni_version.h"
plugin_version_hdr="libs/mrcp-engine/include/mrcp_resource_plugin.h"
......@@ -42,12 +42,13 @@ AC_SUBST(PLUGIN_LT_VERSION)
echo "UniMRCP Version: ${UNI_DOTTED_VERSION}"
# Check APR
UNIMRCP_CHECK_APR
UNIMRCP_CHECK_APU
# Check SOFIA
UNIMRCP_CHECK_SOFIA
UNIMRCP_CHECK_SWIFT
AC_SUBST(ac_aux_dir)
......@@ -74,7 +75,7 @@ AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compile
AX_COMPILER_VENDOR
#Enable maintainer mode
AC_ARG_ENABLE(maintainer-mode,
[AC_HELP_STRING([--enable-maintainer-mode ],[turn on debugging and compile time warnings])],
[enable_maintainer_mode="$enableval"],
......@@ -87,6 +88,7 @@ if test "${enable_maintainer_mode}" != "no"; then
fi
fi
#Enable test suites
AC_ARG_ENABLE(test-suites,
[AC_HELP_STRING([--enable-test-suites ],[build test suites])],
[enable_test_suites="$enableval"],
......@@ -94,6 +96,10 @@ AC_ARG_ENABLE(test-suites,
AM_CONDITIONAL([TEST_SUITES],[test "${enable_test_suites}" != "no"])
### Plugins ###
#Enable demo synthesizer plugin
AC_ARG_ENABLE(demosynth-plugin,
[AC_HELP_STRING([--disable-demosynth-plugin ],[exclude demo synthesizer plugin from build])],
[enable_demosynth_plugin="$enableval"],
......@@ -101,6 +107,8 @@ AC_ARG_ENABLE(demosynth-plugin,
AM_CONDITIONAL([DEMOSYNTH_PLUGIN],[test "${enable_demosynth_plugin}" = "yes"])
#Enable demo recognizer plugin
AC_ARG_ENABLE(demorecog-plugin,
[AC_HELP_STRING([--disable-demorecog-plugin ],[exclude demo recognizer plugin from build])],
[enable_demorecog_plugin="$enableval"],
......@@ -108,6 +116,51 @@ AC_ARG_ENABLE(demorecog-plugin,
AM_CONDITIONAL([DEMORECOG_PLUGIN],[test "${enable_demorecog_plugin}" = "yes"])
#Enable Cepstral Swift plugin
AC_ARG_ENABLE(cepstral-plugin,
[AC_HELP_STRING([--disable-cepstral-plugin ],[exclude cepstral plugin from build])],
[enable_cepstral_plugin="$enableval"],
[enable_cepstral_plugin="yes"])
if test "${enable_cepstral_plugin}" != "no"; then
UNIMRCP_CHECK_SWIFT
fi
AM_CONDITIONAL([CEPSTRAL_PLUGIN],[test "${enable_cepstral_plugin}" = "yes" &&\
test "${found_swift}" = "yes"])
#Enable PocketSphinx plugin
AC_ARG_ENABLE(pocketsphinx-plugin,
[AC_HELP_STRING([--enable-pocketsphinx-plugin ],[enable pocketsphinx plugin])],
[enable_pocketsphinx_plugin="$enableval"],
[enable_pocketsphinx_plugin="no"])
if test "${enable_pocketsphinx_plugin}" != "no"; then
UNIMRCP_CHECK_SPHINXBASE
UNIMRCP_CHECK_POCKETSPHINX
fi
AM_CONDITIONAL([POCKETSPHINX_PLUGIN],[test "${enable_pocketsphinx_plugin}" = "yes" &&\
test "${found_pocketsphinx}" = "yes" &&\
test "${found_sphinxbase}" = "yes"])
#Enable Flite plugin
AC_ARG_ENABLE(flite-plugin,
[AC_HELP_STRING([--enable-flite-plugin ],[enable flite plugin])],
[enable_flite_plugin="$enableval"],
[enable_flite_plugin="no"])
if test "${enable_flite_plugin}" != "no"; then
UNIMRCP_CHECK_FLITE
fi
AM_CONDITIONAL([FLITE_PLUGIN],[test "${enable_flite_plugin}" = "yes" &&\
test "${found_flite}" = "yes"])
AM_CONDITIONAL(ISMAC, [test `uname -s` = Darwin])
AC_CONFIG_FILES([
......@@ -127,6 +180,8 @@ AC_CONFIG_FILES([
modules/mrcp-unirtsp/Makefile
plugins/Makefile
plugins/mrcp-cepstral/Makefile
plugins/mrcp-pocketsphinx/Makefile
plugins/mrcp-flite/Makefile
plugins/demo-synth/Makefile
plugins/demo-recog/Makefile
platforms/Makefile
......@@ -148,3 +203,16 @@ AC_CONFIG_FILES([
])
AC_OUTPUT
AC_MSG_NOTICE
AC_MSG_NOTICE([Report:])
AC_MSG_NOTICE([ UniMRCP: $UNI_DOTTED_VERSION])
AC_MSG_NOTICE([ APR: $apr_version])
AC_MSG_NOTICE([ APR-Util: $apu_version])
AC_MSG_NOTICE([ Sofia-SIP: $sofia_version])
AC_MSG_NOTICE([Plugins:])
AC_MSG_NOTICE([ Demo Synthesizer: $enable_demosynth_plugin])
AC_MSG_NOTICE([ Demo Recognizer: $enable_demorecog_plugin])
AC_MSG_NOTICE([ Cepstral: $enable_cepstral_plugin])
AC_MSG_NOTICE([ PocketSphinx: $enable_pocketsphinx_plugin])
AC_MSG_NOTICE([ Flite: $enable_flite_plugin])
......@@ -42,6 +42,9 @@ typedef enum {
/** Create activity detector */
MPF_DECLARE(mpf_activity_detector_t*) mpf_activity_detector_create(apr_pool_t *pool);
/** Reset activity detector */
MPF_DECLARE(void) mpf_activity_detector_reset(mpf_activity_detector_t *detector);
/** Set threshold of voice activity (silence) level */
MPF_DECLARE(void) mpf_activity_detector_level_set(mpf_activity_detector_t *detector, apr_size_t level_threshold);
......
......@@ -39,7 +39,9 @@ APT_BEGIN_EXTERN_C
typedef enum {
MPF_SAMPLE_RATE_NONE = 0x00,
MPF_SAMPLE_RATE_8000 = 0x01,
MPF_SAMPLE_RATE_16000 = 0x02
MPF_SAMPLE_RATE_16000 = 0x02,
MPF_SAMPLE_RATE_32000 = 0x04,
MPF_SAMPLE_RATE_48000 = 0x08
} mpf_sample_rates_e;
/** Codec descriptor declaration */
......
......@@ -53,6 +53,13 @@ MPF_DECLARE(mpf_activity_detector_t*) mpf_activity_detector_create(apr_pool_t *p
return detector;
}
/** Reset activity detector */
MPF_DECLARE(void) mpf_activity_detector_reset(mpf_activity_detector_t *detector)
{
detector->duration = 0;
detector->state = DETECTOR_STATE_INACTIVITY;
}
/** Set threshold of voice activity (silence) level */
MPF_DECLARE(void) mpf_activity_detector_level_set(mpf_activity_detector_t *detector, apr_size_t level_threshold)
{
......
......@@ -140,15 +140,17 @@ static const mpf_codec_descriptor_t g711a_descriptor = {
};
static const mpf_codec_attribs_t g711u_attribs = {
{G711u_CODEC_NAME, G711u_CODEC_NAME_LENGTH}, /* codec name */
8, /* bits per sample */
MPF_SAMPLE_RATE_8000 | MPF_SAMPLE_RATE_16000 /* sampling rates */
{G711u_CODEC_NAME, G711u_CODEC_NAME_LENGTH}, /* codec name */
8, /* bits per sample */
MPF_SAMPLE_RATE_8000 | MPF_SAMPLE_RATE_16000 |
MPF_SAMPLE_RATE_32000 | MPF_SAMPLE_RATE_48000 /* supported sampling rates */
};
static const mpf_codec_attribs_t g711a_attribs = {
{G711a_CODEC_NAME, G711a_CODEC_NAME_LENGTH}, /* codec name */
8, /* bits per sample */
MPF_SAMPLE_RATE_8000 | MPF_SAMPLE_RATE_16000 /* sampling rates */
{G711a_CODEC_NAME, G711a_CODEC_NAME_LENGTH}, /* codec name */
8, /* bits per sample */
MPF_SAMPLE_RATE_8000 | MPF_SAMPLE_RATE_16000 |
MPF_SAMPLE_RATE_32000 | MPF_SAMPLE_RATE_48000 /* supported sampling rates */
};
mpf_codec_t* mpf_codec_g711u_create(apr_pool_t *pool)
......
......@@ -84,15 +84,17 @@ static const mpf_codec_vtable_t l16_vtable = {
};
static const mpf_codec_attribs_t lpcm_attribs = {
{LPCM_CODEC_NAME, LPCM_CODEC_NAME_LENGTH}, /* codec name */
16, /* bits per sample */
MPF_SAMPLE_RATE_8000 | MPF_SAMPLE_RATE_16000 /* sampling rates */
{LPCM_CODEC_NAME, LPCM_CODEC_NAME_LENGTH}, /* codec name */
16, /* bits per sample */
MPF_SAMPLE_RATE_8000 | MPF_SAMPLE_RATE_16000 |
MPF_SAMPLE_RATE_32000 | MPF_SAMPLE_RATE_48000 /* supported sampling rates */
};
static const mpf_codec_attribs_t l16_attribs = {
{L16_CODEC_NAME, L16_CODEC_NAME_LENGTH}, /* codec name */
16, /* bits per sample */
MPF_SAMPLE_RATE_8000 | MPF_SAMPLE_RATE_16000 /* sampling rates */
{L16_CODEC_NAME, L16_CODEC_NAME_LENGTH}, /* codec name */
16, /* bits per sample */
MPF_SAMPLE_RATE_8000 | MPF_SAMPLE_RATE_16000 |
MPF_SAMPLE_RATE_32000 | MPF_SAMPLE_RATE_48000 /* supported sampling rates */
};
mpf_codec_descriptor_t* mpf_codec_lpcm_descriptor_create(apr_uint16_t sampling_rate, apr_byte_t channel_count, apr_pool_t *pool)
......
......@@ -74,6 +74,8 @@ struct mrcp_engine_channel_t {
mpf_termination_t *termination;
/** Back pointer to resource engine */
mrcp_resource_engine_t *engine;
/** Unique identifier (useful for traces) */
apt_str_t id;
/** Pool to allocate memory from */
apr_pool_t *pool;
};
......
......@@ -51,6 +51,7 @@ mrcp_engine_channel_t* mrcp_engine_channel_create(
channel->termination = termination;
channel->engine = engine;
channel->pool = pool;
apt_string_reset(&channel->id);
return channel;
}
......
......@@ -206,6 +206,7 @@ static mrcp_channel_t* mrcp_server_channel_create(mrcp_server_session_t *session
engine_channel = mrcp_server_engine_channel_create(session,resource_name);
if(engine_channel) {
engine_channel->id = session->base.id;
engine_channel->event_obj = channel;
engine_channel->event_vtable = &engine_channel_vtable;
channel->engine_channel = engine_channel;
......
......@@ -13,3 +13,11 @@ endif
if CEPSTRAL_PLUGIN
SUBDIRS += mrcp-cepstral
endif
if POCKETSPHINX_PLUGIN
SUBDIRS += mrcp-pocketsphinx
endif
if FLITE_PLUGIN
SUBDIRS += mrcp-flite
endif
MAINTAINERCLEANFILES = Makefile.in
INCLUDES = -Iinclude \
-I$(top_srcdir)/libs/mrcp-engine/include \
-I$(top_srcdir)/libs/mrcp/include \
-I$(top_srcdir)/libs/mrcp/message/include \
-I$(top_srcdir)/libs/mrcp/control/include \
-I$(top_srcdir)/libs/mrcp/resources/include \
-I$(top_srcdir)/libs/mpf/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
$(UNIMRCP_APR_INCLUDES) \
$(UNIMRCP_APU_INCLUDES) \
$(UNIMRCP_FLITE_INCLUDES)
plugin_LTLIBRARIES = mrcpflite.la
mrcpflite_la_SOURCES = src/mrcp_flite.c
mrcpflite_la_LDFLAGS = -module $(PLUGIN_LT_VERSION)
mrcpflite_la_LIBADD = $(UNIMRCP_FLITE_LIBS) -lm
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="mrcpflite"
ProjectGUID="{56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}"
RootNamespace="mrcpflite"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\flite.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpplugin.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="include"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\flite.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpplugin.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="include"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="include"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="src"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
>
<File
RelativePath=".\src\mrcp_flite.c"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
......@@ -8,9 +8,13 @@ INCLUDES = -Iinclude \
-I$(top_srcdir)/libs/mrcp/resources/include \
-I$(top_srcdir)/libs/mpf/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
$(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
$(UNIMRCP_APR_INCLUDES) \
$(UNIMRCP_APU_INCLUDES) \
$(UNIMRCP_SPHINXBASE_INCLUDES) \
$(UNIMRCP_POCKETSPHINX_INCLUDES)
plugin_LTLIBRARIES = mrcppocketsphinx.la
mrcppocketsphinx_la_SOURCES = src/mrcp_pocketsphinx.c.c
mrcppocketsphinx_la_SOURCES = src/mrcp_pocketsphinx.c
mrcppocketsphinx_la_LDFLAGS = -module $(PLUGIN_LT_VERSION)
mrcppocketsphinx_la_LIBADD = $(UNIMRCP_POCKETSPHINX_LIBS) $(UNIMRCP_SPHINXBASE_LIBS) -lm
......@@ -27,27 +27,27 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcp", "libs\mrcp\mrcp.vcpr
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpsignaling", "libs\mrcp-signaling\mrcpsignaling.vcproj", "{12A49562-BAB9-43A3-A21D-15B60BBB4C31}"
ProjectSection(ProjectDependencies) = postProject
{B5A00BFA-6083-4FAE-A097-71642D6473B5} = {B5A00BFA-6083-4FAE-A097-71642D6473B5}
{1C320193-46A6-4B34-9C56-8AB584FC1B56} = {1C320193-46A6-4B34-9C56-8AB584FC1B56}
{B5A00BFA-6083-4FAE-A097-71642D6473B5} = {B5A00BFA-6083-4FAE-A097-71642D6473B5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpserver", "libs\mrcp-server\mrcpserver.vcproj", "{18B1F35A-10F8-4287-9B37-2D10501B0B38}"
ProjectSection(ProjectDependencies) = postProject
{12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA} = {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}
{12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunimrcpserver", "platforms\libunimrcp-server\libunimrcpserver.vcproj", "{C98AF157-352E-4737-BD30-A24E2647F5AE}"
ProjectSection(ProjectDependencies) = postProject
{DEB01ACB-D65F-4A62-AED9-58C1054499E9} = {DEB01ACB-D65F-4A62-AED9-58C1054499E9}
{18B1F35A-10F8-4287-9B37-2D10501B0B38} = {18B1F35A-10F8-4287-9B37-2D10501B0B38}
{746F3632-5BB2-4570-9453-31D6D58A7D8E} = {746F3632-5BB2-4570-9453-31D6D58A7D8E}
{18B1F35A-10F8-4287-9B37-2D10501B0B38} = {18B1F35A-10F8-4287-9B37-2D10501B0B38}
{DEB01ACB-D65F-4A62-AED9-58C1054499E9} = {DEB01ACB-D65F-4A62-AED9-58C1054499E9}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpsofiasip", "modules\mrcp-sofiasip\mrcpsofiasip.vcproj", "{746F3632-5BB2-4570-9453-31D6D58A7D8E}"
ProjectSection(ProjectDependencies) = postProject
{12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA} = {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}
{12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpclient", "libs\mrcp-client\mrcpclient.vcproj", "{72782932-37CC-46AE-8C7F-9A7B1A6EE108}"
......@@ -57,9 +57,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpclient", "libs\mrcp-cli
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunimrcpclient", "platforms\libunimrcp-client\libunimrcpclient.vcproj", "{EE157390-1E85-416C-946E-620E32C9AD33}"
ProjectSection(ProjectDependencies) = postProject
{DEB01ACB-D65F-4A62-AED9-58C1054499E9} = {DEB01ACB-D65F-4A62-AED9-58C1054499E9}
{746F3632-5BB2-4570-9453-31D6D58A7D8E} = {746F3632-5BB2-4570-9453-31D6D58A7D8E}
{72782932-37CC-46AE-8C7F-9A7B1A6EE108} = {72782932-37CC-46AE-8C7F-9A7B1A6EE108}
{746F3632-5BB2-4570-9453-31D6D58A7D8E} = {746F3632-5BB2-4570-9453-31D6D58A7D8E}
{DEB01ACB-D65F-4A62-AED9-58C1054499E9} = {DEB01ACB-D65F-4A62-AED9-58C1054499E9}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unimrcpclient", "platforms\unimrcp-client\unimrcpclient.vcproj", "{57FAF32E-49FD-491F-895D-132D0D5EFE0A}"
......@@ -74,8 +74,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpv2transport", "libs\mrc
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpengine", "libs\mrcp-engine\mrcpengine.vcproj", "{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}"
ProjectSection(ProjectDependencies) = postProject
{B5A00BFA-6083-4FAE-A097-71642D6473B5} = {B5A00BFA-6083-4FAE-A097-71642D6473B5}
{1C320193-46A6-4B34-9C56-8AB584FC1B56} = {1C320193-46A6-4B34-9C56-8AB584FC1B56}
{B5A00BFA-6083-4FAE-A097-71642D6473B5} = {B5A00BFA-6083-4FAE-A097-71642D6473B5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demosynth", "plugins\demo-synth\demosynth.vcproj", "{92BFA534-C419-4EB2-AAA3-510653F38F08}"
......@@ -127,8 +127,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rtsptest", "tests\rtsptest\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpunirtsp", "modules\mrcp-unirtsp\mrcpunirtsp.vcproj", "{DEB01ACB-D65F-4A62-AED9-58C1054499E9}"
ProjectSection(ProjectDependencies) = postProject
{12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
{504B3154-7A4F-459D-9877-B951021C3F1F} = {504B3154-7A4F-459D-9877-B951021C3F1F}
{12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "prepare", "build\tools\prepare.vcproj", "{01D63BF5-7798-4746-852A-4B45229BB735}"
......@@ -138,6 +138,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unimrcpservice", "build\too
{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2} = {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcppocketsphinx", "plugins\mrcp-pocketsphinx\mrcppocketsphinx.vcproj", "{3C614AE8-B611-4D43-A9AF-1CAA440A9F69}"
ProjectSection(ProjectDependencies) = postProject
{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpflite", "plugins\mrcp-flite\mrcpflite.vcproj", "{56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}"
ProjectSection(ProjectDependencies) = postProject
{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
......@@ -238,6 +248,10 @@ Global
{01D63BF5-7798-4746-852A-4B45229BB735}.Release|Win32.ActiveCfg = Release|Win32
{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Debug|Win32.ActiveCfg = Debug|Win32
{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Release|Win32.ActiveCfg = Release|Win32
{3C614AE8-B611-4D43-A9AF-1CAA440A9F69}.Debug|Win32.ActiveCfg = Debug|Win32
{3C614AE8-B611-4D43-A9AF-1CAA440A9F69}.Release|Win32.ActiveCfg = Release|Win32
{56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}.Debug|Win32.ActiveCfg = Debug|Win32
{56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}.Release|Win32.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......@@ -261,6 +275,8 @@ Global
{92BFA534-C419-4EB2-AAA3-510653F38F08} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
{B495B6D9-AF84-479D-B30A-313C16EF8BFD} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
{729EF28E-38C9-40DE-A138-87785F021411} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
{3C614AE8-B611-4D43-A9AF-1CAA440A9F69} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
{56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
{79EF9F1D-E211-4ED1-91D2-FC935AB3A872} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}
{429C907B-97D1-4B2D-9B0E-A14A5BFDAD15} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}
{DCF01B1C-5268-44F3-9130-D647FABFB663} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论