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, "<break time=\"500ms\"/>", 0, NULL, &cepstral->tts_stream, NULL); - swift_port_speak_text(cepstral->port, text, 0, NULL, &cepstral->tts_stream, NULL); + if ((to_say = switch_mprintf("<break time=\"500ms\"/> %s <break time=\"500ms\"/>", text))) { + swift_port_speak_text(cepstral->port, to_say, 0, NULL, &cepstral->tts_stream, NULL); + switch_safe_free(to_say); + } } return SWITCH_STATUS_SUCCESS;