Class RecognizeRequest (4.26.0)

public final class RecognizeRequest extends GeneratedMessageV3 implements RecognizeRequestOrBuilder

The top-level message sent by the client for the Recognize method.

Protobuf type google.cloud.speech.v1.RecognizeRequest

Static Fields

AUDIO_FIELD_NUMBER

public static final int AUDIO_FIELD_NUMBER
Field Value
TypeDescription
int

CONFIG_FIELD_NUMBER

public static final int CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static RecognizeRequest getDefaultInstance()
Returns
TypeDescription
RecognizeRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static RecognizeRequest.Builder newBuilder()
Returns
TypeDescription
RecognizeRequest.Builder

newBuilder(RecognizeRequest prototype)

public static RecognizeRequest.Builder newBuilder(RecognizeRequest prototype)
Parameter
NameDescription
prototypeRecognizeRequest
Returns
TypeDescription
RecognizeRequest.Builder

parseDelimitedFrom(InputStream input)

public static RecognizeRequest parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
RecognizeRequest
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RecognizeRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecognizeRequest
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static RecognizeRequest parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
RecognizeRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static RecognizeRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecognizeRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static RecognizeRequest parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
RecognizeRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static RecognizeRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecognizeRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static RecognizeRequest parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
RecognizeRequest
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static RecognizeRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecognizeRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static RecognizeRequest parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
RecognizeRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RecognizeRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecognizeRequest
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static RecognizeRequest parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
RecognizeRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static RecognizeRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecognizeRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<RecognizeRequest> parser()
Returns
TypeDescription
Parser<RecognizeRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAudio()

public RecognitionAudio getAudio()

Required. The audio data to be recognized.

.google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
RecognitionAudio

The audio.

getAudioOrBuilder()

public RecognitionAudioOrBuilder getAudioOrBuilder()

Required. The audio data to be recognized.

.google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
RecognitionAudioOrBuilder

getConfig()

public RecognitionConfig getConfig()

Required. Provides information to the recognizer that specifies how to process the request.

.google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
RecognitionConfig

The config.

getConfigOrBuilder()

public RecognitionConfigOrBuilder getConfigOrBuilder()

Required. Provides information to the recognizer that specifies how to process the request.

.google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
RecognitionConfigOrBuilder

getDefaultInstanceForType()

public RecognizeRequest getDefaultInstanceForType()
Returns
TypeDescription
RecognizeRequest

getParserForType()

public Parser<RecognizeRequest> getParserForType()
Returns
TypeDescription
Parser<RecognizeRequest>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasAudio()

public boolean hasAudio()

Required. The audio data to be recognized.

.google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the audio field is set.

hasConfig()

public boolean hasConfig()

Required. Provides information to the recognizer that specifies how to process the request.

.google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the config field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public RecognizeRequest.Builder newBuilderForType()
Returns
TypeDescription
RecognizeRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected RecognizeRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
RecognizeRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public RecognizeRequest.Builder toBuilder()
Returns
TypeDescription
RecognizeRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException