File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
androidMain/kotlin/platformSpecific/tts
commonMain/kotlin/presentation/conversation Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 1
1
package platformSpecific.tts
2
2
3
3
actual fun getTtsHelper (): TtsHelper ? {
4
- return TtsHelperImpl ()
4
+ return TtsHelperImpl
5
5
}
Original file line number Diff line number Diff line change @@ -33,12 +33,6 @@ fun NewConversationScreen(conversationItem: ConversationItem) {
33
33
val ttsHelper by remember { lazy { getTtsHelper() } }
34
34
var isTtsSpeaking by remember { mutableStateOf(false ) }
35
35
36
- fun onWarmUpTts () {
37
- // TTS takes a bit of time to get ready for operation, so we need to instantiate it before actually using it.
38
- @Suppress(" UNUSED_EXPRESSION" )
39
- ttsHelper
40
- }
41
-
42
36
LaunchedEffect (conversationItem) {
43
37
if (! conversationItem.isVoiceInput || ttsHelper == null ) return @LaunchedEffect
44
38
@@ -150,10 +144,7 @@ fun NewConversationScreen(conversationItem: ConversationItem) {
150
144
voiceInputContent = {
151
145
VoiceInput (
152
146
onPromptChanged = conversationItem.onInput,
153
- onSubmit = {
154
- onWarmUpTts()
155
- conversationItem.onSubmit(true )
156
- }
147
+ onSubmit = { conversationItem.onSubmit(true ) }
157
148
)
158
149
},
159
150
)
You can’t perform that action at this time.
0 commit comments