public static final class RecognitionAudio.Builder extends GeneratedMessageV3.Builder<RecognitionAudio.Builder> implements RecognitionAudioOrBuilder
Contains audio data in the encoding specified in the RecognitionConfig
.
Either content
or uri
must be supplied. Supplying both or neither
returns google.rpc.Code.INVALID_ARGUMENT.
See content limits.
Protobuf type google.cloud.speech.v1.RecognitionAudio
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public RecognitionAudio.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public RecognitionAudio build()
buildPartial()
public RecognitionAudio buildPartial()
clear()
public RecognitionAudio.Builder clear()
Overrides
clearAudioSource()
public RecognitionAudio.Builder clearAudioSource()
clearContent()
public RecognitionAudio.Builder clearContent()
The audio data bytes encoded as specified in
RecognitionConfig
. Note: as with all bytes fields, proto buffers use a
pure binary representation, whereas JSON representations use base64.
bytes content = 1;
clearField(Descriptors.FieldDescriptor field)
public RecognitionAudio.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public RecognitionAudio.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearUri()
public RecognitionAudio.Builder clearUri()
URI that points to a file that contains audio data bytes as specified in
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
google.rpc.Code.INVALID_ARGUMENT).
For more information, see Request
URIs.
string uri = 2;
clone()
public RecognitionAudio.Builder clone()
Overrides
getAudioSourceCase()
public RecognitionAudio.AudioSourceCase getAudioSourceCase()
getContent()
public ByteString getContent()
The audio data bytes encoded as specified in
RecognitionConfig
. Note: as with all bytes fields, proto buffers use a
pure binary representation, whereas JSON representations use base64.
bytes content = 1;
getDefaultInstanceForType()
public RecognitionAudio getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getUri()
URI that points to a file that contains audio data bytes as specified in
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
google.rpc.Code.INVALID_ARGUMENT).
For more information, see Request
URIs.
string uri = 2;
Returns |
Type |
Description |
String |
The uri.
|
getUriBytes()
public ByteString getUriBytes()
URI that points to a file that contains audio data bytes as specified in
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
google.rpc.Code.INVALID_ARGUMENT).
For more information, see Request
URIs.
string uri = 2;
Returns |
Type |
Description |
ByteString |
The bytes for uri.
|
hasContent()
public boolean hasContent()
The audio data bytes encoded as specified in
RecognitionConfig
. Note: as with all bytes fields, proto buffers use a
pure binary representation, whereas JSON representations use base64.
bytes content = 1;
Returns |
Type |
Description |
boolean |
Whether the content field is set.
|
hasUri()
URI that points to a file that contains audio data bytes as specified in
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
google.rpc.Code.INVALID_ARGUMENT).
For more information, see Request
URIs.
string uri = 2;
Returns |
Type |
Description |
boolean |
Whether the uri field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(RecognitionAudio other)
public RecognitionAudio.Builder mergeFrom(RecognitionAudio other)
public RecognitionAudio.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public RecognitionAudio.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final RecognitionAudio.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setContent(ByteString value)
public RecognitionAudio.Builder setContent(ByteString value)
The audio data bytes encoded as specified in
RecognitionConfig
. Note: as with all bytes fields, proto buffers use a
pure binary representation, whereas JSON representations use base64.
bytes content = 1;
Parameter |
Name |
Description |
value |
ByteString
The content to set.
|
setField(Descriptors.FieldDescriptor field, Object value)
public RecognitionAudio.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public RecognitionAudio.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final RecognitionAudio.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides
setUri(String value)
public RecognitionAudio.Builder setUri(String value)
URI that points to a file that contains audio data bytes as specified in
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
google.rpc.Code.INVALID_ARGUMENT).
For more information, see Request
URIs.
string uri = 2;
Parameter |
Name |
Description |
value |
String
The uri to set.
|
setUriBytes(ByteString value)
public RecognitionAudio.Builder setUriBytes(ByteString value)
URI that points to a file that contains audio data bytes as specified in
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
google.rpc.Code.INVALID_ARGUMENT).
For more information, see Request
URIs.
string uri = 2;
Parameter |
Name |
Description |
value |
ByteString
The bytes for uri to set.
|