【Linux】Centos7安装部署unimrcp,搭建MRCP服务器
创始人
2024-12-28 15:10:42
0

yum install libtool

yum install libtool-ltdl-devel

yum install libsofia-sip-ua

find / -name libsofia-sip-ua.so.0 2>/dev/null

# 设置环境变量:如果库文件存在但不在默认搜索路径中,你可以通过设置 LD_LIBRARY_PATH 环境变量来告诉系统在哪里可以找到它。

# 例如,如果库文件在 /usr/local/lib 中,你可以在你的 shell 脚本或命令行中添加以下命令:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH #临时有效

echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc #永久有效

上传文件到/usr/local

unimrcp-deps-1.6.0.tar.gz

unimrcp-1.6.0.tar.gz

编译安装unimrcp-deps-1.6.0.

# cd /usr/local

# tar vzxf unimrcp-deps-1.6.0.tar.gz

# cd unimrcp-deps-1.6.0/

# ./build-dep-libs.sh

这是个交互式脚本,一路选y:

编译安装unimrcp-1.6.0

# tar vzxf unimrcp-1.6.0.tar.gz

# cd unimrcp-1.6.0/

# ./bootstrap

默认安装到 /usr/local/unimrcp, 按自己偏好设置prefix

# ./configure

# make && make install

注:

问题1:/usr/local/apr/lib/libapr-1.so: undefined reference to `uuid_generate@UUID_1.0'

collect2: error: ld returned 1 exit status

make[2]: *** [unimrcpclient] 错误 1

make[2]: 离开目录“/usr/local/unimrcp-1.6.0/platforms/unimrcp-client”

make[1]: *** [all-recursive] 错误 1

make[1]: 离开目录“/usr/local/unimrcp-1.6.0/platforms”

make: *** [all-recursive] 错误 1

解决方法:1、确保已安装 yum install libuuid-devel

2、检查库文件路径 ldconfig -p | grep libuuid

3、手动指定库文件(根据 2中所查到的路径)

export LDFLAGS="-L/path/to/libuuid/lib"

export LIBS="-luuid"

4、重新编译、安装

./configure ... # 其他configure选项

make && make install

加载程序

服务端:

打开一个终端,执行:

# cd /usr/local/unimrcp/bin

# ./unimrcpserver

客户端:

打开另一个终端,执行:

# cd /usr/local/unimrcp/bin

# ./umc

注 :

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

解决方法:find / -name libsofia-sip-ua.so.0 2>/dev/null

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH #临时有效

echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc #永久有效

开机自启

创建一个系统服务文件。

假设你的Unimrcp安装在 /usr/local/unimrcp目录下,你可以创建一个名为unimrcp.service的文件在/etc/systemd/system/目录下

[Unit]

Description=Unimrcp Server

After=network.target

[Service]

Type=forking

ExecStart=/usr/local/unimrcp/bin/unimrcpserver -d

User=root

Group=root

Restart=on-failure

RestartSec=5

[Install]

WantedBy=multi-user.target

重新加载systemd管理器配置。

sudo systemctl daemon-reload

设置Unimrcp服务开机自启

sudo systemctl enable unimrcp.service

启动Unimrcp服务 systemctl start unimrcp.service  停止开机自启动 systemctl disable unimrcp.service 查看服务当前状态 systemctl status unimrcp.service 重新启动服务 systemctl restart unimrcp.service 

注:

问题1:没有正常开机自启,执行 journalctl -u unimrcp.service 发现报错

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

解决方法:1、根据 sudo find / -name libsofia-sip-ua.so.0 2>/dev/null 找到对应的路径

2、在unimrcp.service里的[Service] 节点添加

Environment=LD_LIBRARY_PATH=/usr/local/lib

3、重新加载配置文件

sudo systemctl daemon-reload

场景测试

Client端预设了几个CLI命令,提供几个MRCP测试场景:

语音合成:run synth

语音识别:run recog

DTMF识别: run dtmf

录音: run rec

语音鉴别:run verify

Client端输入 run recog:

Server端输出:

相关内容

热门资讯

热点推荐!创思维激k辅助工具,... 热点推荐!创思维激k辅助工具,点星休闲辅助器下载,细节开挂辅助教程(真的有挂)1、下载安装好点星休闲...
透明讲解!wepoker透视脚... 透明讲解!wepoker透视脚本免费使用视频,uupoker透视(起初有开挂辅助下载);无需打开直接...
一分钟了解!腾威互娱破解辅助工... 一分钟了解!腾威互娱破解辅助工具,掌中乐游戏中心破解版,发现开挂辅助教程(的确有挂);无需打开直接搜...
透视黑科技!wepoker辅助... 您好:wepoker辅助是真的吗这款游戏可以开挂的,确实是有挂的,很多玩家在这款游戏中打牌都会发现很...
透视安卓版!wepoker私人... 透视安卓版!wepoker私人局透视方法,wejoker辅助器怎么卖(起初有开挂辅助工具);无需打开...
今日科普!微乐小程序辅助开挂,... 今日科普!微乐小程序辅助开挂,河洛杠次插件,通报开挂辅助教程(有挂分享);无需打开直接搜索打开薇:1...
透视辅助!wepoker透视脚... 透视辅助!wepoker透视脚本免费使用视频,we poker辅助器v3.3(本然有开挂辅助工具);...
重大通报!指尖四川辅助破解版苹... 重大通报!指尖四川辅助破解版苹果,兴动互娱脚本,曝光开挂辅助教程(有挂透视);无需打开直接搜索薇:1...
透明了解!wepoker有辅助... 透明了解!wepoker有辅助器吗,hhpoker德州牛仔视频(往昔有开挂辅助器);无需打开直接搜索...
盘点几款!吉祥填大坑有插件吗,... 盘点几款!吉祥填大坑有插件吗,战神辅助器下载,科技开挂辅助教程(有人有挂)1、下载安装好吉祥填大坑有...