File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
androidMain/kotlin/platformSpecific/tts
commonMain/kotlin/presentation/settings/tts Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 2
2
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
3
3
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
4
4
5
- val version = " 1.0.43 "
5
+ val version = " 1.0.44 "
6
6
val versionNumber = getVersionInt()
7
7
8
8
plugins {
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ object TtsHelperImpl : TtsHelper {
54
54
55
55
override fun getVoices (): List <TtsVoice > {
56
56
return tts.voices.orEmpty()
57
- .sortedBy { it.name }
57
+ .sortedBy { it.name.lowercase() }
58
58
.map { getTtsVoice(it.name) }
59
59
.filter { it.locale?.language == " en" }
60
60
}
@@ -115,7 +115,16 @@ object TtsHelperImpl : TtsHelper {
115
115
sections[0 ],
116
116
sections[1 ]
117
117
)
118
- val description = sections.drop(2 ).filter { it.length > 1 }.joinToString(" " )
118
+ val description = sections.drop(2 )
119
+ .filter { it.length > 1 }
120
+ .mapIndexed { index, string ->
121
+ if (index != 0 ) return @mapIndexed string
122
+
123
+ string.mapIndexed { index, char ->
124
+ if (index == 0 ) char.uppercase() else char
125
+ }
126
+ }
127
+ .joinToString(" " )
119
128
val name = " ${locale.displayName} $description "
120
129
121
130
return TtsVoice (
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ fun TtsVoiceSelectionView(
37
37
ttsHelper?.let { ttsHelper ->
38
38
selectedTtsVoice = voice
39
39
ttsHelper.setVoice(voice)
40
- ttsHelper.speak(" Hello! This is ${voice.id } speaking." )
40
+ ttsHelper.speak(" Hello! This is ${voice.name } speaking." )
41
41
} ? : onDismiss()
42
42
}
43
43
@@ -73,7 +73,7 @@ fun VoiceRow(
73
73
onClick = null ,
74
74
)
75
75
Spacer (modifier = Modifier .width(8 .dp))
76
- Column {
76
+ Column ( Modifier .weight( 1f )) {
77
77
Text (
78
78
text = voice.name ? : voice.id,
79
79
style = MaterialTheme .typography.subtitle1,
@@ -83,6 +83,7 @@ fun VoiceRow(
83
83
}
84
84
Spacer (modifier = Modifier .width(8 .dp))
85
85
Text (
86
+ modifier = Modifier .width(150 .dp),
86
87
text = voice.locale?.displayName.orEmpty(),
87
88
style = MaterialTheme .typography.subtitle2,
88
89
color = AppColor .onCard()
You can’t perform that action at this time.
0 commit comments