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.

sudo apt-get update
sudo apt-get upgrade  

 Install Docker

sudo apt-get install ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
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
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

 Setup docker to start automatically after server reboot

sudo systemctl enable docker
sudo systemctl start docker
sudo groupadd docker
sudo usermod -aG docker $USER
 Logout and login

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

sudo chmod 666 /var/run/docker.sock   

Install mrcp-api

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

 

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

cd mrcp-api/docker/
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

PRODUCT_VERSION=5.4 
# Control whether containers start automatically when they exit. Possible options: 'no', 'on-failure', 'always', 'unless-stopped' 
# More info on https://docs.docker.com/config/containers/start-containers-automatically/ RESTART_POLICY=unless-stopped 
# Make sure that certificate is matching selected domain 
APPLICATION_DOMAIN=testmachine.com 
 
# Timezone for logging. Acceptable values include "America/New_York", "Europe/Rome", etc. CONTAINER_TIMEZONE=UTC 
 
MEDIA_SERVER__DEPLOYMENT_ID=d80b9d9b-086f-42f0-a728-d95f39dc2229 
MEDIA_SERVER__NUM_CHANNELS=200 
MEDIA_SERVER__SERVER_IP=192.168.31.197 
MEDIA_SERVER__LUMENVOX_API_ADDRESS=lumenvox-api-1.testmachine.com MEDIA_SERVER__LUMENVOX_API_PORT=443 
MEDIA_SERVER__LOGGING_LEVEL=3 
MEDIA_SERVER__COMPATIBILITY_MODE=1

Value to configure hostname mapping. If you don't have a registered domain for your lumenvox 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__LUMENVOX_API_ADDRESS.

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

  Launch Docker Image

docker compose up -d  

 

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.

                                     

NameDefault Port/ RangeProtocolDirectionConfiguration Setting
MRCP Connectivity20000 - 24999TCPINmedia_server.conf / [GLOBAL] mrcp_server_port_base
RTP audio25000 - 29999UDPIN/OUTmedia_server.conf / [GLOBAL] rtp_server_port_base
SIP Port5060UDP/TCPINmedia_server.conf / [GLOBAL] sip_port
RTSP Port554TCPINmedia_server.conf / [GLOBAL] rtsp_port

                                 


 


 

 


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