Cloud Speech-to-Text v2 API - Class RecognizeRequest (1.0.0-beta07)

public sealed class RecognizeRequest : IMessage<RecognizeRequest>, IEquatable<RecognizeRequest>, IDeepCloneable<RecognizeRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Speech-to-Text v2 API class RecognizeRequest.

Request message for the [Recognize][google.cloud.speech.v2.Speech.Recognize] method. Either content or uri must be supplied. Supplying both or neither returns [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. See content limits.

Inheritance

object > RecognizeRequest

Namespace

Google.Cloud.Speech.V2

Assembly

Google.Cloud.Speech.V2.dll

Constructors

RecognizeRequest()

public RecognizeRequest()

RecognizeRequest(RecognizeRequest)

public RecognizeRequest(RecognizeRequest other)
Parameter
NameDescription
otherRecognizeRequest

Properties

AudioSourceCase

public RecognizeRequest.AudioSourceOneofCase AudioSourceCase { get; }
Property Value
TypeDescription
RecognizeRequestAudioSourceOneofCase

Config

public RecognitionConfig Config { get; set; }

Features and audio metadata to use for the Automatic Speech Recognition. This field in combination with the [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field can be used to override parts of the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the Recognizer resource.

Property Value
TypeDescription
RecognitionConfig

ConfigMask

public FieldMask ConfigMask { get; set; }

The list of fields in [config][google.cloud.speech.v2.RecognizeRequest.config] that override the values in the [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config] of the recognizer during this recognition request. If no mask is provided, all non-default valued fields in [config][google.cloud.speech.v2.RecognizeRequest.config] override the values in the recognizer for this recognition request. If a mask is provided, only the fields listed in the mask override the config in the recognizer for this recognition request. If a wildcard (*) is provided, [config][google.cloud.speech.v2.RecognizeRequest.config] completely overrides and replaces the config in the recognizer for this recognition request.

Property Value
TypeDescription
FieldMask

Content

public ByteString Content { get; set; }

The audio data bytes encoded as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64.

Property Value
TypeDescription
ByteString

HasContent

public bool HasContent { get; }

Gets whether the "content" field is set

Property Value
TypeDescription
bool

HasUri

public bool HasUri { get; }

Gets whether the "uri" field is set

Property Value
TypeDescription
bool

Recognizer

public string Recognizer { get; set; }

Required. The name of the Recognizer to use during recognition. The expected format is projects/{project}/locations/{location}/recognizers/{recognizer}. The {recognizer} segment may be set to _ to use an empty implicit Recognizer.

Property Value
TypeDescription
string

RecognizerAsRecognizerName

public RecognizerName RecognizerAsRecognizerName { get; set; }

RecognizerName-typed view over the Recognizer resource name property.

Property Value
TypeDescription
RecognizerName

Uri

public string Uri { get; set; }

URI that points to a file that contains audio data bytes as specified in [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file must not be compressed (for example, gzip). Currently, only Google Cloud Storage URIs are supported, which must be specified in the following format: gs://bucket_name/object_name (other URI formats return [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more information, see Request URIs.

Property Value
TypeDescription
string