Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Allows the creation of an asynchronous synthesis task, by starting a new
SpeechSynthesisTask
. This operation requires all the standard
information needed for speech synthesis, plus the name of an Amazon S3
bucket for the service to store the output of the synthesis task and two
optional parameters (OutputS3KeyPrefix
and SnsTopicArn
). Once the
synthesis task is created, this operation will return a
SpeechSynthesisTask
object, which will include an identifier of this
task as well as the current status. The SpeechSynthesisTask
object is
available for 72 hours after starting the asynchronous synthesis task.
Synopsis
- data StartSpeechSynthesisTask = StartSpeechSynthesisTask' {
- engine :: Maybe Engine
- languageCode :: Maybe LanguageCode
- lexiconNames :: Maybe [Text]
- outputS3KeyPrefix :: Maybe Text
- sampleRate :: Maybe Text
- snsTopicArn :: Maybe Text
- speechMarkTypes :: Maybe [SpeechMarkType]
- textType :: Maybe TextType
- outputFormat :: OutputFormat
- outputS3BucketName :: Text
- text :: Text
- voiceId :: VoiceId
- newStartSpeechSynthesisTask :: OutputFormat -> Text -> Text -> VoiceId -> StartSpeechSynthesisTask
- startSpeechSynthesisTask_engine :: Lens' StartSpeechSynthesisTask (Maybe Engine)
- startSpeechSynthesisTask_languageCode :: Lens' StartSpeechSynthesisTask (Maybe LanguageCode)
- startSpeechSynthesisTask_lexiconNames :: Lens' StartSpeechSynthesisTask (Maybe [Text])
- startSpeechSynthesisTask_outputS3KeyPrefix :: Lens' StartSpeechSynthesisTask (Maybe Text)
- startSpeechSynthesisTask_sampleRate :: Lens' StartSpeechSynthesisTask (Maybe Text)
- startSpeechSynthesisTask_snsTopicArn :: Lens' StartSpeechSynthesisTask (Maybe Text)
- startSpeechSynthesisTask_speechMarkTypes :: Lens' StartSpeechSynthesisTask (Maybe [SpeechMarkType])
- startSpeechSynthesisTask_textType :: Lens' StartSpeechSynthesisTask (Maybe TextType)
- startSpeechSynthesisTask_outputFormat :: Lens' StartSpeechSynthesisTask OutputFormat
- startSpeechSynthesisTask_outputS3BucketName :: Lens' StartSpeechSynthesisTask Text
- startSpeechSynthesisTask_text :: Lens' StartSpeechSynthesisTask Text
- startSpeechSynthesisTask_voiceId :: Lens' StartSpeechSynthesisTask VoiceId
- data StartSpeechSynthesisTaskResponse = StartSpeechSynthesisTaskResponse' {}
- newStartSpeechSynthesisTaskResponse :: Int -> StartSpeechSynthesisTaskResponse
- startSpeechSynthesisTaskResponse_synthesisTask :: Lens' StartSpeechSynthesisTaskResponse (Maybe SynthesisTask)
- startSpeechSynthesisTaskResponse_httpStatus :: Lens' StartSpeechSynthesisTaskResponse Int
Creating a Request
data StartSpeechSynthesisTask Source #
See: newStartSpeechSynthesisTask
smart constructor.
StartSpeechSynthesisTask' | |
|
Instances
newStartSpeechSynthesisTask Source #
:: OutputFormat | |
-> Text | |
-> Text | |
-> VoiceId | |
-> StartSpeechSynthesisTask |
Create a value of StartSpeechSynthesisTask
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
StartSpeechSynthesisTask
, startSpeechSynthesisTask_engine
- Specifies the engine (standard
or neural
) 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.
StartSpeechSynthesisTask
, startSpeechSynthesisTask_languageCode
- Optional language code for the Speech Synthesis request. 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.
StartSpeechSynthesisTask
, startSpeechSynthesisTask_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.
$sel:outputS3KeyPrefix:StartSpeechSynthesisTask'
, startSpeechSynthesisTask_outputS3KeyPrefix
- The Amazon S3 key prefix for the output speech file.
StartSpeechSynthesisTask
, startSpeechSynthesisTask_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".
Valid values for pcm are "8000" and "16000" The default value is "16000".
StartSpeechSynthesisTask
, startSpeechSynthesisTask_snsTopicArn
- ARN for the SNS topic optionally used for providing status notification
for a speech synthesis task.
StartSpeechSynthesisTask
, startSpeechSynthesisTask_speechMarkTypes
- The type of speech marks returned for the input text.
StartSpeechSynthesisTask
, startSpeechSynthesisTask_textType
- Specifies whether the input text is plain text or SSML. The default
value is plain text.
StartSpeechSynthesisTask
, startSpeechSynthesisTask_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.
$sel:outputS3BucketName:StartSpeechSynthesisTask'
, startSpeechSynthesisTask_outputS3BucketName
- Amazon S3 bucket name to which the output file will be saved.
$sel:text:StartSpeechSynthesisTask'
, startSpeechSynthesisTask_text
- The input text to synthesize. If you specify ssml as the TextType,
follow the SSML format for the input text.
StartSpeechSynthesisTask
, startSpeechSynthesisTask_voiceId
- Voice ID to use for the synthesis.
Request Lenses
startSpeechSynthesisTask_engine :: Lens' StartSpeechSynthesisTask (Maybe Engine) Source #
Specifies the engine (standard
or neural
) 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.
startSpeechSynthesisTask_languageCode :: Lens' StartSpeechSynthesisTask (Maybe LanguageCode) Source #
Optional language code for the Speech Synthesis request. 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.
startSpeechSynthesisTask_lexiconNames :: Lens' StartSpeechSynthesisTask (Maybe [Text]) Source #
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.
startSpeechSynthesisTask_outputS3KeyPrefix :: Lens' StartSpeechSynthesisTask (Maybe Text) Source #
The Amazon S3 key prefix for the output speech file.
startSpeechSynthesisTask_sampleRate :: Lens' StartSpeechSynthesisTask (Maybe Text) Source #
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".
Valid values for pcm are "8000" and "16000" The default value is "16000".
startSpeechSynthesisTask_snsTopicArn :: Lens' StartSpeechSynthesisTask (Maybe Text) Source #
ARN for the SNS topic optionally used for providing status notification for a speech synthesis task.
startSpeechSynthesisTask_speechMarkTypes :: Lens' StartSpeechSynthesisTask (Maybe [SpeechMarkType]) Source #
The type of speech marks returned for the input text.
startSpeechSynthesisTask_textType :: Lens' StartSpeechSynthesisTask (Maybe TextType) Source #
Specifies whether the input text is plain text or SSML. The default value is plain text.
startSpeechSynthesisTask_outputFormat :: Lens' StartSpeechSynthesisTask OutputFormat Source #
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.
startSpeechSynthesisTask_outputS3BucketName :: Lens' StartSpeechSynthesisTask Text Source #
Amazon S3 bucket name to which the output file will be saved.
startSpeechSynthesisTask_text :: Lens' StartSpeechSynthesisTask Text Source #
The input text to synthesize. If you specify ssml as the TextType, follow the SSML format for the input text.
startSpeechSynthesisTask_voiceId :: Lens' StartSpeechSynthesisTask VoiceId Source #
Voice ID to use for the synthesis.
Destructuring the Response
data StartSpeechSynthesisTaskResponse Source #
See: newStartSpeechSynthesisTaskResponse
smart constructor.
StartSpeechSynthesisTaskResponse' | |
|
Instances
Generic StartSpeechSynthesisTaskResponse Source # | |
Read StartSpeechSynthesisTaskResponse Source # | |
Show StartSpeechSynthesisTaskResponse Source # | |
Defined in Amazonka.Polly.StartSpeechSynthesisTask | |
NFData StartSpeechSynthesisTaskResponse Source # | |
Defined in Amazonka.Polly.StartSpeechSynthesisTask rnf :: StartSpeechSynthesisTaskResponse -> () # | |
Eq StartSpeechSynthesisTaskResponse Source # | |
type Rep StartSpeechSynthesisTaskResponse Source # | |
Defined in Amazonka.Polly.StartSpeechSynthesisTask type Rep StartSpeechSynthesisTaskResponse = D1 ('MetaData "StartSpeechSynthesisTaskResponse" "Amazonka.Polly.StartSpeechSynthesisTask" "amazonka-polly-2.0-6sZiChgAXCB1QK3Mfr0Pfp" 'False) (C1 ('MetaCons "StartSpeechSynthesisTaskResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "synthesisTask") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SynthesisTask)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newStartSpeechSynthesisTaskResponse Source #
Create a value of StartSpeechSynthesisTaskResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:synthesisTask:StartSpeechSynthesisTaskResponse'
, startSpeechSynthesisTaskResponse_synthesisTask
- SynthesisTask object that provides information and attributes about a
newly submitted speech synthesis task.
$sel:httpStatus:StartSpeechSynthesisTaskResponse'
, startSpeechSynthesisTaskResponse_httpStatus
- The response's http status code.
Response Lenses
startSpeechSynthesisTaskResponse_synthesisTask :: Lens' StartSpeechSynthesisTaskResponse (Maybe SynthesisTask) Source #
SynthesisTask object that provides information and attributes about a newly submitted speech synthesis task.
startSpeechSynthesisTaskResponse_httpStatus :: Lens' StartSpeechSynthesisTaskResponse Int Source #
The response's http status code.