顶顶通呼叫中心中间件(基于FreeSWITCH)对接mrcp asr 和 tts配置

介绍

顶顶通呼叫中心中间件通过asrproxy程序对接各种asr和tts,本文主要讲解 asrproxy程序 对接 mrcp v1 和 mrcp v2的配置。

asrproxy.json配置

asr配置

javascript 复制代码
    "asr":{
        "interface": {
            "mrcp": {
                "count": 0,
                "fault_threshold": 0,
                "fault_try_interval": 600,
                "type": "mrcp",
                "engine": "uni2",
                "grammar":"ahlt_ats.grxml",
                "appid": "",
                "key": "",
                "secret": ""
            }
        },
        "groups":{
            "default":{
                "mode":0,
                "enable":[
                 "mrcp"
                ]
            }
        },
  • grammar 语法配置文件,由ASR提供。
  • engine mrcp的配置文件client-profiles/unimrcp.xml里面配置的mrcp-profile

tts 配置

javascript 复制代码
            "mrcp": {
                "count": 0,
                "fault_threshold": 0,
                "fault_try_interval": 600,
                "type": "mrcp",
                "engine": "uni2-tts",
                "appid": "",
                "key": "",
                "secret": ""
            }
        },
        "groups":{
            "default":{
                "mode":1,
                "enable":[
                    "mrcp"
                ]
            }
        },
  • engine mrcp的配置文件client-profiles/unimrcp.xml里面配置的mrcp-profile

mrcp 配置

unimrcpclient.xml

主要设置本机IP和本机外网IP

xml 复制代码
  <properties>
    <!--
      If the attribute "type" is set to "auto", IP address is determined implicitly by the hostname.
      This is the default setting.
    -->
    <ip type="auto"/>

    <!--
      If the attribute "type" is set to "iface", IP address is determined by the specified name of
      network interface/adapter.
    -->
    <!-- <ip type="iface">eth0</ip>-->

    <!--
      IP address can also be specified explicitly.
    -->
     <ip>改成本机IP</ip> 
    <!--
    <ext-ip>如果mrcpserver是外网取消这个注释,这里设置本机外网IP </ext-ip>
	-->
    <!--
      Server IP address should be specified explicitly, unless the client and the server are located on
      the same host. The server IP address can also be specified per <sip-settings> and <rtsp-settings>.
    -->
    <!-- <server-ip>a.b.c.d</server-ip> -->
  </properties>

client-profiles/unimrcp.xml

主要配置mrcpv2 服务器IP和端口,如果mrcpv1配置V1对应的。

xml 复制代码
<?xml version="1.0" encoding="UTF-8"?>
<!-- UniMRCP client document -->
<unimrcpclient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
               xsi:noNamespaceSchemaLocation="../unimrcpclient.xsd" 
               version="1.0">
  <settings>
    <!-- SIP MRCPv2 settings -->
    <sip-settings id="UniMRCP-SIP-Settings">
      <!--
	    Server IP address can explicitly be specified per "sip-settings". Otherwise, the server IP
        address defaults to "server-ip" set in the properties, which in turn defaults to "ip".
	  -->
      <server-ip>mrcpv2 ASR 服务器外网Ip</server-ip>
      <server-port>mrcpv2 ASR 服务器外网端口</server-port>
      <force-destination>true</force-destination> 
	  <!-- <feature-tags>speechrecog.engine="SR-1";speechsynth.engine="SS-1"</feature-tags> -->
    </sip-settings>
    

    <sip-settings id="TTS-UniMRCP-SIP-Settings">
      <!--
	    Server IP address can explicitly be specified per "sip-settings". Otherwise, the server IP
        address defaults to "server-ip" set in the properties, which in turn defaults to "ip".
	  -->
      <server-ip>mrcpv2 TTS 服务器外网Ip</server-ip>
      <server-port>mrcpv2 TTS 服务器外网端口</server-port>
      <!-- <force-destination>true</force-destination> -->
	  <!-- <feature-tags>speechrecog.engine="SR-1";speechsynth.engine="SS-1"</feature-tags> -->
    </sip-settings>



    <!-- RTSP MRCPv1 settings -->
    <rtsp-settings id="UniMRCP-RTSP-Settings">
      <!--
	    Server IP address can explicitly be specified per "rtsp-settings". Otherwise, the server IP
        address defaults to "server-ip" set in the properties, which in turn defaults to "ip".
	  -->
      <!-- <server-ip>10.10.0.1</server-ip> -->
      <server-port>1554</server-port>
      <!-- <force-destination>true</force-destination> -->
      <resource-location>media</resource-location>
      <resource-map>
        <param name="speechsynth" value="speechsynthesizer"/>
        <param name="speechrecog" value="speechrecognizer"/>
      </resource-map>
    </rtsp-settings>
  </settings>
  
  <profiles>
    <!-- UniMRCP MRCPv2 profile -->
    <mrcpv2-profile id="uni2">
      <sip-uac>SIP-Agent-1</sip-uac>
      <mrcpv2-uac>MRCPv2-Agent-1</mrcpv2-uac>
      <media-engine>Media-Engine-1</media-engine>
      <rtp-factory>RTP-Factory-1</rtp-factory>
      <sip-settings>UniMRCP-SIP-Settings</sip-settings>
      <rtp-settings>RTP-Settings-1</rtp-settings>
    </mrcpv2-profile>
    

    <mrcpv2-profile id="uni2-tts">
      <sip-uac>SIP-Agent-1</sip-uac>
      <mrcpv2-uac>MRCPv2-Agent-1</mrcpv2-uac>
      <media-engine>Media-Engine-1</media-engine>
      <rtp-factory>RTP-Factory-1</rtp-factory>
      <sip-settings>TTS-UniMRCP-SIP-Settings</sip-settings>
      <rtp-settings>RTP-Settings-1</rtp-settings>
    </mrcpv2-profile>


    <!-- UniMRCP MRCPv1 profile -->
    <mrcpv1-profile id="uni1">
      <rtsp-uac>RTSP-Agent-1</rtsp-uac>
      <media-engine>Media-Engine-1</media-engine>
      <rtp-factory>RTP-Factory-1</rtp-factory>
      <rtsp-settings>UniMRCP-RTSP-Settings</rtsp-settings>
      <rtp-settings>RTP-Settings-1</rtp-settings>
    </mrcpv1-profile>

    <!-- More profiles may follow. -->
  </profiles>
</unimrcpclient>
相关推荐
Mike_Zhang1 个月前
FreeSWITCH对接http协议的tts服务
freeswitch
Mike_Zhang2 个月前
python3解析wav文件获取dtmf值
python·freeswitch·音频技术
CyunZing2 个月前
记录一次在欧拉(openEuler22.03LTS-SP4)系统下安装(踩坑)Freeswitch1.10.11的全过程
linux·freeswitch·openeuler·欧拉系统
黄宝良3 个月前
FreeSWITCH入门到精通系列(三):FreeSWITCH基础概念与架构
实时音视频·freeswitch
代码浪人3 个月前
Freeswitch-soundtouch-变声开发
freeswitch
Mike_Zhang4 个月前
FreeSWITCH使用soundtouch进行变声
python·voip·freeswitch·音频技术
醉心编码5 个月前
使用UmcFramework和unimrcpclient.xml连接多个SIP设置的配置指南及C代码示例
c语言·c++·算法·unimrcp·mrcp
Mike_Zhang5 个月前
python3解析FreeSWITCH会议室列表信息
python·freeswitch
贾宝玉的玉宝贾5 个月前
FreeSWITCH 1.10.10 简单图形化界面15 - JsSIP媒体控制(LookLook)
webrtc·媒体·voip·freeswitch·ippbx