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

介绍

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

asrproxy.json配置

asr配置

    "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 配置

            "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

  <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 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>

最近更新

  1. 每日一题cf

    2024-03-10 04:36:02       0 阅读
  2. Vue3+Element-plus的表单重置

    2024-03-10 04:36:02       1 阅读
  3. #B. 等离子电视

    2024-03-10 04:36:02       1 阅读
  4. 纤程和协程理解

    2024-03-10 04:36:02       1 阅读
  5. 几款常见的数字孪生引擎

    2024-03-10 04:36:02       1 阅读

热门阅读

  1. AWS认证

    2024-03-10 04:36:02       23 阅读
  2. 使用conda安装rasa macbook亲测有效

    2024-03-10 04:36:02       22 阅读
  3. Django常用命令

    2024-03-10 04:36:02       21 阅读
  4. Lwip之TCP客户端示例记录

    2024-03-10 04:36:02       23 阅读
  5. PTA天梯 L2-009 抢红包

    2024-03-10 04:36:02       24 阅读
  6. Elasticsearch:dense vector 数据类型及标量量化

    2024-03-10 04:36:02       20 阅读
  7. flutter 获取屏幕尺寸

    2024-03-10 04:36:02       20 阅读
  8. SpringCloud-使用Feign组件调用其他微服务的接口

    2024-03-10 04:36:02       30 阅读