/// <summary> /// Performs asynchronous speech recognition: receive results via the /// google.longrunning.Operations interface. Returns either an /// `Operation.error` or an `Operation.response` which contains /// a `LongRunningRecognizeResponse` message. /// </summary> /// <param name="config"> /// *Required* Provides information to the recognizer that specifies how to /// process the request. /// </param> /// <param name="audio"> /// *Required* The audio data to be recognized. /// </param> /// <param name="cancellationToken"> /// A <see cref="st::CancellationToken"/> to use for this RPC. /// </param> /// <returns> /// A Task containing the RPC response. /// </returns> public virtual stt::Task <lro::Operation <LongRunningRecognizeResponse, LongRunningRecognizeMetadata> > LongRunningRecognizeAsync( RecognitionConfig config, RecognitionAudio audio, st::CancellationToken cancellationToken) => LongRunningRecognizeAsync( config, audio, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary> /// Performs synchronous speech recognition: receive results after all audio /// has been sent and processed. /// </summary> /// <param name="config"> /// *Required* Provides information to the recognizer that specifies how to /// process the request. /// </param> /// <param name="audio"> /// *Required* The audio data to be recognized. /// </param> /// <param name="cancellationToken"> /// A <see cref="st::CancellationToken"/> to use for this RPC. /// </param> /// <returns> /// A Task containing the RPC response. /// </returns> public virtual stt::Task <RecognizeResponse> RecognizeAsync( RecognitionConfig config, RecognitionAudio audio, st::CancellationToken cancellationToken) => RecognizeAsync( config, audio, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary> /// Performs asynchronous speech recognition: receive results via the /// google.longrunning.Operations interface. Returns either an /// `Operation.error` or an `Operation.response` which contains /// a `LongRunningRecognizeResponse` message. /// </summary> /// <param name="config"> /// *Required* Provides information to the recognizer that specifies how to /// process the request. /// </param> /// <param name="audio"> /// *Required* The audio data to be recognized. /// </param> /// <param name="callSettings"> /// If not null, applies overrides to this RPC call. /// </param> /// <returns> /// The RPC response. /// </returns> public virtual lro::Operation <LongRunningRecognizeResponse, LongRunningRecognizeMetadata> LongRunningRecognize( RecognitionConfig config, RecognitionAudio audio, gaxgrpc::CallSettings callSettings = null) => LongRunningRecognize( new LongRunningRecognizeRequest { Config = gax::GaxPreconditions.CheckNotNull(config, nameof(config)), Audio = gax::GaxPreconditions.CheckNotNull(audio, nameof(audio)), }, callSettings);
/// <summary> /// Performs synchronous speech recognition: receive results after all audio /// has been sent and processed. /// </summary> /// <param name="config"> /// *Required* Provides information to the recognizer that specifies how to /// process the request. /// </param> /// <param name="audio"> /// *Required* The audio data to be recognized. /// </param> /// <param name="callSettings"> /// If not null, applies overrides to this RPC call. /// </param> /// <returns> /// The RPC response. /// </returns> public virtual RecognizeResponse Recognize( RecognitionConfig config, RecognitionAudio audio, gaxgrpc::CallSettings callSettings = null) => Recognize( new RecognizeRequest { Config = gax::GaxPreconditions.CheckNotNull(config, nameof(config)), Audio = gax::GaxPreconditions.CheckNotNull(audio, nameof(audio)), }, callSettings);