Rss Categories

Developing Speech Applications on Asterisk

Reference Number: AA-01143 Views: 5216 0 Rating/ Voters

Asterisk has native speech recognition support through the module This module provides a number of dialplan applications that can be used for speech recognition. However, does not handle the communication between Asterisk and an automatic speech recognizer (ASR).

To get that communication working, a second Asterisk module must be loaded. LumenVox' recommended method for  this is to use the open-source UniMRCP-Asterisk module, which uses the Media Resource Control Protocol (MRCP) to send requests for speech recognition from Asterisk to the LumenVox Media Server. A module called provides a link between the native Asterisk speech API and LumenVox in this case, meaning that dialplan calls will be translated into MRCP requests.

One shortcoming of this approach is that Asterisk has no native text-to-speech (TTS) support. To help solve this issue, the UniMRCP project includes another Asterisk module called that offers dialplan applications which provide TTS functionality. The module also includes new ASR functions that can replace or complement the native Asterisk speech API.

In summary, there are two broad approaches to using speech software on Asterisk with UniMRCP:

  1. Use with the native Asterisk Generic Speech API ( This will not give you access to TTS.
  2. Use for TTS and/or ASR functionality.

Developers may also choose to combine these approaches. One important benefit in using the Asterisk Generic Speech API is that recognition results are generally returned as simple strings. The interface (currently) returns results in the Natural Language Semantic Markup Language (NLSML) format, which represents a complex object as XML. This means application developers will need to be able to parse an NLSML-formatted object in order to make use of the results of an ASR interaction. We have a detailed guide to how LumenVox supports NLSML that may be of use for those looking to build NLSML parsers. 

The following information on building speech applications for Asterisk is available: