1

我即将在使用 Nuance Dragon Mobile SDK 的 IOS 上发布我的应用程序。我注册了“白银”计划,该计划允许我每天进行 20 次交易。

我的问题是,有谁知道 Nuance 在超出限制时返回了什么错误?我很担心,因为我正在过滤掉:

error.code == 5 // Because this fires whenever I interrupt running speech
error.code == 1 // Because after interrupting speech, the first time I restart, it cuts off
            // before finished, so I automatically start again, so as not to trouble the user to do so

我想如果 Nuance 返回的错误与这些不同,我将允许它通过,并能够提醒用户他们已达到每日限制。

我认为以下给出了可能的错误:

extern NSString * const SKSpeechErrorDomain;

enum {
    SKServerConnectionError = 1,
    SKServerRetryError = 2,
    SKRecognizerError = 3,
    SKVocalizerError = 4,
SKCancelledError = 5,
};

在我看来,可能会被解雇的是 SKServerConnectionError 。在那种情况下,我需要想出一个不同的策略。如果我能弄清楚重启问题发生了什么,我就不必过滤掉那个错误。另外,当我自动重新启动这些错误启动时,我可能会增加我的事务计数,这是不幸的。

有人对 Nuance SDK for IOS 这方面有经验吗?

4

0 回答 0