Merge branch 'master' into master
This commit is contained in:
commit
fc4a2d5d4f
|
@ -1795,7 +1795,8 @@ typedef enum {
|
||||||
SWITCH_SPEECH_FLAG_BLOCKING = (1 << 3),
|
SWITCH_SPEECH_FLAG_BLOCKING = (1 << 3),
|
||||||
SWITCH_SPEECH_FLAG_PAUSE = (1 << 4),
|
SWITCH_SPEECH_FLAG_PAUSE = (1 << 4),
|
||||||
SWITCH_SPEECH_FLAG_OPEN = (1 << 5),
|
SWITCH_SPEECH_FLAG_OPEN = (1 << 5),
|
||||||
SWITCH_SPEECH_FLAG_DONE = (1 << 6)
|
SWITCH_SPEECH_FLAG_DONE = (1 << 6),
|
||||||
|
SWITCH_SPEECH_FLAG_MULTI = (1 << 7)
|
||||||
} switch_speech_flag_enum_t;
|
} switch_speech_flag_enum_t;
|
||||||
typedef uint32_t switch_speech_flag_t;
|
typedef uint32_t switch_speech_flag_t;
|
||||||
|
|
||||||
|
|
|
@ -949,6 +949,11 @@ static switch_status_t tts_file_open(switch_file_handle_t *handle, const char *p
|
||||||
handle->seekable = 0;
|
handle->seekable = 0;
|
||||||
handle->speed = 0;
|
handle->speed = 0;
|
||||||
context->max_frame_size = handle->samplerate / 1000 * SWITCH_MAX_INTERVAL;
|
context->max_frame_size = handle->samplerate / 1000 * SWITCH_MAX_INTERVAL;
|
||||||
|
|
||||||
|
if ((context->sh.flags & SWITCH_SPEECH_FLAG_MULTI)) {
|
||||||
|
switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_DONE;
|
||||||
|
switch_core_speech_feed_tts(&context->sh, "DONE", &flags);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
switch_core_speech_close(&context->sh, &context->flags);
|
switch_core_speech_close(&context->sh, &context->flags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2823,6 +2823,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_core_speech_feed_tts(sh, text, &flags);
|
switch_core_speech_feed_tts(sh, text, &flags);
|
||||||
|
|
||||||
|
if ((sh->flags & SWITCH_SPEECH_FLAG_MULTI)) {
|
||||||
|
flags = SWITCH_SPEECH_FLAG_DONE;
|
||||||
|
switch_core_speech_feed_tts(sh, "DONE", &flags);
|
||||||
|
}
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Speaking text: %s\n", text);
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Speaking text: %s\n", text);
|
||||||
switch_safe_free(tmp);
|
switch_safe_free(tmp);
|
||||||
text = NULL;
|
text = NULL;
|
||||||
|
|
Loading…
Reference in New Issue