From df78cceab5379f9dd5bf8683165df5024a8e8dcb Mon Sep 17 00:00:00 2001 From: Christopher Rienzo Date: Wed, 17 Jun 2009 12:48:05 +0000 Subject: [PATCH] specify tts profile with sh->param git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13811 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c b/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c index 43696c7651..c3ef7833d8 100644 --- a/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c +++ b/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c @@ -1309,6 +1309,7 @@ static switch_status_t synth_speech_open(switch_speech_handle_t *sh, const char { switch_status_t status = SWITCH_STATUS_SUCCESS; speech_channel_t *schannel = NULL; + const char *profile = sh->param; switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "speech_handle: name = %s, rate = %d, speed = %d, samples = %d, voice = %s, engine = %s, param = %s\n", sh->name, sh->rate, sh->speed, sh->samples, sh->voice, sh->engine, sh->param); @@ -1329,7 +1330,9 @@ static switch_status_t synth_speech_open(switch_speech_handle_t *sh, const char sh->private_info = schannel; /* try to open an MRCP channel */ - const char *profile = globals.unimrcp_default_synth_profile; + if (switch_strlen_zero(profile)) { + profile = globals.unimrcp_default_synth_profile; + } if (speech_channel_open(schannel, profile) != SWITCH_STATUS_SUCCESS) { status = SWITCH_STATUS_FALSE; goto done;