public final class StreamingRecognizeRequest extends com.google.protobuf.GeneratedMessageV3 implements StreamingRecognizeRequestOrBuilder
Request message for the [StreamingRecognize][google.cloud.speech.v2.Speech.StreamingRecognize] method. Multiple [StreamingRecognizeRequest][google.cloud.speech.v2.StreamingRecognizeRequest] messages are sent in one call. If the [Recognizer][google.cloud.speech.v2.Recognizer] referenced by [recognizer][google.cloud.speech.v2.StreamingRecognizeRequest.recognizer] contains a fully specified request configuration then the stream may only contain messages with only [audio][google.cloud.speech.v2.StreamingRecognizeRequest.audio] set. Otherwise the first message must contain a [recognizer][google.cloud.speech.v2.StreamingRecognizeRequest.recognizer] and a [streaming_config][google.cloud.speech.v2.StreamingRecognizeRequest.streaming_config] message that together fully specify the request configuration and must not contain [audio][google.cloud.speech.v2.StreamingRecognizeRequest.audio]. All subsequent messages must only have [audio][google.cloud.speech.v2.StreamingRecognizeRequest.audio] set.Protobuf type
google.cloud.speech.v2.StreamingRecognizeRequest| Modifier and Type | Class and Description |
|---|---|
static class |
StreamingRecognizeRequest.Builder
Request message for the
[StreamingRecognize][google.cloud.speech.v2.Speech.StreamingRecognize]
method.
|
static class |
StreamingRecognizeRequest.StreamingRequestCase |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
AUDIO_FIELD_NUMBER |
static int |
RECOGNIZER_FIELD_NUMBER |
static int |
STREAMING_CONFIG_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
com.google.protobuf.ByteString |
getAudio()
Inline audio bytes to be Recognized.
|
static StreamingRecognizeRequest |
getDefaultInstance() |
StreamingRecognizeRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Parser<StreamingRecognizeRequest> |
getParserForType() |
String |
getRecognizer()
Required.
|
com.google.protobuf.ByteString |
getRecognizerBytes()
Required.
|
int |
getSerializedSize() |
StreamingRecognitionConfig |
getStreamingConfig()
StreamingRecognitionConfig to be used in this recognition attempt.
|
StreamingRecognitionConfigOrBuilder |
getStreamingConfigOrBuilder()
StreamingRecognitionConfig to be used in this recognition attempt.
|
StreamingRecognizeRequest.StreamingRequestCase |
getStreamingRequestCase() |
boolean |
hasAudio()
Inline audio bytes to be Recognized.
|
int |
hashCode() |
boolean |
hasStreamingConfig()
StreamingRecognitionConfig to be used in this recognition attempt.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static StreamingRecognizeRequest.Builder |
newBuilder() |
static StreamingRecognizeRequest.Builder |
newBuilder(StreamingRecognizeRequest prototype) |
StreamingRecognizeRequest.Builder |
newBuilderForType() |
protected StreamingRecognizeRequest.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static StreamingRecognizeRequest |
parseDelimitedFrom(InputStream input) |
static StreamingRecognizeRequest |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static StreamingRecognizeRequest |
parseFrom(byte[] data) |
static StreamingRecognizeRequest |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static StreamingRecognizeRequest |
parseFrom(ByteBuffer data) |
static StreamingRecognizeRequest |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static StreamingRecognizeRequest |
parseFrom(com.google.protobuf.ByteString data) |
static StreamingRecognizeRequest |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static StreamingRecognizeRequest |
parseFrom(com.google.protobuf.CodedInputStream input) |
static StreamingRecognizeRequest |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static StreamingRecognizeRequest |
parseFrom(InputStream input) |
static StreamingRecognizeRequest |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<StreamingRecognizeRequest> |
parser() |
StreamingRecognizeRequest.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int RECOGNIZER_FIELD_NUMBER
public static final int STREAMING_CONFIG_FIELD_NUMBER
public static final int AUDIO_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public StreamingRecognizeRequest.StreamingRequestCase getStreamingRequestCase()
getStreamingRequestCase in interface StreamingRecognizeRequestOrBuilderpublic String getRecognizer()
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.
string recognizer = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
getRecognizer in interface StreamingRecognizeRequestOrBuilderpublic com.google.protobuf.ByteString getRecognizerBytes()
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.
string recognizer = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
getRecognizerBytes in interface StreamingRecognizeRequestOrBuilderpublic boolean hasStreamingConfig()
StreamingRecognitionConfig to be used in this recognition attempt. If provided, it will override the default RecognitionConfig stored in the Recognizer.
.google.cloud.speech.v2.StreamingRecognitionConfig streaming_config = 6;hasStreamingConfig in interface StreamingRecognizeRequestOrBuilderpublic StreamingRecognitionConfig getStreamingConfig()
StreamingRecognitionConfig to be used in this recognition attempt. If provided, it will override the default RecognitionConfig stored in the Recognizer.
.google.cloud.speech.v2.StreamingRecognitionConfig streaming_config = 6;getStreamingConfig in interface StreamingRecognizeRequestOrBuilderpublic StreamingRecognitionConfigOrBuilder getStreamingConfigOrBuilder()
StreamingRecognitionConfig to be used in this recognition attempt. If provided, it will override the default RecognitionConfig stored in the Recognizer.
.google.cloud.speech.v2.StreamingRecognitionConfig streaming_config = 6;getStreamingConfigOrBuilder in interface StreamingRecognizeRequestOrBuilderpublic boolean hasAudio()
Inline audio bytes to be Recognized. Maximum size for this field is 15 KB per request.
bytes audio = 5;hasAudio in interface StreamingRecognizeRequestOrBuilderpublic com.google.protobuf.ByteString getAudio()
Inline audio bytes to be Recognized. Maximum size for this field is 15 KB per request.
bytes audio = 5;getAudio in interface StreamingRecognizeRequestOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static StreamingRecognizeRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static StreamingRecognizeRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static StreamingRecognizeRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static StreamingRecognizeRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static StreamingRecognizeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static StreamingRecognizeRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static StreamingRecognizeRequest parseFrom(InputStream input) throws IOException
IOExceptionpublic static StreamingRecognizeRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static StreamingRecognizeRequest parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static StreamingRecognizeRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static StreamingRecognizeRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static StreamingRecognizeRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic StreamingRecognizeRequest.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static StreamingRecognizeRequest.Builder newBuilder()
public static StreamingRecognizeRequest.Builder newBuilder(StreamingRecognizeRequest prototype)
public StreamingRecognizeRequest.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected StreamingRecognizeRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static StreamingRecognizeRequest getDefaultInstance()
public static com.google.protobuf.Parser<StreamingRecognizeRequest> parser()
public com.google.protobuf.Parser<StreamingRecognizeRequest> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public StreamingRecognizeRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.