Communication Protocol

gRPC Interface

gRPC is a cross-platform open-source high-performance Remote Procedure Call (RPC) framework, initially created by Google. This is the preferred and recommended protocol for communication with the platform. gRPC can run in any environment and can efficiently connect services in and across data centers with support for load balancing, tracing, health checking, and authentication. It is optimized for scalability and is cloud and microservices native. All major programming languages can access the API via gRPC.

Characteristics:

  • Self-describing interface, includes request and response options
  • Allows single or bidirectional connectivity (callbacks and streaming)
  • Multiplexed binary messages to optimize network traffic
  • Uses protocol buffers described by .proto files
  • Complete language independence
  • Cloud-native, easily secured
  • Designed to scale massively
  • Extremely fast and efficient

gRPC: Cloud-native, high-performance connectivity

gRPC architecture diagram

MRCP Interface

Media Resource Control Protocol (MRCP) is a communication protocol between applications (voice IVR platforms) and the ASR and TTS resources serving them. Primarily used by voice application platforms, call centers, call recording providers, telephony trunks, and network switches, it is built on W3C standards.

A subset of the standard is specific to speech applications. MRCP uses methods to control speech resources: to start or stop a recognizer, set parameters, load grammars, or control a speech synthesizer (for TTS), using web technologies to deliver information and commands.

  • MRCPv1 uses RTSP (Real Time Streaming Protocol), where session management and the MRCP content are sent together.
  • MRCPv2 uses SIP (Session Initiation Protocol), where a session is established first and MRCP content is sent separately, allowing both ASR and TTS in one session.

MRCPv2 is the prevailing standard in customer service platforms. The platform supports all major voice platforms and IVRs using MRCP. Note that MRCP requires special treatment in the architecture because the MRCP services need to run on their own virtual machine using Docker, as MRCP uses UDP and TCP ports which are not currently supported by Kubernetes. To support this, a media server runs outside the Kubernetes cluster for communicating with MRCP clients. The client application communicates via MRCP to the media server (the MRCP API), which in turn uses gRPC to communicate with the Capacity Private Cloud API.

This does limit the ability for MRCP to scale independently. However, this approach allows massive connectivity: many MRCP API instances can connect to a single Kubernetes cluster.

MRCP architecture diagram

REST Interface

REST is a widely used interface for Internet connectivity. REST APIs use HTTP or WebSockets for their communication protocols. HTTP is a traditional model for communications with backend servers — it relies on a client (web application) initiating a request, such as obtaining data from a database, and is stateless. This model does not work well for applications with real-time data access requirements, such as conversational or voice and speech applications.

The REST interface is used for the Voice Biometrics APIs, voice biometric reporting APIs, and management APIs. API documentation is available at developer.lumenvox.com.

Characteristics:

  • Easy to implement and test, simplistic interface mechanism
  • Operates on existing browser-style connections (no specialized tools needed)
  • Universally supported — can use command-line tools such as curl
  • Limited streaming support
  • Limited callback handling
  • Does not scale well

REST architecture diagram



Was this article helpful?