Azure-Samples / Cognitive-Speech-STT-iOS

iOS SDK for the Microsoft Speech-to-Text API, part of Cognitive Services
https://www.microsoft.com/cognitive-services/en-us/speech-api
Other
49 stars 21 forks source link

Error when use sample app #35

Closed Realmonia closed 7 years ago

Realmonia commented 7 years ago

It gives following error when click start. It does say "language generation OK" which I think the request is successfully sent..

Sending audio stream endpoint, requestId='2817a14b-2efd-7998-e9f9-6e48a62c1340'
Sent audio stream endpoint, requestId='2817a14b-2efd-7998-e9f9-6e48a62c1340'
signaling OnAudioEvent(AUDIO_EVENT_RECORD_STOP)
Client UPL: 27180000 ticks
originating error 0x8000ffff
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIControl isSelected]
PID: 4064, TID: 128887, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4   SpeechRecognitionServerExample      0x000000010a195ccd -[ViewController modeIndex] + 253
5   SpeechRecognitionServerExample      0x000000010a1959db -[ViewController mode] + 43
6   SpeechRecognitionServerExample      0x000000010a19792b -[ViewController onFinalResponseReceived:] + 59
7   SpeechSDK                           0x000000010a48afda -[Conversation onFinalResponseReceived:] + 58
8   SpeechSDK                           0x000000010a489f4b _ZN13HostCallbacks26HandleConversationResponseEiRKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_10unique_ptrIN4Bing6Speech20INameValueCollectionENS0_14default_deleteISC_EEEE + 1125
9   SpeechSDK                           0x000000010a602321 _ZN10CspWrapper26HandleConversationResponseEiRKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_10unique_ptrIN4Bing6Speech20INameValueCollectionENS0_14default_deleteISC_EEEE + 1529
10  SpeechSDK                           0x000000010a63847d _ZN14CUConversation23MessageConsumerCallBackERNSt3__110unique_ptrIN4Bing6Speech8IMessageENS0_14default_deleteIS4_EEEE + 1495
11  SpeechSDK                           0x000000010a648363 _ZN4Bing6Speech8CUClient13InvokeRequestERKSt6guid_tRNSt3__110unique_ptrINS0_8IMessageENS5_14default_deleteIS7_EEEEb + 129
12  SpeechSDK                           0x000000010a648182 _ZN4Bing6Speech8CUClient23MessageConsumerCallBackERNSt3__110unique_ptrINS0_8IMessageENS2_14default_deleteIS4_EEEE + 276
13  SpeechSDK                           0x000000010a651773 _ZN4Bing6Speech19WebSocketConnection17OnReceivedMessageERNSt3__110unique_ptrINS0_8IMessageENS2_14default_deleteIS4_EEEE + 63
14  SpeechSDK                           0x000000010a651790 _ZThn376_N4Bing6Speech19WebSocketConnection17OnReceivedMessageERNSt3__110unique_ptrINS0_8IMessageENS2_14default_deleteIS4_EEEE + 16
15  SpeechSDK                           0x000000010a653efe _ZN4Bing6Speech16WebSocketChannel24OnReceiveMessageCompleteERNS0_14IHttpWebSocketENS0_22WebSocketMessageFormat4TypeE + 576
16  SpeechSDK                           0x000000010a66e78f _ZN9WSRequest15OnDataAvailableERN4Bing6Speech12IHttpRequestEj + 667
17  SpeechSDK                           0x000000010a66d81a _ZN7Request6WorkerEv + 210
18  SpeechSDK                           0x000000010a66ed0f _ZN7Request8S_WorkerEPv + 35
19  SpeechSDK                           0x000000010a6760c8 _ZL7TPStartPv + 20
20  libsystem_pthread.dylib             0x000000010fa0c93b _pthread_body + 180
21  libsystem_pthread.dylib             0x000000010fa0c887 _pthread_body + 0
22  libsystem_pthread.dylib             0x000000010fa0c08d thread_start + 13
2017-10-10 00:52:14.103432-0400 SpeechRecognitionServerExample[4064:128887] [reports] Main Thread Checker: UI API called on a background thread: -[UIControl isSelected]
PID: 4064, TID: 128887, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21
Backtrace:
4   SpeechRecognitionServerExample      0x000000010a195ccd -[ViewController modeIndex] + 253
5   SpeechRecognitionServerExample      0x000000010a1959db -[ViewController mode] + 43
6   SpeechRecognitionServerExample      0x000000010a19792b -[ViewController onFinalResponseReceived:] + 59
7   SpeechSDK                           0x000000010a48afda -[Conversation onFinalResponseReceived:] + 58
8   SpeechSDK                           0x000000010a489f4b _ZN13HostCallbacks26HandleConversationResponseEiRKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_10unique_ptrIN4Bing6Speech20INameValueCollectionENS0_14default_deleteISC_EEEE + 1125
9   SpeechSDK                           0x000000010a602321 _ZN10CspWrapper26HandleConversationResponseEiRKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_10unique_ptrIN4Bing6Speech20INameValueCollectionENS0_14default_deleteISC_EEEE + 1529
10  SpeechSDK                           0x000000010a63847d _ZN14CUConversation23MessageConsumerCallBackERNSt3__110unique_ptrIN4Bing6Speech8IMessageENS0_14default_deleteIS4_EEEE + 1495
11  SpeechSDK                           0x000000010a648363 _ZN4Bing6Speech8CUClient13InvokeRequestERKSt6guid_tRNSt3__110unique_ptrINS0_8IMessageENS5_14default_deleteIS7_EEEEb + 129
12  SpeechSDK                           0x000000010a648182 _ZN4Bing6Speech8CUClient23MessageConsumerCallBackERNSt3__110unique_ptrINS0_8IMessageENS2_14default_deleteIS4_EEEE + 276
13  SpeechSDK                           0x000000010a651773 _ZN4Bing6Speech19WebSocketConnection17OnReceivedMessageERNSt3__110unique_ptrINS0_8IMessageENS2_14default_deleteIS4_EEEE + 63
14  SpeechSDK                           0x000000010a651790 _ZThn376_N4Bing6Speech19WebSocketConnection17OnReceivedMessageERNSt3__110unique_ptrINS0_8IMessageENS2_14default_deleteIS4_EEEE + 16
15  SpeechSDK                           0x000000010a653efe _ZN4Bing6Speech16WebSocketChannel24OnReceiveMessageCompleteERNS0_14IHttpWebSocketENS0_22WebSocketMessageFormat4TypeE + 576
16  SpeechSDK                           0x000000010a66e78f _ZN9WSRequest15OnDataAvailableERN4Bing6Speech12IHttpRequestEj + 667
17  SpeechSDK                           0x000000010a66d81a _ZN7Request6WorkerEv + 210
18  SpeechSDK                           0x000000010a66ed0f _ZN7Request8S_WorkerEPv + 35
19  SpeechSDK                           0x000000010a6760c8 _ZL7TPStartPv + 20
20  libsystem_pthread.dylib             0x000000010fa0c93b _pthread_body + 180
21  libsystem_pthread.dylib             0x000000010fa0c887 _pthread_body + 0
22  libsystem_pthread.dylib             0x000000010fa0c08d thread_start + 13
originating error 0x80004005
Failed to 'hresult', HR=80004005, WebSocket connection failed
No messages to retry, closing.
Closing web socket channel
Web socket channel closed (state = 0)
CU Client connection dropped
ConnectionStateChanged
WebSocket closed unexpectedly, status: 0
Web socket channel already closed.

And It seems the UI is a little bit strange, which there is no frame for text to appear: screen shot 2017-10-10 at 1 00 06 am Could you help me with this?

michaelz-voice2sports commented 7 years ago

This happened to me as well. In my case I fixed it by resolving the object auto-layout constraints in IB because the objects were still there, however they were just being blocked or moved offscreen by other objects.

Michael

On Oct 10, 2017, at 1:01 AM, Heming Han notifications@github.com<mailto:notifications@github.com> wrote:

It gives following error when click start. It does say "language generation OK" which I think the request is successfully sent..

Sending audio stream endpoint, requestId='2817a14b-2efd-7998-e9f9-6e48a62c1340' Sent audio stream endpoint, requestId='2817a14b-2efd-7998-e9f9-6e48a62c1340' signaling OnAudioEvent(AUDIO_EVENT_RECORD_STOP) Client UPL: 27180000 ticks originating error 0x8000ffff

Main Thread Checker: UI API called on a background thread: -[UIControl isSelected] PID: 4064, TID: 128887, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21 Backtrace: 4 SpeechRecognitionServerExample 0x000000010a195ccd -[ViewController modeIndex] + 253 5 SpeechRecognitionServerExample 0x000000010a1959db -[ViewController mode] + 43 6 SpeechRecognitionServerExample 0x000000010a19792b -[ViewController onFinalResponseReceived:] + 59 7 SpeechSDK 0x000000010a48afda -[Conversation onFinalResponseReceived:] + 58 8 SpeechSDK 0x000000010a489f4b _ZN13HostCallbacks26HandleConversationResponseEiRKNSt3112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_10unique_ptrIN4Bing6Speech20INameValueCollectionENS0_14default_deleteISC_EEEE + 1125 9 SpeechSDK 0x000000010a602321 _ZN10CspWrapper26HandleConversationResponseEiRKNSt3112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_10unique_ptrIN4Bing6Speech20INameValueCollectionENS0_14default_deleteISC_EEEE + 1529 10 SpeechSDK 0x000000010a63847d _ZN14CUConversation23MessageConsumerCallBackERNSt3110unique_ptrIN4Bing6Speech8IMessageENS0_14default_deleteIS4_EEEE + 1495 11 SpeechSDK 0x000000010a648363 _ZN4Bing6Speech8CUClient13InvokeRequestERKSt6guid_tRNSt3110unique_ptrINS0_8IMessageENS5_14default_deleteIS7_EEEEb + 129 12 SpeechSDK 0x000000010a648182 _ZN4Bing6Speech8CUClient23MessageConsumerCallBackERNSt3110unique_ptrINS0_8IMessageENS2_14default_deleteIS4_EEEE + 276 13 SpeechSDK 0x000000010a651773 _ZN4Bing6Speech19WebSocketConnection17OnReceivedMessageERNSt3110unique_ptrINS0_8IMessageENS2_14default_deleteIS4_EEEE + 63 14 SpeechSDK 0x000000010a651790 _ZThn376_N4Bing6Speech19WebSocketConnection17OnReceivedMessageERNSt3110unique_ptrINS0_8IMessageENS2_14default_deleteIS4_EEEE + 16 15 SpeechSDK 0x000000010a653efe _ZN4Bing6Speech16WebSocketChannel24OnReceiveMessageCompleteERNS0_14IHttpWebSocketENS0_22WebSocketMessageFormat4TypeE + 576 16 SpeechSDK 0x000000010a66e78f _ZN9WSRequest15OnDataAvailableERN4Bing6Speech12IHttpRequestEj + 667 17 SpeechSDK 0x000000010a66d81a _ZN7Request6WorkerEv + 210 18 SpeechSDK 0x000000010a66ed0f _ZN7Request8S_WorkerEPv + 35 19 SpeechSDK 0x000000010a6760c8 _ZL7TPStartPv + 20 20 libsystem_pthread.dylib 0x000000010fa0c93b _pthread_body + 180 21 libsystem_pthread.dylib 0x000000010fa0c887 _pthread_body + 0 22 libsystem_pthread.dylib 0x000000010fa0c08d thread_start + 13 2017-10-10 00:52:14.103432-0400 SpeechRecognitionServerExample[4064:128887] [reports] Main Thread Checker: UI API called on a background thread: -[UIControl isSelected] PID: 4064, TID: 128887, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21 Backtrace: 4 SpeechRecognitionServerExample 0x000000010a195ccd -[ViewController modeIndex] + 253 5 SpeechRecognitionServerExample 0x000000010a1959db -[ViewController mode] + 43 6 SpeechRecognitionServerExample 0x000000010a19792b -[ViewController onFinalResponseReceived:] + 59 7 SpeechSDK 0x000000010a48afda -[Conversation onFinalResponseReceived:] + 58 8 SpeechSDK 0x000000010a489f4b _ZN13HostCallbacks26HandleConversationResponseEiRKNSt3112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_10unique_ptrIN4Bing6Speech20INameValueCollectionENS0_14default_deleteISC_EEEE + 1125 9 SpeechSDK 0x000000010a602321 _ZN10CspWrapper26HandleConversationResponseEiRKNSt3112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_10unique_ptrIN4Bing6Speech20INameValueCollectionENS0_14default_deleteISC_EEEE + 1529 10 SpeechSDK 0x000000010a63847d _ZN14CUConversation23MessageConsumerCallBackERNSt3110unique_ptrIN4Bing6Speech8IMessageENS0_14default_deleteIS4_EEEE + 1495 11 SpeechSDK 0x000000010a648363 _ZN4Bing6Speech8CUClient13InvokeRequestERKSt6guid_tRNSt3110unique_ptrINS0_8IMessageENS5_14default_deleteIS7_EEEEb + 129 12 SpeechSDK 0x000000010a648182 _ZN4Bing6Speech8CUClient23MessageConsumerCallBackERNSt3110unique_ptrINS0_8IMessageENS2_14default_deleteIS4_EEEE + 276 13 SpeechSDK 0x000000010a651773 _ZN4Bing6Speech19WebSocketConnection17OnReceivedMessageERNSt3__110unique_ptrINS0_8IMessageENS2_14default_deleteIS4_EEEE + 63 14 SpeechSDK 0x000000010a651790 _ZThn376_N4Bing6Speech19WebSocketConnection17OnReceivedMessageERNSt3__110unique_ptrINS0_8IMessageENS2_14default_deleteIS4_EEEE + 16 15 SpeechSDK 0x000000010a653efe _ZN4Bing6Speech16WebSocketChannel24OnReceiveMessageCompleteERNS0_14IHttpWebSocketENS0_22WebSocketMessageFormat4TypeE + 576 16 SpeechSDK 0x000000010a66e78f _ZN9WSRequest15OnDataAvailableERN4Bing6Speech12IHttpRequestEj + 667 17 SpeechSDK 0x000000010a66d81a _ZN7Request6WorkerEv + 210 18 SpeechSDK 0x000000010a66ed0f _ZN7Request8S_WorkerEPv + 35 19 SpeechSDK 0x000000010a6760c8 _ZL7TPStartPv + 20 20 libsystem_pthread.dylib 0x000000010fa0c93b _pthread_body + 180 21 libsystem_pthread.dylib 0x000000010fa0c887 _pthread_body + 0 22 libsystem_pthread.dylib 0x000000010fa0c08d thread_start + 13 originating error 0x80004005 Failed to 'hresult', HR=80004005, WebSocket connection failed No messages to retry, closing. Closing web socket channel Web socket channel closed (state = 0) CU Client connection dropped ConnectionStateChanged WebSocket closed unexpectedly, status: 0 Web socket channel already closed.

And It seems the UI is a little bit strange, which there is no frame for text to appear: [screen shot 2017-10-10 at 1 00 06 am]https://user-images.githubusercontent.com/19587399/31370022-6dd9e55e-ad56-11e7-89c8-0dbdf8357048.png Could you help me with this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Azure-Samples/Cognitive-Speech-STT-iOS/issues/35, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AaWfvmrTnTf66_xGfv4I125ia0crYujRks5sqvoWgaJpZM4PzYOD.

Realmonia commented 7 years ago

Problem solved after resolve layout problem

boooooommmmmm commented 6 years ago

Problem solved by unchecking auto layout.

rohitgadia commented 6 years ago

I am using the framework in one of our applications that needs to convert short phrased speech to text. Earlier I was on the free trial version of Azure and it was working fine. Recently I upgraded to the standard account. Ever since the account was upgraded and the API keys along with the region. I have been facing this issues. The result of the transcription is displayed in a message text box (MessageKit).

Can you help me out on this ? Because the only change was the account upgrade and key+region changes.