三星Gear S2 TTS本机API

若奥·比里巴(JoaoBiriba)

我正在学习本教程:

STT:识别语音

我正在使用STT API,但在Samsung Gear S2上调用create_stt_handle时收到STT_ERROR_NOT_SUPPORTED错误。该设备是否支持此API,或者在服务service_app_control上调用此函数有问题:

   create_stt_handle()  {
                   int ret;
                   ret = stt_create(&stt);
                   if (STT_ERROR_NONE != ret)
                     {
                        dlog_print(DLOG_DEBUG, LOG_TAG, "create_stt_handle %#010x", ret);
                     }
                   if (STT_ERROR_NOT_SUPPORTED == ret)
                     {
                        dlog_print(DLOG_DEBUG, LOG_TAG, "create_stt_handle STT_ERROR_NOT_SUPPORTED");
                     }

       }


        void service_app_control(app_control_h app_control, void *data) {
            // Todo: add your code here.

            //create_stt_handle();

            //set_recognition_result_cb(stt);

            int error = register_accelerometer_callback(data);
            //dlog_print(DLOG_DEBUG, LOG_TAG, "after create %d", error);

            return;
        }
李石勋

STT需要两个功能tizen.org/feature/speech.recognition和tizen.org/feature/microphone

您需要按以下方式检查systemapi支持的功能。

https://developer.tizen.org/development/api-references/api-reference-2.3.1?redirect=https%3A//developer.tizen.org/dev-guide/2.3.1/org.tizen.native .wearable.apireference / group__CAPI__SYSTEM__SYSTEM__INFO__MODULE.html

#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 );

也许它不支持stt_supported。这是tizen论坛中的相同问题。

https://developer.tizen.org/forums/native-application-development/stt-support-on-real-gear-s2-not-emulator?tab=active

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章