Я использую C# Google.Cloud.Speech.V1. NET клиентскую библиотеку версию 2.0.0 для Google Cloud Speech API .
Я хочу получить статус операции longRunningRecognize с OperationsClient :
var operationsClient = new OperationsClientBuilder { CredentialsPath = "GoogleServiceAccount.json" }.Build();
var operation = operationsClient.GetOperation("3637912932635009144");
Но я получаю это исключение:
Grpc.Core.RpcException: Status(StatusCode=Cancelled, Detail="Received http2 header with status: 404")
Я использую SpeechClient и StorageClient с учетными данными ServiceAccount (GoogleServiceAccount. json) и все работает нормально.
Я проверил операции с Google Cloud SDK Shell и тоже хорошо:
gcloud ml speech operations describe 3637912932635009144
Любая помощь будет принята с благодарностью.
Вот StackTrace:
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
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.Interceptors.InterceptingCallInvoker.<BlockingUnaryCall>b__3_0[TRequest,TResponse](TRequest req, ClientInterceptorContext`2 ctx)
at Grpc.Core.ClientBase.ClientBaseConfiguration.ClientBaseConfigurationInterceptor.BlockingUnaryCall[TRequest,TResponse](TRequest request, ClientInterceptorContext`2 context, BlockingUnaryCallContinuation`2 continuation)
at Grpc.Core.Interceptors.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request)
at Google.LongRunning.Operations.OperationsClient.GetOperation(GetOperationRequest request, CallOptions options)
at Google.Api.Gax.Grpc.ApiCall.GrpcCallAdapter`2.CallSync(TRequest request, CallSettings callSettings)
at Google.Api.Gax.Grpc.ApiCallRetryExtensions.<>c__DisplayClass1_0`2.<WithRetry>b__0(TRequest request, CallSettings callSettings)
at Google.Api.Gax.Grpc.ApiCall`2.<>c__DisplayClass10_0.<WithCallSettingsOverlay>b__1(TRequest req, CallSettings cs)
at Google.Api.Gax.Grpc.ApiCall`2.Sync(TRequest request, CallSettings perCallCallSettings)
at Google.LongRunning.OperationsClientImpl.GetOperation(GetOperationRequest request, CallSettings callSettings)
at Google.LongRunning.OperationsClient.GetOperation(String name, CallSettings callSettings)
at TranscripcionAPI.Controllers.WeatherForecastController.GetResult(String operationName) in C:\Users\andresfelipe\source\repos\TranscripcionAPI\TranscripcionAPI\TranscripcionAPI\Controllers\WeatherForecastController.cs:line 146