| Copyright | (c) 2013-2016 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.AWS.Polly.SynthesizeSpeech
Description
Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML input must be valid, well-formed SSML. Some alphabets might not be available with all the voices (for example, Cyrillic might not be read at all by English voices) unless phoneme mapping is used. For more information, see How it Works .
- synthesizeSpeech :: OutputFormat -> Text -> VoiceId -> SynthesizeSpeech
- data SynthesizeSpeech
- ssSampleRate :: Lens' SynthesizeSpeech (Maybe Text)
- ssTextType :: Lens' SynthesizeSpeech (Maybe TextType)
- ssLexiconNames :: Lens' SynthesizeSpeech [Text]
- ssOutputFormat :: Lens' SynthesizeSpeech OutputFormat
- ssText :: Lens' SynthesizeSpeech Text
- ssVoiceId :: Lens' SynthesizeSpeech VoiceId
- synthesizeSpeechResponse :: Int -> RsBody -> SynthesizeSpeechResponse
- data SynthesizeSpeechResponse
- ssrsRequestCharacters :: Lens' SynthesizeSpeechResponse (Maybe Int)
- ssrsContentType :: Lens' SynthesizeSpeechResponse (Maybe Text)
- ssrsResponseStatus :: Lens' SynthesizeSpeechResponse Int
- ssrsAudioStream :: Lens' SynthesizeSpeechResponse RsBody
Creating a Request
Arguments
| :: OutputFormat | |
| -> Text | |
| -> VoiceId | |
| -> SynthesizeSpeech |
Creates a value of SynthesizeSpeech with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ssSampleRate- The audio frequency specified in Hz. The valid values formp3andogg_vorbisare "8000", "16000", and "22050". The default value is "22050". Valid values forpcmare "8000" and "16000" The default value is "16000".ssTextType- Specifies whether the input text is plain text or SSML. The default value is plain text. For more information, see Using SSML .ssLexiconNames- 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. For information about storing lexicons, see PutLexicon .ssOutputFormat- The audio format in which the resulting stream will be encoded.ssText- Input text to synthesize. If you specifyssmlas theTextType, follow the SSML format for the input text.ssVoiceId- Voice ID to use for the synthesis. You can get a list of available voice IDs by calling the DescribeVoices operation.
data SynthesizeSpeech #
See: synthesizeSpeech smart constructor.
Instances
Request Lenses
ssSampleRate :: Lens' SynthesizeSpeech (Maybe Text) #
The audio frequency specified in Hz. The valid values for mp3 and ogg_vorbis are "8000", "16000", and "22050". The default value is "22050". Valid values for pcm are "8000" and "16000" The default value is "16000".
ssTextType :: Lens' SynthesizeSpeech (Maybe TextType) #
Specifies whether the input text is plain text or SSML. The default value is plain text. For more information, see Using SSML .
ssLexiconNames :: Lens' SynthesizeSpeech [Text] #
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. For information about storing lexicons, see PutLexicon .
ssOutputFormat :: Lens' SynthesizeSpeech OutputFormat #
The audio format in which the resulting stream will be encoded.
ssText :: Lens' SynthesizeSpeech Text #
Input text to synthesize. If you specify ssml as the TextType , follow the SSML format for the input text.
ssVoiceId :: Lens' SynthesizeSpeech VoiceId #
Voice ID to use for the synthesis. You can get a list of available voice IDs by calling the DescribeVoices operation.
Destructuring the Response
Arguments
| :: Int | |
| -> RsBody | |
| -> SynthesizeSpeechResponse |
Creates a value of SynthesizeSpeechResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ssrsRequestCharacters- Number of characters synthesized.ssrsContentType- Specifies the type audio stream. This should reflect theOutputFormatparameter in your request. * If you requestmp3as theOutputFormat, theContentTypereturned is audiompeg. * If you requestogg_vorbisas theOutputFormat, theContentTypereturned is audioogg. * If you requestpcmas theOutputFormat, theContentTypereturned is audio/pcm.ssrsResponseStatus- -- | The response status code.ssrsAudioStream- Stream containing the synthesized speech.
Response Lenses
ssrsRequestCharacters :: Lens' SynthesizeSpeechResponse (Maybe Int) #
Number of characters synthesized.
ssrsContentType :: Lens' SynthesizeSpeechResponse (Maybe Text) #
Specifies the type audio stream. This should reflect the OutputFormat parameter in your request. * If you request mp3 as the OutputFormat , the ContentType returned is audiompeg. * If you request ogg_vorbis as the OutputFormat , the ContentType returned is audioogg. * If you request pcm as the OutputFormat , the ContentType returned is audio/pcm.
ssrsResponseStatus :: Lens' SynthesizeSpeechResponse Int #
- - | The response status code.
ssrsAudioStream :: Lens' SynthesizeSpeechResponse RsBody #
Stream containing the synthesized speech.