[Freeswitch-branches] [commit] r5587 - freeswitch/branches/greenlizard/src/mod/asr_tts/mod_openmrcp

Freeswitch SVN greenlizard at freeswitch.org
Sat Aug 11 12:28:25 EDT 2007


Author: greenlizard
Date: Sat Aug 11 12:28:24 2007
New Revision: 5587

Modified:
   freeswitch/branches/greenlizard/src/mod/asr_tts/mod_openmrcp/Makefile
   freeswitch/branches/greenlizard/src/mod/asr_tts/mod_openmrcp/mod_openmrcp.c

Log:
works with trunk version of openmrcp since it now sets the version correctly

Modified: freeswitch/branches/greenlizard/src/mod/asr_tts/mod_openmrcp/Makefile
==============================================================================
--- freeswitch/branches/greenlizard/src/mod/asr_tts/mod_openmrcp/Makefile	(original)
+++ freeswitch/branches/greenlizard/src/mod/asr_tts/mod_openmrcp/Makefile	Sat Aug 11 12:28:24 2007
@@ -14,9 +14,7 @@
 # - is there an openmrcp dir in the fs tree yet?  (see FIXME)
 
 # FIXME!!!  Should this download and build openmrcp?  What's the plan?
-# NOTE: currently only works with trunk revision 367.  On trunk revision 440
-# there is a segfault when server loads.
-OPENMRCP_DIR=/usr/src/openmrcp_stable
+OPENMRCP_DIR=/usr/src/openmrcp_trunk
 
 OPENMRCP_INCLUDE=-I$(OPENMRCP_DIR)/mrcpcore/client/include/ -I$(OPENMRCP_DIR)/platform/openmrcpclient/include/ -I$(OPENMRCP_DIR)/mediaframe/include/ -I$(OPENMRCP_DIR)/mrcpcore/engine/include/ -I$(OPENMRCP_DIR)/mrcpcore/include/ -I$(OPENMRCP_DIR)/mrcpcore/parser/include/ -I$(OPENMRCP_DIR)/mrcpcore/server/include/ -I$(OPENMRCP_DIR)/mrcpcore/media/include/ -I$(OPENMRCP_DIR)/mrcpcore/util/include -I$(OPENMRCP_DIR)/mrcpcore/resource/include/
 
@@ -24,7 +22,7 @@
 
 OPENMRCP_LIBS_STABLE=$(OPENMRCP_DIR)/platform/openmrcpclient/.libs/libopenmrcpclient.a $(OPENMRCP_DIR)/platform/openmrcpserver/.libs/libopenmrcpserver.a $(OPENMRCP_DIR)/mrcpcore/client/.libs/libmrcpclient.a $(OPENMRCP_DIR)/mediaframe/.libs/libmediaframe.a $(OPENMRCP_DIR)/mrcpcore/engine/.libs/libmrcpengine.a $(OPENMRCP_DIR)/mrcpcore/parser/.libs/libmrcpparser.a $(OPENMRCP_DIR)/mrcpcore/server/.libs/libmrcpserver.a $(OPENMRCP_DIR)/mrcpcore/media/.libs/libmrcpmedia.a $(OPENMRCP_DIR)/mrcpcore/util/.libs/libmrcputil.a $(OPENMRCP_DIR)/mrcpcore/util/.libs/libmrcputil.a $(OPENMRCP_DIR)/mrcpcore/resource/.libs/libmrcpresource.a $(OPENMRCP_DIR)/module/plugin/demo/.libs/libdemoplugin.a $(OPENMRCP_DIR)/module/mrcpv2agent/.libs/libmrcpv2agent.a $(OPENMRCP_DIR)/module/mrcplivemedia/.libs/libmrcplivemedia.a $(OPENMRCP_DIR)/module/mrcpsofiasip/.libs/libmrcpsofiasip.a $(OPENMRCP_DIR)/mrcpcore/.libs/libmrcpcore.a
 
-OPENMRCP_LIBS=$(OPENMRCP_LIBS_STABLE)
+OPENMRCP_LIBS=$(OPENMRCP_LIBS_TRUNK)
 MRCP_APR_INCLUDES =  -I../../../../libs/apr/include
 MRCP_APU_INCLUDES =  -I../../../../libs/apr-util/include
 MRCP_SOFIA_INCLUDES = -I/usr/local/include/sofia-sip-1.12  # FIXME!!

Modified: freeswitch/branches/greenlizard/src/mod/asr_tts/mod_openmrcp/mod_openmrcp.c
==============================================================================
--- freeswitch/branches/greenlizard/src/mod/asr_tts/mod_openmrcp/mod_openmrcp.c	(original)
+++ freeswitch/branches/greenlizard/src/mod/asr_tts/mod_openmrcp/mod_openmrcp.c	Sat Aug 11 12:28:24 2007
@@ -27,10 +27,11 @@
  *
  * Module which acts as an MRCP client to an MRCP speech recognition
  * server.  In other words it bridges freeswitch to an external speech
- * recognition system.  
+ * recognition system.  Documentation on how to install and configure
+ * the module is here: http://wiki.freeswitch.org/wiki/Mod_openmrcp
  *
  * Uses OpenMrcp (http://wiki.freeswitch.org/wiki/OpenMRCP) as the 
- * the client library.
+ * the client library.  
  * 
  */
 #ifdef __ICC
@@ -70,6 +71,7 @@
 static struct {
 	char *client_ip;
 	char *server_ip;
+	uint32_t proto_version;
 	uint32_t client_port;
 	uint32_t server_port;
 	uint32_t rtp_port_min;
@@ -197,7 +199,6 @@
 					timeout = 0;  
 				}
 				else {
-					switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "sleeping %d millieconds\n", sleep_ms);
 					switch_sleep(sleep_ms * 1000);  // ms->us
 					timeout -= sleep_ms;  
 				}
@@ -344,6 +345,7 @@
 static apr_status_t set_default_options(openmrcp_client_options_t *options)
 {
 	mrcp_logger.priority = MRCP_PRIO_INFO;
+	options->proto_version = globals.proto_version; 
 	options->client_ip = globals.client_ip;
 	options->server_ip = globals.server_ip;
 	options->client_port = globals.client_port;
@@ -798,6 +800,8 @@
 				globals.client_ip = val;
 			} else if (!strcasecmp(var, "server_ip")) {
 				globals.server_ip = val;
+			} else if (!strcasecmp(var, "proto_version")) {
+				globals.proto_version =(uint32_t) atoi(val);
 			} else if (!strcasecmp(var, "client_port")) {
 				globals.client_port = (uint32_t) atoi(val);
 			} else if (!strcasecmp(var, "server_port")) {



More information about the Freeswitch-branches mailing list