Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
70d78f16
提交
70d78f16
authored
7月 19, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-5583 --resolve
上级
fab8e29d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
225 行增加
和
3 行删除
+225
-3
switch_core.h
src/include/switch_core.h
+9
-0
switch_module_interfaces.h
src/include/switch_module_interfaces.h
+2
-0
mod_unimrcp.c
src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c
+189
-3
switch_core_asr.c
src/switch_core_asr.c
+12
-0
switch_ivr_async.c
src/switch_ivr_async.c
+13
-0
没有找到文件。
src/include/switch_core.h
浏览文件 @
70d78f16
...
...
@@ -1967,6 +1967,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_check_results(switch_asr_handle_
*/
SWITCH_DECLARE
(
switch_status_t
)
switch_core_asr_get_results
(
switch_asr_handle_t
*
ah
,
char
**
xmlstr
,
switch_asr_flag_t
*
flags
);
/*!
\brief Get result headers from an asr handle
\param ah the handle to get results from
\param headers a pointer to dynamically allocate an switch_event_t result to
\param flags flags to influence behaviour
\return SWITCH_STATUS_SUCCESS
*/
SWITCH_DECLARE
(
switch_status_t
)
switch_core_asr_get_result_headers
(
switch_asr_handle_t
*
ah
,
switch_event_t
**
headers
,
switch_asr_flag_t
*
flags
);
/*!
\brief Load a grammar to an asr handle
\param ah the handle to load to
...
...
src/include/switch_module_interfaces.h
浏览文件 @
70d78f16
...
...
@@ -377,6 +377,8 @@ struct switch_asr_interface {
switch_status_t
(
*
asr_check_results
)
(
switch_asr_handle_t
*
ah
,
switch_asr_flag_t
*
flags
);
/*! function to read results from the ASR */
switch_status_t
(
*
asr_get_results
)
(
switch_asr_handle_t
*
ah
,
char
**
xmlstr
,
switch_asr_flag_t
*
flags
);
/*! function to read result headers from the ASR */
switch_status_t
(
*
asr_get_result_headers
)
(
switch_asr_handle_t
*
ah
,
switch_event_t
**
headers
,
switch_asr_flag_t
*
flags
);
/*! function to start ASR input timers */
switch_status_t
(
*
asr_start_input_timers
)
(
switch_asr_handle_t
*
ah
);
void
(
*
asr_text_param
)
(
switch_asr_handle_t
*
ah
,
char
*
param
,
const
char
*
val
);
...
...
src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c
浏览文件 @
70d78f16
差异被折叠。
点击展开。
src/switch_core_asr.c
浏览文件 @
70d78f16
...
...
@@ -299,6 +299,18 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_get_results(switch_asr_handle_t
return
ah
->
asr_interface
->
asr_get_results
(
ah
,
xmlstr
,
flags
);
}
SWITCH_DECLARE
(
switch_status_t
)
switch_core_asr_get_result_headers
(
switch_asr_handle_t
*
ah
,
switch_event_t
**
headers
,
switch_asr_flag_t
*
flags
)
{
switch_assert
(
ah
!=
NULL
);
if
(
ah
->
asr_interface
->
asr_get_result_headers
)
{
return
ah
->
asr_interface
->
asr_get_result_headers
(
ah
,
headers
,
flags
);
}
else
{
/* Since this is not always implemented, return success if the function can't be called */
return
SWITCH_STATUS_SUCCESS
;
}
}
SWITCH_DECLARE
(
switch_status_t
)
switch_core_asr_start_input_timers
(
switch_asr_handle_t
*
ah
)
{
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
...
...
src/switch_ivr_async.c
浏览文件 @
70d78f16
...
...
@@ -3791,6 +3791,7 @@ static void *SWITCH_THREAD_FUNC speech_thread(switch_thread_t *thread, void *obj
while
(
switch_channel_up_nosig
(
channel
)
&&
!
switch_test_flag
(
sth
->
ah
,
SWITCH_ASR_FLAG_CLOSED
))
{
char
*
xmlstr
=
NULL
;
switch_event_t
*
headers
=
NULL
;
switch_thread_cond_wait
(
sth
->
cond
,
sth
->
mutex
);
...
...
@@ -3804,6 +3805,9 @@ static void *SWITCH_THREAD_FUNC speech_thread(switch_thread_t *thread, void *obj
if
(
status
!=
SWITCH_STATUS_SUCCESS
&&
status
!=
SWITCH_STATUS_BREAK
)
{
goto
done
;
}
else
if
(
status
==
SWITCH_STATUS_SUCCESS
)
{
/* Try to fetch extra information for this result, the return value doesn't really matter here - it's just optional data. */
switch_core_asr_get_result_headers
(
sth
->
ah
,
&
headers
,
&
flags
);
}
if
(
status
==
SWITCH_STATUS_SUCCESS
&&
switch_true
(
switch_channel_get_variable
(
channel
,
"asr_intercept_dtmf"
)))
{
...
...
@@ -3853,6 +3857,11 @@ static void *SWITCH_THREAD_FUNC speech_thread(switch_thread_t *thread, void *obj
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_DETECTED_SPEECH
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
status
==
SWITCH_STATUS_SUCCESS
)
{
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Speech-Type"
,
"detected-speech"
);
if
(
headers
)
{
switch_event_merge
(
event
,
headers
);
}
switch_event_add_body
(
event
,
"%s"
,
xmlstr
);
}
else
{
switch_event_add_header_string
(
event
,
SWITCH_STACK_BOTTOM
,
"Speech-Type"
,
"begin-speaking"
);
...
...
@@ -3876,6 +3885,10 @@ static void *SWITCH_THREAD_FUNC speech_thread(switch_thread_t *thread, void *obj
}
switch_safe_free
(
xmlstr
);
if
(
headers
)
{
switch_event_destroy
(
&
headers
);
}
}
}
done:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论