Giter Site home page Giter Site logo

wangkaisine / mrcp-plugin-with-freeswitch Goto Github PK

View Code? Open in Web Editor NEW
306.0 23.0 151.0 176 KB

使用FreeSWITCH接受用户手机呼叫,通过UniMRCP Server集成讯飞开放平台(xfyun)插件将用户语音进行语音识别(ASR),并根据自定义业务逻辑调用语音合成(TTS),构建简单的端到端语音呼叫中心。

freeswitch unimrcp xfyun asr tts

mrcp-plugin-with-freeswitch's Introduction

mrcp-plugin-with-freeswitch

github非每天登录,如有问题,请联系 [email protected],空闲时间回复,谢谢!

这是我的第一个Github工程,特别感谢 Cotin网站 《构建简单的智能客服系统》(一)(二)(三) 对于构建过程的帮助,您在阅读本教程前,可以先行阅读这三篇文章,本教程基于此调整了构建顺序,给出更多的操作细节,错误处理以及其它构建描述。

主要目的

使用FreeSWITCH接受用户手机呼叫,通过UniMRCP Server集成讯飞开放平台(xfyun)插件将用户语音进行语音识别(ASR),并根据自定义业务逻辑调用语音合成(TTS),构建简单的端到端语音呼叫中心。

总体结构如下图所示:

image

构建步骤

第一步 安装编译FreeSWITCH

本次示例的FreeSWITCH在MacOS High Sierra 10.13.4系统版本中进行源码编译安装,未使用软件包安装,具体安装步骤可见 官网安装介绍 ,其他平台如Linux(Ubuntu、CentOS)应均能安装成功。

以下给出源码编译安装的步骤:

1.下载 FreeSWITCH源码

cd /usr/local/src
git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git freeswitch

2.安装依赖库

brew install autoconf
brew install automake
brew install libtool
brew install pkg-config
brew install speexdsp
brew install speex
brew install libldns-dev
brew install OpenSSL
brew install pcre
brew install pkgconfig sqlite3
brew install lua
brew install opus
brew install libsndfile

注:其他系统平台请自行确认依赖库内容,可能的搜索结果:Ubuntu/CentOS FreeSWITCH 安装依赖。 在ubuntu下:libtool not found

3.编译安装

cd freeswitch/
# 先执行 bootstrap.sh,生成configure文件
./bootstrap.sh 
./configure --prefix=/usr/local/freeswitch
make
make install
make cd-sounds-install
make cd-moh-install

4.运行

cd /usr/local/freeswitch/bin
./freeswitch

即可启动应用。

注:安装过程中可能出现的问题 configure中的错误

FreeSWITCH默认配置1000-1019(20个)用户,默认密码1234,您可以提前跳转到“第四步 测试与验证” 的验证步骤,登录并拨打5000,可以听到默认IVR的示例语音菜单指引。

第二步 配置编译UniMRCP Server

本次示例的UniMRCP Server在CentOS 7中进行源码编译安装,感谢由Github用户cotinyang提供的已经写好的集成讯飞SDK的UniMRCP Server源码。

1.下载 UniMRCP Server Plugin Demo 源码

cd /opt
git clone https://github.com/cotinyang/MRCP-Plugin-Demo.git MRCP-Plugin-Demo

2.编译准备环境

cd MRCP-Plugin-Demo/unimrcp-deps-1.5.0
## 编译可能出现错误, 注释掉:107 ~ 109, getopt的set,其中存在不识别的option
## 编译生成apr, apr-util, target path: ./libs
./build-dep-libs.sh

注:1.过程中需要输入两次y,并确认;2.另外,我们为该Demo工程Fork了一个自己维护的工程,地址为https://github.com/wangkaisine/MRCP-Plugin-Demo 您也可以使用这个地址的源码。

3.编译安装unimrcp

cd unimrcp-1.5.0
./bootstrap
## 如果不能自动检测apr,apr-util,请在configure中增加 option:--with-apr=/path/apr --with-apr-util=/path/apr-util/
## apr, apr-util由./build-dep-libs.sh 生成
./configure
make
make install

即可在/usr/local/中看到安装好的unimrcp。

4.测试运行

cd /usr/local/unimrcp/bin
./unimrcpserver -o 3

可以使用client进行验证

cd /usr/local/unimrcp/bin
./unimrcpclient
>help
usage:

- run [app_name] [profile_name] (run demo application)
       app_name is one of 'synth', 'recog', 'bypass', 'discover'
       profile_name is one of 'uni2', 'uni1', ...

       examples: 
           run synth
           run recog
           run synth uni1
           run recog uni1

- loglevel [level] (set loglevel, one of 0,1...7)

- quit, exit

输入help回车,给出了使用方法,输入run recog运行语音识别测试,run synth进行语音合成测试。

第三步 集成讯飞开放平台SDK

1.讯飞开发平台SDK下载

由于从讯飞开放平台下载的SDK包和用户以及用户创建的应用相关联,因此需要将third-party/xfyun中的文件和文件夹全部删除,重新下载解压属于自己的SDK,目录与源代码基本一致。

您需要注册并登录 讯飞开放平台 ,进入控制台页面,并创建应用;

在“我的应用”界面获得你的APPID,并为该应用“添加新服务”,选择需要的“语音听写”和”在线语音合成“服务(本示例需要);

点击右侧“SDK下载”,在跳转页面中确认“选择应用”已经选中了您创建的应用,“选择您需要的AI能力”选中上述两项服务,并点击“SDK下载”等待SDK生成与完成下载。

将下载的zip包,解压并替换MRCP-Plugin-Demo/unimrcp-1.5.0/plugins/third-party/xfyun/下的所有文件及文件夹。

注:创建应用页面中的应用平台选择“Linux”。

2.plugin编写与编译

本步骤将告诉您如何编写unimrcp的插件代码,即现在MRCP-Plugin-Demo/unimrcp-1.5.0/plugins文件夹下xfyun_recog、xfyun_xynth文件夹下的文件及其相关配置是如何得到的,如果您当前还不关注此细节,可以跳过本步骤至第四步。

实际上,上述MRCP-Plugin-Demo代码是在 Unimrcp官网 下载 Unimrcp 1.5.0Unimrcp Deps 1.5.0 并在此基础上添加的plugin代码。

首先编辑configure.ac文件,会在后面的Makefile中使用到的宏定义。XFyun recognizer plugin的添加如下:

dnl XFyun recognizer plugin.
UNI_PLUGIN_ENABLED(xfyunrecog)

AM_CONDITIONAL([XFYUNRECOG_PLUGIN],[test "${enable_xfyunrecog_plugin}" = "yes"])

...

plugins/xfyun-recog/Makefile

...

echo XFyun recognizer plugin....... : $enable_xfyunrecog_plugin

注:其中 ··· 是该文件中的其它默认配置,请找到对应位置填写。

对应地,XFyun synthesizer plugin的添加如下:

dnl XFyun synthesizer plugin.
UNI_PLUGIN_ENABLED(xfyunsynth)

AM_CONDITIONAL([XFYUNSYNTH_PLUGIN],[test "${enable_xfyunsynth_plugin}" = "yes"])

···

plugins/xfyun-synth/Makefile

···

echo XFyun synthesizer plugin...... : $enable_xfyunsynth_plugin

新增源码与目录

在 plugins 目录下,新建 xfyun-recog 目录,并在该目录下新建 src 目录,可以将 demo_recog_engine.c 拷贝到该目录下改名为 xfyun_recog_engine.c,将xfyun_recog_engine.c文件进行修改(已知一个修改的部分:将appid修改成你自己下载sdk的appid,不然会报错:QISRAudioWrite failed! error code:10407),xfyun-synth目录下对应创建并修改。

在xfyun-recog文件夹下新建Makefile.am文件,内容如下:

AM_CPPFLAGS                = $(UNIMRCP_PLUGIN_INCLUDES)

plugin_LTLIBRARIES         = xfyunrecog.la

xfyunrecog_la_SOURCES       = src/xfyun_recog_engine.c
xfyunrecog_la_LDFLAGS       = $(UNIMRCP_PLUGIN_OPTS) \
                              -L$(top_srcdir)/plugins/third-party/xfyun/libs/x64 \
                              -lmsc -ldl -lpthread -lrt -lstdc++
xfyunrecog_ladir            = $(libdir)
xfyunrecog_la_DATA          = $(top_srcdir)/plugins/third-party/xfyun/libs/x64/libmsc.so


include $(top_srcdir)/build/rules/uniplugin.am

UNIMRCP_PLUGIN_INCLUDES     += -I$(top_srcdir)/plugins/third-party/xfyun/include

对应地,在fyun-synth文件夹下新建Makefile.am文件夹,内容如下:

AM_CPPFLAGS                = $(UNIMRCP_PLUGIN_INCLUDES)

plugin_LTLIBRARIES         = xfyunsynth.la

xfyunsynth_la_SOURCES       = src/xfyun_synth_engine.c
xfyunsynth_la_LDFLAGS       = $(UNIMRCP_PLUGIN_OPTS) \
                              -L$(top_srcdir)/plugins/third-party/xfyun/libs/x64 \
                              -lmsc -ldl -lpthread -lrt
xfyunsynth_ladir            = $(libdir)

include $(top_srcdir)/build/rules/uniplugin.am

UNIMRCP_PLUGIN_INCLUDES     += -I$(top_srcdir)/plugins/third-party/xfyun/include

修改plugins文件夹下Makefile.am文件,xfyun-recog添加内容如下:

if XFYUNRECOG_PLUGIN
SUBDIRS               += xfyun-recog
endif

对应地,xfyun-synth添加内容如下:

if XFYUNRECOG_PLUGIN
SUBDIRS               += xfyun-synth
endif

修改conf/unimrcpserver.xml文件,从默认启用demo engine改为启用我们的两个engine。

xfyun-recog修改如下:

<engine id="Demo-Recog-1" name="demorecog" enable="false"/>
<engine id="XFyun-Recog-1" name="xfyunrecog" enable="true"/>

对应地,xfyun-synth修改如下:

<engine id="Demo-Synth-1" name="demorecog" enable="false"/>
<engine id="XFyun-Synth-1" name="xfyunsynth" enable="true"/>

同时,如果您已经准备好将UniMRCP Server和FreeSWITCH对接,您应该在conf/unimrcpserver.xml中配置好server的ip地址,即当前unimrcp安装的子网访问地址。

重新编译安装unimrcp(第二步 3)。

当你启动时出现如下问题时:

  1. Failed to Load DSO: /usr/local/unimrcp/lib/libmsc.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE

fix:-lstdc++

  1. ./unimrcpserver: error while loading shared libraries: libsofia-sip-ua.so.0: cannot open shared object file: No such file or directory

fix:

在etc/ld.so.conf 内容增加: /usr/local/lib
ldconfig 将ld.so.conf读入cache

第四步 配置与验证

配置

配置FreeSWITCH

我们需要将处理用户语音呼入的FreeSWITCH与向xfyun engine发请求的unimrcp server两者连接起来。

1.配置unimrcp模块并自动加载;

# 编辑/usr/local/src/freeswitch/modules.conf文件,找到要安装的模块,去掉前面的注释符号#
cd /usr/local/src/freeswitch
vim modules.conf
#asr_tts/mod_unimrcp
asr_tts/mod_unimrcp

# 执行make mod_xxx-install命令,这样就编译相应模块,并把编译后的动态库安装的/usr/local/freeswitch/mod目录下
make mod_unimrcp-install

# 编辑/usr/local/freeswitch/conf/autoload_configs/modules.conf.xml,去掉注释符号,如果没有发现对应模块,则添加
<load module="mod_unimrcp"/>

2.设置profile文件与conf文件;

在/usr/local/freeswitch/conf/mrcp_profiles目录新建unimrcpserver-mrcp-v2.xml配置文件:

<include>
  <!-- UniMRCP Server MRCPv2 -->
  <!-- 后面我们使用该配置文件,均使用 name 作为唯一标识,而不是文件名 -->
  <profile name="unimrcpserver-mrcp2" version="2">
    <!-- MRCP 服务器地址 -->
    <param name="server-ip" value="192.168.1.23"/>
    <!-- MRCP SIP 端口号 -->
    <param name="server-port" value="8060"/>
    <param name="resource-location" value=""/>

    <!-- FreeSWITCH IP、端口以及 SIP 传输方式 -->
    <param name="client-ip" value="192.168.1.24" />
    <param name="client-port" value="5069"/>
    <param name="sip-transport" value="udp"/>


    <param name="speechsynth" value="speechsynthesizer"/>
    <param name="speechrecog" value="speechrecognizer"/>
    <!--param name="rtp-ext-ip" value="auto"/-->
    <param name="rtp-ip" value="192.168.1.24"/>
    <param name="rtp-port-min" value="4000"/>
    <param name="rtp-port-max" value="5000"/>
    <param name="codecs" value="PCMU PCMA L16/96/8000"/>

    <!-- Add any default MRCP params for SPEAK requests here -->
    <synthparams>
    </synthparams>

    <!-- Add any default MRCP params for RECOGNIZE requests here -->
    <recogparams>
      <!--param name="start-input-timers" value="false"/-->
    </recogparams>
  </profile>
</include>

配置/usr/local/freeswitch/conf/autoload_configs/unimrcp.conf.xml文件:

<configuration name="unimrcp.conf" description="UniMRCP Client">
  <settings>
    <!-- UniMRCP profile to use for TTS -->
    <param name="default-tts-profile" value="unimrcpserver-mrcp2"/>
    <!-- UniMRCP profile to use for ASR -->
    <param name="default-asr-profile" value="unimrcpserver-mrcp2"/>
    <!-- UniMRCP logging level to appear in freeswitch.log.  Options are:
         EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG -->
    <param name="log-level" value="DEBUG"/>
    <!-- Enable events for profile creation, open, and close -->
    <param name="enable-profile-events" value="false"/>

    <param name="max-connection-count" value="100"/>
    <param name="offer-new-connection" value="1"/>
    <param name="request-timeout" value="3000"/>
  </settings>

  <profiles>
    <X-PRE-PROCESS cmd="include" data="../mrcp_profiles/*.xml"/>
  </profiles>

</configuration>

注:1.unimrcpserver-mrcp-v2.xml中server-ip为unimrcpserver启动的主机ip;2.client-ip和rtp-ip为FreeSWITCH启动的主机,client-port仕FreeSWITCH作为客户端访问unimrcpserver的端口,手机作为客户端访问的FreeSWITCH端口默认为5060,两者不同;3.unimrcpserver-mrcp-v2.xml中的profile name应和unimrcp.conf.xml中的default-tts-profile与default-ars-profile的value一致(有些文档的分析中称mrcp_profiles中的xml文件名也必须和这两者一致,实际上是非必须的)。

Attenion: unimrcpserver 和 freeswitch 部署在同一个网段很重要,最好部署测试的时候在同一台物理机器上进行

3.配置IVR与脚本。

在/usr/local/freeswitch/conf/dialplan/default.xml里新增如下配置:

<extension name="unimrcp">
    <condition field="destination_number" expression="^5001$">
   	    <action application="answer"/>
        <action application="lua" data="names.lua"/>
    </condition>
</extension>

在/usr/local/freeswitch/scripts目录下新增names.lua脚本:

session:answer()

--freeswitch.consoleLog("INFO", "Called extension is '".. argv[1]"'\n")
welcome = "ivr/ivr-welcome_to_freeswitch.wav"
menu = "ivr/ivr-this_ivr_will_let_you_test_features.wav"
--
grammar = "hello"
no_input_timeout = 80000
recognition_timeout = 80000
confidence_threshold = 0.2
--
session:streamFile(welcome)
--freeswitch.consoleLog("INFO", "Prompt file is \n")

tryagain = 1
 while (tryagain == 1) do
 --
       session:execute("play_and_detect_speech",menu .. "detect:unimrcp {start-input-timers=false,no-input-timeout=" .. no_input_timeout .. ",recognition-timeout=" .. recognition_timeout .. "}" .. grammar)
       xml = session:getVariable('detect_speech_result')
 --
       if (xml == nil) then
               freeswitch.consoleLog("CRIT","Result is 'nil'\n")
               tryagain = 0
       else
               freeswitch.consoleLog("CRIT","Result is '" .. xml .. "'\n")
               tryagain = 0
    end
end
 --
 -- put logic to forward call here
 --
 session:sleep(250)
 session:set_tts_params("unimrcp", "xiaofang");
 session:speak("今天天气不错啊");
 session:hangup()

我们需要在/usr/local/freeswitch/grammar目录新增hello.gram语法文件,可以为空语法文件须满足语音识别语法规范1.0标准(简称 SRGS1.0),该语法文件 ASR 引擎在进行识别时可以使用。

<?xml version="1.0" encoding="utf-8" ?>
<grammar version="1.0" xml:lang="zh-cn" root="Menu" tag-format="semantics/1.0"
      xmlns=http://www.w3.org/2001/06/grammar
    xmlns:sapi="http://schemas.microsoft.com/Speech/2002/06/SRGSExtensions"><!- 这些都是必不可少的-->
  <rule id="city" scope="public">
    <one-of>     <!-- 匹配其中一个短语-->
      <item>北京</item>
      <item>上海</item>
    </one-of>
  </rule>
  <rule id="cross" scope="public">
    <one-of>
      <item>到</item>
      <item>至</item>
      <item>飞往</item>
    </one-of>
  </rule>
  <rule id="Menu" scope="public">
    <item>
      <ruleref uri="#date"/>         <!--指定关联的其他规则的节点-->
      <tag>out.date = reles.latest();</tag>
    </item>
    <item repeat="0-1">从</item>    <!--显示1次或0次-->
    <item>
      <ruleref uri="#city"/>
      <tag>out.city = rulels.latest();</tag>
    </item>
    <item>
      <ruleref uri="#cross"/>
      <tag>out.cross = rulels.latest();</tag>
    </item>
    <item>
      <ruleref uri="#city"/>
      <tag>out.city = rulels.latest();</tag>
    </item>
  </rule>
</grammar>

注:lua脚本中,”play_and_detect_speech” 调用了 ASR 服务,”speak” 调用了 TTS 服务。配置启动中遇到问题

验证

下载测试工具:Adore SIP Client

在App Store(其他手机系统请到对应应用市场)中搜索“Adore SIP Client”,并下载。

image

其中SIP IP是FreeSWITCH服务开启的主机IP与port(默认为5060),USER NAME如上所述可选1000-1019,PASSWORD默认为1234。点击"Login"(请确保手机连接的网络与FreeSWITCH在同一个子网内),并拨打5001进行语言测试验证(如果您是从第一步跳转过来的,请拨打5000)。

其他相关资料

FreeSWITCH主页:https://freeswitch.com/

Unimrcp主页:http://www.unimrcp.org/

Apache APR:https://apr.apache.org/

讯飞SDK包导入方式:https://doc.xfyun.cn/msc_linux/SDK%E5%8C%85%E5%AF%BC%E5%85%A5.html

mrcp-plugin-with-freeswitch's People

Contributors

shanghai-jerry avatar wangkaisine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mrcp-plugin-with-freeswitch's Issues

debain9.x下 执行./build-dep-libs.sh安装错误

Building Sofia-SIP library
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking cached information... ok
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... none
checking for gcc... gcc
checking for gcc... (cached) gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define EXTENSIONS... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking how to run the C preprocessor... gcc -E
checking for etags... echo
checking for ar... ar
checking for ld... ld
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... ld
checking if the linker (ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... (cached) ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether gcc and cc understand -c and -o together... yes
checking for maximum warnings compiler flag...
checking for compilation environment...
checking for doxygen... echo
checking for C compiler vendor... gnu
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for size_t... yes
checking whether gcc recognizes func... yes
checking whether gcc recognizes FUNCTION... yes
checking for inline... inline
checking for sa_len... no
checking for sys/types.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for stack suitable for tags... no
checking for graceful free(0)... yes
checking for sockaddr_in6... yes
checking for unistd.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/filio.h usability... no
checking sys/filio.h presence... no
checking for sys/filio.h... no
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/epoll.h usability... yes
checking sys/epoll.h presence... yes
checking for sys/epoll.h... yes
checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking for netinet/in.h... yes
checking for arpa/inet.h... yes
checking for netdb.h... yes
checking for net/if.h... yes
checking for net/if_types.h... no
checking for ifaddr.h... no
checking for netpacket/packet.h... yes
checking whether MSG_TRUNC is declared... yes
checking whether SO_RCVBUFFORCE is declared... yes
checking whether SO_SNDBUFFORCE is declared... yes
checking whether IP_ADD_MEMBERSHIP is declared... yes
checking whether IP_MULTICAST_LOOP is declared... yes
checking whether IP_MTU_DISCOVER is declared... yes
checking for struct addrinfo... yes
checking for struct sockaddr_storage... yes
checking for field ifr_index in struct ifreq... no
checking for field ifr_ifindex in struct ifreq... yes
checking for struct ifconf... yes
checking for ioctl SIOCGIFNUM... sys/sockio.h missing
checking for pthread_create in -lpthread... yes
checking for socketpair in -lsocket... no
checking for library containing clock_gettime... none required
checking for clock_gettime... yes
checking for clock_getcpuclockid... yes
checking whether CLOCK_MONOTONIC is declared... yes
checking for library containing socket... none required
checking for library containing inet_ntop... none required
checking for library containing getipnodebyname... no
checking for library containing gethostbyname... none required
checking for library containing getaddrinfo... none required
checking for working alloca.h... yes
checking for alloca... yes
checking for gettimeofday... yes
checking for strerror... yes
checking for random... yes
checking for initstate... yes
checking for tcsetattr... yes
checking for flock... yes
checking for socketpair... yes
checking for gethostname... yes
checking for gethostbyname... yes
checking for getipnodebyname... no
checking for poll... yes
checking for epoll_create... yes
checking for kqueue... no
checking for select... yes
checking for if_nameindex... yes
checking for signal... yes
checking for alarm... yes
checking for strnlen... yes
checking for memmem... yes
checking for getaddrinfo... yes
checking for getnameinfo... yes
checking for freeaddrinfo... yes
checking for gai_strerror... yes
checking for getifaddrs... yes
checking for getline... yes
checking for getdelim... yes
checking for getpass... yes
checking for memccpy... yes
checking for memspn... no
checking for memcspn... no
checking for strtoull... yes
checking for inet_ntop... yes
checking for inet_pton... yes
checking for poll... (cached) yes
checking whether SIGPIPE is declared... yes
checking for pkg-config... no
*** The pkg-config script could not be found. Make sure it is
*** in your path, or set the PKG_CONFIG environment variable
*** to the full path to pkg-config.
*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.
checking openssl/tls1.h usability... no
checking openssl/tls1.h presence... no
checking for openssl/tls1.h... no
configure: WARNING: OpenSSL include files were not found
checking for IP_RECVERR... yes
checking for IPV6_RECVERR... yes
checking for netinet/tcp.h... yes
checking for netinet/sctp.h... no
*** The pkg-config script could not be found. Make sure it is
*** in your path, or set the PKG_CONFIG environment variable
*** to the full path to pkg-config.
*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.
checking fnmatch.h usability... yes
checking fnmatch.h presence... yes
checking for fnmatch.h... yes
checking for dlopen in -ldl... yes
configure: WARNING: ** TLS support for STUN disabled as OpenSSL headers and/or libraries were not found **
checking for ANSI C header files... (cached) yes
checking return type of signal handlers... void
checking for long long... yes
checking whether IO functions support C99 size specifiers... yes
checking for an ANSI C-conforming const... (cached) yes
checking for inline... (cached) inline
checking for inline... (cached) inline
checking whether byte ordering is bigendian... no
checking whether gcc recognizes func... (cached) yes
checking whether gcc recognizes FUNCTION... (cached) yes
checking whether gcc recognizes field names in struct initialization... yes
checking whether time.h and sys/time.h may both be included... (cached) yes
checking for size_t... (cached) yes
checking for sa_len... (cached) no
checking /dev/urandom... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating packages/Makefile
config.status: creating packages/sofia-sip-ua.pc
config.status: creating packages/sofia-sip-ua-glib.pc
config.status: creating libsofia-sip-ua/Makefile
config.status: creating libsofia-sip-ua/bnf/Makefile
config.status: creating libsofia-sip-ua/bnf/Doxyfile
config.status: creating libsofia-sip-ua/docs/Makefile
config.status: creating libsofia-sip-ua/docs/Doxyfile
config.status: creating libsofia-sip-ua/docs/Doxyfile.version
config.status: creating libsofia-sip-ua/docs/sofia-footer.html
config.status: creating libsofia-sip-ua/features/Doxyfile
config.status: creating libsofia-sip-ua/features/Makefile
config.status: creating libsofia-sip-ua/http/Doxyfile
config.status: creating libsofia-sip-ua/http/Makefile
config.status: creating libsofia-sip-ua/ipt/Doxyfile
config.status: creating libsofia-sip-ua/ipt/Makefile
config.status: creating libsofia-sip-ua/iptsec/Doxyfile
config.status: creating libsofia-sip-ua/iptsec/Makefile
config.status: creating libsofia-sip-ua/msg/Doxyfile
config.status: creating libsofia-sip-ua/msg/Makefile
config.status: creating libsofia-sip-ua/nea/Doxyfile
config.status: creating libsofia-sip-ua/nea/Makefile
config.status: creating libsofia-sip-ua/nta/Doxyfile
config.status: creating libsofia-sip-ua/nta/Makefile
config.status: creating libsofia-sip-ua/nth/Doxyfile
config.status: creating libsofia-sip-ua/nth/Makefile
config.status: creating libsofia-sip-ua/nua/Doxyfile
config.status: creating libsofia-sip-ua/nua/Makefile
config.status: creating libsofia-sip-ua/sdp/Doxyfile
config.status: creating libsofia-sip-ua/sdp/Makefile
config.status: creating libsofia-sip-ua/sip/Doxyfile
config.status: creating libsofia-sip-ua/sip/Makefile
config.status: creating libsofia-sip-ua/soa/Doxyfile
config.status: creating libsofia-sip-ua/soa/Makefile
config.status: creating libsofia-sip-ua/sresolv/Doxyfile
config.status: creating libsofia-sip-ua/sresolv/Makefile
config.status: creating libsofia-sip-ua/stun/Doxyfile
config.status: creating libsofia-sip-ua/stun/Makefile
config.status: creating libsofia-sip-ua/su/Doxyfile
config.status: creating libsofia-sip-ua/su/Makefile
config.status: creating libsofia-sip-ua/tport/Doxyfile
config.status: creating libsofia-sip-ua/tport/Makefile
config.status: creating libsofia-sip-ua/url/Doxyfile
config.status: creating libsofia-sip-ua/url/Makefile
config.status: creating libsofia-sip-ua/features/sofia-sip/sofia_features.h
config.status: creating s2check/Makefile
config.status: creating libsofia-sip-ua-glib/Makefile
config.status: creating libsofia-sip-ua-glib/su-glib/Makefile
config.status: creating libsofia-sip-ua-glib/su-glib/Doxyfile
config.status: creating utils/Makefile
config.status: creating utils/Doxyfile
config.status: creating tests/Makefile
config.status: creating win32/Makefile
config.status: creating win32/config.h
config.status: creating open_c/Makefile
config.status: creating open_c/config.h
config.status: creating packages/sofia-sip-1.12.11-234-gd74df2e.spec
config.status: creating config.h
config.status: config.h is unchanged
config.status: creating libsofia-sip-ua/su/sofia-sip/su_configure.h
config.status: libsofia-sip-ua/su/sofia-sip/su_configure.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing version commands
./build-dep-libs.sh: 69: ./build-dep-libs.sh: make: not found
./build-dep-libs.sh: 71: ./build-dep-libs.sh: sudo: not found

很明显lua源码有问题

代码出处 --- lua

       if (xml == nil) then
               freeswitch.consoleLog("CRIT","Result is 'nil'\n")
               tryagain = 0
       else
               freeswitch.consoleLog("CRIT","Result is '" .. xml .. "'\n")
               tryagain = 0

错误

在这次循环中, while (tryagain == 1) do 循环中,其实只执行一次。

问个问题

我可以用这个方式进行呼叫结果识别码?

unimrcp make 编译出现下面错误

src/xfyun_synth_engine.c:311:35: warning: passing 'const void *' to parameter of type 'void *' discards
qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
mpf_buffer_audio_write(buffer, data, audio_len);
^~~~
../../libs/mpf/include/mpf_buffer.h:43:63: note: passing argument to parameter 'data' here
apt_bool_t mpf_buffer_audio_write(mpf_buffer_t *buffer, void *data, apr_size_t size);
^
1 warning generated.
CCLD xfyunsynth.la
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [xfyunsynth.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

关键词也google不出来相关信息,不知道问题出在了哪里,求教!!

open QTTSAudioGet failed, error code: 10407.

您好,我按照这个教程在集成讯飞的开放平台SDK的时候,运行之后提示open QTTSAudioGet failed, error code: 10407. 开放平台选择的是linux平台,服务是语音听写和在线语音合成。开放平台的论坛上说是不支持mrcp,不太理解。

执行./build-dep-libs.sh出错?

make install-am make[3]: Entering directory/opt/MRCP-Plugin-Demo/unimrcp-deps-1.5.0/libs/sofia
-sip/libsofia-sip-ua/tport'
LTCOMPILE tport_tls.lo
tport_tls.c: In function 'tls_init_context':
tport_tls.c:300:7: warning: 'TLSv1_method' is deprecated [-Wdeprecated-declarati
ons]
meth = TLSv1_method();
In file included from /usr/include/openssl/e_os2.h:13:0,
from /usr/include/openssl/lhash.h:17,
from tport_tls.c:45:
/usr/include/openssl/rand.h:47:1: note: declared here
DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
^
tport_tls.c: In function 'tls_post_connection_check':
tport_tls.c:596:33: error: dereferencing pointer to incomplete type 'X509 {aka s
truct x509_st}'
tls_parse_extensions(tls, cert->cert_info->extensions);
^~
make[3]: *** [tport_tls.lo] Error 1
make[3]: Leaving directory /opt/MRCP-Plugin-Demo/unimrcp-deps-1.5.0/libs/sofia- sip/libsofia-sip-ua/tport' make[2]: *** [install] Error 2 make[2]: Leaving directory /opt/MRCP-Plugin-Demo/unimrcp-deps-1.5.0/libs/sofia-
sip/libsofia-sip-ua/tport'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory /opt/MRCP-Plugin-Demo/unimrcp-deps-1.5.0/libs/sofia- sip/libsofia-sip-ua' make: *** [install-recursive] Error 1

Completion-Cause: 002 no-input-timeout

#JSGF V1.0;
/** JSGF Grammar for example */
grammar example;
public = [];

2022-07-04 19:07:32.886766 [DEBUG] apt_poller_task.c:246 () Wait for Messages [MRCPv2ConnectionAgent] timeout [3000]
2022-07-04 19:07:32.886766 [DEBUG] apt_poller_task.c:269 () Process Signalled Descriptor [MRCPv2ConnectionAgent]
2022-07-04 19:07:32.886766 [INFO] mrcp_client_connection.c:635 () Receive MRCPv2 Data 192.168.1.156:57018 <-> 192.168.1.156:1544 [112 bytes]
MRCP/2.0 112 1 200 COMPLETE
Channel-Identifier: 645653af08c144dc@speechrecog
Completion-Cause: 000 success

2022-07-04 19:07:32.886766 [DEBUG] apt_task.c:265 () Signal Message to [MRCP Client] [0x7f5cc8018d10;2;3]
2022-07-04 19:07:32.886766 [DEBUG] apt_poller_task.c:251 () Wait for Messages [MRCPv2ConnectionAgent]
2022-07-04 19:07:32.886766 [DEBUG] apt_task.c:337 () Process Message [MRCP Client] [0x7f5cc8018d10;2;3]
2022-07-04 19:07:32.886766 [INFO] mrcp_client_session.c:500 (ASR-3) Raise App MRCP Response ASR-3 <645653af08c144dc>
2022-07-04 19:07:32.886766 [DEBUG] mod_unimrcp.c:3658 (ASR-3) grammar loaded
2022-07-04 19:07:32.886766 [DEBUG] mod_unimrcp.c:1584 (ASR-3) PROCESSING ==> READY
2022-07-04 19:07:32.886766 [DEBUG] apt_consumer_task.c:141 () Wait for Messages [MRCP Client]
2022-07-04 19:07:32.886766 [DEBUG] mod_unimrcp.c:2526 (ASR-3) Disabling all grammars
2022-07-04 19:07:32.886766 [DEBUG] mod_unimrcp.c:2485 (ASR-3) Enabling grammar 6fa8a9da-2b47-456a-9dcc-45d54e240f2f
2022-07-04 19:07:32.886766 [DEBUG] mod_unimrcp.c:2848 (ASR-3) "recognition-timeout": "10000"
2022-07-04 19:07:32.886766 [DEBUG] mod_unimrcp.c:2848 (ASR-3) "start-input-timers": "false"
2022-07-04 19:07:32.886766 [DEBUG] mod_unimrcp.c:2848 (ASR-3) "no-input-timeout": "5000"
2022-07-04 19:07:32.886766 [DEBUG] apt_task.c:265 () Signal Message to [MRCP Client] [0x7f5cb40db980;4;0]
2022-07-04 19:07:32.886766 [DEBUG] apt_task.c:337 () Process Message [MRCP Client] [0x7f5cb40db980;4;0]
2022-07-04 19:07:32.886766 [INFO] mrcp_client_session.c:392 (ASR-3) Receive App MRCP Request ASR-3 <645653af08c144dc>
2022-07-04 19:07:32.886766 [INFO] mrcp_client_session.c:622 (ASR-3) Send MRCP Request ASR-3 645653af08c144dc@speechrecog [2]
2022-07-04 19:07:32.886766 [DEBUG] apt_task.c:265 () Signal Message to [MRCPv2ConnectionAgent] [0x7f5cbc024c30;1;0]
2022-07-04 19:07:32.886766 [DEBUG] apt_consumer_task.c:141 () Wait for Messages [MRCP Client]
2022-07-04 19:07:32.886766 [DEBUG] apt_poller_task.c:261 () Process Poller Wakeup [MRCPv2ConnectionAgent]
2022-07-04 19:07:32.886766 [DEBUG] apt_task.c:337 () Process Message [MRCPv2ConnectionAgent] [0x7f5cbc024c30;1;0]
2022-07-04 19:07:32.886766 [INFO] mrcp_client_connection.c:530 (ASR-3) Send MRCPv2 Data 192.168.1.156:57018 <-> 192.168.1.156:1544 [274 bytes]
MRCP/2.0 274 RECOGNIZE 2
Channel-Identifier: 645653af08c144dc@speechrecog
Content-Type: text/uri-list
Cancel-If-Queue: false
Recognition-Timeout: 10000
Start-Input-Timers: false
No-Input-Timeout: 5000
Content-Length: 44

session:6fa8a9da-2b47-456a-9dcc-45d54e240f2f
2022-07-04 19:07:32.886766 [DEBUG] apt_poller_task.c:246 () Wait for Messages [MRCPv2ConnectionAgent] timeout [3000]
2022-07-04 19:07:32.886766 [DEBUG] apt_poller_task.c:269 () Process Signalled Descriptor [MRCPv2ConnectionAgent]
2022-07-04 19:07:32.886766 [INFO] mrcp_client_connection.c:635 () Receive MRCPv2 Data 192.168.1.156:57018 <-> 192.168.1.156:1544 [83 bytes]
MRCP/2.0 83 2 200 IN-PROGRESS
Channel-Identifier: 645653af08c144dc@speechrecog

2022-07-04 19:07:32.886766 [DEBUG] apt_task.c:265 () Signal Message to [MRCP Client] [0x7f5cc8018d10;2;3]
2022-07-04 19:07:32.886766 [DEBUG] apt_poller_task.c:251 () Wait for Messages [MRCPv2ConnectionAgent]
2022-07-04 19:07:32.886766 [DEBUG] apt_task.c:337 () Process Message [MRCP Client] [0x7f5cc8018d10;2;3]
2022-07-04 19:07:32.886766 [INFO] mrcp_client_session.c:500 (ASR-3) Raise App MRCP Response ASR-3 <645653af08c144dc>
2022-07-04 19:07:32.886766 [DEBUG] mod_unimrcp.c:3610 (ASR-3) RECOGNIZE IN PROGRESS
2022-07-04 19:07:32.886766 [DEBUG] mod_unimrcp.c:1584 (ASR-3) READY ==> PROCESSING
2022-07-04 19:07:32.886766 [DEBUG] apt_consumer_task.c:141 () Wait for Messages [MRCP Client]
2022-07-04 19:07:32.886766 [DEBUG] switch_core_file.c:389 File /usr/local/freeswitch/sounds/en/us/callie/ivr/test.wav sample rate 16000 doesn't match requested rate 48000
2022-07-04 19:07:32.886766 [DEBUG] switch_ivr_play_say.c:1497 Codec Activated L16@48000hz 1 channels 20ms
2022-07-04 19:07:32.928063 [DEBUG] switch_core_io.c:448 Setting BUG Codec opus:116
2022-07-04 19:07:32.928063 [DEBUG] mod_opus.c:617 Opus encoder: set bitrate to local settings [72000bps]
2022-07-04 19:07:37.247983 [DEBUG] switch_ivr_play_say.c:1941 done playing file /usr/local/freeswitch/sounds/en/us/callie/ivr/test.wav
2022-07-04 19:07:37.247983 [DEBUG] mod_unimrcp.c:2569 (ASR-3) Starting input timers
2022-07-04 19:07:37.247983 [DEBUG] apt_task.c:265 () Signal Message to [MRCP Client] [0x7f5cb4000a20;4;0]
2022-07-04 19:07:37.247983 [INFO] switch_ivr_async.c:4549 (sofia/internal/[email protected]) WAITING FOR RESULT
2022-07-04 19:07:37.247983 [DEBUG] apt_task.c:337 () Process Message [MRCP Client] [0x7f5cb4000a20;4;0]
2022-07-04 19:07:37.247983 [INFO] mrcp_client_session.c:392 (ASR-3) Receive App MRCP Request ASR-3 <645653af08c144dc>
2022-07-04 19:07:37.247983 [INFO] mrcp_client_session.c:622 (ASR-3) Send MRCP Request ASR-3 645653af08c144dc@speechrecog [3]
2022-07-04 19:07:37.247983 [DEBUG] apt_task.c:265 () Signal Message to [MRCPv2ConnectionAgent] [0x7f5cbc01d280;1;0]
2022-07-04 19:07:37.247983 [DEBUG] apt_consumer_task.c:141 () Wait for Messages [MRCP Client]
2022-07-04 19:07:37.247983 [DEBUG] apt_poller_task.c:261 () Process Poller Wakeup [MRCPv2ConnectionAgent]
2022-07-04 19:07:37.247983 [DEBUG] apt_task.c:337 () Process Message [MRCPv2ConnectionAgent] [0x7f5cbc01d280;1;0]
2022-07-04 19:07:37.247983 [INFO] mrcp_client_connection.c:530 (ASR-3) Send MRCPv2 Data 192.168.1.156:57018 <-> 192.168.1.156:1544 [86 bytes]
MRCP/2.0 86 START-INPUT-TIMERS 3
Channel-Identifier: 645653af08c144dc@speechrecog

2022-07-04 19:07:37.247983 [DEBUG] apt_poller_task.c:246 () Wait for Messages [MRCPv2ConnectionAgent] timeout [3000]
2022-07-04 19:07:37.247983 [DEBUG] apt_poller_task.c:269 () Process Signalled Descriptor [MRCPv2ConnectionAgent]
2022-07-04 19:07:37.247983 [INFO] mrcp_client_connection.c:635 () Receive MRCPv2 Data 192.168.1.156:57018 <-> 192.168.1.156:1544 [80 bytes]
MRCP/2.0 80 3 200 COMPLETE
Channel-Identifier: 645653af08c144dc@speechrecog

2022-07-04 19:07:37.247983 [DEBUG] apt_task.c:265 () Signal Message to [MRCP Client] [0x7f5cc812a670;2;3]
2022-07-04 19:07:37.247983 [DEBUG] apt_poller_task.c:251 () Wait for Messages [MRCPv2ConnectionAgent]
2022-07-04 19:07:37.247983 [DEBUG] apt_task.c:337 () Process Message [MRCP Client] [0x7f5cc812a670;2;3]
2022-07-04 19:07:37.247983 [INFO] mrcp_client_session.c:500 (ASR-3) Raise App MRCP Response ASR-3 <645653af08c144dc>
2022-07-04 19:07:37.247983 [DEBUG] mod_unimrcp.c:3647 (ASR-3) timers started
2022-07-04 19:07:37.247983 [DEBUG] apt_consumer_task.c:141 () Wait for Messages [MRCP Client]
2022-07-04 19:07:42.267096 [DEBUG] apt_poller_task.c:269 () Process Signalled Descriptor [MRCPv2ConnectionAgent]
2022-07-04 19:07:42.267096 [INFO] mrcp_client_connection.c:635 () Receive MRCPv2 Data 192.168.1.156:57018 <-> 192.168.1.156:1544 [213 bytes]
MRCP/2.0 213 RECOGNITION-COMPLETE 2 COMPLETE
Channel-Identifier: 645653af08c144dc@speechrecog
Completion-Cause: 002 no-input-timeout
Waveform-Uri: 645653af08c144dc-1.wav
Content-Type: application/nlsml+xml

2022-07-04 19:07:42.267096 [DEBUG] apt_task.c:265 () Signal Message to [MRCP Client] [0x7f5cc8151cf0;2;3]
2022-07-04 19:07:42.267096 [DEBUG] apt_poller_task.c:251 () Wait for Messages [MRCPv2ConnectionAgent]
2022-07-04 19:07:42.267096 [DEBUG] apt_task.c:337 () Process Message [MRCP Client] [0x7f5cc8151cf0;2;3]
2022-07-04 19:07:42.267096 [INFO] mrcp_client_session.c:516 (ASR-3) Raise App MRCP Event ASR-3 <645653af08c144dc>
2022-07-04 19:07:42.267096 [DEBUG] mod_unimrcp.c:3675 (ASR-3) RECOGNITION COMPLETE, Completion-Cause: 002
2022-07-04 19:07:42.267096 [DEBUG] mod_unimrcp.c:3693 (ASR-3) No result
2022-07-04 19:07:42.267096 [DEBUG] mod_unimrcp.c:2733 (ASR-3) ASR adding result headers
2022-07-04 19:07:42.267096 [DEBUG] mod_unimrcp.c:2628 (ASR-3) result:

Completion-Cause: 002
2022-07-04 19:07:42.267096 [DEBUG] mod_unimrcp.c:1584 (ASR-3) PROCESSING ==> READY
2022-07-04 19:07:42.267096 [DEBUG] apt_consumer_task.c:141 () Wait for Messages [MRCP Client]
2022-07-04 19:07:42.287137 [DEBUG] mod_unimrcp.c:2545 (ASR-3) SUCCESS, have result
2022-07-04 19:07:42.287137 [DEBUG] mod_unimrcp.c:2545 (ASR-3) SUCCESS, have result
2022-07-04 19:07:42.287137 [DEBUG] mod_unimrcp.c:2786 (ASR-3) result:

Completion-Cause: 002
2022-07-04 19:07:42.307140 [INFO] switch_ivr_async.c:4450 (sofia/internal/[email protected]) DETECTED SPEECH
2022-07-04 19:07:42.307140 [CRIT] switch_cpp.cpp:1370 Result is 'Completion-Cause: 002'
2022-07-04 19:07:42.327954 [DEBUG] switch_cpp.cpp:731 CoreSession::hangup
2022-07-04 19:07:42.327954 [NOTICE] switch_cpp.cpp:733 Hangup sofia/internal/[email protected] [CS_EXECUTE] [NORMAL_CLEARING]
2022-07-04 19:07:42.327954 [DEBUG] switch_cpp.cpp:1187 sofia/internal/[email protected] destroy/unlink session from object
2022-07-04 19:07:42.327954 [DEBUG] switch_core_session.c:2905 sofia/internal/[email protected] skip receive message [APPLICATION_EXEC_COMPLETE] (channel is hungup already)
2022-07-04 19:07:42.327954 [DEBUG] switch_core_state_machine.c:650 (sofia/internal/[email protected]) State EXECUTE going to sleep
2022-07-04 19:07:42.327954 [DEBUG] switch_core_state_machine.c:584 (sofia/internal/[email protected]) Running State Change CS_HANGUP (Cur 1 Tot 38)

unimrcp with plugin xfyun has problems

Load Plugin [xfyunsynth-1] [/usr/local/unimrcp/plugin/xfyunsynth.so] Failed to Load DSO: /usr/local/unimrcp/lib/libmsc.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE Load Plugin [xfyunrecog-1] [/usr/local/unimrcp/plugin/xfyunrecog.so] Failed to Load DSO: /usr/local/unimrcp/lib/libmsc.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE

Freeswitch向UniMRCP服务器传送的RTP包内容全是7f7f7f7f7f7f7f7f7f7f....

大神好!我按照您的文档一步步配置,TTS可以正常运行,听到声音,但是ASR 科大讯飞服务返回的识别结果是Completion-Cause: 002 no-input-timeout. 在UniMRCP服务器侧抓包发现Freeswitch发给UniMRCP服务器的RTP包的Payload内容全为7f7f7f7f7f7f7f7f..., 想请教您可能是什么原因造成的,万分感谢!
192.168.20.148是Freeswitch的IP地址,192.168.20.43是UniMRCP服务器的IP地址。
image

可以告诉我最终效果吗??

我能够完成所有步骤,但是不知道最终效果是不是成功了。

我的最终效果就是,我说一句话,比如“从北京到上海”,不能立即识别,需要历经一些时间才能识别。但是并不能在FreeSWITCH控制台上看到效果。单纯地在UniMRCP控制台中看书输出识别的内容。

switch_ivr_play_say.c:3006 Invalid TTS module unimrcp[xiaofang]!

switch_channel.c:1118 New Channel sofia/internal/[email protected]:5060 [7e4b82b6-e33d-4f1e-87a1-9001529397e6]
2021-03-04 06:34:09.636783 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/[email protected]:5060) Running State Change CS_NEW (Cur 1 Tot 8)
2021-03-04 06:34:09.636783 [INFO] sofia.c:10333 sofia/internal/[email protected]:5060 receiving invite from 192.168.3.84:53763 version: 1.10.6-dev 64bit call-id: nlgGWh-uW96NFyeUjVjlcg..
2021-03-04 06:34:09.636783 [DEBUG] sofia.c:10427 verifying acl "domains" for ip/port 192.168.3.84:0.
2021-03-04 06:34:09.636783 [DEBUG] switch_core_state_machine.c:604 (sofia/internal/[email protected]:5060) State NEW
2021-03-04 06:34:09.636783 [DEBUG] sofia.c:2435 detaching session 7e4b82b6-e33d-4f1e-87a1-9001529397e6
2021-03-04 06:34:09.676725 [DEBUG] sofia.c:2545 Re-attaching to session 7e4b82b6-e33d-4f1e-87a1-9001529397e6
2021-03-04 06:34:09.696807 [INFO] sofia.c:10333 sofia/internal/[email protected]:5060 receiving invite from 192.168.3.84:53763 version: 1.10.6-dev 64bit call-id: nlgGWh-uW96NFyeUjVjlcg..
2021-03-04 06:34:09.696807 [DEBUG] sofia.c:10427 verifying acl "domains" for ip/port 192.168.3.84:0.
2021-03-04 06:34:09.696807 [DEBUG] sofia.c:7379 Channel sofia/internal/[email protected]:5060 entering state [received][100]
2021-03-04 06:34:09.696807 [DEBUG] sofia.c:7389 Remote SDP:
v=0
o=Z 1614839649454 1 IN IP4 192.168.3.84
s=Z
c=IN IP4 192.168.3.84
t=0 0
m=audio 8000 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

2021-03-04 06:34:09.696807 [DEBUG] sofia.c:7792 (sofia/internal/[email protected]:5060) State Change CS_NEW -> CS_INIT
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/[email protected]:5060) Running State Change CS_INIT (Cur 1 Tot 8)
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:628 (sofia/internal/[email protected]:5060) State INIT
2021-03-04 06:34:09.696807 [DEBUG] mod_sofia.c:93 sofia/internal/[email protected]:5060 SOFIA INIT
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:40 sofia/internal/[email protected]:5060 Standard INIT
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:48 (sofia/internal/[email protected]:5060) State Change CS_INIT -> CS_ROUTING
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:628 (sofia/internal/[email protected]:5060) State INIT going to sleep
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/[email protected]:5060) Running State Change CS_ROUTING (Cur 1 Tot 8)
2021-03-04 06:34:09.696807 [DEBUG] switch_channel.c:2332 (sofia/internal/[email protected]:5060) Callstate Change DOWN -> RINGING
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:644 (sofia/internal/[email protected]:5060) State ROUTING
2021-03-04 06:34:09.696807 [DEBUG] mod_sofia.c:154 sofia/internal/[email protected]:5060 SOFIA ROUTING
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:236 sofia/internal/[email protected]:5060 Standard ROUTING
2021-03-04 06:34:09.696807 [INFO] mod_dialplan_xml.c:637 Processing 1000 <1000>->5001 in context default
Dialplan: sofia/internal/[email protected]:5060 parsing [default->unimrcp] continue=false
Dialplan: sofia/internal/[email protected]:5060 Regex (PASS) [unimrcp] destination_number(5001) =~ /^5001$/ break=on-false
Dialplan: sofia/internal/[email protected]:5060 Action answer()
Dialplan: sofia/internal/[email protected]:5060 Action lua(names.lua)
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:287 (sofia/internal/[email protected]:5060) State Change CS_ROUTING -> CS_EXECUTE
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:644 (sofia/internal/[email protected]:5060) State ROUTING going to sleep
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/[email protected]:5060) Running State Change CS_EXECUTE (Cur 1 Tot 8)
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:651 (sofia/internal/[email protected]:5060) State EXECUTE
2021-03-04 06:34:09.696807 [DEBUG] mod_sofia.c:209 sofia/internal/[email protected]:5060 SOFIA EXECUTE
2021-03-04 06:34:09.696807 [DEBUG] switch_core_state_machine.c:329 sofia/internal/[email protected]:5060 Standard EXECUTE
EXECUTE [depth=0] sofia/internal/[email protected]:5060 answer()
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [opus:106:48000:20:0:1]/[opus:116:48000:20:0:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5650 Audio Codec Compare [opus:116:48000:20:0:1] ++++ is saved as a match
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [opus:106:48000:20:0:1]/[G722:9:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [opus:106:48000:20:0:1]/[PCMU:0:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [opus:106:48000:20:0:1]/[PCMA:8:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [G722:9:8000:20:64000:1]/[opus:116:48000:20:0:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [G722:9:8000:20:64000:1]/[G722:9:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5650 Audio Codec Compare [G722:9:8000:20:64000:1] ++++ is saved as a match
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [G722:9:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [G722:9:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5511 Set telephone-event payload to 98@48000
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[opus:116:48000:20:0:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[G722:9:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5650 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[opus:116:48000:20:0:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[G722:9:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5650 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [GSM:3:8000:20:13200:1]/[opus:116:48000:20:0:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [GSM:3:8000:20:13200:1]/[G722:9:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [GSM:3:8000:20:13200:1]/[PCMU:0:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5595 Audio Codec Compare [GSM:3:8000:20:13200:1]/[PCMA:8:8000:20:64000:1]
2021-03-04 06:34:09.696807 [DEBUG] mod_opus.c:613 Opus encoder: set bitrate to local settings [72000bps]
2021-03-04 06:34:09.696807 [DEBUG] mod_opus.c:613 Opus encoder: set bitrate to local settings [72000bps]
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:3840 Set Codec sofia/internal/[email protected]:5060 opus/48000 20 ms 960 samples 0 bits 1 channels
2021-03-04 06:34:09.696807 [DEBUG] switch_core_codec.c:111 sofia/internal/[email protected]:5060 Original read codec set to opus:116
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5854 Set telephone-event payload to 98@48000
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:5912 sofia/internal/[email protected]:5060 Set 2833 dtmf send payload to 98 recv payload to 98
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:8664 AUDIO RTP [sofia/internal/[email protected]:5060] 172.17.0.3 port 22478 -> 192.168.3.84 port 8000 codec: 106 ms: 20
2021-03-04 06:34:09.696807 [DEBUG] switch_rtp.c:4450 Starting timer [soft] 960 bytes per 20ms
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:8978 sofia/internal/[email protected]:5060 Set 2833 dtmf send payload to 98
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:8985 sofia/internal/[email protected]:5060 Set 2833 dtmf receive payload to 98
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:9008 sofia/internal/[email protected]:5060 Set rtp dtmf delay to 40
2021-03-04 06:34:09.696807 [NOTICE] sofia_media.c:92 Pre-Answer sofia/internal/[email protected]:5060!
2021-03-04 06:34:09.696807 [DEBUG] switch_channel.c:3565 (sofia/internal/[email protected]:5060) Callstate Change RINGING -> EARLY
2021-03-04 06:34:09.696807 [DEBUG] switch_core_media.c:8646 Audio params are unchanged for sofia/internal/[email protected]:5060.
2021-03-04 06:34:09.696807 [DEBUG] mod_sofia.c:898 Local SDP sofia/internal/[email protected]:5060:
v=0
o=FreeSWITCH 1614817171 1614817172 IN IP4 182.149.137.6
s=FreeSWITCH
c=IN IP4 182.149.137.6
t=0 0
m=audio 22478 RTP/AVP 106 98
a=rtpmap:106 opus/48000/2
a=fmtp:106 useinbandfec=1; minptime=20
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=ptime:20
a=sendrecv

2021-03-04 06:34:09.696807 [NOTICE] mod_dptools.c:1412 Channel [sofia/internal/[email protected]:5060] has been answered
2021-03-04 06:34:09.696807 [DEBUG] switch_channel.c:3865 (sofia/internal/[email protected]:5060) Callstate Change EARLY -> ACTIVE
2021-03-04 06:34:09.696807 [DEBUG] sofia.c:7379 Channel sofia/internal/[email protected]:5060 entering state [completed][200]
EXECUTE [depth=0] sofia/internal/[email protected]:5060 lua(names.lua)
2021-03-04 06:34:09.696807 [DEBUG] switch_core_file.c:405 File /usr/local/freeswitch/sounds/en/us/callie/ivr/ivr-welcome_to_freeswitch.wav sample rate 32000 doesn't match requested rate 48000
2021-03-04 06:34:09.696807 [DEBUG] switch_ivr_play_say.c:1488 Codec Activated L16@48000hz 1 channels 20ms
2021-03-04 06:34:12.316803 [DEBUG] switch_ivr_play_say.c:1933 done playing file /usr/local/freeswitch/sounds/en/us/callie/ivr/ivr-welcome_to_freeswitch.wav
EXECUTE [depth=0] sofia/internal/[email protected]:5060 play_and_detect_speech(ivr/ivr-this_ivr_will_let_you_test_features.wavdetect:unimrcp {start-input-timers=false,no-input-timeout=80000,recognition-timeout=80000}hello)
2021-03-04 06:34:12.316803 [INFO] mod_unimrcp.c:3128 asr_handle: name = unimrcp, codec = (null), rate = 48000, grammar = (null), param = (null)
2021-03-04 06:34:12.316803 [INFO] mod_unimrcp.c:3130 codec = L16, rate = 48000, dest = (null)
2021-03-04 06:34:12.316803 [DEBUG] mod_unimrcp.c:669 (ASR-0) queue rx saved to /tmp/mod_unimrcp_rx_hFSUDc
2021-03-04 06:34:12.316803 [DEBUG] mod_unimrcp.c:676 (ASR-0) queue tx saved to /tmp/mod_unimrcp_tx_aryisz
2021-03-04 06:34:12.316803 [DEBUG] mod_unimrcp.c:684 (ASR-0) audio queue created
2021-03-04 06:34:12.316803 [NOTICE] mrcp_application.c:96 (ASR-0) Create MRCP Handle 0x7f16ac05f6c0 [unimrcpserver-mrcp2]
2021-03-04 06:34:12.316803 [INFO] mrcp_client_session.c:133 (ASR-0) Create Channel ASR-0
2021-03-04 06:34:12.316803 [DEBUG] apt_task.c:265 () Signal Message to [MRCP Client] [0x7f16ac0563e0;4;0]
2021-03-04 06:34:12.316803 [DEBUG] apt_task.c:337 () Process Message [MRCP Client] [0x7f16ac0563e0;4;0]
2021-03-04 06:34:12.316803 [INFO] mrcp_client_session.c:387 (ASR-0) Receive App Request ASR-0 [2]
2021-03-04 06:34:12.316803 [WARNING] mrcp_client_session.c:1269 (ASR-0) Failed to Create Session ASR-0 [2]
2021-03-04 06:34:12.316803 [INFO] mrcp_client_session.c:533 (ASR-0) Raise App Response ASR-0 [2] FAILURE [1]
2021-03-04 06:34:12.316803 [ERR] mod_unimrcp.c:1914 (ASR-0) RECOGNIZER channel error!
2021-03-04 06:34:12.316803 [DEBUG] mod_unimrcp.c:1578 (ASR-0) CLOSED ==> ERROR
2021-03-04 06:34:12.316803 [DEBUG] apt_consumer_task.c:141 () Wait for Messages [MRCP Client]
2021-03-04 06:34:12.316803 [DEBUG] mod_unimrcp.c:1062 (ASR-0) Terminating MRCP session
2021-03-04 06:34:12.316803 [DEBUG] apt_task.c:265 () Signal Message to [MRCP Client] [0x7f16ac1c1f80;4;0]
2021-03-04 06:34:12.316803 [DEBUG] apt_task.c:337 () Process Message [MRCP Client] [0x7f16ac1c1f80;4;0]
2021-03-04 06:34:12.316803 [INFO] mrcp_client_session.c:387 (ASR-0) Receive App Request ASR-0 [1]
2021-03-04 06:34:12.316803 [INFO] mrcp_client_session.c:455 (ASR-0) Raise App Response ASR-0 [1] SUCCESS [0]
2021-03-04 06:34:12.316803 [DEBUG] mod_unimrcp.c:1829 (ASR-0) Destroying MRCP session
2021-03-04 06:34:12.316803 [NOTICE] mrcp_application.c:182 (ASR-0) Destroy MRCP Handle ASR-0
2021-03-04 06:34:12.316803 [DEBUG] mod_unimrcp.c:1578 (ASR-0) ERROR ==> CLOSED
2021-03-04 06:34:12.316803 [DEBUG] apt_consumer_task.c:141 () Wait for Messages [MRCP Client]
2021-03-04 06:34:12.316803 [CRIT] switch_cpp.cpp:1465 Result is 'nil'
2021-03-04 06:34:12.576788 [INFO] mod_unimrcp.c:1625 speech_handle: name = unimrcp, rate = 48000, speed = 0, samples = 960, voice = , engine = unimrcp, param = (null)
2021-03-04 06:34:12.576788 [INFO] mod_unimrcp.c:1628 voice = xiaofang, rate = 48000
2021-03-04 06:34:12.576788 [DEBUG] mod_unimrcp.c:669 (TTS-1) queue rx saved to /tmp/mod_unimrcp_rx_bg4FkX
2021-03-04 06:34:12.576788 [DEBUG] mod_unimrcp.c:676 (TTS-1) queue tx saved to /tmp/mod_unimrcp_tx_GnE6cl
2021-03-04 06:34:12.576788 [DEBUG] mod_unimrcp.c:684 (TTS-1) audio queue created
2021-03-04 06:34:12.576788 [NOTICE] mrcp_application.c:96 (TTS-1) Create MRCP Handle 0x7f16ac0686d0 [unimrcpserver-mrcp2]
2021-03-04 06:34:12.576788 [INFO] mrcp_client_session.c:133 (TTS-1) Create Channel TTS-1
2021-03-04 06:34:12.576788 [DEBUG] apt_task.c:265 () Signal Message to [MRCP Client] [0x7f16ac04b320;4;0]
2021-03-04 06:34:12.576788 [DEBUG] apt_task.c:337 () Process Message [MRCP Client] [0x7f16ac04b320;4;0]
2021-03-04 06:34:12.576788 [INFO] mrcp_client_session.c:387 (TTS-1) Receive App Request TTS-1 [2]
2021-03-04 06:34:12.576788 [WARNING] mrcp_client_session.c:1269 (TTS-1) Failed to Create Session TTS-1 [2]
2021-03-04 06:34:12.576788 [INFO] mrcp_client_session.c:533 (TTS-1) Raise App Response TTS-1 [2] FAILURE [1]
2021-03-04 06:34:12.576788 [ERR] mod_unimrcp.c:1914 (TTS-1) SYNTHESIZER channel error!
2021-03-04 06:34:12.576788 [DEBUG] mod_unimrcp.c:1578 (TTS-1) CLOSED ==> ERROR
2021-03-04 06:34:12.576788 [DEBUG] apt_consumer_task.c:141 () Wait for Messages [MRCP Client]
2021-03-04 06:34:12.576788 [DEBUG] mod_unimrcp.c:1062 (TTS-1) Terminating MRCP session
2021-03-04 06:34:12.576788 [DEBUG] apt_task.c:265 () Signal Message to [MRCP Client] [0x7f16ac04b320;4;0]
2021-03-04 06:34:12.576788 [DEBUG] apt_task.c:337 () Process Message [MRCP Client] [0x7f16ac04b320;4;0]
2021-03-04 06:34:12.576788 [INFO] mrcp_client_session.c:387 (TTS-1) Receive App Request TTS-1 [1]
2021-03-04 06:34:12.576788 [INFO] mrcp_client_session.c:455 (TTS-1) Raise App Response TTS-1 [1] SUCCESS [0]
2021-03-04 06:34:12.576788 [DEBUG] mod_unimrcp.c:1829 (TTS-1) Destroying MRCP session
2021-03-04 06:34:12.576788 [NOTICE] mrcp_application.c:182 (TTS-1) Destroy MRCP Handle TTS-1
2021-03-04 06:34:12.576788 [DEBUG] mod_unimrcp.c:1578 (TTS-1) ERROR ==> CLOSED
2021-03-04 06:34:12.576788 [DEBUG] apt_consumer_task.c:141 () Wait for Messages [MRCP Client]
2021-03-04 06:34:12.576788 [ERR] switch_ivr_play_say.c:3006 Invalid TTS module unimrcp[xiaofang]!
2021-03-04 06:34:12.576788 [DEBUG] switch_cpp.cpp:749 CoreSession::hangup
2021-03-04 06:34:12.576788 [NOTICE] switch_cpp.cpp:751 Hangup sofia/internal/[email protected]:5060 [CS_EXECUTE] [NORMAL_CLEARING]
2021-03-04 06:34:12.576788 [DEBUG] switch_cpp.cpp:1209 sofia/internal/[email protected]:5060 destroy/unlink session from object
2021-03-04 06:34:12.576788 [DEBUG] switch_core_session.c:2905 sofia/internal/[email protected]:5060 skip receive message [APPLICATION_EXEC_COMPLETE] (channel is hungup already)
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:651 (sofia/internal/[email protected]:5060) State EXECUTE going to sleep
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/[email protected]:5060) Running State Change CS_HANGUP (Cur 1 Tot 8)
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:848 (sofia/internal/[email protected]:5060) Callstate Change ACTIVE -> HANGUP
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:850 (sofia/internal/[email protected]:5060) State HANGUP
2021-03-04 06:34:12.576788 [DEBUG] mod_sofia.c:453 Channel sofia/internal/[email protected]:5060 hanging up, cause: NORMAL_CLEARING
2021-03-04 06:34:12.576788 [DEBUG] mod_sofia.c:507 Sending BYE to sofia/internal/[email protected]:5060
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:60 sofia/internal/[email protected]:5060 Standard HANGUP, cause: NORMAL_CLEARING
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:850 (sofia/internal/[email protected]:5060) State HANGUP going to sleep
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:620 (sofia/internal/[email protected]:5060) State Change CS_HANGUP -> CS_REPORTING
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/[email protected]:5060) Running State Change CS_REPORTING (Cur 1 Tot 8)
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:936 (sofia/internal/[email protected]:5060) State REPORTING
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:174 sofia/internal/[email protected]:5060 Standard REPORTING, cause: NORMAL_CLEARING
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:936 (sofia/internal/[email protected]:5060) State REPORTING going to sleep
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:611 (sofia/internal/[email protected]:5060) State Change CS_REPORTING -> CS_DESTROY
2021-03-04 06:34:12.576788 [DEBUG] switch_core_session.c:1726 Session 8 (sofia/internal/[email protected]:5060) Locked, Waiting on external entities
2021-03-04 06:34:12.576788 [NOTICE] switch_core_session.c:1744 Session 8 (sofia/internal/[email protected]:5060) Ended
2021-03-04 06:34:12.576788 [NOTICE] switch_core_session.c:1748 Close Channel sofia/internal/[email protected]:5060 [CS_DESTROY]
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:739 (sofia/internal/[email protected]:5060) Running State Change CS_DESTROY (Cur 0 Tot 8)
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:749 (sofia/internal/[email protected]:5060) State DESTROY
2021-03-04 06:34:12.576788 [DEBUG] mod_sofia.c:364 sofia/internal/[email protected]:5060 SOFIA DESTROY
2021-03-04 06:34:12.576788 [DEBUG] mod_opus.c:719 Opus decoder stats: Frames[0] PLC[0] FEC[0]
2021-03-04 06:34:12.576788 [DEBUG] mod_opus.c:734 Opus encoder stats: Frames[0] Bytes encoded[0] Encoded length ms[0] Average encoded bitrate bps[0]
2021-03-04 06:34:12.576788 [DEBUG] mod_opus.c:719 Opus decoder stats: Frames[0] PLC[0] FEC[0]
2021-03-04 06:34:12.576788 [DEBUG] mod_opus.c:734 Opus encoder stats: Frames[131] Bytes encoded[16489] Encoded length ms[2620] Average encoded bitrate bps[65956]
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:181 sofia/internal/[email protected]:5060 Standard DESTROY
2021-03-04 06:34:12.576788 [DEBUG] switch_core_state_machine.c:749 (sofia/internal/[email protected]:5060) State DESTROY going to sleep

非常感谢!但是……

运行后总算没有报错了,但是问题还是有的,就是只是单纯地读了前面的几句,后来就没有了,说什么也不管用,控制台输出的只是单纯的

2019-03-23 07:19:42:571622 [INFO]   Activity Detector state changed [1]
2019-03-23 07:19:42:571622 [INFO]   Activity Detector state changed [0]

是什么原因导致的呢?
不好意思。麻烦您帮帮我

unimrcp : Reject RTP Session 192.168.163.11:5006 no codecs matched

I have strictly followed the example to set up the environment, but when making a call, it reports a unimrcp error: "Reject RTP Session 192.168.163.11:5006 no codecs matched". Freeswitch also reports an error: "[ERR] mod_unimrcp.c:1925 (TTS-5) SYNTHESIZER channel error!". After my checks, I didn't find any abnormalities. How can I resolve this issue?

我按照实例上完成了环境搭建,但是拨打电话报告unimrcp错误:Reject RTP Session 192.168.163.11:5006 no codecs matched,freeswitch 报错:[ERR] mod_unimrcp.c:1925 (TTS-5) SYNTHESIZER channel error!,经过我的检查没有发现异常,请问该怎么解决?

求助,如何进行初步检验

希望lua中不进行复杂的操作,单纯地播放一段中文读音就行了。

如何检测呢?

我按照这个步骤反复做了几遍,但是依然失败……

希望您能够给我支支招,谢谢~~

Freeswitch 报SYNTHESIZER channel error

2019-03-28 20:41:19.130070 [INFO] mrcp_sofiasip_client_agent.c:609 () Receive SIP Event [nua_i_state] Status 0 INVITE sent [unimrcpserver-mrcp2]
2019-03-28 20:41:19.130070 [NOTICE] mrcp_sofiasip_client_agent.c:547 (TTS-1) SIP Call State TTS-1 [calling]
2019-03-28 20:41:19.130070 [INFO] mrcp_sofiasip_client_agent.c:609 () Receive SIP Event [nua_r_invite] Status 503 Service Unavailable [unimrcpserver-mrcp2]
2019-03-28 20:41:19.130070 [INFO] mrcp_sofiasip_client_agent.c:609 () Receive SIP Event [nua_i_state] Status 503 Service Unavailable [unimrcpserver-mrcp2]
2019-03-28 20:41:19.130070 [NOTICE] mrcp_sofiasip_client_agent.c:547 (TTS-1) SIP Call State TTS-1 [terminated]
2019-03-28 20:41:19.130070 [INFO] mrcp_client_session.c:151 (TTS-1) Receive Answer TTS-1 [c:0 a:0 v:0] Status 503
2019-03-28 20:41:19.130070 [INFO] mrcp_client_session.c:455 (TTS-1) Raise App Response TTS-1 [2] FAILURE [2]
2019-03-28 20:41:19.130070 [ERR] mod_unimrcp.c:1913 (TTS-1) SYNTHESIZER channel error!
2019-03-28 20:41:19.130070 [INFO] mrcp_client_session.c:387 (TTS-1) Receive App Request TTS-1 [1]
2019-03-28 20:41:19.130070 [INFO] mrcp_client_session.c:833 (TTS-1) Terminate Session TTS-1
2019-03-28 20:41:19.130070 [INFO] mrcp_client_session.c:209 (TTS-1) Session Terminated TTS-1
2019-03-28 20:41:19.130070 [INFO] mrcp_client.c:710 (TTS-1) Remove MRCP Handle TTS-1
2019-03-28 20:41:19.130070 [INFO] mrcp_client_session.c:455 (TTS-1) Raise App Response TTS-1 [1] SUCCESS [0]
2019-03-28 20:41:19.130070 [NOTICE] mrcp_application.c:182 (TTS-1) Destroy MRCP Handle TTS-1
2019-03-28 20:41:19.130070 [ERR] switch_ivr_play_say.c:3008 Invalid TTS module!
2019-03-28 20:41:19.130070 [NOTICE] switch_cpp.cpp:723 Hangup sofia/internal/[email protected] [CS_EXECUTE] [NORMAL_CLEARING]
2019-03-28 20:41:19.130070 [NOTICE] switch_core_session.c:1683 Session 1 (sofia/internal/[email protected]) Ended
2019-03-28 20:41:19.130070 [NOTICE] switch_core_session.c:1687 Close Channel sofia/internal/[email protected] [CS_DESTROY]

在文章中的讨论中也有人提到这个问题

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.