1

我一直在尝试在 Android ( https://msdn.microsoft.com/en-us/library/mt613453.aspx ) 上使用 Project Oxford Speech API。我已将我的 API 订阅密钥添加到示例项目模块SpeechRecoExample中。但是,我在启动时收到以下错误消息:

01-22 17:10:04.234  11661-11661/com.microsoft.AzureIntelligentServicesExample I/NLPLAT﹕ InitializeRenderer@103 originating error 0x80070057 from InitializeRenderer 103
01-22 17:10:04.234  11661-11661/com.microsoft.AzureIntelligentServicesExample I/NLPLAT﹕ Initialize@749 Initializing Audio Services
01-22 17:10:04.236  11661-11661/com.microsoft.AzureIntelligentServicesExample W/AudioRecord﹕ AUDIO_INPUT_FLAG_FAST denied by client; transfer 1, track 16000 Hz, primary 48000 Hz
01-22 17:10:04.246  11661-11661/com.microsoft.AzureIntelligentServicesExample E/AudioRecord﹕ AudioFlinger could not create record track, status: -1
01-22 17:10:04.247  11661-11661/com.microsoft.AzureIntelligentServicesExample E/libOpenSLES﹕ android_audioRecorder_realize(0xab224400) error creating AudioRecord object; status -1
01-22 17:10:04.247  11661-11661/com.microsoft.AzureIntelligentServicesExample W/libOpenSLES﹕ Leaving Object::Realize (SL_RESULT_CONTENT_UNSUPPORTED)
01-22 17:10:04.247  11661-11661/com.microsoft.AzureIntelligentServicesExample I/NLPLAT﹕ Initialize@47 originating error 0x8000ffff from Initialize 47
01-22 17:10:04.247  11661-11661/com.microsoft.AzureIntelligentServicesExample E/NLPLAT﹕ native error -1910439934
01-22 17:10:04.249  11661-11661/com.microsoft.AzureIntelligentServicesExample W/libOpenSLES﹕ class OutputMix interface 0 requested but unavailable MPH=43
01-22 17:10:04.250  11661-11661/com.microsoft.AzureIntelligentServicesExample W/AudioTrack﹕ AUDIO_OUTPUT_FLAG_FAST denied by client; transfer 1, track 16000 Hz, output 48000 Hz
01-22 17:10:04.253  11661-11661/com.microsoft.AzureIntelligentServicesExample I/NLPLAT﹕ Load@205 Opening VAD 'raw/vcd/common/grammar/Date.0409.vad.xml'

我认为这些可能是吨产量的相关线。由于大部分逻辑都回到了闭源 SpeechAPI,我找不到调试它的好方法。有没有人能够在 Android 上成功运行这个示例(或任何其他应用程序)?任何指针在哪里挖掘?

注意:该应用程序在模拟器上运行良好(以及在硬件上启动),但由于缺乏麦克风支持,我无法在那里测试功能。在 Google Nexus 5 上测试时出现错误消息。我使用 Ubuntu 14.04 和 Intellij IDE。使用服务进行身份验证并进行调用(正如我在配额中看到的那样),但没有返回(或为空)结果。

我在这里只能找到一份关于同样错误的报告:https ://social.msdn.microsoft.com/Forums/azure/en-US/a23230b8-b7a9-43bb-8390-03036301ee77/android-speech2text-sdk-error ?论坛=mlapi

4

1 回答 1

0

这似乎与 SpeechSDK 的版本和包含的 NDK 文件有关。这显然没有记录在案,我在将目标 Android 版本更改为 15 并重新编译后取得了成功。

我无法完全追溯这个问题,但它现在对我有用。

于 2016-01-25T08:45:44.333 回答