Page tree
Skip to end of metadata
Go to start of metadata

About

Play while doing speech recognition. Result is stored in the [[Variable_detect_speech_result|detect_speech_result]] channel variable.

 

 Click here to expand Table of Contents

Usage

Parameters

  • file = file to play. See mod_dptools: playback for details.
  • engine = speech recognition module. e.g. unimrcp
  • {param1=val1} = optional speech recognition parameters. This is specific to the speech recognition module used.
  • grammar = grammar may be inline:, builtin:, session:, a URL, a filename, etc.

Channel Variables

  • detect_speech_result — FreeSWITCH sets this variable to the reason that terminated the playback or TTS. Returns "DIGIT: x" where x = the Touch Tone digit that terminated the playback or TTS sequence.
  • play_and_detect_speech_close_asr — Set this variable to true to close the speech recognition port upon completion. This returns the port license to the available pool instead of holding it for the duration of the call.
  • playback_terminator_used — FreeSWITCH sets this variable to the Touch Tone digit that terminated playback or TTS. Must be a digit specified to playback_terminators. Returns "x" where x = the Touch Tone digit that terminated the playback or TTS sequence.
  • playback_terminators — Set this variable to the string of Touch Tone digits that will end playback or TTS. If this variable is not set, then Touch Tone digits will be ignored by this app, only speech will detected.

Examples

TouchTone Digit Detection

If the caller presses '2' during the playback of a prompt file or a say TTS command, the result will be returned in detect_speech_result as "DIGIT: 2" and in playback_terminator_used as "2".

TTS in XML Dialplan

This example demonstrates using TTS and speech recognition with mod_unimrcp.

TTS dialplan

 

UNIMRCP

This example demonstrates playing a wav file and speech recognition with mod_unimrcp. Note: There is no space between wav and detect. As of 25 Apr 2012, any amount of whitespace is allowed between the wav file and "detect:".

TTS play .wav dialplan

Lua

This example Lua script uses mod_unimrcp and Lumenvox

See Also