Mod openmrcp
From FreeSWITCH Wiki
Contents |
Introduction
A module which allows freeswitch to interface with v1 or v2 MRCP compliant speech recognition or TTS servers. The module connects using the publicly available OpenMRCP library sponsored by Cepstral, makers of Text-to-Speech voices.
Status
The module has been released and is ready for use!
Compatibility Matrix
mod_openmrcp has been tested with the following products
- Cepstral TTS
- Voxeo
Building
- Add entry to modules.conf file
asr_tts/mod_openmrcp
- Build freeswitch with 'make install'
Deploying
- Perform steps described in Configuration section below
- Add module to modules.conf.xml
- Restart freeswitch
- Start necessary ASR/TTS MRCP servers
Configuration
Create and Include XML conf
- Create a configuration file in /usr/local/freeswitch/conf/mod_openmrcp.conf.xml using example below
- Edity freeswitch.xml to include mod_openmrcp.conf.xml
Example Configuration
<configuration name="mod_openmrcp.conf" description="mod_openmrcp configuration">
<settings>
<param name="asr_default_profile" value="openmrcp-v2"/>
<param name="tts_default_profile" value="openmrcp-v2"/>
<param name="log_level" value="0"/>
</settings>
<profiles>
<profile name="openmrcp-v1" description="OpenMRCPv1 Server">
<param name="proto_version" value="1"/>
<param name="client_ip" value="127.0.0.1"/>
<param name="client_port" value="8062"/>
<param name="server_ip" value="127.0.0.1"/>
<param name="server_port" value="1554"/>
<param name="rtp_port_min" value="10000"/>
<param name="rtp_port_max" value="11000"/>
</profile>
<profile name="openmrcp-v2" description="OpenMRCPv2 Server">
<param name="proto_version" value="2"/>
<param name="client_ip" value="127.0.0.1"/>
<param name="client_port" value="8062"/>
<param name="server_ip" value="127.0.0.1"/>
<param name="server_port" value="8060"/>
<param name="rtp_port_min" value="11000"/>
<param name="rtp_port_max" value="12000"/>
</profile>
</profiles>
</configuration>
- asr_default_profile - what profile to use for client settings for contacting an ASR (speech recognition server). 'default' profile to use when one isn't specified.
- tts_default_profile - what profile to use for client settings for contacting a TTS (text to speech server).
- log_level - loglevel for OpenMRCP client library, valid values: 0-7 where 0 emits the least amount and 7 emits the most amount of logging.
- proto_version - whether to use MRCP v1 or v2. See OpenMRCP for more info on what this means.
- client_ip - the ip address the embedded OpenMRCP client will bind to.
- client_port - the port the embedded OpenMRCP client will bind to.
- server_ip - the ip address the embedded OpenMRCP client will connect to. There must be an MRCP compliant server running on this port. If this profile was designated as the asr_default_profile, then the MRCP server must support recognition.
- server_port - the port the embedded OpenMRCP client will connect to.
Using from FreeSWITCH
TTS
Using javascript
session.speak("openmrcp:openmrcp-v2","David","Hello from FreeSwitch");
- NOTE* the string after the : is the desired profile from your config.
ASR
Try changing the pizza demo to use "openmrcp" instead of "lumenvox" (no longer supported). (However, this probably won't work due to differences in grammar)
Also check out the python-based recipewizard tutorial.
FAQ
If my freeswitch server is behind a NAT..
Q: If my freeswitch server is behind a NAT, can I connect to a v2 MRCP server on the public internet? Will it use STUN?
A: By default it does not seem to use STUN, however this might be configurable.
Known Bugs
Previous Bugs
Failed to modify channel (sporadic)
Fixed in revision 465
This bug only affects MRCP v2 communication.
The bug is a sporadic failure in the client library which causes it to fail to setup a connection with the mrcp server. On the freeswitch console you will see "Modify Channel" first, then "Failed to modify channel", then finally a "Connected to MRCPv2 Server", though its not really connected.
This fix involves add a pending requests queue in the client stack.
Categories: ASR | TTS | Integration | Modules
