Testing the Capacity installation on Asterisk
The prefe
Before testing the Asterisk integration, verify that the speech services themselves are running — confirm the ASR, TTS, and Media Server are healthy on their own. Once they are, you can confirm the connection between Asterisk and Capacity Private Cloud by running a simple speech recognition or text-to-speech application.
How you test depends on which module you are using: the Generic Speech API through res_speech_unimrcp.so, or the MRCP interface through res_unimrcp.so. See Installing and Configuring UniMRCP Modules for the configuration details behind each. The sections below give a test dialplan for each path.
Verifying Asterisk Is Installed and Running
First, make sure Asterisk is installed and running, and that you can place calls into the system with bidirectional audio. If that is not yet configured, refer to the official Asterisk documentation or your Asterisk support provider — Capacity cannot assist with basic Asterisk configuration.
Checking the Modules Are Loaded
Before using the UniMRCP modules that connect Asterisk to the platform, confirm they are loaded. From an Asterisk CLI, run module show like X to list modules whose name contains X. For example:
module show like mrcp— look for:app_unimrcp.so(the MRCP suite of applications)res_speech_unimrcp.so(the UniMRCP speech engine connector)
module show like speech— look for:res_speech.soandapp_speech_utils.so(the generic Speech API)res_speech_unimrcp.so(the UniMRCP connector for the generic Speech API)
If these modules are not loaded, edit /etc/asterisk/modules.conf to load them explicitly, and verify they are actually installed in /var/lib/asterisk/modules/. Restart Asterisk for them to load automatically, or use module load X to load one manually — for example, module load res_unimrcp.so. Manual loading is useful because it reports why a module fails to load.
Testing ASR with the MRCP Interface (res_unimrcp.so)
The following dialplan context lets you call in, say "Yes" or "No" at the beep, and get a recognition returned as either "true" or "false." Keep the Asterisk console open with verbosity set to at least 1 to see the results.
| [lumenvox-mrcp-asr-test] exten = s,1,Answer same = n,Wait(1) same = n,MRCPRecog(builtin:grammar/boolean,&f=beep) same = n,Verbose(1,Status is: ${RECOGSTATUS} and Result is: ${RECOG_RESULT}) |
Testing TTS with the MRCP Interface (res_unimrcp.so)
The following dialplan context lets you call in and have the TTS engine speak "Welcome to LumenVox" to you.
| [lumenvox-mrcp-tts-test] exten = s,1,Answer same = n,Wait(1) same = n,MRCPSynth(Welcome to LumenVox) same = n,Verbose(1, ${SYNTHSTATUS}) |
Testing ASR with the Generic Speech API (res_speech_unimrcp.so)
The following dialplan context lets you call in, say "Yes" or "No" at the beep, and get a recognition returned as either "true" or "false." Keep the Asterisk console open with verbosity set to at least 1 to see the results.
| [lumenvox-test] exten = s,1,Answer same = n,Wait(1) same = n,SpeechCreate same = n,SpeechLoadGrammar(yesno,builtin:grammar/boolean) same = n,SpeechActivateGrammar(yesno) same = n,SpeechBackground(beep) same = n,Verbose(1,Result was ${SPEECH_TEXT(0)}) same = n,Verbose(1,Confidence was ${SPEECH_SCORE(0)}) |
