diff --git a/src/mod/asr_tts/mod_cepstral/mod_cepstral.c b/src/mod/asr_tts/mod_cepstral/mod_cepstral.c index 0318df4a58..e8aaace236 100644 --- a/src/mod/asr_tts/mod_cepstral/mod_cepstral.c +++ b/src/mod/asr_tts/mod_cepstral/mod_cepstral.c @@ -67,6 +67,7 @@ static swift_result_t write_audio(swift_event *event, swift_event_t type, void * /* Only proceed when we have success */ if (!SWIFT_FAILED((rv = swift_event_get_audio(event, &buf, &len)))) { switch_mutex_lock(cepstral->audio_lock); + if (switch_buffer_write(cepstral->audio_buffer, buf, len) <= 0) { rv = SWIFT_UNKNOWN_ERROR; } @@ -91,7 +92,7 @@ static switch_status_t cepstral_speech_open(switch_speech_handle_t *sh, char *vo return SWITCH_STATUS_MEMERR; } - if (switch_buffer_create(sh->memory_pool, &cepstral->audio_buffer, SWITCH_RECCOMMENDED_BUFFER_SIZE) != SWITCH_STATUS_SUCCESS) { + if (switch_buffer_create(sh->memory_pool, &cepstral->audio_buffer, 1024 * 256) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Write Buffer Failed!\n"); return SWITCH_STATUS_MEMERR; } @@ -168,7 +169,6 @@ static switch_status_t cepstral_speech_feed_tts(switch_speech_handle_t *sh, char cepstral = sh->private_info; assert(cepstral != NULL); - swift_port_speak_text(cepstral->port, text, 0, NULL, &cepstral->tts_stream, NULL); //swift_port_speak_text(cepstral->port, text, 0, NULL, NULL, NULL); @@ -201,8 +201,6 @@ static switch_status_t cepstral_speech_read_tts(switch_speech_handle_t *sh, used = switch_buffer_inuse(cepstral->audio_buffer); - - if (!used && cepstral->done_gen) { break; } diff --git a/src/switch_core.c b/src/switch_core.c index 1f278146e8..08287391ff 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -1449,7 +1449,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_kill_channel(switch_ switch_io_event_hook_kill_channel_t *ptr; switch_status_t status = SWITCH_STATUS_FALSE; - switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char *) file, func, line, SWITCH_LOG_NOTICE, "Kill %s [%d]\n", switch_channel_get_name(session->channel), sig); + switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char *) file, func, line, SWITCH_LOG_INFO, "Kill %s [%d]\n", switch_channel_get_name(session->channel), sig); if (session->endpoint_interface->io_routines->kill_channel) { if ((status = session->endpoint_interface->io_routines->kill_channel(session, sig)) == SWITCH_STATUS_SUCCESS) { @@ -1717,7 +1717,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t assert(runtime.memory_pool != NULL); - if ((apr_pool_create(pool, runtime.memory_pool)) != SWITCH_STATUS_SUCCESS) { + if ((apr_pool_create(pool, NULL)) != SWITCH_STATUS_SUCCESS) { *pool = NULL; return SWITCH_STATUS_MEMERR; } diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 5a46d68865..a9661a5b76 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -696,7 +696,6 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_ for(;;) { bytes = sizeof(rtp_msg_t); status = switch_socket_recvfrom(rtp_session->from_addr, rtp_session->sock, 0, (void *)&rtp_session->recv_msg, &bytes); - if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_BREAK)) { switch_clear_flag(rtp_session, SWITCH_RTP_FLAG_BREAK);