gpt4 book ai didi

ios - DragonMobile SDK SpeechKit 不工作 [NMSP_DEBUG]

转载 作者:行者123 更新时间:2023-11-29 12:31:58 24 4
gpt4 key购买 nike

我刚刚下载了用于 iOS 开发的 Dragon Mobile SDK,并尝试使用 SpeechKit 创建一个应用程序。我遵循了 Dragon Mobile SDK Reference,但我不断在日志中收到以下消息:

2014-12-11 23:24:52.834 TestApp[17554:1036858] [NMSP_DEBUG] nmsp_nmas_create_dictionary().
2014-12-11 23:24:52.835 TestApp[17554:1036858] [NMSP_DEBUG] nmsp_nmas_dictionary_add().
2014-12-11 23:24:52.835 TestApp[17554:1036858] [NMSP_DEBUG] nmsp_nmas_dictionary_key_exists
2014-12-11 23:24:52.835 TestApp[17554:1036858] [NMSP_DEBUG] nmsp_nmas_dictionary_add().
2014-12-11 23:24:52.836 TestApp[17554:1036858] [NMSP_DEBUG] nmsp_nmas_dictionary_key_exists

这是我的代码:

- (IBAction)startRecording:(id)sender {
self.vocalizer = [[SKVocalizer alloc] initWithLanguage:@"en_US"
delegate:self];

[self.vocalizer speakString:@"Hello world."];
}

代码运行时没有任何反应。我已经仔细检查并确保 key 是正确的,并且我已经下载了正确的框架,所以我不知道问题是什么。任何帮助将不胜感激!

最佳答案

刚刚弄清楚为什么会这样!我将以下函数放在 AppDelegate 中(根据 Ray Wenderlich 的教程)

- (void)setupSpeechKitConnection {
[SpeechKit setupWithID:INSERT_YOUR_APPLICATION_ID_HERE
host:INSERT_YOUR_HOST_ADDRESS_HERE
port:INSERT_YOUR_HOST_PORT_HERE
useSSL:NO
delegate:nil];

// Set earcons to play
SKEarcon* earconStart = [SKEarcon earconWithName:@"earcon_listening.wav"];
SKEarcon* earconStop = [SKEarcon earconWithName:@"earcon_done_listening.wav"];
SKEarcon* earconCancel = [SKEarcon earconWithName:@"earcon_cancel.wav"];

[SpeechKit setEarcon:earconStart forType:SKStartRecordingEarconType];
[SpeechKit setEarcon:earconStop forType:SKStopRecordingEarconType];
[SpeechKit setEarcon:earconCancel forType:SKCancelRecordingEarconType];
}

但它没有被调用。当我将它移动到 ViewController 中的 viewDidLoad 时,它开始工作了。

关于ios - DragonMobile SDK SpeechKit 不工作 [NMSP_DEBUG],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27436919/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com