From 66c0da3c0f4915fb529e4f01894b9f22ea206339 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 14 Dec 2006 22:48:32 +0000 Subject: [PATCH] cepstral issue git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3664 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/asr_tts/mod_cepstral/mod_cepstral.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mod/asr_tts/mod_cepstral/mod_cepstral.c b/src/mod/asr_tts/mod_cepstral/mod_cepstral.c index c06d63a9b0..b8a46b4be3 100644 --- a/src/mod/asr_tts/mod_cepstral/mod_cepstral.c +++ b/src/mod/asr_tts/mod_cepstral/mod_cepstral.c @@ -218,12 +218,15 @@ static switch_status_t cepstral_speech_feed_tts(switch_speech_handle_t *sh, char } swift_port_speak_file(cepstral->port, text, NULL, &cepstral->tts_stream, NULL); } else { + char *to_say; if (switch_strlen_zero(text)) { return SWITCH_STATUS_FALSE; } - swift_port_speak_text(cepstral->port, "", 0, NULL, &cepstral->tts_stream, NULL); - swift_port_speak_text(cepstral->port, text, 0, NULL, &cepstral->tts_stream, NULL); + if ((to_say = switch_mprintf(" %s ", text))) { + swift_port_speak_text(cepstral->port, to_say, 0, NULL, &cepstral->tts_stream, NULL); + switch_safe_free(to_say); + } } return SWITCH_STATUS_SUCCESS;