languageIdSettings;
private CallAnalyticsJobSettings(BuilderImpl builder) {
this.vocabularyName = builder.vocabularyName;
this.vocabularyFilterName = builder.vocabularyFilterName;
this.vocabularyFilterMethod = builder.vocabularyFilterMethod;
this.languageModelName = builder.languageModelName;
this.contentRedaction = builder.contentRedaction;
this.languageOptions = builder.languageOptions;
this.languageIdSettings = builder.languageIdSettings;
}
/**
*
* The name of the custom vocabulary you want to include in your Call Analytics transcription request. Custom
* vocabulary names are case sensitive.
*
*
* @return The name of the custom vocabulary you want to include in your Call Analytics transcription request.
* Custom vocabulary names are case sensitive.
*/
public final String vocabularyName() {
return vocabularyName;
}
/**
*
* The name of the custom vocabulary filter you want to include in your Call Analytics transcription request. Custom
* vocabulary filter names are case sensitive.
*
*
* Note that if you include VocabularyFilterName
in your request, you must also include
* VocabularyFilterMethod
.
*
*
* @return The name of the custom vocabulary filter you want to include in your Call Analytics transcription
* request. Custom vocabulary filter names are case sensitive.
*
* Note that if you include VocabularyFilterName
in your request, you must also include
* VocabularyFilterMethod
.
*/
public final String vocabularyFilterName() {
return vocabularyFilterName;
}
/**
*
* Specify how you want your custom vocabulary filter applied to your transcript.
*
*
* To replace words with ***
, choose mask
.
*
*
* To delete words, choose remove
.
*
*
* To flag words without changing them, choose tag
.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #vocabularyFilterMethod} will return {@link VocabularyFilterMethod#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #vocabularyFilterMethodAsString}.
*
*
* @return Specify how you want your custom vocabulary filter applied to your transcript.
*
* To replace words with ***
, choose mask
.
*
*
* To delete words, choose remove
.
*
*
* To flag words without changing them, choose tag
.
* @see VocabularyFilterMethod
*/
public final VocabularyFilterMethod vocabularyFilterMethod() {
return VocabularyFilterMethod.fromValue(vocabularyFilterMethod);
}
/**
*
* Specify how you want your custom vocabulary filter applied to your transcript.
*
*
* To replace words with ***
, choose mask
.
*
*
* To delete words, choose remove
.
*
*
* To flag words without changing them, choose tag
.
*
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #vocabularyFilterMethod} will return {@link VocabularyFilterMethod#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #vocabularyFilterMethodAsString}.
*
*
* @return Specify how you want your custom vocabulary filter applied to your transcript.
*
* To replace words with ***
, choose mask
.
*
*
* To delete words, choose remove
.
*
*
* To flag words without changing them, choose tag
.
* @see VocabularyFilterMethod
*/
public final String vocabularyFilterMethodAsString() {
return vocabularyFilterMethod;
}
/**
*
* The name of the custom language model you want to use when processing your Call Analytics job. Note that custom
* language model names are case sensitive.
*
*
* The language of the specified custom language model must match the language code that you specify in your
* transcription request. If the languages don't match, the custom language model isn't applied. There are no errors
* or warnings associated with a language mismatch.
*
*
* @return The name of the custom language model you want to use when processing your Call Analytics job. Note that
* custom language model names are case sensitive.
*
* The language of the specified custom language model must match the language code that you specify in your
* transcription request. If the languages don't match, the custom language model isn't applied. There are
* no errors or warnings associated with a language mismatch.
*/
public final String languageModelName() {
return languageModelName;
}
/**
* Returns the value of the ContentRedaction property for this object.
*
* @return The value of the ContentRedaction property for this object.
*/
public final ContentRedaction contentRedaction() {
return contentRedaction;
}
/**
*
* You can specify two or more language codes that represent the languages you think may be present in your media.
* Including more than five is not recommended. If you're unsure what languages are present, do not include this
* parameter.
*
*
* Including language options can improve the accuracy of language identification.
*
*
* For a list of languages supported with Call Analytics, refer to the Supported languages table.
*
*
* To transcribe speech in Modern Standard Arabic (ar-SA
), your media file must be encoded at a sample
* rate of 16,000 Hz or higher.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasLanguageOptions} method.
*
*
* @return You can specify two or more language codes that represent the languages you think may be present in your
* media. Including more than five is not recommended. If you're unsure what languages are present, do not
* include this parameter.
*
* Including language options can improve the accuracy of language identification.
*
*
* For a list of languages supported with Call Analytics, refer to the Supported languages
* table.
*
*
* To transcribe speech in Modern Standard Arabic (ar-SA
), your media file must be encoded at a
* sample rate of 16,000 Hz or higher.
*/
public final List languageOptions() {
return LanguageOptionsCopier.copyStringToEnum(languageOptions);
}
/**
* For responses, this returns true if the service returned a value for the LanguageOptions property. This DOES NOT
* check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasLanguageOptions() {
return languageOptions != null && !(languageOptions instanceof SdkAutoConstructList);
}
/**
*
* You can specify two or more language codes that represent the languages you think may be present in your media.
* Including more than five is not recommended. If you're unsure what languages are present, do not include this
* parameter.
*
*
* Including language options can improve the accuracy of language identification.
*
*
* For a list of languages supported with Call Analytics, refer to the Supported languages table.
*
*
* To transcribe speech in Modern Standard Arabic (ar-SA
), your media file must be encoded at a sample
* rate of 16,000 Hz or higher.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasLanguageOptions} method.
*
*
* @return You can specify two or more language codes that represent the languages you think may be present in your
* media. Including more than five is not recommended. If you're unsure what languages are present, do not
* include this parameter.
*
* Including language options can improve the accuracy of language identification.
*
*
* For a list of languages supported with Call Analytics, refer to the Supported languages
* table.
*
*
* To transcribe speech in Modern Standard Arabic (ar-SA
), your media file must be encoded at a
* sample rate of 16,000 Hz or higher.
*/
public final List languageOptionsAsStrings() {
return languageOptions;
}
/**
*
* If using automatic language identification in your request and you want to apply a custom language model, a
* custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings
with the relevant
* sub-parameters (VocabularyName
, LanguageModelName
, and
* VocabularyFilterName
).
*
*
* LanguageIdSettings
supports two to five language codes. Each language code you include can have an
* associated custom language model, custom vocabulary, and custom vocabulary filter. The language codes that you
* specify must match the languages of the associated custom language models, custom vocabularies, and custom
* vocabulary filters.
*
*
* It's recommended that you include LanguageOptions
when using LanguageIdSettings
to
* ensure that the correct language dialect is identified. For example, if you specify a custom vocabulary that is
* in en-US
but Amazon Transcribe determines that the language spoken in your media is
* en-AU
, your custom vocabulary is not applied to your transcription. If you include
* LanguageOptions
and include en-US
as the only English language dialect, your custom
* vocabulary is applied to your transcription.
*
*
* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with your request
* but do not want to use automatic language identification, use instead the
*
parameter with the LanguageModelName
, VocabularyName
, or
* VocabularyFilterName
sub-parameters.
*
*
* For a list of languages supported with Call Analytics, refer to Supported languages and
* language-specific features .
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasLanguageIdSettings} method.
*
*
* @return If using automatic language identification in your request and you want to apply a custom language model,
* a custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings
with the
* relevant sub-parameters (VocabularyName
, LanguageModelName
, and
* VocabularyFilterName
).
*
* LanguageIdSettings
supports two to five language codes. Each language code you include can
* have an associated custom language model, custom vocabulary, and custom vocabulary filter. The language
* codes that you specify must match the languages of the associated custom language models, custom
* vocabularies, and custom vocabulary filters.
*
*
* It's recommended that you include LanguageOptions
when using LanguageIdSettings
* to ensure that the correct language dialect is identified. For example, if you specify a custom
* vocabulary that is in en-US
but Amazon Transcribe determines that the language spoken in
* your media is en-AU
, your custom vocabulary is not applied to your transcription. If
* you include LanguageOptions
and include en-US
as the only English language
* dialect, your custom vocabulary is applied to your transcription.
*
*
* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with your
* request but do not want to use automatic language identification, use instead the
*
parameter with the LanguageModelName
, VocabularyName
, or
* VocabularyFilterName
sub-parameters.
*
*
* For a list of languages supported with Call Analytics, refer to Supported languages and
* language-specific features .
*/
public final Map languageIdSettings() {
return LanguageIdSettingsMapCopier.copyStringToEnum(languageIdSettings);
}
/**
* For responses, this returns true if the service returned a value for the LanguageIdSettings property. This DOES
* NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasLanguageIdSettings() {
return languageIdSettings != null && !(languageIdSettings instanceof SdkAutoConstructMap);
}
/**
*
* If using automatic language identification in your request and you want to apply a custom language model, a
* custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings
with the relevant
* sub-parameters (VocabularyName
, LanguageModelName
, and
* VocabularyFilterName
).
*
*
* LanguageIdSettings
supports two to five language codes. Each language code you include can have an
* associated custom language model, custom vocabulary, and custom vocabulary filter. The language codes that you
* specify must match the languages of the associated custom language models, custom vocabularies, and custom
* vocabulary filters.
*
*
* It's recommended that you include LanguageOptions
when using LanguageIdSettings
to
* ensure that the correct language dialect is identified. For example, if you specify a custom vocabulary that is
* in en-US
but Amazon Transcribe determines that the language spoken in your media is
* en-AU
, your custom vocabulary is not applied to your transcription. If you include
* LanguageOptions
and include en-US
as the only English language dialect, your custom
* vocabulary is applied to your transcription.
*
*
* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with your request
* but do not want to use automatic language identification, use instead the
*
parameter with the LanguageModelName
, VocabularyName
, or
* VocabularyFilterName
sub-parameters.
*
*
* For a list of languages supported with Call Analytics, refer to Supported languages and
* language-specific features .
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasLanguageIdSettings} method.
*
*
* @return If using automatic language identification in your request and you want to apply a custom language model,
* a custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings
with the
* relevant sub-parameters (VocabularyName
, LanguageModelName
, and
* VocabularyFilterName
).
*
* LanguageIdSettings
supports two to five language codes. Each language code you include can
* have an associated custom language model, custom vocabulary, and custom vocabulary filter. The language
* codes that you specify must match the languages of the associated custom language models, custom
* vocabularies, and custom vocabulary filters.
*
*
* It's recommended that you include LanguageOptions
when using LanguageIdSettings
* to ensure that the correct language dialect is identified. For example, if you specify a custom
* vocabulary that is in en-US
but Amazon Transcribe determines that the language spoken in
* your media is en-AU
, your custom vocabulary is not applied to your transcription. If
* you include LanguageOptions
and include en-US
as the only English language
* dialect, your custom vocabulary is applied to your transcription.
*
*
* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with your
* request but do not want to use automatic language identification, use instead the
*
parameter with the LanguageModelName
, VocabularyName
, or
* VocabularyFilterName
sub-parameters.
*
*
* For a list of languages supported with Call Analytics, refer to Supported languages and
* language-specific features .
*/
public final Map languageIdSettingsAsStrings() {
return languageIdSettings;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(vocabularyName());
hashCode = 31 * hashCode + Objects.hashCode(vocabularyFilterName());
hashCode = 31 * hashCode + Objects.hashCode(vocabularyFilterMethodAsString());
hashCode = 31 * hashCode + Objects.hashCode(languageModelName());
hashCode = 31 * hashCode + Objects.hashCode(contentRedaction());
hashCode = 31 * hashCode + Objects.hashCode(hasLanguageOptions() ? languageOptionsAsStrings() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasLanguageIdSettings() ? languageIdSettingsAsStrings() : null);
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof CallAnalyticsJobSettings)) {
return false;
}
CallAnalyticsJobSettings other = (CallAnalyticsJobSettings) obj;
return Objects.equals(vocabularyName(), other.vocabularyName())
&& Objects.equals(vocabularyFilterName(), other.vocabularyFilterName())
&& Objects.equals(vocabularyFilterMethodAsString(), other.vocabularyFilterMethodAsString())
&& Objects.equals(languageModelName(), other.languageModelName())
&& Objects.equals(contentRedaction(), other.contentRedaction())
&& hasLanguageOptions() == other.hasLanguageOptions()
&& Objects.equals(languageOptionsAsStrings(), other.languageOptionsAsStrings())
&& hasLanguageIdSettings() == other.hasLanguageIdSettings()
&& Objects.equals(languageIdSettingsAsStrings(), other.languageIdSettingsAsStrings());
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*/
@Override
public final String toString() {
return ToString.builder("CallAnalyticsJobSettings").add("VocabularyName", vocabularyName())
.add("VocabularyFilterName", vocabularyFilterName())
.add("VocabularyFilterMethod", vocabularyFilterMethodAsString()).add("LanguageModelName", languageModelName())
.add("ContentRedaction", contentRedaction())
.add("LanguageOptions", hasLanguageOptions() ? languageOptionsAsStrings() : null)
.add("LanguageIdSettings", hasLanguageIdSettings() ? languageIdSettingsAsStrings() : null).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "VocabularyName":
return Optional.ofNullable(clazz.cast(vocabularyName()));
case "VocabularyFilterName":
return Optional.ofNullable(clazz.cast(vocabularyFilterName()));
case "VocabularyFilterMethod":
return Optional.ofNullable(clazz.cast(vocabularyFilterMethodAsString()));
case "LanguageModelName":
return Optional.ofNullable(clazz.cast(languageModelName()));
case "ContentRedaction":
return Optional.ofNullable(clazz.cast(contentRedaction()));
case "LanguageOptions":
return Optional.ofNullable(clazz.cast(languageOptionsAsStrings()));
case "LanguageIdSettings":
return Optional.ofNullable(clazz.cast(languageIdSettingsAsStrings()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((CallAnalyticsJobSettings) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends SdkPojo, CopyableBuilder {
/**
*
* The name of the custom vocabulary you want to include in your Call Analytics transcription request. Custom
* vocabulary names are case sensitive.
*
*
* @param vocabularyName
* The name of the custom vocabulary you want to include in your Call Analytics transcription request.
* Custom vocabulary names are case sensitive.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder vocabularyName(String vocabularyName);
/**
*
* The name of the custom vocabulary filter you want to include in your Call Analytics transcription request.
* Custom vocabulary filter names are case sensitive.
*
*
* Note that if you include VocabularyFilterName
in your request, you must also include
* VocabularyFilterMethod
.
*
*
* @param vocabularyFilterName
* The name of the custom vocabulary filter you want to include in your Call Analytics transcription
* request. Custom vocabulary filter names are case sensitive.
*
* Note that if you include VocabularyFilterName
in your request, you must also include
* VocabularyFilterMethod
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder vocabularyFilterName(String vocabularyFilterName);
/**
*
* Specify how you want your custom vocabulary filter applied to your transcript.
*
*
* To replace words with ***
, choose mask
.
*
*
* To delete words, choose remove
.
*
*
* To flag words without changing them, choose tag
.
*
*
* @param vocabularyFilterMethod
* Specify how you want your custom vocabulary filter applied to your transcript.
*
* To replace words with ***
, choose mask
.
*
*
* To delete words, choose remove
.
*
*
* To flag words without changing them, choose tag
.
* @see VocabularyFilterMethod
* @return Returns a reference to this object so that method calls can be chained together.
* @see VocabularyFilterMethod
*/
Builder vocabularyFilterMethod(String vocabularyFilterMethod);
/**
*
* Specify how you want your custom vocabulary filter applied to your transcript.
*
*
* To replace words with ***
, choose mask
.
*
*
* To delete words, choose remove
.
*
*
* To flag words without changing them, choose tag
.
*
*
* @param vocabularyFilterMethod
* Specify how you want your custom vocabulary filter applied to your transcript.
*
* To replace words with ***
, choose mask
.
*
*
* To delete words, choose remove
.
*
*
* To flag words without changing them, choose tag
.
* @see VocabularyFilterMethod
* @return Returns a reference to this object so that method calls can be chained together.
* @see VocabularyFilterMethod
*/
Builder vocabularyFilterMethod(VocabularyFilterMethod vocabularyFilterMethod);
/**
*
* The name of the custom language model you want to use when processing your Call Analytics job. Note that
* custom language model names are case sensitive.
*
*
* The language of the specified custom language model must match the language code that you specify in your
* transcription request. If the languages don't match, the custom language model isn't applied. There are no
* errors or warnings associated with a language mismatch.
*
*
* @param languageModelName
* The name of the custom language model you want to use when processing your Call Analytics job. Note
* that custom language model names are case sensitive.
*
* The language of the specified custom language model must match the language code that you specify in
* your transcription request. If the languages don't match, the custom language model isn't applied.
* There are no errors or warnings associated with a language mismatch.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder languageModelName(String languageModelName);
/**
* Sets the value of the ContentRedaction property for this object.
*
* @param contentRedaction
* The new value for the ContentRedaction property for this object.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder contentRedaction(ContentRedaction contentRedaction);
/**
* Sets the value of the ContentRedaction property for this object.
*
* This is a convenience method that creates an instance of the {@link ContentRedaction.Builder} avoiding the
* need to create one manually via {@link ContentRedaction#builder()}.
*
*
* When the {@link Consumer} completes, {@link ContentRedaction.Builder#build()} is called immediately and its
* result is passed to {@link #contentRedaction(ContentRedaction)}.
*
* @param contentRedaction
* a consumer that will call methods on {@link ContentRedaction.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #contentRedaction(ContentRedaction)
*/
default Builder contentRedaction(Consumer contentRedaction) {
return contentRedaction(ContentRedaction.builder().applyMutation(contentRedaction).build());
}
/**
*
* You can specify two or more language codes that represent the languages you think may be present in your
* media. Including more than five is not recommended. If you're unsure what languages are present, do not
* include this parameter.
*
*
* Including language options can improve the accuracy of language identification.
*
*
* For a list of languages supported with Call Analytics, refer to the Supported languages
* table.
*
*
* To transcribe speech in Modern Standard Arabic (ar-SA
), your media file must be encoded at a
* sample rate of 16,000 Hz or higher.
*
*
* @param languageOptions
* You can specify two or more language codes that represent the languages you think may be present in
* your media. Including more than five is not recommended. If you're unsure what languages are present,
* do not include this parameter.
*
* Including language options can improve the accuracy of language identification.
*
*
* For a list of languages supported with Call Analytics, refer to the Supported
* languages table.
*
*
* To transcribe speech in Modern Standard Arabic (ar-SA
), your media file must be encoded
* at a sample rate of 16,000 Hz or higher.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder languageOptionsWithStrings(Collection languageOptions);
/**
*
* You can specify two or more language codes that represent the languages you think may be present in your
* media. Including more than five is not recommended. If you're unsure what languages are present, do not
* include this parameter.
*
*
* Including language options can improve the accuracy of language identification.
*
*
* For a list of languages supported with Call Analytics, refer to the Supported languages
* table.
*
*
* To transcribe speech in Modern Standard Arabic (ar-SA
), your media file must be encoded at a
* sample rate of 16,000 Hz or higher.
*
*
* @param languageOptions
* You can specify two or more language codes that represent the languages you think may be present in
* your media. Including more than five is not recommended. If you're unsure what languages are present,
* do not include this parameter.
*
* Including language options can improve the accuracy of language identification.
*
*
* For a list of languages supported with Call Analytics, refer to the Supported
* languages table.
*
*
* To transcribe speech in Modern Standard Arabic (ar-SA
), your media file must be encoded
* at a sample rate of 16,000 Hz or higher.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder languageOptionsWithStrings(String... languageOptions);
/**
*
* You can specify two or more language codes that represent the languages you think may be present in your
* media. Including more than five is not recommended. If you're unsure what languages are present, do not
* include this parameter.
*
*
* Including language options can improve the accuracy of language identification.
*
*
* For a list of languages supported with Call Analytics, refer to the Supported languages
* table.
*
*
* To transcribe speech in Modern Standard Arabic (ar-SA
), your media file must be encoded at a
* sample rate of 16,000 Hz or higher.
*
*
* @param languageOptions
* You can specify two or more language codes that represent the languages you think may be present in
* your media. Including more than five is not recommended. If you're unsure what languages are present,
* do not include this parameter.
*
* Including language options can improve the accuracy of language identification.
*
*
* For a list of languages supported with Call Analytics, refer to the Supported
* languages table.
*
*
* To transcribe speech in Modern Standard Arabic (ar-SA
), your media file must be encoded
* at a sample rate of 16,000 Hz or higher.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder languageOptions(Collection languageOptions);
/**
*
* You can specify two or more language codes that represent the languages you think may be present in your
* media. Including more than five is not recommended. If you're unsure what languages are present, do not
* include this parameter.
*
*
* Including language options can improve the accuracy of language identification.
*
*
* For a list of languages supported with Call Analytics, refer to the Supported languages
* table.
*
*
* To transcribe speech in Modern Standard Arabic (ar-SA
), your media file must be encoded at a
* sample rate of 16,000 Hz or higher.
*
*
* @param languageOptions
* You can specify two or more language codes that represent the languages you think may be present in
* your media. Including more than five is not recommended. If you're unsure what languages are present,
* do not include this parameter.
*
* Including language options can improve the accuracy of language identification.
*
*
* For a list of languages supported with Call Analytics, refer to the Supported
* languages table.
*
*
* To transcribe speech in Modern Standard Arabic (ar-SA
), your media file must be encoded
* at a sample rate of 16,000 Hz or higher.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder languageOptions(LanguageCode... languageOptions);
/**
*
* If using automatic language identification in your request and you want to apply a custom language model, a
* custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings
with the relevant
* sub-parameters (VocabularyName
, LanguageModelName
, and
* VocabularyFilterName
).
*
*
* LanguageIdSettings
supports two to five language codes. Each language code you include can have
* an associated custom language model, custom vocabulary, and custom vocabulary filter. The language codes that
* you specify must match the languages of the associated custom language models, custom vocabularies, and
* custom vocabulary filters.
*
*
* It's recommended that you include LanguageOptions
when using LanguageIdSettings
to
* ensure that the correct language dialect is identified. For example, if you specify a custom vocabulary that
* is in en-US
but Amazon Transcribe determines that the language spoken in your media is
* en-AU
, your custom vocabulary is not applied to your transcription. If you include
* LanguageOptions
and include en-US
as the only English language dialect, your custom
* vocabulary is applied to your transcription.
*
*
* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with your
* request but do not want to use automatic language identification, use instead the
*
parameter with the LanguageModelName
, VocabularyName
, or
* VocabularyFilterName
sub-parameters.
*
*
* For a list of languages supported with Call Analytics, refer to Supported languages and
* language-specific features .
*
*
* @param languageIdSettings
* If using automatic language identification in your request and you want to apply a custom language
* model, a custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings
* with the relevant sub-parameters (VocabularyName
, LanguageModelName
, and
* VocabularyFilterName
).
*
* LanguageIdSettings
supports two to five language codes. Each language code you include
* can have an associated custom language model, custom vocabulary, and custom vocabulary filter. The
* language codes that you specify must match the languages of the associated custom language models,
* custom vocabularies, and custom vocabulary filters.
*
*
* It's recommended that you include LanguageOptions
when using
* LanguageIdSettings
to ensure that the correct language dialect is identified. For
* example, if you specify a custom vocabulary that is in en-US
but Amazon Transcribe
* determines that the language spoken in your media is en-AU
, your custom vocabulary is
* not applied to your transcription. If you include LanguageOptions
and include
* en-US
as the only English language dialect, your custom vocabulary is applied to
* your transcription.
*
*
* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with
* your request but do not want to use automatic language identification, use instead the
*
parameter with the LanguageModelName
, VocabularyName
, or
* VocabularyFilterName
sub-parameters.
*
*
* For a list of languages supported with Call Analytics, refer to Supported languages
* and language-specific features .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder languageIdSettingsWithStrings(Map languageIdSettings);
/**
*
* If using automatic language identification in your request and you want to apply a custom language model, a
* custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings
with the relevant
* sub-parameters (VocabularyName
, LanguageModelName
, and
* VocabularyFilterName
).
*
*
* LanguageIdSettings
supports two to five language codes. Each language code you include can have
* an associated custom language model, custom vocabulary, and custom vocabulary filter. The language codes that
* you specify must match the languages of the associated custom language models, custom vocabularies, and
* custom vocabulary filters.
*
*
* It's recommended that you include LanguageOptions
when using LanguageIdSettings
to
* ensure that the correct language dialect is identified. For example, if you specify a custom vocabulary that
* is in en-US
but Amazon Transcribe determines that the language spoken in your media is
* en-AU
, your custom vocabulary is not applied to your transcription. If you include
* LanguageOptions
and include en-US
as the only English language dialect, your custom
* vocabulary is applied to your transcription.
*
*
* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with your
* request but do not want to use automatic language identification, use instead the
*
parameter with the LanguageModelName
, VocabularyName
, or
* VocabularyFilterName
sub-parameters.
*
*
* For a list of languages supported with Call Analytics, refer to Supported languages and
* language-specific features .
*
*
* @param languageIdSettings
* If using automatic language identification in your request and you want to apply a custom language
* model, a custom vocabulary, or a custom vocabulary filter, include LanguageIdSettings
* with the relevant sub-parameters (VocabularyName
, LanguageModelName
, and
* VocabularyFilterName
).
*
* LanguageIdSettings
supports two to five language codes. Each language code you include
* can have an associated custom language model, custom vocabulary, and custom vocabulary filter. The
* language codes that you specify must match the languages of the associated custom language models,
* custom vocabularies, and custom vocabulary filters.
*
*
* It's recommended that you include LanguageOptions
when using
* LanguageIdSettings
to ensure that the correct language dialect is identified. For
* example, if you specify a custom vocabulary that is in en-US
but Amazon Transcribe
* determines that the language spoken in your media is en-AU
, your custom vocabulary is
* not applied to your transcription. If you include LanguageOptions
and include
* en-US
as the only English language dialect, your custom vocabulary is applied to
* your transcription.
*
*
* If you want to include a custom language model, custom vocabulary, or custom vocabulary filter with
* your request but do not want to use automatic language identification, use instead the
*
parameter with the LanguageModelName
, VocabularyName
, or
* VocabularyFilterName
sub-parameters.
*
*
* For a list of languages supported with Call Analytics, refer to Supported languages
* and language-specific features .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder languageIdSettings(Map languageIdSettings);
}
static final class BuilderImpl implements Builder {
private String vocabularyName;
private String vocabularyFilterName;
private String vocabularyFilterMethod;
private String languageModelName;
private ContentRedaction contentRedaction;
private List languageOptions = DefaultSdkAutoConstructList.getInstance();
private Map languageIdSettings = DefaultSdkAutoConstructMap.getInstance();
private BuilderImpl() {
}
private BuilderImpl(CallAnalyticsJobSettings model) {
vocabularyName(model.vocabularyName);
vocabularyFilterName(model.vocabularyFilterName);
vocabularyFilterMethod(model.vocabularyFilterMethod);
languageModelName(model.languageModelName);
contentRedaction(model.contentRedaction);
languageOptionsWithStrings(model.languageOptions);
languageIdSettingsWithStrings(model.languageIdSettings);
}
public final String getVocabularyName() {
return vocabularyName;
}
public final void setVocabularyName(String vocabularyName) {
this.vocabularyName = vocabularyName;
}
@Override
public final Builder vocabularyName(String vocabularyName) {
this.vocabularyName = vocabularyName;
return this;
}
public final String getVocabularyFilterName() {
return vocabularyFilterName;
}
public final void setVocabularyFilterName(String vocabularyFilterName) {
this.vocabularyFilterName = vocabularyFilterName;
}
@Override
public final Builder vocabularyFilterName(String vocabularyFilterName) {
this.vocabularyFilterName = vocabularyFilterName;
return this;
}
public final String getVocabularyFilterMethod() {
return vocabularyFilterMethod;
}
public final void setVocabularyFilterMethod(String vocabularyFilterMethod) {
this.vocabularyFilterMethod = vocabularyFilterMethod;
}
@Override
public final Builder vocabularyFilterMethod(String vocabularyFilterMethod) {
this.vocabularyFilterMethod = vocabularyFilterMethod;
return this;
}
@Override
public final Builder vocabularyFilterMethod(VocabularyFilterMethod vocabularyFilterMethod) {
this.vocabularyFilterMethod(vocabularyFilterMethod == null ? null : vocabularyFilterMethod.toString());
return this;
}
public final String getLanguageModelName() {
return languageModelName;
}
public final void setLanguageModelName(String languageModelName) {
this.languageModelName = languageModelName;
}
@Override
public final Builder languageModelName(String languageModelName) {
this.languageModelName = languageModelName;
return this;
}
public final ContentRedaction.Builder getContentRedaction() {
return contentRedaction != null ? contentRedaction.toBuilder() : null;
}
public final void setContentRedaction(ContentRedaction.BuilderImpl contentRedaction) {
this.contentRedaction = contentRedaction != null ? contentRedaction.build() : null;
}
@Override
public final Builder contentRedaction(ContentRedaction contentRedaction) {
this.contentRedaction = contentRedaction;
return this;
}
public final Collection getLanguageOptions() {
if (languageOptions instanceof SdkAutoConstructList) {
return null;
}
return languageOptions;
}
public final void setLanguageOptions(Collection languageOptions) {
this.languageOptions = LanguageOptionsCopier.copy(languageOptions);
}
@Override
public final Builder languageOptionsWithStrings(Collection languageOptions) {
this.languageOptions = LanguageOptionsCopier.copy(languageOptions);
return this;
}
@Override
@SafeVarargs
public final Builder languageOptionsWithStrings(String... languageOptions) {
languageOptionsWithStrings(Arrays.asList(languageOptions));
return this;
}
@Override
public final Builder languageOptions(Collection languageOptions) {
this.languageOptions = LanguageOptionsCopier.copyEnumToString(languageOptions);
return this;
}
@Override
@SafeVarargs
public final Builder languageOptions(LanguageCode... languageOptions) {
languageOptions(Arrays.asList(languageOptions));
return this;
}
public final Map getLanguageIdSettings() {
Map result = LanguageIdSettingsMapCopier.copyToBuilder(this.languageIdSettings);
if (result instanceof SdkAutoConstructMap) {
return null;
}
return result;
}
public final void setLanguageIdSettings(Map languageIdSettings) {
this.languageIdSettings = LanguageIdSettingsMapCopier.copyFromBuilder(languageIdSettings);
}
@Override
public final Builder languageIdSettingsWithStrings(Map languageIdSettings) {
this.languageIdSettings = LanguageIdSettingsMapCopier.copy(languageIdSettings);
return this;
}
@Override
public final Builder languageIdSettings(Map languageIdSettings) {
this.languageIdSettings = LanguageIdSettingsMapCopier.copyEnumToString(languageIdSettings);
return this;
}
@Override
public CallAnalyticsJobSettings build() {
return new CallAnalyticsJobSettings(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}