}
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;