putLexicon
inline suspend fun PollyClient.putLexicon(crossinline block: PutLexiconRequest.Builder.() -> Unit): PutLexiconResponse
Stores a pronunciation lexicon in an Amazon Web Services Region. If a lexicon with the same name already exists in the region, it is overwritten by the new lexicon. Lexicon operations have eventual consistency, therefore, it might take some time before the lexicon is available to the SynthesizeSpeech operation.
For more information, see Managing Lexicons.
Samples
fun main() {
//sampleStart
// Stores a pronunciation lexicon in an AWS Region.
val resp = pollyClient.putLexicon {
name = "W3C"
content = "<Lexicon Content>"
}
//sampleEnd
}