blib/lib/Paws/Polly/SynthesizeSpeech.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 22 / 22 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/Polly/PutLexiconOutput.pm ↑ Summary blib/lib/Paws/Polly/SynthesizeSpeechOutput.pm »
1  
2 package Paws::Polly::SynthesizeSpeech;
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 has Engine => (is => 'ro', isa => 'Str');
5 1 has LanguageCode => (is => 'ro', isa => 'Str');
6 1 has LexiconNames => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
7 1 has OutputFormat => (is => 'ro', isa => 'Str', required => 1);
8 1 has SampleRate => (is => 'ro', isa => 'Str');
9 1 has SpeechMarkTypes => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
10 1 has Text => (is => 'ro', isa => 'Str', required => 1);
11 1 has TextType => (is => 'ro', isa => 'Str');
12 1 has VoiceId => (is => 'ro', isa => 'Str', required => 1);
13  
14 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'SynthesizeSpeech');
17 1 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/v1/speech');
18 1 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
19 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Polly::SynthesizeSpeechOutput');
20 1 1;
21  
22 ### main pod documentation begin ###
23  
24 =head1 NAME
25  
26 Paws::Polly::SynthesizeSpeech - Arguments for method SynthesizeSpeech on L<Paws::Polly>
27  
28 =head1 DESCRIPTION
29  
30 This class represents the parameters used for calling the method SynthesizeSpeech on the
31 L<Amazon Polly|Paws::Polly> service. Use the attributes of this class
32 as arguments to method SynthesizeSpeech.
33  
34 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to SynthesizeSpeech.
35  
36 =head1 SYNOPSIS
37  
38 my $polly = Paws->service('Polly');
39 # To synthesize speech
40 # Synthesizes plain text or SSML into a file of human-like speech.
41 my $SynthesizeSpeechOutput = $polly->SynthesizeSpeech(
42 'LexiconNames' => ['example'],
43 'OutputFormat' => 'mp3',
44 'SampleRate' => 8000,
45 'Text' => 'All Gaul is divided into three parts',
46 'TextType' => 'text',
47 'VoiceId' => 'Joanna'
48 );
49  
50 # Results:
51 my $AudioStream = $SynthesizeSpeechOutput->AudioStream;
52 my $ContentType = $SynthesizeSpeechOutput->ContentType;
53 my $RequestCharacters = $SynthesizeSpeechOutput->RequestCharacters;
54  
55 # Returns a L<Paws::Polly::SynthesizeSpeechOutput> object.
56  
57 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
58 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/polly/SynthesizeSpeech>
59  
60 =head1 ATTRIBUTES
61  
62  
63 =head2 Engine => Str
64  
65 Specifies the engine (C<standard> or C<neural>) for Amazon Polly to use
66 when processing input text for speech synthesis. For information on
67 Amazon Polly voices and which voices are available in standard-only,
68 NTTS-only, and both standard and NTTS formats, see Available Voices
69 (https://docs.aws.amazon.com/polly/latest/dg/voicelist.html).
70  
71 B<NTTS-only voices>
72  
73 When using NTTS-only voices such as Kevin (en-US), this parameter is
74 required and must be set to C<neural>. If the engine is not specified,
75 or is set to C<standard>, this will result in an error.
76  
77 Type: String
78  
79 Valid Values: C<standard> | C<neural>
80  
81 Required: Yes
82  
83 B<Standard voices>
84  
85 For standard voices, this is not required; the engine parameter
86 defaults to C<standard>. If the engine is not specified, or is set to
87 C<standard> and an NTTS-only voice is selected, this will result in an
88 error.
89  
90 Valid values are: C<"standard">, C<"neural">
91  
92 =head2 LanguageCode => Str
93  
94 Optional language code for the Synthesize Speech request. This is only
95 necessary if using a bilingual voice, such as Aditi, which can be used
96 for either Indian English (en-IN) or Hindi (hi-IN).
97  
98 If a bilingual voice is used and no language code is specified, Amazon
99 Polly will use the default language of the bilingual voice. The default
100 language for any voice is the one returned by the DescribeVoices
101 (https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html)
102 operation for the C<LanguageCode> parameter. For example, if no
103 language code is specified, Aditi will use Indian English rather than
104 Hindi.
105  
106 Valid values are: C<"arb">, C<"cmn-CN">, C<"cy-GB">, C<"da-DK">, C<"de-DE">, C<"en-AU">, C<"en-GB">, C<"en-GB-WLS">, C<"en-IN">, C<"en-US">, C<"es-ES">, C<"es-MX">, C<"es-US">, C<"fr-CA">, C<"fr-FR">, C<"is-IS">, C<"it-IT">, C<"ja-JP">, C<"hi-IN">, C<"ko-KR">, C<"nb-NO">, C<"nl-NL">, C<"pl-PL">, C<"pt-BR">, C<"pt-PT">, C<"ro-RO">, C<"ru-RU">, C<"sv-SE">, C<"tr-TR">
107  
108 =head2 LexiconNames => ArrayRef[Str|Undef]
109  
110 List of one or more pronunciation lexicon names you want the service to
111 apply during synthesis. Lexicons are applied only if the language of
112 the lexicon is the same as the language of the voice. For information
113 about storing lexicons, see PutLexicon
114 (https://docs.aws.amazon.com/polly/latest/dg/API_PutLexicon.html).
115  
116  
117  
118 =head2 B<REQUIRED> OutputFormat => Str
119  
120 The format in which the returned output will be encoded. For audio
121 stream, this will be mp3, ogg_vorbis, or pcm. For speech marks, this
122 will be json.
123  
124 When pcm is used, the content returned is audio/pcm in a signed 16-bit,
125 1 channel (mono), little-endian format.
126  
127 Valid values are: C<"json">, C<"mp3">, C<"ogg_vorbis">, C<"pcm">
128  
129 =head2 SampleRate => Str
130  
131 The audio frequency specified in Hz.
132  
133 The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050",
134 and "24000". The default value for standard voices is "22050". The
135 default value for neural voices is "24000".
136  
137 Valid values for pcm are "8000" and "16000" The default value is
138 "16000".
139  
140  
141  
142 =head2 SpeechMarkTypes => ArrayRef[Str|Undef]
143  
144 The type of speech marks returned for the input text.
145  
146  
147  
148 =head2 B<REQUIRED> Text => Str
149  
150 Input text to synthesize. If you specify C<ssml> as the C<TextType>,
151 follow the SSML format for the input text.
152  
153  
154  
155 =head2 TextType => Str
156  
157 Specifies whether the input text is plain text or SSML. The default
158 value is plain text. For more information, see Using SSML
159 (https://docs.aws.amazon.com/polly/latest/dg/ssml.html).
160  
161 Valid values are: C<"ssml">, C<"text">
162  
163 =head2 B<REQUIRED> VoiceId => Str
164  
165 Voice ID to use for the synthesis. You can get a list of available
166 voice IDs by calling the DescribeVoices
167 (https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html)
168 operation.
169  
170 Valid values are: C<"Aditi">, C<"Amy">, C<"Astrid">, C<"Bianca">, C<"Brian">, C<"Camila">, C<"Carla">, C<"Carmen">, C<"Celine">, C<"Chantal">, C<"Conchita">, C<"Cristiano">, C<"Dora">, C<"Emma">, C<"Enrique">, C<"Ewa">, C<"Filiz">, C<"Gabrielle">, C<"Geraint">, C<"Giorgio">, C<"Gwyneth">, C<"Hans">, C<"Ines">, C<"Ivy">, C<"Jacek">, C<"Jan">, C<"Joanna">, C<"Joey">, C<"Justin">, C<"Karl">, C<"Kendra">, C<"Kevin">, C<"Kimberly">, C<"Lea">, C<"Liv">, C<"Lotte">, C<"Lucia">, C<"Lupe">, C<"Mads">, C<"Maja">, C<"Marlene">, C<"Mathieu">, C<"Matthew">, C<"Maxim">, C<"Mia">, C<"Miguel">, C<"Mizuki">, C<"Naja">, C<"Nicole">, C<"Olivia">, C<"Penelope">, C<"Raveena">, C<"Ricardo">, C<"Ruben">, C<"Russell">, C<"Salli">, C<"Seoyeon">, C<"Takumi">, C<"Tatyana">, C<"Vicki">, C<"Vitoria">, C<"Zeina">, C<"Zhiyu">
171  
172  
173 =head1 SEE ALSO
174  
175 This class forms part of L<Paws>, documenting arguments for method SynthesizeSpeech in L<Paws::Polly>
176  
177 =head1 BUGS and CONTRIBUTIONS
178  
179 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
180  
181 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
182  
183 =cut
184  
« blib/lib/Paws/Polly/PutLexiconOutput.pm ↑ Summary blib/lib/Paws/Polly/SynthesizeSpeechOutput.pm »