Asterisk PBX

RESOURCES

ADDITIONAL HELP

For a full reference on installing the LumenVox Speech Engine on an Asterisk system, see our Asterisk help document

Asterisk Application Zone:

One of the best ways to get started with speech development is to play around with sample code. We have several small and open-source Asterisk speech applications in our Asterisk Application Zone.

More video instructions are available to help you with your Asterisk speech application development. A good starting point is Asterisk Speech Development 101, the first in our Asterisk Speech University video series.

Digium References:

Digium has several resources available for speech recognition users on Asterisk. To start with, see the documentation for the generic speech API, which is a complete reference for the speech commands available in Asterisk.

Another helpful resource for Asterisk developers is the Asterisk Speech Recognition Mailing List. Subscribe to share information with other speech users, or browse the archives to see common problems and questions.

Asterisk

Total Time:
25-40 Minutes

Get Started – Asterisk PBX Users and Developers

Please note: these instructions were written for LumenVox 8.0 and are outdated for LumenVox 8.5 and newer. We are working on updating them and apologize for the inconvenience. In the meantime, please see our Asterisk installation help file for complete up–to–date instructions.

These instructions will walk you through installing LumenVox speech recognition for Asterisk and building a simple speech application in under an hour.

Before you install the LumenVox Speech Engine for Asterisk, you will want to make sure that you have your Asterisk system up and running.

These instructions are written for Asterisk 1.4.13 on a Linux machine using Fedora Core 6. The process is similar for other versions of Asterisk or Linux; our help documentation has full details for those.

If this looks like a lot of text, don't sweat it. There's a lot to do — the instructions cover installing the software, testing it out, and running a few example programs so you can play around with speech recognition immediately — but if you follow the instructions, you will be done in no time (less than an hour).

Want proof that it's really this fast?

Watch a timed video of the process, which you can use as a visual aide.

Play Video

Download and Install LumenVox

5–15 Minutes

  1. The easiest way to get the LumenVox speech recognition software is to set up Fedora Core to use YUM to download and install it. First, download our GPG key from http://www.lumenvox.com/packages/FC6/i386/RPM-GPG-KEY-LumenVox.gpg and copy it into /etc/pki/rpm–gpg/
  2. Create a file called LumenVox.repo in /etc/yum.repos.d/
  3. Edit that file and enter the following information:
    ###################################################
    [LumenVox]
    name=LumenVox Products for Fedora Core $releasever - $basearch
    baseurl=http://www.LumenVox.com/packages/FC$releasever/
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LumenVox.gpg 
    ###################################################
  4. Save and close the file.
  5. From the command line, type yum install LumenVoxLicenseServer to download and install the License Server.
  6. Then type yum install LumenVoxSRE to download and install the Speech Engine.
  7. Once it has installed, logout of your system and log back in.

Installing a License

5–10 Minutes

  1. The first thing you need to do is generate a file called Info.bts that will save some information about your system. Go to the directory /opt/lumenvox/ licenseserver/bin/ and type ./getlvsystem_info to generate the file (it is put in the same directory).
  2. Open a Web browser and go to http://www.lumenvox.com/customers/ and log in with your username and password (email us if you've misplaced it or didn't receive it).
  3. Go to your Account Information and find your deployment (if you just have one license it will be the only deployment you have). Click License Upload.Deployments
  4. In the License Upload screen, click Browse, select your Info.bts file, and upload it.
  5. Go back to your account screen and find that deployment — the License Upload link has turned into License Download. Click it and save the LicenseXXXX.bts (XXXX is a 4–digit number) file to /opt/lumenvox/licenseserver/bin/
  6. Go to /opt/lumenvox/licenseserver/bin/ and type ./license_mgr –m /opt/ lumenvox/licenseserver/bin/LicenseXXXX.bts (be sure and replace XXXX with your 4–digit number).

Verify Installation

3–5 Minutes

  1. First, ensure the License Server and Engine daemons are running. Type ps –el | grep LVSRE_SERVER to make sure that LVSRE_SERVER is running, and then do ps –el | grep license_server for the License Server.
  2. There's a really simple C++ application you can run to make sure the software is working. Go to /opt/lumenvox/engine/examples/ and type make to build it (you need gcc installed for this).
  3. Once it has compiled, type ./example 127.0.0.1 to run it. You should get back the following loop:
    count=0, decode returns 10
    Interpretation 1:
    8587070707
  4. Press CTRL+C to exit the program.

Download and Install the Asterisk/LumenVox Connection

5–10 Minutes

  1. Go back to the customer portal at http://www.lumenvox.com/customers/ and login.
  2. Click Your Software Downloads.
  3. Download the file labeled Asterisk 1.4 Connector.
  4. Extract the file by running tar –xzvf and the name of the file you downloaded.
  5. This creates a new directory, go into that directory and copy the file called res_speech_lumenvox.so into /usr/lib/asterisk/modules/
  6. Copy the file called lumenvox.conf into /etc/asterisk/
  7. Modify /etc/asterisk/modules.conf and make sure the line preload => res_speech.so is there and add the line load => res_speech_lumenvox.so

Run Your First Asterisk Speech Application

5 Minutes

  1. Edit your dial plan (extensions.conf) and add the following context:
    [lumenvox-test]
    exten => s,1,Answer
    exten => s,n,Wait(1)
    exten => s,n,SpeechCreate
    exten => s,n,SpeechLoadGrammar
    	(yesno|/opt/lumenvox/engine/Lang/BuiltinGrammars/ABNFBoolean.gram)
    exten => s,n,SpeechActivateGrammar(yesno)
    exten => s,n,SpeechBackground(beep)
    exten => s,n,Verbose(1|Result was ${SPEECH_TEXT(0)})
    exten => s,n,Verbose(1|Confidence was ${SPEECH_SCORE(0)})
    
  2. Add a line into your default context to route a call to lumenvox–test,s,1 (e.g. to dial 1234 and have it go the demo application, add the line exten => 1234,1,Goto(lumenvox–test,s,1)
  3. Connect to the Asterisk console with asterisk –vr
  4. Reload Asterisk by typing reload
  5. Call the extension you set up (e.g. dial 1234). Say "Yes" or "No" at the beep — the Asterisk console will print the results ("true" for yes and "false" for no).

Congratulations!

You're now using speech recognition on Asterisk.

Want more applications to play with? Go to our Asterisk Application Zone for some free speech demonstrations.

© 2016 LumenVox, LLC. All rights reserved.