Skip to main content

Example Recipewizard

About

Example speech recognition application in python. Many instructions and comments exist in the recipewizard.py script file itself.

Configuration

This tutorial assumes you have mod_python correctly installed. It also depends on mod_openmrcp to be installed and working with an automatic speech recognition server.

  • Open /usr/src/freeswitch/scripts/python/recipewizard.py and customize the GRAMMAR_ROOT variable and TTS settings to match your system.
  • Create $GRAMMAR_ROOT/mainmenu.xml from contents in mainmenu() comments.
  • Add scripts dir to your PYTHONPATH.
    \export PYTHONPATH=$PYTHONPATH:/usr/src/freeswitch/scripts/python
  • Add an extension to the dialplan under test

RecipeWizard dialplan extension

<extension name="2001">
<condition field="destination_number" expression="^2001$">
<action application="python" data="recipewizard"/>
</condition>
</extension>
  • Restart FreeSWITCH.
  • Call the extension.