locked
Getting time-out errors from the Bing Speech API with longer utterances

    Question

  • Recently I started getting time-out errors from the Bing Speech API for WinRT with any utterance audio that is longer than a few seconds.  I'm having a hard time finding a good technical contact for that group.  Can you direct me to someone that could help?  It's really ruining the speech recognition experience in my Windows Store App, and this is the app that won the Accela Grand Prize in their recent contest, so I'm very eager to make this work.  If the utterance is short, it works reliably, but anything longer than a few seconds and the Bing Speech recognizer times out.  It never did this before.  Here's the call I to the Bing Speech API control that triggers the intermittent error:

             // Start speech recognition.
             var result = await _speechRecognizer.RecognizeSpeechToTextAsync();

    Sometimes I get the following series of Exceptions during a failed session.  Here's the thread state at the time of the failure, the current thread is the one currently executing the SetThinkingStateTimer() method:

    Not Flagged		3852	0	Main Thread	Main Thread	InspectorBuddy2.exe!InspectorBuddy2.Program.Main	Normal
    Not Flagged		5684	3	Worker Thread	<No Name>	Bing.Speech.winmd!Bing.Speech.Connection.CUConnection.Disconnect	Normal
    Not Flagged		7532	5	Worker Thread	Worker Thread		Normal
    Not Flagged	>	5164	6	Worker Thread	Worker Thread	Bing.Speech.winmd!Bing.Speech.API.NlApiOperation.SetThinkingStateTimer	Normal
    Not Flagged		3732	7	Worker Thread	<No Name>	System.dll!System.Net.TimerThread.ThreadProc	Normal
    Not Flagged		7016	0	Worker Thread	Worker Thread		Normal
    Not Flagged		7964	9	Worker Thread	Worker Thread		Normal
    Not Flagged		8632	10	Worker Thread	Worker Thread		Normal
    Not Flagged		9228	0	Worker Thread	GC Finalizer Thread		Normal
    Not Flagged		1760	0	Worker Thread	<No Name>		Normal
    Not Flagged		96	13	Worker Thread	<No Name>		Normal
    Not Flagged		7540	11	Worker Thread	Worker Thread		Normal
    Not Flagged		8672	15	Worker Thread	<No Name>		Normal
    Not Flagged		1488	16	Worker Thread	<No Name>		Normal
    Not Flagged		8536	17	Worker Thread	<No Name>		Normal
    Not Flagged		3756	19	Worker Thread	<No Name>		Normal
    Not Flagged		2760	20	Worker Thread	Worker Thread		Normal
    Not Flagged		7884	21	Worker Thread	Worker Thread		Normal
    Not Flagged		9108	22	Worker Thread	<No Name>		Normal
    Not Flagged		8940	23	Worker Thread	<No Name>		Normal
    Not Flagged		9716	24	Worker Thread	<No Name>		Normal
    Not Flagged		5136	25	Worker Thread	<No Name>	Microsoft.Bing.Platform.Logging.ClientWinRT.DLL!Microsoft.Bing.Platform.Logging.ClientWinRT.Transport.ServiceEndpointTransport.Send	Normal
    Not Flagged		6808	26	Worker Thread	<No Name>		Normal

    It begins with a TaskCanceledException from Bing Speech control:

    >	mscorlib.dll!System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task task)	Unknown
     	mscorlib.dll!System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task)	Unknown
     	mscorlib.dll!System.Runtime.CompilerServices.TaskAwaiter.GetResult()	Unknown
     	Bing.Speech.winmd!Bing.Speech.API.NlApiOperation.SetThinkingStateTimer()	Unknown
     	mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.InvokeMoveNext(object stateMachine)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
     	mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()	Unknown
     	mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.OutputAsyncCausalityEvents<System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Threading.Tasks.VoidTaskResult>>.AnonymousMethod__0()	Unknown
     	mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke()	Unknown
     	mscorlib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__0()	Unknown
     	mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke()	Unknown
     	mscorlib.dll!System.Threading.Tasks.AwaitTaskContinuation.ExecuteWorkItemHelper()	Unknown
     	mscorlib.dll!System.Threading.Tasks.AwaitTaskContinuation.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()	Unknown
     	mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch()	Unknown
     	mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()	Unknown
    


    Then a web exception occurs:

     	System.dll!System.Net.HttpWebRequest.EndGetResponse(System.IAsyncResult asyncResult) Line 2019	C#
     	System.Net.Http.dll!System.Net.Http.HttpClientHandler.GetResponseCallback(System.IAsyncResult ar)	Unknown
     	System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 415	C#
     	System.dll!System.Net.ContextAwareResult.CompleteCallback(object state) Line 471	C#
     	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	Unknown
     	System.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken) Line 465	C#
     	System.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken) Line 370	C#
     	System.dll!System.Net.HttpWebRequest.SetResponse(System.Exception E) Line 3825	C#
     	System.dll!System.Net.HttpWebRequest.SetAndOrProcessResponse(object responseOrException) Line 3577	C#
     	System.dll!System.Net.ConnectionReturnResult.SetResponses(System.Net.ConnectionReturnResult returnResult) Line 198	C#
     	System.dll!System.Net.Connection.AbortOrDisassociate(System.Net.HttpWebRequest request, System.Net.WebException webException) Line 2706	C#
     	System.dll!System.Net.HttpWebRequest.Abort(System.Exception exception, int abortState) Line 3041	C#
    >	System.dll!System.Net.HttpWebRequest.Abort() Line 3001	C#
     	System.Net.Http.dll!System.Net.Http.HttpClientHandler.OnCancel(object state)	Unknown
     	mscorlib.dll!System.Threading.CancellationCallbackInfo.ExecutionContextCallback(object obj)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	Unknown
     	mscorlib.dll!System.Threading.CancellationCallbackInfo.ExecuteCallback()	Unknown
     	mscorlib.dll!System.Threading.CancellationTokenSource.CancellationCallbackCoreWork(System.Threading.CancellationCallbackCoreWorkArguments args)	Unknown
     	mscorlib.dll!System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(bool throwOnFirstException)	Unknown
     	mscorlib.dll!System.Threading.CancellationTokenSource.NotifyCancellation(bool throwOnFirstException)	Unknown
     	mscorlib.dll!System.Threading.CancellationTokenSource.LinkedTokenCancelDelegate(object source)	Unknown
     	mscorlib.dll!System.Threading.CancellationCallbackInfo.ExecutionContextCallback(object obj)	Unknown
     	mscorlib.dll!System.Threading.CancellationCallbackInfo.ExecuteCallback()	Unknown
     	mscorlib.dll!System.Threading.CancellationTokenSource.CancellationCallbackCoreWork(System.Threading.CancellationCallbackCoreWorkArguments args)	Unknown
     	mscorlib.dll!System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(bool throwOnFirstException)	Unknown
     	mscorlib.dll!System.Threading.CancellationTokenSource.NotifyCancellation(bool throwOnFirstException)	Unknown
     	mscorlib.dll!System.Threading.CancellationTokenSource.Cancel()	Unknown
     	Microsoft.Bing.Platform.Logging.ClientWinRT.DLL!Microsoft.Bing.Platform.Logging.ClientWinRT.Transport.ServiceEndpointTransport.Send(Microsoft.Bing.Platform.Logging.Objects.LogEntry logEntry)	Unknown
     	Microsoft.Bing.Platform.Logging.ClientWinRT.DLL!Microsoft.Bing.Platform.Logging.ClientWinRT.Loggers.AsyncLoggerClient.TrySendCurrentLogEntry()	Unknown
     	Microsoft.Bing.Platform.Logging.ClientWinRT.DLL!Microsoft.Bing.Platform.Logging.ClientWinRT.Loggers.AsyncLoggerClient.DispatchLogEntry()	Unknown
     	Microsoft.Bing.Platform.Logging.ClientWinRT.DLL!Microsoft.Bing.Platform.Logging.ClientWinRT.Loggers.AsyncLoggerClient.TimerCallback(Windows.System.Threading.ThreadPoolTimer timer)	Unknown
    


    Followed by an ObjectDisposed exception:

     	System.dll!System.Net.Security.SslState.CheckThrow(bool authSucessCheck) Line 447	C#
     	System.dll!System.Net.Security.SslState.SecureStream.get() Line 382	C#
     	System.dll!System.Net.TlsStream.EndRead(System.IAsyncResult asyncResult) Line 178	C#
     	System.dll!System.Net.PooledStream.EndRead(System.IAsyncResult asyncResult) Line 545	C#
     	System.dll!System.Net.Connection.ReadCallback(System.IAsyncResult asyncResult) Line 3050	C#
     	System.dll!System.Net.Connection.ReadCallbackWrapper(System.IAsyncResult asyncResult) Line 3030	C#
     	System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 415	C#
     	System.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken) Line 370	C#
     	System.dll!System.Net.Security._SslStream.ReadFrameCallback(System.Net.AsyncProtocolRequest asyncRequest) Line 931	C#
     	System.dll!System.Net.AsyncProtocolRequest.CompleteRequest(int result) Line 142	C#
     	System.dll!System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(int bytes) Line 125	C#
     	System.dll!System.Net.FixedSizeReader.ReadCallback(System.IAsyncResult transportResult) Line 148	C#
     	System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 415	C#
     	System.dll!System.Net.ContextAwareResult.CompleteCallback(object state) Line 471	C#
     	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	Unknown
     	System.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken) Line 465	C#
     	System.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken) Line 370	C#
    >	System.dll!System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* nativeOverlapped) Line 399	C#
     	mscorlib.dll!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* pOVERLAP)	Unknown
    

    And then a TransportException:

    >	Microsoft.Bing.Platform.Logging.ClientWinRT.DLL!Microsoft.Bing.Platform.Logging.ClientWinRT.Transport.ServiceEndpointTransport.Send(Microsoft.Bing.Platform.Logging.Objects.LogEntry logEntry)	Unknown
     	Microsoft.Bing.Platform.Logging.ClientWinRT.DLL!Microsoft.Bing.Platform.Logging.ClientWinRT.Loggers.AsyncLoggerClient.TrySendCurrentLogEntry()	Unknown
     	Microsoft.Bing.Platform.Logging.ClientWinRT.DLL!Microsoft.Bing.Platform.Logging.ClientWinRT.Loggers.AsyncLoggerClient.DispatchLogEntry()	Unknown
     	Microsoft.Bing.Platform.Logging.ClientWinRT.DLL!Microsoft.Bing.Platform.Logging.ClientWinRT.Loggers.AsyncLoggerClient.TimerCallback(Windows.System.Threading.ThreadPoolTimer timer)	Unknown
    

    And then another ObjectDisposed Exception:

     	System.dll!System.Net.TlsStream.EndRead(System.IAsyncResult asyncResult) Line 200	C#
     	System.dll!System.Net.PooledStream.EndRead(System.IAsyncResult asyncResult) Line 545	C#
     	System.dll!System.Net.Connection.ReadCallback(System.IAsyncResult asyncResult) Line 3050	C#
     	System.dll!System.Net.Connection.ReadCallbackWrapper(System.IAsyncResult asyncResult) Line 3030	C#
     	System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 415	C#
     	System.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken) Line 370	C#
     	System.dll!System.Net.Security._SslStream.ReadFrameCallback(System.Net.AsyncProtocolRequest asyncRequest) Line 931	C#
     	System.dll!System.Net.AsyncProtocolRequest.CompleteRequest(int result) Line 142	C#
     	System.dll!System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(int bytes) Line 125	C#
     	System.dll!System.Net.FixedSizeReader.ReadCallback(System.IAsyncResult transportResult) Line 148	C#
     	System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 415	C#
     	System.dll!System.Net.ContextAwareResult.CompleteCallback(object state) Line 471	C#
     	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
     	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	Unknown
     	System.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken) Line 465	C#
     	System.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken) Line 370	C#
    >	System.dll!System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* nativeOverlapped) Line 399	C#
     	mscorlib.dll!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* pOVERLAP)	Unknown
    



    -- roschler


    • Edited by roschler Wednesday, September 10, 2014 8:05 PM
    Wednesday, September 10, 2014 6:30 PM

Answers

  • The general Bing forum is where you want to post:
    http://social.msdn.microsoft.com/Forums/en-US/bingdev/


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, October 3, 2014 4:53 PM
    Moderator

All replies

  • Please show me your post on the Bing forums, and I'll direct it to the right people.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, September 11, 2014 7:32 PM
    Moderator
  • I never made a post on the Bing forums.  There's a Bing forum for reporting problems with the Bing Speech API control in WinRT?  Can you give me a link to that forum?

    -- roschler

    Thursday, September 11, 2014 8:22 PM
  • The general Bing forum is where you want to post:
    http://social.msdn.microsoft.com/Forums/en-US/bingdev/


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, October 3, 2014 4:53 PM
    Moderator
  • That forum appears to have no posts so I think it's dead.

    -- roschler


    -- roschler

    Saturday, October 4, 2014 10:27 AM