Service 三星Gear S2 TTS本机API

Service 三星Gear S2 TTS本机API,service,voice-recognition,tizen,samsung-gear-s2,Service,Voice Recognition,Tizen,Samsung Gear S2,我将遵循教程: 我正在使用STT API,但当我 在三星Gear S2上调用create_stt_handle。 此设备是否支持此API,或者在service\u app\u控件上调用此函数时出错: create_stt_handle(){ int ret; ret=stt\u创建(&stt); 如果(STT\U错误\U无!=ret) { dlog_打印(dlog_调试,日志标签,“创建stt_句柄%#010x”,ret); } 如果(STT\U错误\U不受支持==ret) { dlog_pr

我将遵循教程:

我正在使用STT API,但当我 在三星Gear S2上调用create_stt_handle。 此设备是否支持此API,或者在service\u app\u控件上调用此函数时出错:

create_stt_handle(){
int ret;
ret=stt\u创建(&stt);
如果(STT\U错误\U无!=ret)
{
dlog_打印(dlog_调试,日志标签,“创建stt_句柄%#010x”,ret);
}
如果(STT\U错误\U不受支持==ret)
{
dlog_print(dlog_DEBUG,LOG_标签,“创建stt_处理stt_错误”不受支持);
}
}
无效服务应用控制(应用控制应用控制,无效*数据){
//Todo:在此处添加代码。
//创建_stt_handle();
//设置识别结果cb(stt);
int error=寄存器\加速计\回调(数据);
//dlog_打印(dlog_调试,日志标签,“创建%d后”,错误);
返回;
}

Stt需要两个功能:tizen.org/feature/speech.recognition和tizen.org/feature/microscop

您需要检查systemapi支持的功能,如下所示

也许它不能支持stt_支持。 在tizen论坛上也有同样的问题

#include "system_info.h"

bool stt_supported = false;
bool mic_supported = false;

system_info_get_platform_bool("http://tizen.org/feature/speech.recognition", &stt_supported);
system_info_get_platform_bool("http://tizen.org/feature/microphone", &mic_supported);

dlog_print(DLOG_ERROR, LOG_TAG, "supported = %d, %d", stt_supported ,mic_supported );