Sample Code for Speech Recognition and Text-to-Speech Software

Sample code is often the best way to learn how to build an application. Below you'll find sample code for working with LumenVox automatic speech recognition and text-to-speech software in a variety of ways. Pick the code samples that suit your needs and get started building.

Recent Samples

  • An application that allows the user to say "yes" or "no" is the equivalent of the Hello World application when building speech recognition applications. It is a very simple application. The following code sample plays a beep to the caller and then prints to the Asterisk console the result of whether the user said yes or no.
  • Asterisk dialplan that plays a simple "Hello World" message to the caller using text-to-speech. Includes a few variants showing how to set options and use different inputs to the TTS server.
  • A simple call router application that makes use of speech recognition ("Please say the name of the person you wish to speak to") for Asterisk, written in dialplan.
  • Provides a generic interface to use automatic speech recognition (ASR) and text-to-speech (TTS) synthesis for the Asterisk PBX, making use of PHP and the Asterisk Gateway Interface (AGI).
  • A sample "store locator" application for Asterisk that uses automatic speech recognition (ASR) and text-to-speech (TTS) to ask a caller for the city and state (using a list of cities in the United States), simulating a transaction common to many store locator IVR applications.
  • Very simple "Hello World" application for Asterisk, demonstrating the use of our generic PHP speech interface for the Asterisk Gateway Interface (AGI).