All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.polly.model.SynthesisTask Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Polly module holds the client classes that are used for communicating with Amazon Polly.

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.polly.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* SynthesisTask object that provides information about a speech synthesis task. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SynthesisTask implements Serializable, Cloneable, StructuredPojo { /** *

* Specifies the engine (standard, neural, long-form or * generative) for Amazon Polly to use when processing input text for speech synthesis. Using a voice * that is not supported for the engine selected will result in an error. *

*/ private String engine; /** *

* The Amazon Polly generated identifier for a speech synthesis task. *

*/ private String taskId; /** *

* Current status of the individual speech synthesis task. *

*/ private String taskStatus; /** *

* Reason for the current status of a specific speech synthesis task, including errors if the task has failed. *

*/ private String taskStatusReason; /** *

* Pathway for the output speech file. *

*/ private String outputUri; /** *

* Timestamp for the time the synthesis task was started. *

*/ private java.util.Date creationTime; /** *

* Number of billable characters synthesized. *

*/ private Integer requestCharacters; /** *

* ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. *

*/ private String snsTopicArn; /** *

* List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are * applied only if the language of the lexicon is the same as the language of the voice. *

*/ private java.util.List lexiconNames; /** *

* The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. * For speech marks, this will be json. *

*/ private String outputFormat; /** *

* The audio frequency specified in Hz. *

*

* The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for standard * voices is "22050". The default value for neural voices is "24000". The default value for long-form voices is * "24000". The default value for generative voices is "24000". *

*

* Valid values for pcm are "8000" and "16000" The default value is "16000". *

*/ private String sampleRate; /** *

* The type of speech marks returned for the input text. *

*/ private java.util.List speechMarkTypes; /** *

* Specifies whether the input text is plain text or SSML. The default value is plain text. *

*/ private String textType; /** *

* Voice ID to use for the synthesis. *

*/ private String voiceId; /** *

* Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, * which can be used for either Indian English (en-IN) or Hindi (hi-IN). *

*

* If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of the * bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the * LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English * rather than Hindi. *

*/ private String languageCode; /** *

* Specifies the engine (standard, neural, long-form or * generative) for Amazon Polly to use when processing input text for speech synthesis. Using a voice * that is not supported for the engine selected will result in an error. *

* * @param engine * Specifies the engine (standard, neural, long-form or * generative) for Amazon Polly to use when processing input text for speech synthesis. Using a * voice that is not supported for the engine selected will result in an error. * @see Engine */ public void setEngine(String engine) { this.engine = engine; } /** *

* Specifies the engine (standard, neural, long-form or * generative) for Amazon Polly to use when processing input text for speech synthesis. Using a voice * that is not supported for the engine selected will result in an error. *

* * @return Specifies the engine (standard, neural, long-form or * generative) for Amazon Polly to use when processing input text for speech synthesis. Using a * voice that is not supported for the engine selected will result in an error. * @see Engine */ public String getEngine() { return this.engine; } /** *

* Specifies the engine (standard, neural, long-form or * generative) for Amazon Polly to use when processing input text for speech synthesis. Using a voice * that is not supported for the engine selected will result in an error. *

* * @param engine * Specifies the engine (standard, neural, long-form or * generative) for Amazon Polly to use when processing input text for speech synthesis. Using a * voice that is not supported for the engine selected will result in an error. * @return Returns a reference to this object so that method calls can be chained together. * @see Engine */ public SynthesisTask withEngine(String engine) { setEngine(engine); return this; } /** *

* Specifies the engine (standard, neural, long-form or * generative) for Amazon Polly to use when processing input text for speech synthesis. Using a voice * that is not supported for the engine selected will result in an error. *

* * @param engine * Specifies the engine (standard, neural, long-form or * generative) for Amazon Polly to use when processing input text for speech synthesis. Using a * voice that is not supported for the engine selected will result in an error. * @return Returns a reference to this object so that method calls can be chained together. * @see Engine */ public SynthesisTask withEngine(Engine engine) { this.engine = engine.toString(); return this; } /** *

* The Amazon Polly generated identifier for a speech synthesis task. *

* * @param taskId * The Amazon Polly generated identifier for a speech synthesis task. */ public void setTaskId(String taskId) { this.taskId = taskId; } /** *

* The Amazon Polly generated identifier for a speech synthesis task. *

* * @return The Amazon Polly generated identifier for a speech synthesis task. */ public String getTaskId() { return this.taskId; } /** *

* The Amazon Polly generated identifier for a speech synthesis task. *

* * @param taskId * The Amazon Polly generated identifier for a speech synthesis task. * @return Returns a reference to this object so that method calls can be chained together. */ public SynthesisTask withTaskId(String taskId) { setTaskId(taskId); return this; } /** *

* Current status of the individual speech synthesis task. *

* * @param taskStatus * Current status of the individual speech synthesis task. * @see TaskStatus */ public void setTaskStatus(String taskStatus) { this.taskStatus = taskStatus; } /** *

* Current status of the individual speech synthesis task. *

* * @return Current status of the individual speech synthesis task. * @see TaskStatus */ public String getTaskStatus() { return this.taskStatus; } /** *

* Current status of the individual speech synthesis task. *

* * @param taskStatus * Current status of the individual speech synthesis task. * @return Returns a reference to this object so that method calls can be chained together. * @see TaskStatus */ public SynthesisTask withTaskStatus(String taskStatus) { setTaskStatus(taskStatus); return this; } /** *

* Current status of the individual speech synthesis task. *

* * @param taskStatus * Current status of the individual speech synthesis task. * @return Returns a reference to this object so that method calls can be chained together. * @see TaskStatus */ public SynthesisTask withTaskStatus(TaskStatus taskStatus) { this.taskStatus = taskStatus.toString(); return this; } /** *

* Reason for the current status of a specific speech synthesis task, including errors if the task has failed. *

* * @param taskStatusReason * Reason for the current status of a specific speech synthesis task, including errors if the task has * failed. */ public void setTaskStatusReason(String taskStatusReason) { this.taskStatusReason = taskStatusReason; } /** *

* Reason for the current status of a specific speech synthesis task, including errors if the task has failed. *

* * @return Reason for the current status of a specific speech synthesis task, including errors if the task has * failed. */ public String getTaskStatusReason() { return this.taskStatusReason; } /** *

* Reason for the current status of a specific speech synthesis task, including errors if the task has failed. *

* * @param taskStatusReason * Reason for the current status of a specific speech synthesis task, including errors if the task has * failed. * @return Returns a reference to this object so that method calls can be chained together. */ public SynthesisTask withTaskStatusReason(String taskStatusReason) { setTaskStatusReason(taskStatusReason); return this; } /** *

* Pathway for the output speech file. *

* * @param outputUri * Pathway for the output speech file. */ public void setOutputUri(String outputUri) { this.outputUri = outputUri; } /** *

* Pathway for the output speech file. *

* * @return Pathway for the output speech file. */ public String getOutputUri() { return this.outputUri; } /** *

* Pathway for the output speech file. *

* * @param outputUri * Pathway for the output speech file. * @return Returns a reference to this object so that method calls can be chained together. */ public SynthesisTask withOutputUri(String outputUri) { setOutputUri(outputUri); return this; } /** *

* Timestamp for the time the synthesis task was started. *

* * @param creationTime * Timestamp for the time the synthesis task was started. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

* Timestamp for the time the synthesis task was started. *

* * @return Timestamp for the time the synthesis task was started. */ public java.util.Date getCreationTime() { return this.creationTime; } /** *

* Timestamp for the time the synthesis task was started. *

* * @param creationTime * Timestamp for the time the synthesis task was started. * @return Returns a reference to this object so that method calls can be chained together. */ public SynthesisTask withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** *

* Number of billable characters synthesized. *

* * @param requestCharacters * Number of billable characters synthesized. */ public void setRequestCharacters(Integer requestCharacters) { this.requestCharacters = requestCharacters; } /** *

* Number of billable characters synthesized. *

* * @return Number of billable characters synthesized. */ public Integer getRequestCharacters() { return this.requestCharacters; } /** *

* Number of billable characters synthesized. *

* * @param requestCharacters * Number of billable characters synthesized. * @return Returns a reference to this object so that method calls can be chained together. */ public SynthesisTask withRequestCharacters(Integer requestCharacters) { setRequestCharacters(requestCharacters); return this; } /** *

* ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. *

* * @param snsTopicArn * ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. */ public void setSnsTopicArn(String snsTopicArn) { this.snsTopicArn = snsTopicArn; } /** *

* ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. *

* * @return ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. */ public String getSnsTopicArn() { return this.snsTopicArn; } /** *

* ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. *

* * @param snsTopicArn * ARN for the SNS topic optionally used for providing status notification for a speech synthesis task. * @return Returns a reference to this object so that method calls can be chained together. */ public SynthesisTask withSnsTopicArn(String snsTopicArn) { setSnsTopicArn(snsTopicArn); return this; } /** *

* List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are * applied only if the language of the lexicon is the same as the language of the voice. *

* * @return List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons * are applied only if the language of the lexicon is the same as the language of the voice. */ public java.util.List getLexiconNames() { return lexiconNames; } /** *

* List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are * applied only if the language of the lexicon is the same as the language of the voice. *

* * @param lexiconNames * List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons * are applied only if the language of the lexicon is the same as the language of the voice. */ public void setLexiconNames(java.util.Collection lexiconNames) { if (lexiconNames == null) { this.lexiconNames = null; return; } this.lexiconNames = new java.util.ArrayList(lexiconNames); } /** *

* List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are * applied only if the language of the lexicon is the same as the language of the voice. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setLexiconNames(java.util.Collection)} or {@link #withLexiconNames(java.util.Collection)} if you want to * override the existing values. *

* * @param lexiconNames * List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons * are applied only if the language of the lexicon is the same as the language of the voice. * @return Returns a reference to this object so that method calls can be chained together. */ public SynthesisTask withLexiconNames(String... lexiconNames) { if (this.lexiconNames == null) { setLexiconNames(new java.util.ArrayList(lexiconNames.length)); } for (String ele : lexiconNames) { this.lexiconNames.add(ele); } return this; } /** *

* List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons are * applied only if the language of the lexicon is the same as the language of the voice. *

* * @param lexiconNames * List of one or more pronunciation lexicon names you want the service to apply during synthesis. Lexicons * are applied only if the language of the lexicon is the same as the language of the voice. * @return Returns a reference to this object so that method calls can be chained together. */ public SynthesisTask withLexiconNames(java.util.Collection lexiconNames) { setLexiconNames(lexiconNames); return this; } /** *

* The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. * For speech marks, this will be json. *

* * @param outputFormat * The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, * or pcm. For speech marks, this will be json. * @see OutputFormat */ public void setOutputFormat(String outputFormat) { this.outputFormat = outputFormat; } /** *

* The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. * For speech marks, this will be json. *

* * @return The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, * or pcm. For speech marks, this will be json. * @see OutputFormat */ public String getOutputFormat() { return this.outputFormat; } /** *

* The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. * For speech marks, this will be json. *

* * @param outputFormat * The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, * or pcm. For speech marks, this will be json. * @return Returns a reference to this object so that method calls can be chained together. * @see OutputFormat */ public SynthesisTask withOutputFormat(String outputFormat) { setOutputFormat(outputFormat); return this; } /** *

* The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, or pcm. * For speech marks, this will be json. *

* * @param outputFormat * The format in which the returned output will be encoded. For audio stream, this will be mp3, ogg_vorbis, * or pcm. For speech marks, this will be json. * @return Returns a reference to this object so that method calls can be chained together. * @see OutputFormat */ public SynthesisTask withOutputFormat(OutputFormat outputFormat) { this.outputFormat = outputFormat.toString(); return this; } /** *

* The audio frequency specified in Hz. *

*

* The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for standard * voices is "22050". The default value for neural voices is "24000". The default value for long-form voices is * "24000". The default value for generative voices is "24000". *

*

* Valid values for pcm are "8000" and "16000" The default value is "16000". *

* * @param sampleRate * The audio frequency specified in Hz.

*

* The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for * standard voices is "22050". The default value for neural voices is "24000". The default value for * long-form voices is "24000". The default value for generative voices is "24000". *

*

* Valid values for pcm are "8000" and "16000" The default value is "16000". */ public void setSampleRate(String sampleRate) { this.sampleRate = sampleRate; } /** *

* The audio frequency specified in Hz. *

*

* The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for standard * voices is "22050". The default value for neural voices is "24000". The default value for long-form voices is * "24000". The default value for generative voices is "24000". *

*

* Valid values for pcm are "8000" and "16000" The default value is "16000". *

* * @return The audio frequency specified in Hz.

*

* The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for * standard voices is "22050". The default value for neural voices is "24000". The default value for * long-form voices is "24000". The default value for generative voices is "24000". *

*

* Valid values for pcm are "8000" and "16000" The default value is "16000". */ public String getSampleRate() { return this.sampleRate; } /** *

* The audio frequency specified in Hz. *

*

* The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for standard * voices is "22050". The default value for neural voices is "24000". The default value for long-form voices is * "24000". The default value for generative voices is "24000". *

*

* Valid values for pcm are "8000" and "16000" The default value is "16000". *

* * @param sampleRate * The audio frequency specified in Hz.

*

* The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050", and "24000". The default value for * standard voices is "22050". The default value for neural voices is "24000". The default value for * long-form voices is "24000". The default value for generative voices is "24000". *

*

* Valid values for pcm are "8000" and "16000" The default value is "16000". * @return Returns a reference to this object so that method calls can be chained together. */ public SynthesisTask withSampleRate(String sampleRate) { setSampleRate(sampleRate); return this; } /** *

* The type of speech marks returned for the input text. *

* * @return The type of speech marks returned for the input text. * @see SpeechMarkType */ public java.util.List getSpeechMarkTypes() { return speechMarkTypes; } /** *

* The type of speech marks returned for the input text. *

* * @param speechMarkTypes * The type of speech marks returned for the input text. * @see SpeechMarkType */ public void setSpeechMarkTypes(java.util.Collection speechMarkTypes) { if (speechMarkTypes == null) { this.speechMarkTypes = null; return; } this.speechMarkTypes = new java.util.ArrayList(speechMarkTypes); } /** *

* The type of speech marks returned for the input text. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSpeechMarkTypes(java.util.Collection)} or {@link #withSpeechMarkTypes(java.util.Collection)} if you * want to override the existing values. *

* * @param speechMarkTypes * The type of speech marks returned for the input text. * @return Returns a reference to this object so that method calls can be chained together. * @see SpeechMarkType */ public SynthesisTask withSpeechMarkTypes(String... speechMarkTypes) { if (this.speechMarkTypes == null) { setSpeechMarkTypes(new java.util.ArrayList(speechMarkTypes.length)); } for (String ele : speechMarkTypes) { this.speechMarkTypes.add(ele); } return this; } /** *

* The type of speech marks returned for the input text. *

* * @param speechMarkTypes * The type of speech marks returned for the input text. * @return Returns a reference to this object so that method calls can be chained together. * @see SpeechMarkType */ public SynthesisTask withSpeechMarkTypes(java.util.Collection speechMarkTypes) { setSpeechMarkTypes(speechMarkTypes); return this; } /** *

* The type of speech marks returned for the input text. *

* * @param speechMarkTypes * The type of speech marks returned for the input text. * @return Returns a reference to this object so that method calls can be chained together. * @see SpeechMarkType */ public SynthesisTask withSpeechMarkTypes(SpeechMarkType... speechMarkTypes) { java.util.ArrayList speechMarkTypesCopy = new java.util.ArrayList(speechMarkTypes.length); for (SpeechMarkType value : speechMarkTypes) { speechMarkTypesCopy.add(value.toString()); } if (getSpeechMarkTypes() == null) { setSpeechMarkTypes(speechMarkTypesCopy); } else { getSpeechMarkTypes().addAll(speechMarkTypesCopy); } return this; } /** *

* Specifies whether the input text is plain text or SSML. The default value is plain text. *

* * @param textType * Specifies whether the input text is plain text or SSML. The default value is plain text. * @see TextType */ public void setTextType(String textType) { this.textType = textType; } /** *

* Specifies whether the input text is plain text or SSML. The default value is plain text. *

* * @return Specifies whether the input text is plain text or SSML. The default value is plain text. * @see TextType */ public String getTextType() { return this.textType; } /** *

* Specifies whether the input text is plain text or SSML. The default value is plain text. *

* * @param textType * Specifies whether the input text is plain text or SSML. The default value is plain text. * @return Returns a reference to this object so that method calls can be chained together. * @see TextType */ public SynthesisTask withTextType(String textType) { setTextType(textType); return this; } /** *

* Specifies whether the input text is plain text or SSML. The default value is plain text. *

* * @param textType * Specifies whether the input text is plain text or SSML. The default value is plain text. * @return Returns a reference to this object so that method calls can be chained together. * @see TextType */ public SynthesisTask withTextType(TextType textType) { this.textType = textType.toString(); return this; } /** *

* Voice ID to use for the synthesis. *

* * @param voiceId * Voice ID to use for the synthesis. * @see VoiceId */ public void setVoiceId(String voiceId) { this.voiceId = voiceId; } /** *

* Voice ID to use for the synthesis. *

* * @return Voice ID to use for the synthesis. * @see VoiceId */ public String getVoiceId() { return this.voiceId; } /** *

* Voice ID to use for the synthesis. *

* * @param voiceId * Voice ID to use for the synthesis. * @return Returns a reference to this object so that method calls can be chained together. * @see VoiceId */ public SynthesisTask withVoiceId(String voiceId) { setVoiceId(voiceId); return this; } /** *

* Voice ID to use for the synthesis. *

* * @param voiceId * Voice ID to use for the synthesis. * @return Returns a reference to this object so that method calls can be chained together. * @see VoiceId */ public SynthesisTask withVoiceId(VoiceId voiceId) { this.voiceId = voiceId.toString(); return this; } /** *

* Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, * which can be used for either Indian English (en-IN) or Hindi (hi-IN). *

*

* If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of the * bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the * LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English * rather than Hindi. *

* * @param languageCode * Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as * Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).

*

* If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of * the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation * for the LanguageCode parameter. For example, if no language code is specified, Aditi will use * Indian English rather than Hindi. * @see LanguageCode */ public void setLanguageCode(String languageCode) { this.languageCode = languageCode; } /** *

* Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, * which can be used for either Indian English (en-IN) or Hindi (hi-IN). *

*

* If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of the * bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the * LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English * rather than Hindi. *

* * @return Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as * Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).

*

* If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of * the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation * for the LanguageCode parameter. For example, if no language code is specified, Aditi will * use Indian English rather than Hindi. * @see LanguageCode */ public String getLanguageCode() { return this.languageCode; } /** *

* Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, * which can be used for either Indian English (en-IN) or Hindi (hi-IN). *

*

* If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of the * bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the * LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English * rather than Hindi. *

* * @param languageCode * Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as * Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).

*

* If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of * the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation * for the LanguageCode parameter. For example, if no language code is specified, Aditi will use * Indian English rather than Hindi. * @return Returns a reference to this object so that method calls can be chained together. * @see LanguageCode */ public SynthesisTask withLanguageCode(String languageCode) { setLanguageCode(languageCode); return this; } /** *

* Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as Aditi, * which can be used for either Indian English (en-IN) or Hindi (hi-IN). *

*

* If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of the * bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation for the * LanguageCode parameter. For example, if no language code is specified, Aditi will use Indian English * rather than Hindi. *

* * @param languageCode * Optional language code for a synthesis task. This is only necessary if using a bilingual voice, such as * Aditi, which can be used for either Indian English (en-IN) or Hindi (hi-IN).

*

* If a bilingual voice is used and no language code is specified, Amazon Polly uses the default language of * the bilingual voice. The default language for any voice is the one returned by the DescribeVoices operation * for the LanguageCode parameter. For example, if no language code is specified, Aditi will use * Indian English rather than Hindi. * @return Returns a reference to this object so that method calls can be chained together. * @see LanguageCode */ public SynthesisTask withLanguageCode(LanguageCode languageCode) { this.languageCode = languageCode.toString(); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getEngine() != null) sb.append("Engine: ").append(getEngine()).append(","); if (getTaskId() != null) sb.append("TaskId: ").append(getTaskId()).append(","); if (getTaskStatus() != null) sb.append("TaskStatus: ").append(getTaskStatus()).append(","); if (getTaskStatusReason() != null) sb.append("TaskStatusReason: ").append(getTaskStatusReason()).append(","); if (getOutputUri() != null) sb.append("OutputUri: ").append(getOutputUri()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getRequestCharacters() != null) sb.append("RequestCharacters: ").append(getRequestCharacters()).append(","); if (getSnsTopicArn() != null) sb.append("SnsTopicArn: ").append(getSnsTopicArn()).append(","); if (getLexiconNames() != null) sb.append("LexiconNames: ").append(getLexiconNames()).append(","); if (getOutputFormat() != null) sb.append("OutputFormat: ").append(getOutputFormat()).append(","); if (getSampleRate() != null) sb.append("SampleRate: ").append(getSampleRate()).append(","); if (getSpeechMarkTypes() != null) sb.append("SpeechMarkTypes: ").append(getSpeechMarkTypes()).append(","); if (getTextType() != null) sb.append("TextType: ").append(getTextType()).append(","); if (getVoiceId() != null) sb.append("VoiceId: ").append(getVoiceId()).append(","); if (getLanguageCode() != null) sb.append("LanguageCode: ").append(getLanguageCode()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SynthesisTask == false) return false; SynthesisTask other = (SynthesisTask) obj; if (other.getEngine() == null ^ this.getEngine() == null) return false; if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == false) return false; if (other.getTaskId() == null ^ this.getTaskId() == null) return false; if (other.getTaskId() != null && other.getTaskId().equals(this.getTaskId()) == false) return false; if (other.getTaskStatus() == null ^ this.getTaskStatus() == null) return false; if (other.getTaskStatus() != null && other.getTaskStatus().equals(this.getTaskStatus()) == false) return false; if (other.getTaskStatusReason() == null ^ this.getTaskStatusReason() == null) return false; if (other.getTaskStatusReason() != null && other.getTaskStatusReason().equals(this.getTaskStatusReason()) == false) return false; if (other.getOutputUri() == null ^ this.getOutputUri() == null) return false; if (other.getOutputUri() != null && other.getOutputUri().equals(this.getOutputUri()) == false) return false; if (other.getCreationTime() == null ^ this.getCreationTime() == null) return false; if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false) return false; if (other.getRequestCharacters() == null ^ this.getRequestCharacters() == null) return false; if (other.getRequestCharacters() != null && other.getRequestCharacters().equals(this.getRequestCharacters()) == false) return false; if (other.getSnsTopicArn() == null ^ this.getSnsTopicArn() == null) return false; if (other.getSnsTopicArn() != null && other.getSnsTopicArn().equals(this.getSnsTopicArn()) == false) return false; if (other.getLexiconNames() == null ^ this.getLexiconNames() == null) return false; if (other.getLexiconNames() != null && other.getLexiconNames().equals(this.getLexiconNames()) == false) return false; if (other.getOutputFormat() == null ^ this.getOutputFormat() == null) return false; if (other.getOutputFormat() != null && other.getOutputFormat().equals(this.getOutputFormat()) == false) return false; if (other.getSampleRate() == null ^ this.getSampleRate() == null) return false; if (other.getSampleRate() != null && other.getSampleRate().equals(this.getSampleRate()) == false) return false; if (other.getSpeechMarkTypes() == null ^ this.getSpeechMarkTypes() == null) return false; if (other.getSpeechMarkTypes() != null && other.getSpeechMarkTypes().equals(this.getSpeechMarkTypes()) == false) return false; if (other.getTextType() == null ^ this.getTextType() == null) return false; if (other.getTextType() != null && other.getTextType().equals(this.getTextType()) == false) return false; if (other.getVoiceId() == null ^ this.getVoiceId() == null) return false; if (other.getVoiceId() != null && other.getVoiceId().equals(this.getVoiceId()) == false) return false; if (other.getLanguageCode() == null ^ this.getLanguageCode() == null) return false; if (other.getLanguageCode() != null && other.getLanguageCode().equals(this.getLanguageCode()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode()); hashCode = prime * hashCode + ((getTaskId() == null) ? 0 : getTaskId().hashCode()); hashCode = prime * hashCode + ((getTaskStatus() == null) ? 0 : getTaskStatus().hashCode()); hashCode = prime * hashCode + ((getTaskStatusReason() == null) ? 0 : getTaskStatusReason().hashCode()); hashCode = prime * hashCode + ((getOutputUri() == null) ? 0 : getOutputUri().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getRequestCharacters() == null) ? 0 : getRequestCharacters().hashCode()); hashCode = prime * hashCode + ((getSnsTopicArn() == null) ? 0 : getSnsTopicArn().hashCode()); hashCode = prime * hashCode + ((getLexiconNames() == null) ? 0 : getLexiconNames().hashCode()); hashCode = prime * hashCode + ((getOutputFormat() == null) ? 0 : getOutputFormat().hashCode()); hashCode = prime * hashCode + ((getSampleRate() == null) ? 0 : getSampleRate().hashCode()); hashCode = prime * hashCode + ((getSpeechMarkTypes() == null) ? 0 : getSpeechMarkTypes().hashCode()); hashCode = prime * hashCode + ((getTextType() == null) ? 0 : getTextType().hashCode()); hashCode = prime * hashCode + ((getVoiceId() == null) ? 0 : getVoiceId().hashCode()); hashCode = prime * hashCode + ((getLanguageCode() == null) ? 0 : getLanguageCode().hashCode()); return hashCode; } @Override public SynthesisTask clone() { try { return (SynthesisTask) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.polly.model.transform.SynthesisTaskMarshaller.getInstance().marshall(this, protocolMarshaller); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy