顶顶通呼叫中心中间件(基于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>
相关推荐
代码浪人12 天前
docker 基于Debian镜像安装FreeSwitch1.10.7
docker·容器·debian·freeswitch
new_abc23 天前
Sofia-SIP 使用教程
freeswitch·sofia
hongkid1 个月前
docker 部署freeswitch(非编译方式)
docker·容器·freeswitch
异域天使phy1 个月前
树莓派安装FreeSWITCH
树莓派·freeswitch
贾宝玉的玉宝贾2 个月前
FreeSWITCH 简单图形化界面30 - 使用MYODBC时可能遇到的错误
android·adb·voip·freeswitch·ippbx·sip测试
贾宝玉的玉宝贾3 个月前
FreeSWITCH 简单图形化界面29 - 使用mod_xml_curl 动态获取配置、用户、网关数据
数据库·voip·freeswitch·ippbx·sip测试
new_abc3 个月前
FreeSWITCH event_socket 配置从其他地址连接
freeswitch
Mike_Zhang4 个月前
FreeSWITCH对接http协议的tts服务
freeswitch
Mike_Zhang5 个月前
python3解析wav文件获取dtmf值
python·freeswitch·音频技术