File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
src/main/kotlin/com/kotlin/polly Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22
33plugins {
4- kotlin(" jvm" ) version " 1.9 .0"
4+ kotlin(" jvm" ) version " 2.1 .0"
55 application
66}
77
@@ -27,7 +27,7 @@ repositories {
2727}
2828apply (plugin = " org.jlleitschuh.gradle.ktlint" )
2929dependencies {
30- implementation(platform(" aws.sdk.kotlin:bom:1.3.112 " ))
30+ implementation(platform(" aws.sdk.kotlin:bom:1.4.119 " ))
3131 implementation(" aws.sdk.kotlin:polly" )
3232 implementation(" aws.smithy.kotlin:http-client-engine-okhttp" )
3333 implementation(" aws.smithy.kotlin:http-client-engine-crt" )
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ suspend fun main() {
2323
2424// snippet-start:[polly.kotlin.describe_voice.main]
2525suspend fun describeVoice () {
26- PollyClient { region = " us-west-2" }.use { polly ->
26+ PollyClient .fromEnvironment { region = " us-west-2" }.use { polly ->
2727 val enUsVoicesResult =
2828 polly.describeVoices(
2929 DescribeVoicesRequest {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ suspend fun main() {
2222
2323// snippet-start:[polly.kotlin.list_icons.main]
2424suspend fun listLexicons () {
25- PollyClient { region = " us-west-2" }.use { polly ->
25+ PollyClient .fromEnvironment { region = " us-west-2" }.use { polly ->
2626 val response = polly.listLexicons(ListLexiconsRequest {})
2727 response.lexicons?.forEach { lexDescription ->
2828 println (" The name of the Lexicon is ${lexDescription.name} " )
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ suspend fun talkPolly() {
4040 engine = Engine .Standard
4141 }
4242
43- PollyClient { region = " us-west-2" }.use { polly ->
43+ PollyClient .fromEnvironment { region = " us-west-2" }.use { polly ->
4444 val describeVoicesResult = polly.describeVoices(describeVoiceRequest)
4545 val voice = describeVoicesResult.voices?.get(26 )
4646 polly.synthesizeSpeech(
You can’t perform that action at this time.
0 commit comments