Testing the LumenVox installation on Asterisk

Before testing that the Asterisk-LumenVox functionality is in place, you should verify the basic LumenVox functionality.

Once you have verified that the ASR, TTS Server, and/or Media Server are running correctly, you can ensure the LumenVox-Asterisk connectionis successful by running a simple speech recognition or text-to-speech application. Depending on whether you use the Generic Asterisk Speech API through res_speech_unimrcp.so or else use the MRCP Interface through res_unimrcp.so (see the installation and configuration instructions for more information), there are several ways to test the application.

Verifying Asterisk is Installed and Running

You will need to make sure that Asterisk is installed, running, and that you are able to place calls into the system and get bidirectional audio. If you do not have that already configured, you should refer to the official Asterisk documentation or Digium support for assistance. LumenVox is unable to help with basic Asterisk configuration.

Checking Modules are Loaded

Before you can use the UniMRCP modules that provide connectivity between LumenVox and Asterisk, you must make sure they are loaded in Asterisk. From an Asterisk CLI, you can run the module show like X command to look for modules that have X in their name. For instance, you might run the following commands:

  • module show like mrcpto find:
    • app_unimrcp.so (MRCP Suite of applications)
    • res_speech_unimrcp.so (UniMRCP Speech Engine)
  • module show like speechto find the following modules:
    • res_speech.so and app_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, you may wish to edit /etc/asterisk/modules.conf to ensure that they are explicitly loaded. Also verify that they are actually installed in /var/lib/asterisk/modules/

You will need to restart Asterisk for them to get automatically loaded, though you can use also use module load X to manually attempt to load a module. This is useful as it can provide information about why a module isn't loading, e.g. try module load res_unimrcp.so to attempt to load the MRCP speech interface.

Testing ASR with MRCP Interface (res_unimrcp.so)

The following dialplan context will allow you to call in to your machine and say "Yes" or "No" at the beep and get a recognition, returned as either"true" or "false." You will need to have the Asterisk console open and have its verbosity set to at least 1 in order 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 MRCP Interface (res_unimrcp.so)

The following dialplan context will allow you to call in to your machine and have the TTS 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 Generic Speech API (res_speech_unimrcp.so)

The following dialplan context will allow you to call in to your machine and say "Yes" or "No" at the beep and get a recognition, returned as either "true" or "false." You will need to have the Asterisk console open and have its verbosity set to at least 1 in order 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)}) 


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