| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Paws::Polly; |
|
2
|
1
|
|
|
1
|
|
7893
|
use Moose; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
|
|
sub service { 'polly' } |
|
4
|
|
|
|
|
|
|
sub version { '2016-06-10' } |
|
5
|
|
|
|
|
|
|
sub flattened_arrays { 0 } |
|
6
|
|
|
|
|
|
|
has max_attempts => (is => 'ro', isa => 'Int', default => 5); |
|
7
|
|
|
|
|
|
|
has retry => (is => 'ro', isa => 'HashRef', default => sub { |
|
8
|
|
|
|
|
|
|
{ base => 'rand', type => 'exponential', growth_factor => 2 } |
|
9
|
|
|
|
|
|
|
}); |
|
10
|
|
|
|
|
|
|
has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [ |
|
11
|
|
|
|
|
|
|
] }); |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::RestJsonCaller', 'Paws::Net::RestJsonResponse'; |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub DeleteLexicon { |
|
17
|
|
|
|
|
|
|
my $self = shift; |
|
18
|
|
|
|
|
|
|
my $call_object = $self->new_with_coercions('Paws::Polly::DeleteLexicon', @_); |
|
19
|
|
|
|
|
|
|
return $self->caller->do_call($self, $call_object); |
|
20
|
|
|
|
|
|
|
} |
|
21
|
|
|
|
|
|
|
sub DescribeVoices { |
|
22
|
|
|
|
|
|
|
my $self = shift; |
|
23
|
|
|
|
|
|
|
my $call_object = $self->new_with_coercions('Paws::Polly::DescribeVoices', @_); |
|
24
|
|
|
|
|
|
|
return $self->caller->do_call($self, $call_object); |
|
25
|
|
|
|
|
|
|
} |
|
26
|
|
|
|
|
|
|
sub GetLexicon { |
|
27
|
|
|
|
|
|
|
my $self = shift; |
|
28
|
|
|
|
|
|
|
my $call_object = $self->new_with_coercions('Paws::Polly::GetLexicon', @_); |
|
29
|
|
|
|
|
|
|
return $self->caller->do_call($self, $call_object); |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
sub ListLexicons { |
|
32
|
|
|
|
|
|
|
my $self = shift; |
|
33
|
|
|
|
|
|
|
my $call_object = $self->new_with_coercions('Paws::Polly::ListLexicons', @_); |
|
34
|
|
|
|
|
|
|
return $self->caller->do_call($self, $call_object); |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
sub PutLexicon { |
|
37
|
|
|
|
|
|
|
my $self = shift; |
|
38
|
|
|
|
|
|
|
my $call_object = $self->new_with_coercions('Paws::Polly::PutLexicon', @_); |
|
39
|
|
|
|
|
|
|
return $self->caller->do_call($self, $call_object); |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
sub SynthesizeSpeech { |
|
42
|
|
|
|
|
|
|
my $self = shift; |
|
43
|
|
|
|
|
|
|
my $call_object = $self->new_with_coercions('Paws::Polly::SynthesizeSpeech', @_); |
|
44
|
|
|
|
|
|
|
return $self->caller->do_call($self, $call_object); |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub operations { qw/DeleteLexicon DescribeVoices GetLexicon ListLexicons PutLexicon SynthesizeSpeech / } |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
### main pod documentation begin ### |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 NAME |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Paws::Polly - Perl Interface to AWS Amazon Polly |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
use Paws; |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
my $obj = Paws->service('Polly'); |
|
64
|
|
|
|
|
|
|
my $res = $obj->Method( |
|
65
|
|
|
|
|
|
|
Arg1 => $val1, |
|
66
|
|
|
|
|
|
|
Arg2 => [ 'V1', 'V2' ], |
|
67
|
|
|
|
|
|
|
# if Arg3 is an object, the HashRef will be used as arguments to the constructor |
|
68
|
|
|
|
|
|
|
# of the arguments type |
|
69
|
|
|
|
|
|
|
Arg3 => { Att1 => 'Val1' }, |
|
70
|
|
|
|
|
|
|
# if Arg4 is an array of objects, the HashRefs will be passed as arguments to |
|
71
|
|
|
|
|
|
|
# the constructor of the arguments type |
|
72
|
|
|
|
|
|
|
Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ], |
|
73
|
|
|
|
|
|
|
); |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Amazon Polly is a web service that makes it easy to synthesize speech |
|
78
|
|
|
|
|
|
|
from text. |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
The Amazon Polly service provides API operations for synthesizing |
|
81
|
|
|
|
|
|
|
high-quality speech from plain text and Speech Synthesis Markup |
|
82
|
|
|
|
|
|
|
Language (SSML), along with managing pronunciations lexicons that |
|
83
|
|
|
|
|
|
|
enable you to get the best results for your application domain. |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 METHODS |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 DeleteLexicon(Name => Str) |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Each argument is described in detail in: L<Paws::Polly::DeleteLexicon> |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Returns: a L<Paws::Polly::DeleteLexiconOutput> instance |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Deletes the specified pronunciation lexicon stored in an AWS Region. A |
|
94
|
|
|
|
|
|
|
lexicon which has been deleted is not available for speech synthesis, |
|
95
|
|
|
|
|
|
|
nor is it possible to retrieve it using either the C<GetLexicon> or |
|
96
|
|
|
|
|
|
|
C<ListLexicon> APIs. |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
For more information, see Managing Lexicons. |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head2 DescribeVoices([LanguageCode => Str, NextToken => Str]) |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Each argument is described in detail in: L<Paws::Polly::DescribeVoices> |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Returns: a L<Paws::Polly::DescribeVoicesOutput> instance |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Returns the list of voices that are available for use when requesting |
|
108
|
|
|
|
|
|
|
speech synthesis. Each voice speaks a specified language, is either |
|
109
|
|
|
|
|
|
|
male or female, and is identified by an ID, which is the ASCII version |
|
110
|
|
|
|
|
|
|
of the voice name. |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
When synthesizing speech ( C<SynthesizeSpeech> ), you provide the voice |
|
113
|
|
|
|
|
|
|
ID for the voice you want from the list of voices returned by |
|
114
|
|
|
|
|
|
|
C<DescribeVoices>. |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
For example, you want your news reader application to read news in a |
|
117
|
|
|
|
|
|
|
specific language, but giving a user the option to choose the voice. |
|
118
|
|
|
|
|
|
|
Using the C<DescribeVoices> operation you can provide the user with a |
|
119
|
|
|
|
|
|
|
list of available voices to select from. |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
You can optionally specify a language code to filter the available |
|
122
|
|
|
|
|
|
|
voices. For example, if you specify C<en-US>, the operation returns a |
|
123
|
|
|
|
|
|
|
list of all available US English voices. |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
This operation requires permissions to perform the |
|
126
|
|
|
|
|
|
|
C<polly:DescribeVoices> action. |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head2 GetLexicon(Name => Str) |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Each argument is described in detail in: L<Paws::Polly::GetLexicon> |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
Returns: a L<Paws::Polly::GetLexiconOutput> instance |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Returns the content of the specified pronunciation lexicon stored in an |
|
136
|
|
|
|
|
|
|
AWS Region. For more information, see Managing Lexicons. |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head2 ListLexicons([NextToken => Str]) |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Each argument is described in detail in: L<Paws::Polly::ListLexicons> |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Returns: a L<Paws::Polly::ListLexiconsOutput> instance |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Returns a list of pronunciation lexicons stored in an AWS Region. For |
|
146
|
|
|
|
|
|
|
more information, see Managing Lexicons. |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=head2 PutLexicon(Content => Str, Name => Str) |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
Each argument is described in detail in: L<Paws::Polly::PutLexicon> |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
Returns: a L<Paws::Polly::PutLexiconOutput> instance |
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
Stores a pronunciation lexicon in an AWS Region. If a lexicon with the |
|
156
|
|
|
|
|
|
|
same name already exists in the region, it is overwritten by the new |
|
157
|
|
|
|
|
|
|
lexicon. Lexicon operations have eventual consistency, therefore, it |
|
158
|
|
|
|
|
|
|
might take some time before the lexicon is available to the |
|
159
|
|
|
|
|
|
|
SynthesizeSpeech operation. |
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
For more information, see Managing Lexicons. |
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head2 SynthesizeSpeech(OutputFormat => Str, Text => Str, VoiceId => Str, [LexiconNames => ArrayRef[Str|Undef], SampleRate => Str, SpeechMarkTypes => ArrayRef[Str|Undef], TextType => Str]) |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
Each argument is described in detail in: L<Paws::Polly::SynthesizeSpeech> |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
Returns: a L<Paws::Polly::SynthesizeSpeechOutput> instance |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
Synthesizes UTF-8 input, plain text or SSML, to a stream of bytes. SSML |
|
171
|
|
|
|
|
|
|
input must be valid, well-formed SSML. Some alphabets might not be |
|
172
|
|
|
|
|
|
|
available with all the voices (for example, Cyrillic might not be read |
|
173
|
|
|
|
|
|
|
at all by English voices) unless phoneme mapping is used. For more |
|
174
|
|
|
|
|
|
|
information, see How it Works. |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=head1 PAGINATORS |
|
180
|
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
Paginator methods are helpers that repetively call methods that return partial results |
|
182
|
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
187
|
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
This service class forms part of L<Paws> |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=head1 BUGS and CONTRIBUTIONS |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
The source code is located here: https://github.com/pplu/aws-sdk-perl |
|
193
|
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues |
|
195
|
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
=cut |
|
197
|
|
|
|
|
|
|
|