Setup of MRCP API server

MRCP API Server 

Installation

The minimum server requirements are as follows:

  • Linux OS capable of running Docker and Docker Compose plugin
  • CPU – 2 CPU Cores
  • Memory – 4GB Memory
  • Boot Disk – 20GB

The following steps must be followed for a MRCP installation:

These notes were for an installation performed on Ubuntu Server.

1. sudo apt-get update

2. sudo apt-get upgrade  


 Install Docker

1. sudo apt-get install ca-certificates curl gnupg lsb-release

2. sudo mkdir -/etc/apt/keyrings

3. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

4. echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

5. sudo apt-get update

6. sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin


 Setup docker to start automatically after server reboot

1. sudo systemctl enable docker

2. sudo systemctl start docker

3. sudo groupadd docker

4. sudo usermod -aG docker $USER


 Logout and login

 If you receive this error then ====Permission denied when trying to connect to Docker Daemon

1. sudo chmod 666 /var/run/docker.sock  


 

Install mrcp-api

git clone https://github.com/lumenvox/mrcp-api.git

1. cd mrcp-api/docker/  


 

If pointing to a lumenvox-api instance running with TLS follow these steps

1. cd mrcp-api/docker/

2. mkdir certs  


copy server.crt file from instance running lumenvox-api to mrcp-api/docker/certs/

 

Edit .env file

 Make the necessary edits to the .env file as per your setup

 Example

 1. APPLICATION_DOMAIN=testmachine.com

 2.  

 3. MEDIA_SERVER__ALLOW_DEPLOYMENT_OVERRIDE=false

 4. MEDIA_SERVER__ALLOW_OPERATOR_OVERRIDE=false

 5. MEDIA_SERVER__DEFAULT_DEPLOYMENT_ID=your deployment id

 6. MEDIA_SERVER__DEFAULT_OPERATOR_ID=00000000-0000-0000-0000-000000000000

 7. MEDIA_SERVER__SERVER_IP=the IP address of the server running the MRCP API instance

 8. MEDIA_SERVER__SPEECH_API_ADDRESS=lumenvox-api.testmachine.com

 9. MEDIA_SERVER__SPEECH_API_PORT=443

10. MEDIA_SERVER__USE_TLS=true  


 Value to configure hostname mapping. If you don't have a registered domain for your speech API, you should set the mapping here. If you do have a registered domain, you can set this to empty or comment it out entirely. 

The hostname should match the value of MEDIA_SERVER__SPEECH_API_ADDRESS.

MEDIA_SERVER__HOST_MAP=lumenvox-api.testmachine.com:ip address of the speech-api.testmachine.com interface

 

Edit hosts file

 Edit the /ect/hosts file with an entry like the example below:

ip address of the lumenvox-api.testmachine.com interface lumenvox-api.testmachine.com

 

Launch Docker Image

1. docker compose up -d  


 NB: MRCP services will be deployment-specific and there is no option to change the deployment ID used by the service. If customers want to provide different tenants (deployments) access to MRCP, each will require their own MRCP service configured for their own deploymentId.

 

Server Ports Setup

The MRCP API Server is responsible for providing connectivity between various platforms that use MRCP to connect to the LumenVox speech services. Typically when connecting to the LumenVox Server, these platforms would use either SIP or RTSP sessions to negotiate the parameters of the connection, including which MRCP port and RTP ports would be used. Either of the SIP and RTSP ports can be disabled by setting the port value to 0 if not required, although leaving the port enabled does not pose much of an overhead.

LumenVox supports SIP connections using either UDP or TCP protocols, so be sure to configure the appropriate setting for this port when setting up your firewall rules. Also note that often when LumenVox is installed on the same server as another platform that uses SIP connectivity, there may be a port conflict between the platform and the LumenVox MRCP Server, since both are trying to use port 5060 by default, so many times it is easier to change the MRCP Server SIP port from the default value to something else (5066 for example).

For RTP connections: we allow configuration of the port ranges for MRCP and RTP connectivity to avoid overlapping any port range used by other applications. RTP data is typically inbound to the MRCP Server for ASR audio, and outbound from the MRCP Server for TTS audio.

                                                                      

  

Name

  

  

Default  Port / Range

  

  

Protocol

  

  

Direction

  

  

Configuration  Setting

  

  

MRCP Connectivity

  

20000 - 24999

  

TCP

  

IN

  

media_server.conf / [GLOBAL] mrcp_server_port_base

  

RTP audio

  

25000 - 29999

  

UDP

  

IN/OUT

  

media_server.conf / [GLOBAL] rtp_server_port_base

  

SIP Port

  

5060

  

UDP/TCP

  

IN

  

media_server.conf / [GLOBAL] sip_port

  

RTSP Port

  

554

  

TCP

  

IN

  

media_server.conf / [GLOBAL] rtsp_port

 


 

 


Was this article helpful?
Copyright (C) 2001-2024, Ai Software, LLC d/b/a LumenVox