@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Amazon Polly
@version 2016-06-10
@auth AWS SigV4
@endpoints 9
@toc lexicons(4), voices(1), synthesisTasks(3), speech(1)

@group lexicons
@endpoint DELETE /v1/lexicons/{LexiconName}
@required {Name: str}

@endgroup

@group voices
@endpoint GET /v1/voices
@optional {Engine: str, LanguageCode: str, IncludeAdditionalLanguageCodes: bool, NextToken: str}
@returns(200) {Voices: [Voice]?, NextToken: str?}

@endgroup

@group lexicons
@endpoint GET /v1/lexicons/{LexiconName}
@required {Name: str}
@returns(200) {Lexicon: Lexicon?{Content: str?, Name: str?}, LexiconAttributes: LexiconAttributes?{Alphabet: str?, LanguageCode: str?, LastModified: str(timestamp)?, LexiconArn: str?, LexemesCount: int?, Size: int?}}

@endgroup

@group synthesisTasks
@endpoint GET /v1/synthesisTasks/{TaskId}
@required {TaskId: str}
@returns(200) {SynthesisTask: SynthesisTask?{Engine: str?, TaskId: str?, TaskStatus: str?, TaskStatusReason: str?, OutputUri: str?, CreationTime: str(timestamp)?, RequestCharacters: int?, SnsTopicArn: str?, LexiconNames: [str]?, OutputFormat: str?, SampleRate: str?, SpeechMarkTypes: [str]?, TextType: str?, VoiceId: str?, LanguageCode: str?}}

@endgroup

@group lexicons
@endpoint GET /v1/lexicons
@optional {NextToken: str}
@returns(200) {Lexicons: [LexiconDescription]?, NextToken: str?}

@endgroup

@group synthesisTasks
@endpoint GET /v1/synthesisTasks
@optional {MaxResults: int, NextToken: str, Status: str}
@returns(200) {NextToken: str?, SynthesisTasks: [SynthesisTask]?}

@endgroup

@group lexicons
@endpoint PUT /v1/lexicons/{LexiconName}
@required {Name: str, Content: str}

@endgroup

@group synthesisTasks
@endpoint POST /v1/synthesisTasks
@required {OutputFormat: str, OutputS3BucketName: str, Text: str, VoiceId: str}
@optional {Engine: str, LanguageCode: str, LexiconNames: [str], OutputS3KeyPrefix: str, SampleRate: str, SnsTopicArn: str, SpeechMarkTypes: [str], TextType: str}
@returns(200) {SynthesisTask: SynthesisTask?{Engine: str?, TaskId: str?, TaskStatus: str?, TaskStatusReason: str?, OutputUri: str?, CreationTime: str(timestamp)?, RequestCharacters: int?, SnsTopicArn: str?, LexiconNames: [str]?, OutputFormat: str?, SampleRate: str?, SpeechMarkTypes: [str]?, TextType: str?, VoiceId: str?, LanguageCode: str?}}

@endgroup

@group speech
@endpoint POST /v1/speech
@required {OutputFormat: str, Text: str, VoiceId: str}
@optional {Engine: str, LanguageCode: str, LexiconNames: [str], SampleRate: str, SpeechMarkTypes: [str], TextType: str}
@returns(200) {AudioStream: bytes?, ContentType: str?, RequestCharacters: int?}

@endgroup

@end
