提交 9e600ec9 authored 作者: Jeff Lenk's avatar Jeff Lenk

FS-6591 --resolve If you are still using spidermonkey you should migrate to v8

上级 dc2f5cc4
......@@ -1901,12 +1901,13 @@ static switch_status_t init_speech_engine(struct js_session *jss, char *engine,
{
switch_codec_t *read_codec;
switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_NONE;
uint32_t rate = 0;
uint32_t rate = 0, channels;
int interval = 0;
read_codec = switch_core_session_get_read_codec(jss->session);
rate = read_codec->implementation->actual_samples_per_second;
interval = read_codec->implementation->microseconds_per_packet / 1000;
channels = read_codec->implementation->number_of_channels;
if (switch_core_codec_init(&jss->speech->codec,
"L16",
......@@ -1921,7 +1922,7 @@ static switch_status_t init_speech_engine(struct js_session *jss, char *engine,
return SWITCH_STATUS_FALSE;
}
if (switch_core_speech_open(&jss->speech->sh, engine, voice, rate, interval,
if (switch_core_speech_open(&jss->speech->sh, engine, voice, rate, interval, channels,
&flags, switch_core_session_get_pool(jss->session)) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module!\n");
switch_core_codec_destroy(&jss->speech->codec);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论