我们正在尝试实施GRPC代理服务器(ASP.NET核心控制台应用程序),它将传入的数据代理到Google Speech streaming api。代码与sample application中的代码几乎相同。
代理服务器的目的是多语言识别和api密钥保护。
出于测试目的,我创建了Windows表单应用程序,它将可用数据(通过DataAvailable处理程序的音频块)发送到代理服务器。服务器开始识别成绩单,但经过几次识别(大约5-10)后,它就不再响应了。实际上每次从客户端调用代理服务器超时(截止日期)。
在客户端,我收到下一个例外:
Grpc.Core.RpcException: Status(StatusCode=DeadlineExceeded, Detail="Deadline Exceeded")
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Grpc.Core.Internal.AsyncCall`2.UnaryCall(TRequest msg)
at Grpc.Core.Calls.BlockingUnaryCall[TRequest,TResponse](CallInvocationDetails`2 call, TRequest req)
at Grpc.Core.DefaultCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request)
at Grpc.Core.Internal.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request)