package types

import "github.com/aws/aws-sdk-go-v2/service/polly/types"

Index

Examples

Types

type AudioEvent

type AudioEvent struct {

	// A chunk of synthesized audio data encoded in the format specified by the
	// OutputFormat parameter.
	AudioChunk []byte
	// contains filtered or unexported fields
}

Contains a chunk of synthesized audio data.

type CloseStreamEvent

type CloseStreamEvent struct {
	// contains filtered or unexported fields
}

Indicates the end of the input stream. After sending this event, the input stream will be closed and all audio will be returned.

type Engine

type Engine string
const (
	EngineStandard   Engine = "standard"
	EngineNeural     Engine = "neural"
	EngineLongForm   Engine = "long-form"
	EngineGenerative Engine = "generative"
)

Enum values for Engine

func (Engine) Values

func (Engine) Values() []Engine

Values returns all known values for Engine. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type EngineNotSupportedException

type EngineNotSupportedException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

This engine is not compatible with the voice that you have designated. Choose a new voice that is compatible with the engine or change the engine and restart the operation.

func (*EngineNotSupportedException) Error

func (*EngineNotSupportedException) ErrorCode

func (e *EngineNotSupportedException) ErrorCode() string

func (*EngineNotSupportedException) ErrorFault

func (*EngineNotSupportedException) ErrorMessage

func (e *EngineNotSupportedException) ErrorMessage() string

type FlushStreamConfiguration

type FlushStreamConfiguration struct {

	// Specifies whether to force the synthesis engine to immediately write buffered
	// audio data to the output stream.
	Force bool
	// contains filtered or unexported fields
}

Configuration that controls when synthesized audio data is sent on the output stream.

type Gender

type Gender string
const (
	GenderFemale Gender = "Female"
	GenderMale   Gender = "Male"
)

Enum values for Gender

func (Gender) Values

func (Gender) Values() []Gender

Values returns all known values for Gender. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type InvalidLexiconException

type InvalidLexiconException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

Amazon Polly can't find the specified lexicon. Verify that the lexicon's name is spelled correctly, and then try again.

func (*InvalidLexiconException) Error

func (e *InvalidLexiconException) Error() string

func (*InvalidLexiconException) ErrorCode

func (e *InvalidLexiconException) ErrorCode() string

func (*InvalidLexiconException) ErrorFault

func (e *InvalidLexiconException) ErrorFault() smithy.ErrorFault

func (*InvalidLexiconException) ErrorMessage

func (e *InvalidLexiconException) ErrorMessage() string

type InvalidNextTokenException

type InvalidNextTokenException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The NextToken is invalid. Verify that it's spelled correctly, and then try again.

func (*InvalidNextTokenException) Error

func (e *InvalidNextTokenException) Error() string

func (*InvalidNextTokenException) ErrorCode

func (e *InvalidNextTokenException) ErrorCode() string

func (*InvalidNextTokenException) ErrorFault

func (*InvalidNextTokenException) ErrorMessage

func (e *InvalidNextTokenException) ErrorMessage() string

type InvalidS3BucketException

type InvalidS3BucketException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The provided Amazon S3 bucket name is invalid. Please check your input with S3 bucket naming requirements and try again.

func (*InvalidS3BucketException) Error

func (e *InvalidS3BucketException) Error() string

func (*InvalidS3BucketException) ErrorCode

func (e *InvalidS3BucketException) ErrorCode() string

func (*InvalidS3BucketException) ErrorFault

func (e *InvalidS3BucketException) ErrorFault() smithy.ErrorFault

func (*InvalidS3BucketException) ErrorMessage

func (e *InvalidS3BucketException) ErrorMessage() string

type InvalidS3KeyException

type InvalidS3KeyException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The provided Amazon S3 key prefix is invalid. Please provide a valid S3 object key name.

func (*InvalidS3KeyException) Error

func (e *InvalidS3KeyException) Error() string

func (*InvalidS3KeyException) ErrorCode

func (e *InvalidS3KeyException) ErrorCode() string

func (*InvalidS3KeyException) ErrorFault

func (e *InvalidS3KeyException) ErrorFault() smithy.ErrorFault

func (*InvalidS3KeyException) ErrorMessage

func (e *InvalidS3KeyException) ErrorMessage() string

type InvalidSampleRateException

type InvalidSampleRateException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The specified sample rate is not valid.

func (*InvalidSampleRateException) Error

func (*InvalidSampleRateException) ErrorCode

func (e *InvalidSampleRateException) ErrorCode() string

func (*InvalidSampleRateException) ErrorFault

func (*InvalidSampleRateException) ErrorMessage

func (e *InvalidSampleRateException) ErrorMessage() string

type InvalidSnsTopicArnException

type InvalidSnsTopicArnException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The provided SNS topic ARN is invalid. Please provide a valid SNS topic ARN and try again.

func (*InvalidSnsTopicArnException) Error

func (*InvalidSnsTopicArnException) ErrorCode

func (e *InvalidSnsTopicArnException) ErrorCode() string

func (*InvalidSnsTopicArnException) ErrorFault

func (*InvalidSnsTopicArnException) ErrorMessage

func (e *InvalidSnsTopicArnException) ErrorMessage() string

type InvalidSsmlException

type InvalidSsmlException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The SSML you provided is invalid. Verify the SSML syntax, spelling of tags and values, and then try again.

func (*InvalidSsmlException) Error

func (e *InvalidSsmlException) Error() string

func (*InvalidSsmlException) ErrorCode

func (e *InvalidSsmlException) ErrorCode() string

func (*InvalidSsmlException) ErrorFault

func (e *InvalidSsmlException) ErrorFault() smithy.ErrorFault

func (*InvalidSsmlException) ErrorMessage

func (e *InvalidSsmlException) ErrorMessage() string

type InvalidTaskIdException

type InvalidTaskIdException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The provided Task ID is not valid. Please provide a valid Task ID and try again.

func (*InvalidTaskIdException) Error

func (e *InvalidTaskIdException) Error() string

func (*InvalidTaskIdException) ErrorCode

func (e *InvalidTaskIdException) ErrorCode() string

func (*InvalidTaskIdException) ErrorFault

func (e *InvalidTaskIdException) ErrorFault() smithy.ErrorFault

func (*InvalidTaskIdException) ErrorMessage

func (e *InvalidTaskIdException) ErrorMessage() string

type LanguageCode

type LanguageCode string
const (
	LanguageCodeArb     LanguageCode = "arb"
	LanguageCodeCmnCn   LanguageCode = "cmn-CN"
	LanguageCodeCyGb    LanguageCode = "cy-GB"
	LanguageCodeDaDk    LanguageCode = "da-DK"
	LanguageCodeDeDe    LanguageCode = "de-DE"
	LanguageCodeEnAu    LanguageCode = "en-AU"
	LanguageCodeEnGb    LanguageCode = "en-GB"
	LanguageCodeEnGbWls LanguageCode = "en-GB-WLS"
	LanguageCodeEnIn    LanguageCode = "en-IN"
	LanguageCodeEnUs    LanguageCode = "en-US"
	LanguageCodeEsEs    LanguageCode = "es-ES"
	LanguageCodeEsMx    LanguageCode = "es-MX"
	LanguageCodeEsUs    LanguageCode = "es-US"
	LanguageCodeFrCa    LanguageCode = "fr-CA"
	LanguageCodeFrFr    LanguageCode = "fr-FR"
	LanguageCodeIsIs    LanguageCode = "is-IS"
	LanguageCodeItIt    LanguageCode = "it-IT"
	LanguageCodeJaJp    LanguageCode = "ja-JP"
	LanguageCodeHiIn    LanguageCode = "hi-IN"
	LanguageCodeKoKr    LanguageCode = "ko-KR"
	LanguageCodeNbNo    LanguageCode = "nb-NO"
	LanguageCodeNlNl    LanguageCode = "nl-NL"
	LanguageCodePlPl    LanguageCode = "pl-PL"
	LanguageCodePtBr    LanguageCode = "pt-BR"
	LanguageCodePtPt    LanguageCode = "pt-PT"
	LanguageCodeRoRo    LanguageCode = "ro-RO"
	LanguageCodeRuRu    LanguageCode = "ru-RU"
	LanguageCodeSvSe    LanguageCode = "sv-SE"
	LanguageCodeTrTr    LanguageCode = "tr-TR"
	LanguageCodeEnNz    LanguageCode = "en-NZ"
	LanguageCodeEnZa    LanguageCode = "en-ZA"
	LanguageCodeCaEs    LanguageCode = "ca-ES"
	LanguageCodeDeAt    LanguageCode = "de-AT"
	LanguageCodeYueCn   LanguageCode = "yue-CN"
	LanguageCodeArAe    LanguageCode = "ar-AE"
	LanguageCodeFiFi    LanguageCode = "fi-FI"
	LanguageCodeEnIe    LanguageCode = "en-IE"
	LanguageCodeNlBe    LanguageCode = "nl-BE"
	LanguageCodeFrBe    LanguageCode = "fr-BE"
	LanguageCodeCsCz    LanguageCode = "cs-CZ"
	LanguageCodeDeCh    LanguageCode = "de-CH"
	LanguageCodeEnSg    LanguageCode = "en-SG"
)

Enum values for LanguageCode

func (LanguageCode) Values

func (LanguageCode) Values() []LanguageCode

Values returns all known values for LanguageCode. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type LanguageNotSupportedException

type LanguageNotSupportedException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The language specified is not currently supported by Amazon Polly in this capacity.

func (*LanguageNotSupportedException) Error

func (*LanguageNotSupportedException) ErrorCode

func (e *LanguageNotSupportedException) ErrorCode() string

func (*LanguageNotSupportedException) ErrorFault

func (*LanguageNotSupportedException) ErrorMessage

func (e *LanguageNotSupportedException) ErrorMessage() string

type Lexicon

type Lexicon struct {

	// Lexicon content in string format. The content of a lexicon must be in PLS
	// format.
	Content *string

	// Name of the lexicon.
	Name *string
	// contains filtered or unexported fields
}

Provides lexicon name and lexicon content in string format. For more information, see Pronunciation Lexicon Specification (PLS) Version 1.0.

type LexiconAttributes

type LexiconAttributes struct {

	// Phonetic alphabet used in the lexicon. Valid values are ipa and x-sampa .
	Alphabet *string

	// Language code that the lexicon applies to. A lexicon with a language code such
	// as "en" would be applied to all English languages (en-GB, en-US, en-AUS, en-WLS,
	// and so on.
	LanguageCode LanguageCode

	// Date lexicon was last modified (a timestamp value).
	LastModified *time.Time

	// Number of lexemes in the lexicon.
	LexemesCount int32

	// Amazon Resource Name (ARN) of the lexicon.
	LexiconArn *string

	// Total size of the lexicon, in characters.
	Size int32
	// contains filtered or unexported fields
}

Contains metadata describing the lexicon such as the number of lexemes, language code, and so on. For more information, see Managing Lexicons.

type LexiconDescription

type LexiconDescription struct {

	// Provides lexicon metadata.
	Attributes *LexiconAttributes

	// Name of the lexicon.
	Name *string
	// contains filtered or unexported fields
}

Describes the content of the lexicon.

type LexiconNotFoundException

type LexiconNotFoundException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

Amazon Polly can't find the specified lexicon. This could be caused by a lexicon that is missing, its name is misspelled or specifying a lexicon that is in a different region.

Verify that the lexicon exists, is in the region (see ListLexicons) and that you spelled its name is spelled correctly. Then try again.

func (*LexiconNotFoundException) Error

func (e *LexiconNotFoundException) Error() string

func (*LexiconNotFoundException) ErrorCode

func (e *LexiconNotFoundException) ErrorCode() string

func (*LexiconNotFoundException) ErrorFault

func (e *LexiconNotFoundException) ErrorFault() smithy.ErrorFault

func (*LexiconNotFoundException) ErrorMessage

func (e *LexiconNotFoundException) ErrorMessage() string

type LexiconSizeExceededException

type LexiconSizeExceededException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The maximum size of the specified lexicon would be exceeded by this operation.

func (*LexiconSizeExceededException) Error

func (*LexiconSizeExceededException) ErrorCode

func (e *LexiconSizeExceededException) ErrorCode() string

func (*LexiconSizeExceededException) ErrorFault

func (*LexiconSizeExceededException) ErrorMessage

func (e *LexiconSizeExceededException) ErrorMessage() string

type MarksNotSupportedForFormatException

type MarksNotSupportedForFormatException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

Speech marks are not supported for the OutputFormat selected. Speech marks are only available for content in json format.

func (*MarksNotSupportedForFormatException) Error

func (*MarksNotSupportedForFormatException) ErrorCode

func (*MarksNotSupportedForFormatException) ErrorFault

func (*MarksNotSupportedForFormatException) ErrorMessage

func (e *MarksNotSupportedForFormatException) ErrorMessage() string

type MaxLexemeLengthExceededException

type MaxLexemeLengthExceededException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The maximum size of the lexeme would be exceeded by this operation.

func (*MaxLexemeLengthExceededException) Error

func (*MaxLexemeLengthExceededException) ErrorCode

func (*MaxLexemeLengthExceededException) ErrorFault

func (*MaxLexemeLengthExceededException) ErrorMessage

func (e *MaxLexemeLengthExceededException) ErrorMessage() string

type MaxLexiconsNumberExceededException

type MaxLexiconsNumberExceededException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The maximum number of lexicons would be exceeded by this operation.

func (*MaxLexiconsNumberExceededException) Error

func (*MaxLexiconsNumberExceededException) ErrorCode

func (*MaxLexiconsNumberExceededException) ErrorFault

func (*MaxLexiconsNumberExceededException) ErrorMessage

func (e *MaxLexiconsNumberExceededException) ErrorMessage() string

type OutputFormat

type OutputFormat string
const (
	OutputFormatJson      OutputFormat = "json"
	OutputFormatMp3       OutputFormat = "mp3"
	OutputFormatOggOpus   OutputFormat = "ogg_opus"
	OutputFormatOggVorbis OutputFormat = "ogg_vorbis"
	OutputFormatPcm       OutputFormat = "pcm"
	OutputFormatMulaw     OutputFormat = "mulaw"
	OutputFormatAlaw      OutputFormat = "alaw"
)

Enum values for OutputFormat

func (OutputFormat) Values

func (OutputFormat) Values() []OutputFormat

Values returns all known values for OutputFormat. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type QuotaCode

type QuotaCode string
const (
	QuotaCodeInputStreamInboundEventTimeout QuotaCode = "input-stream-inbound-event-timeout"
	QuotaCodeInputStreamTimeout             QuotaCode = "input-stream-timeout"
)

Enum values for QuotaCode

func (QuotaCode) Values

func (QuotaCode) Values() []QuotaCode

Values returns all known values for QuotaCode. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type ServiceCode

type ServiceCode string
const (
	ServiceCodePolly ServiceCode = "polly"
)

Enum values for ServiceCode

func (ServiceCode) Values

func (ServiceCode) Values() []ServiceCode

Values returns all known values for ServiceCode. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type ServiceFailureException

type ServiceFailureException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

An unknown condition has caused a service failure.

func (*ServiceFailureException) Error

func (e *ServiceFailureException) Error() string

func (*ServiceFailureException) ErrorCode

func (e *ServiceFailureException) ErrorCode() string

func (*ServiceFailureException) ErrorFault

func (e *ServiceFailureException) ErrorFault() smithy.ErrorFault

func (*ServiceFailureException) ErrorMessage

func (e *ServiceFailureException) ErrorMessage() string

type ServiceQuotaExceededException

type ServiceQuotaExceededException struct {
	Message *string

	ErrorCodeOverride *string

	QuotaCode   QuotaCode
	ServiceCode ServiceCode
	// contains filtered or unexported fields
}

The request would cause a service quota to be exceeded.

func (*ServiceQuotaExceededException) Error

func (*ServiceQuotaExceededException) ErrorCode

func (e *ServiceQuotaExceededException) ErrorCode() string

func (*ServiceQuotaExceededException) ErrorFault

func (*ServiceQuotaExceededException) ErrorMessage

func (e *ServiceQuotaExceededException) ErrorMessage() string

type SpeechMarkType

type SpeechMarkType string
const (
	SpeechMarkTypeSentence SpeechMarkType = "sentence"
	SpeechMarkTypeSsml     SpeechMarkType = "ssml"
	SpeechMarkTypeViseme   SpeechMarkType = "viseme"
	SpeechMarkTypeWord     SpeechMarkType = "word"
)

Enum values for SpeechMarkType

func (SpeechMarkType) Values

func (SpeechMarkType) Values() []SpeechMarkType

Values returns all known values for SpeechMarkType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type SsmlMarksNotSupportedForTextTypeException

type SsmlMarksNotSupportedForTextTypeException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

SSML speech marks are not supported for plain text-type input.

func (*SsmlMarksNotSupportedForTextTypeException) Error

func (*SsmlMarksNotSupportedForTextTypeException) ErrorCode

func (*SsmlMarksNotSupportedForTextTypeException) ErrorFault

func (*SsmlMarksNotSupportedForTextTypeException) ErrorMessage

type StartSpeechSynthesisStreamActionStream

type StartSpeechSynthesisStreamActionStream interface {
	// contains filtered or unexported methods
}

Inbound event stream for sending input and control events to manage bidirectional speech synthesis.

The following types satisfy this interface:

StartSpeechSynthesisStreamActionStreamMemberCloseStreamEvent
StartSpeechSynthesisStreamActionStreamMemberTextEvent
Example (OutputUsage)

Code:play 

package main

import (
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/polly/types"
)

func main() {
	var union types.StartSpeechSynthesisStreamActionStream
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.StartSpeechSynthesisStreamActionStreamMemberCloseStreamEvent:
		_ = v.Value // Value is types.CloseStreamEvent

	case *types.StartSpeechSynthesisStreamActionStreamMemberTextEvent:
		_ = v.Value // Value is types.TextEvent

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}

type StartSpeechSynthesisStreamActionStreamMemberCloseStreamEvent

type StartSpeechSynthesisStreamActionStreamMemberCloseStreamEvent struct {
	Value CloseStreamEvent
	// contains filtered or unexported fields
}

An event indicating the end of the input stream.

type StartSpeechSynthesisStreamActionStreamMemberTextEvent

type StartSpeechSynthesisStreamActionStreamMemberTextEvent struct {
	Value TextEvent
	// contains filtered or unexported fields
}

A text event containing content to be synthesized.

type StartSpeechSynthesisStreamEventStream

type StartSpeechSynthesisStreamEventStream interface {
	// contains filtered or unexported methods
}

Outbound event stream that contains synthesized audio data and stream status events.

The following types satisfy this interface:

StartSpeechSynthesisStreamEventStreamMemberAudioEvent
StartSpeechSynthesisStreamEventStreamMemberStreamClosedEvent
Example (OutputUsage)

Code:play 

package main

import (
	"fmt"
	"github.com/aws/aws-sdk-go-v2/service/polly/types"
)

func main() {
	var union types.StartSpeechSynthesisStreamEventStream
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.StartSpeechSynthesisStreamEventStreamMemberAudioEvent:
		_ = v.Value // Value is types.AudioEvent

	case *types.StartSpeechSynthesisStreamEventStreamMemberStreamClosedEvent:
		_ = v.Value // Value is types.StreamClosedEvent

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}

type StartSpeechSynthesisStreamEventStreamMemberAudioEvent

type StartSpeechSynthesisStreamEventStreamMemberAudioEvent struct {
	Value AudioEvent
	// contains filtered or unexported fields
}

An audio event containing synthesized speech.

type StartSpeechSynthesisStreamEventStreamMemberStreamClosedEvent

type StartSpeechSynthesisStreamEventStreamMemberStreamClosedEvent struct {
	Value StreamClosedEvent
	// contains filtered or unexported fields
}

An event, with summary information, indicating the stream has closed.

type StreamClosedEvent

type StreamClosedEvent struct {

	// The total number of characters synthesized during the streaming session.
	RequestCharacters int32
	// contains filtered or unexported fields
}

Indicates that the synthesis stream is closed and provides summary information.

type SynthesisTask

type SynthesisTask struct {

	// Timestamp for the time the synthesis task was started.
	CreationTime *time.Time

	// Specifies the engine ( standard , neural , long-form or generative ) 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.
	Engine Engine

	// Optional language code for a synthesis task. 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.
	//
	// [DescribeVoices]: https://docs.aws.amazon.com/polly/latest/dg/API_DescribeVoices.html
	LanguageCode LanguageCode

	// 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.
	LexiconNames []string

	// The format in which the returned output will be encoded. For audio stream, this
	// will be mp3, ogg_vorbis, ogg_opus, mu-law, a-law, or pcm. For speech marks, this
	// will be json.
	OutputFormat OutputFormat

	// Pathway for the output speech file.
	OutputUri *string

	// Number of billable characters synthesized.
	RequestCharacters int32

	// 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". The default value for long-form voices is "24000". The
	// default value for generative voices is "24000".
	//
	// Valid values for pcm are "8000" and "16000" The default value is "16000".
	//
	// Valid value for ogg_opus is "48000".
	//
	// Valid value for mu-law and a-law is "8000".
	SampleRate *string

	// ARN for the SNS topic optionally used for providing status notification for a
	// speech synthesis task.
	SnsTopicArn *string

	// The type of speech marks returned for the input text.
	SpeechMarkTypes []SpeechMarkType

	// The Amazon Polly generated identifier for a speech synthesis task.
	TaskId *string

	// Current status of the individual speech synthesis task.
	TaskStatus TaskStatus

	// Reason for the current status of a specific speech synthesis task, including
	// errors if the task has failed.
	TaskStatusReason *string

	// Specifies whether the input text is plain text or SSML. The default value is
	// plain text.
	TextType TextType

	// Voice ID to use for the synthesis.
	VoiceId VoiceId
	// contains filtered or unexported fields
}

SynthesisTask object that provides information about a speech synthesis task.

type SynthesisTaskNotFoundException

type SynthesisTaskNotFoundException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The Speech Synthesis task with requested Task ID cannot be found.

func (*SynthesisTaskNotFoundException) Error

func (*SynthesisTaskNotFoundException) ErrorCode

func (e *SynthesisTaskNotFoundException) ErrorCode() string

func (*SynthesisTaskNotFoundException) ErrorFault

func (*SynthesisTaskNotFoundException) ErrorMessage

func (e *SynthesisTaskNotFoundException) ErrorMessage() string

type TaskStatus

type TaskStatus string
const (
	TaskStatusScheduled  TaskStatus = "scheduled"
	TaskStatusInProgress TaskStatus = "inProgress"
	TaskStatusCompleted  TaskStatus = "completed"
	TaskStatusFailed     TaskStatus = "failed"
)

Enum values for TaskStatus

func (TaskStatus) Values

func (TaskStatus) Values() []TaskStatus

Values returns all known values for TaskStatus. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type TextEvent

type TextEvent struct {

	// The text content to synthesize. If you specify ssml as the TextType , follow the
	// SSML format for the input text.
	//
	// This member is required.
	Text *string

	// Configuration for controlling when synthesized audio flushes to the output
	// stream.
	FlushStreamConfiguration *FlushStreamConfiguration

	// Specifies whether the input text is plain text or SSML. Default: plain text.
	TextType TextType
	// contains filtered or unexported fields
}

Contains text content to be synthesized into speech.

type TextLengthExceededException

type TextLengthExceededException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The value of the "Text" parameter is longer than the accepted limits. For the SynthesizeSpeech API, the limit for input text is a maximum of 6000 characters total, of which no more than 3000 can be billed characters. For the StartSpeechSynthesisTask API, the maximum is 200,000 characters, of which no more than 100,000 can be billed characters. SSML tags are not counted as billed characters.

func (*TextLengthExceededException) Error

func (*TextLengthExceededException) ErrorCode

func (e *TextLengthExceededException) ErrorCode() string

func (*TextLengthExceededException) ErrorFault

func (*TextLengthExceededException) ErrorMessage

func (e *TextLengthExceededException) ErrorMessage() string

type TextType

type TextType string
const (
	TextTypeSsml TextType = "ssml"
	TextTypeText TextType = "text"
)

Enum values for TextType

func (TextType) Values

func (TextType) Values() []TextType

Values returns all known values for TextType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type ThrottlingException

type ThrottlingException struct {
	Message *string

	ErrorCodeOverride *string

	ThrottlingReasons []ThrottlingReason
	// contains filtered or unexported fields
}

The request was denied because of request throttling.

func (*ThrottlingException) Error

func (e *ThrottlingException) Error() string

func (*ThrottlingException) ErrorCode

func (e *ThrottlingException) ErrorCode() string

func (*ThrottlingException) ErrorFault

func (e *ThrottlingException) ErrorFault() smithy.ErrorFault

func (*ThrottlingException) ErrorMessage

func (e *ThrottlingException) ErrorMessage() string

type ThrottlingReason

type ThrottlingReason struct {

	// The reason code explaining why the request was throttled.
	Reason *string

	// The resource that caused the throttling.
	Resource *string
	// contains filtered or unexported fields
}

Provides information about a specific throttling reason.

type UnknownUnionMember

type UnknownUnionMember struct {
	Tag   string
	Value []byte
	// contains filtered or unexported fields
}

UnknownUnionMember is returned when a union member is returned over the wire, but has an unknown tag.

type UnsupportedPlsAlphabetException

type UnsupportedPlsAlphabetException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The alphabet specified by the lexicon is not a supported alphabet. Valid values are x-sampa and ipa .

func (*UnsupportedPlsAlphabetException) Error

func (*UnsupportedPlsAlphabetException) ErrorCode

func (e *UnsupportedPlsAlphabetException) ErrorCode() string

func (*UnsupportedPlsAlphabetException) ErrorFault

func (*UnsupportedPlsAlphabetException) ErrorMessage

func (e *UnsupportedPlsAlphabetException) ErrorMessage() string

type UnsupportedPlsLanguageException

type UnsupportedPlsLanguageException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The language specified in the lexicon is unsupported. For a list of supported languages, see Lexicon Attributes.

func (*UnsupportedPlsLanguageException) Error

func (*UnsupportedPlsLanguageException) ErrorCode

func (e *UnsupportedPlsLanguageException) ErrorCode() string

func (*UnsupportedPlsLanguageException) ErrorFault

func (*UnsupportedPlsLanguageException) ErrorMessage

func (e *UnsupportedPlsLanguageException) ErrorMessage() string

type ValidationException

type ValidationException struct {
	Message *string

	ErrorCodeOverride *string

	Reason ValidationExceptionReason
	Fields []ValidationExceptionField
	// contains filtered or unexported fields
}

The input fails to satisfy the constraints specified by the service.

func (*ValidationException) Error

func (e *ValidationException) Error() string

func (*ValidationException) ErrorCode

func (e *ValidationException) ErrorCode() string

func (*ValidationException) ErrorFault

func (e *ValidationException) ErrorFault() smithy.ErrorFault

func (*ValidationException) ErrorMessage

func (e *ValidationException) ErrorMessage() string

type ValidationExceptionField

type ValidationExceptionField struct {

	// A message describing why the field failed validation.
	//
	// This member is required.
	Message *string

	// The name of the field that failed validation.
	//
	// This member is required.
	Name *string
	// contains filtered or unexported fields
}

Information about a field that failed validation.

type ValidationExceptionReason

type ValidationExceptionReason string
const (
	ValidationExceptionReasonUnsupportedOperation  ValidationExceptionReason = "unsupportedOperation"
	ValidationExceptionReasonFieldValidationFailed ValidationExceptionReason = "fieldValidationFailed"
	ValidationExceptionReasonOther                 ValidationExceptionReason = "other"
	ValidationExceptionReasonInvalidInboundEvent   ValidationExceptionReason = "invalidInboundEvent"
)

Enum values for ValidationExceptionReason

func (ValidationExceptionReason) Values

Values returns all known values for ValidationExceptionReason. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type Voice

type Voice struct {

	// Additional codes for languages available for the specified voice in addition to
	// its default language.
	//
	// For example, the default language for Aditi is Indian English (en-IN) because
	// it was first used for that language. Since Aditi is bilingual and fluent in both
	// Indian English and Hindi, this parameter would show the code hi-IN .
	AdditionalLanguageCodes []LanguageCode

	// Gender of the voice.
	Gender Gender

	// Amazon Polly assigned voice ID. This is the ID that you specify when calling
	// the SynthesizeSpeech operation.
	Id VoiceId

	// Language code of the voice.
	LanguageCode LanguageCode

	// Human readable name of the language in English.
	LanguageName *string

	// Name of the voice (for example, Salli, Kendra, etc.). This provides a human
	// readable voice name that you might display in your application.
	Name *string

	// Specifies which engines ( standard , neural , long-form or generative ) are
	// supported by a given voice.
	SupportedEngines []Engine
	// contains filtered or unexported fields
}

Description of the voice.

type VoiceId

type VoiceId string
const (
	VoiceIdAditi     VoiceId = "Aditi"
	VoiceIdAmy       VoiceId = "Amy"
	VoiceIdAstrid    VoiceId = "Astrid"
	VoiceIdBianca    VoiceId = "Bianca"
	VoiceIdBrian     VoiceId = "Brian"
	VoiceIdCamila    VoiceId = "Camila"
	VoiceIdCarla     VoiceId = "Carla"
	VoiceIdCarmen    VoiceId = "Carmen"
	VoiceIdCeline    VoiceId = "Celine"
	VoiceIdChantal   VoiceId = "Chantal"
	VoiceIdConchita  VoiceId = "Conchita"
	VoiceIdCristiano VoiceId = "Cristiano"
	VoiceIdDora      VoiceId = "Dora"
	VoiceIdEmma      VoiceId = "Emma"
	VoiceIdEnrique   VoiceId = "Enrique"
	VoiceIdEwa       VoiceId = "Ewa"
	VoiceIdFiliz     VoiceId = "Filiz"
	VoiceIdGabrielle VoiceId = "Gabrielle"
	VoiceIdGeraint   VoiceId = "Geraint"
	VoiceIdGiorgio   VoiceId = "Giorgio"
	VoiceIdGwyneth   VoiceId = "Gwyneth"
	VoiceIdHans      VoiceId = "Hans"
	VoiceIdInes      VoiceId = "Ines"
	VoiceIdIvy       VoiceId = "Ivy"
	VoiceIdJacek     VoiceId = "Jacek"
	VoiceIdJan       VoiceId = "Jan"
	VoiceIdJoanna    VoiceId = "Joanna"
	VoiceIdJoey      VoiceId = "Joey"
	VoiceIdJustin    VoiceId = "Justin"
	VoiceIdKarl      VoiceId = "Karl"
	VoiceIdKendra    VoiceId = "Kendra"
	VoiceIdKevin     VoiceId = "Kevin"
	VoiceIdKimberly  VoiceId = "Kimberly"
	VoiceIdLea       VoiceId = "Lea"
	VoiceIdLiv       VoiceId = "Liv"
	VoiceIdLotte     VoiceId = "Lotte"
	VoiceIdLucia     VoiceId = "Lucia"
	VoiceIdLupe      VoiceId = "Lupe"
	VoiceIdMads      VoiceId = "Mads"
	VoiceIdMaja      VoiceId = "Maja"
	VoiceIdMarlene   VoiceId = "Marlene"
	VoiceIdMathieu   VoiceId = "Mathieu"
	VoiceIdMatthew   VoiceId = "Matthew"
	VoiceIdMaxim     VoiceId = "Maxim"
	VoiceIdMia       VoiceId = "Mia"
	VoiceIdMiguel    VoiceId = "Miguel"
	VoiceIdMizuki    VoiceId = "Mizuki"
	VoiceIdNaja      VoiceId = "Naja"
	VoiceIdNicole    VoiceId = "Nicole"
	VoiceIdOlivia    VoiceId = "Olivia"
	VoiceIdPenelope  VoiceId = "Penelope"
	VoiceIdRaveena   VoiceId = "Raveena"
	VoiceIdRicardo   VoiceId = "Ricardo"
	VoiceIdRuben     VoiceId = "Ruben"
	VoiceIdRussell   VoiceId = "Russell"
	VoiceIdSalli     VoiceId = "Salli"
	VoiceIdSeoyeon   VoiceId = "Seoyeon"
	VoiceIdTakumi    VoiceId = "Takumi"
	VoiceIdTatyana   VoiceId = "Tatyana"
	VoiceIdVicki     VoiceId = "Vicki"
	VoiceIdVitoria   VoiceId = "Vitoria"
	VoiceIdZeina     VoiceId = "Zeina"
	VoiceIdZhiyu     VoiceId = "Zhiyu"
	VoiceIdAria      VoiceId = "Aria"
	VoiceIdAyanda    VoiceId = "Ayanda"
	VoiceIdArlet     VoiceId = "Arlet"
	VoiceIdHannah    VoiceId = "Hannah"
	VoiceIdArthur    VoiceId = "Arthur"
	VoiceIdDaniel    VoiceId = "Daniel"
	VoiceIdLiam      VoiceId = "Liam"
	VoiceIdPedro     VoiceId = "Pedro"
	VoiceIdKajal     VoiceId = "Kajal"
	VoiceIdHiujin    VoiceId = "Hiujin"
	VoiceIdLaura     VoiceId = "Laura"
	VoiceIdElin      VoiceId = "Elin"
	VoiceIdIda       VoiceId = "Ida"
	VoiceIdSuvi      VoiceId = "Suvi"
	VoiceIdOla       VoiceId = "Ola"
	VoiceIdHala      VoiceId = "Hala"
	VoiceIdAndres    VoiceId = "Andres"
	VoiceIdSergio    VoiceId = "Sergio"
	VoiceIdRemi      VoiceId = "Remi"
	VoiceIdAdriano   VoiceId = "Adriano"
	VoiceIdThiago    VoiceId = "Thiago"
	VoiceIdRuth      VoiceId = "Ruth"
	VoiceIdStephen   VoiceId = "Stephen"
	VoiceIdKazuha    VoiceId = "Kazuha"
	VoiceIdTomoko    VoiceId = "Tomoko"
	VoiceIdNiamh     VoiceId = "Niamh"
	VoiceIdSofie     VoiceId = "Sofie"
	VoiceIdLisa      VoiceId = "Lisa"
	VoiceIdIsabelle  VoiceId = "Isabelle"
	VoiceIdZayd      VoiceId = "Zayd"
	VoiceIdDanielle  VoiceId = "Danielle"
	VoiceIdGregory   VoiceId = "Gregory"
	VoiceIdBurcu     VoiceId = "Burcu"
	VoiceIdJitka     VoiceId = "Jitka"
	VoiceIdSabrina   VoiceId = "Sabrina"
	VoiceIdJasmine   VoiceId = "Jasmine"
	VoiceIdJihye     VoiceId = "Jihye"
	VoiceIdAmbre     VoiceId = "Ambre"
	VoiceIdBeatrice  VoiceId = "Beatrice"
	VoiceIdFlorian   VoiceId = "Florian"
	VoiceIdLennart   VoiceId = "Lennart"
	VoiceIdLorenzo   VoiceId = "Lorenzo"
	VoiceIdTiffany   VoiceId = "Tiffany"
)

Enum values for VoiceId

func (VoiceId) Values

func (VoiceId) Values() []VoiceId

Values returns all known values for VoiceId. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

Source Files

enums.go errors.go types.go

Version
v1.57.3 (latest)
Published
Apr 29, 2026
Platform
linux/amd64
Imports
4 packages
Last checked
55 minutes ago

Tools for package owners.