2016-01-22 97 views
0

我一直試圖在Android上使用Project Speech API(https://msdn.microsoft.com/en-us/library/mt613453.aspx)。我已將我的API訂閱密鑰添加到示例項目模塊SpeechRecoExample中。但是,啓動時出現以下錯誤消息:項目Oxford Speech API:被客戶端拒絕的AUDIO_INPUT_FLAG_FAST

01-22 17:10:04.234 11661-11661/com.microsoft.AzureIntelligentServicesExample I/NLPLAT﹕ [email protected] originating error 0x80070057 from InitializeRenderer 103 
01-22 17:10:04.234 11661-11661/com.microsoft.AzureIntelligentServicesExample I/NLPLAT﹕ [email protected] 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﹕ [email protected] 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﹕ [email protected] Opening VAD 'raw/vcd/common/grammar/Date.0409.vad.xml' 

我想這些可能是噸產量中的相關行。由於大部分邏輯都回到閉源語音API,所以我找不到一個調試它的好方法。有沒有人能夠在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?forum=mlapi

+0

令人驚訝的是,GitHub上可用的示例中沒有出現該問題(https://github.com/Microsoft/ProjectOxford-ClientSDK/tree/master/Speech/SpeechToText/Android/samples/SpeechRecoExample)。但是,我仍然無法找到根本原因,並且在嘗試實施我自己的應用程序時,錯誤不斷顯現。 – Carsten

回答

0

這似乎與SpeechSDK的版本和包括NDK文件。這顯然沒有記錄,我已經成功將目標Android版本更改爲15並重新編譯。

我還沒有能夠完全追溯這個問題,但它現在適用於我。

相關問題