public class AddAudioOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Class and Description |
---|---|
static class |
AddAudioOptions.Builder
Builder.
|
static interface |
AddAudioOptions.ContainedContentType
**For an archive-type resource,** specify the format of the audio files that are contained in
the archive file if they are of type `audio/alaw`, `audio/basic`, `audio/l16`, or
`audio/mulaw`.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.Boolean |
allowOverwrite |
protected java.lang.String |
audioName |
protected java.io.InputStream |
audioResource |
protected java.lang.String |
containedContentType |
protected java.lang.String |
contentType |
protected java.lang.String |
customizationId |
Modifier | Constructor and Description |
---|---|
protected |
AddAudioOptions(AddAudioOptions.Builder builder) |
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
allowOverwrite()
Gets the allowOverwrite.
|
java.lang.String |
audioName()
Gets the audioName.
|
java.io.InputStream |
audioResource()
Gets the audioResource.
|
java.lang.String |
containedContentType()
Gets the containedContentType.
|
java.lang.String |
contentType()
Gets the contentType.
|
java.lang.String |
customizationId()
Gets the customizationId.
|
AddAudioOptions.Builder |
newBuilder()
New builder.
|
protected java.lang.String customizationId
protected java.lang.String audioName
protected java.io.InputStream audioResource
protected java.lang.String contentType
protected java.lang.String containedContentType
protected java.lang.Boolean allowOverwrite
protected AddAudioOptions(AddAudioOptions.Builder builder)
public AddAudioOptions.Builder newBuilder()
public java.lang.String customizationId()
The customization ID (GUID) of the custom acoustic model that is to be used for the request. You must make the request with credentials for the instance of the service that owns the custom model.
public java.lang.String audioName()
The name of the new audio resource for the custom acoustic model. Use a localized name that matches the language of the custom model and reflects the contents of the resource. * Include a maximum of 128 characters in the name. * Do not use characters that need to be URL-encoded. For example, do not use spaces, slashes, backslashes, colons, ampersands, double quotes, plus signs, equals signs, questions marks, and so on in the name. (The service does not prevent the use of these characters. But because they must be URL-encoded wherever used, their use is strongly discouraged.) * Do not use the name of an audio resource that has already been added to the custom model.
public java.io.InputStream audioResource()
The audio resource that is to be added to the custom acoustic model, an individual audio file or an archive file.
With the `curl` command, use the `--data-binary` option to upload the file for the request.
public java.lang.String contentType()
For an audio-type resource, the format (MIME type) of the audio. For more information, see **Content types for audio-type resources** in the method description.
For an archive-type resource, the media type of the archive file. For more information, see **Content types for archive-type resources** in the method description.
public java.lang.String containedContentType()
**For an archive-type resource,** specify the format of the audio files that are contained in the archive file if they are of type `audio/alaw`, `audio/basic`, `audio/l16`, or `audio/mulaw`. Include the `rate`, `channels`, and `endianness` parameters where necessary. In this case, all audio files that are contained in the archive file must be of the indicated type.
For all other audio formats, you can omit the header. In this case, the audio files can be of multiple types as long as they are not of the types listed in the previous paragraph.
The parameter accepts all of the audio formats that are supported for use with speech recognition. For more information, see **Content types for audio-type resources** in the method description.
**For an audio-type resource,** omit the header.
public java.lang.Boolean allowOverwrite()
If `true`, the specified audio resource overwrites an existing audio resource with the same name. If `false`, the request fails if an audio resource with the same name already exists. The parameter has no effect if an audio resource with the same name does not already exist.