Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ material = "1.12.0"
hilt = "2.56.1"
kotlinAndroidPlugin = "2.0.0"
grgit = "5.3.0"
elimuModel = "model-2.0.89"
elimuModel = "model-2.0.91"
elimuProvider = "1.2.35"

[libraries]
Expand Down
24 changes: 0 additions & 24 deletions utils/src/main/java/ai/elimu/common/utils/LanguageExt.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package ai.elimu.common.utils.di

import ai.elimu.common.utils.toLanguage
import ai.elimu.common.utils.toLocale
import ai.elimu.content_provider.utils.SharedDataKeys
import ai.elimu.model.v2.enums.Language
import android.content.Context
import android.net.Uri
import android.speech.tts.TextToSpeech
Expand Down Expand Up @@ -37,7 +36,10 @@ class TextToSpeechWrapper(context: Context, contentProviderId: String) {
tts.setSpeechRate(0.5f)

if (contentProviderLanguage.isNotEmpty()) {
tts.setLanguage(contentProviderLanguage.lowercase().toLanguage().toLocale())
val language: Language = Language.valueOf(contentProviderLanguage)
Log.d(TAG, "language: ${language}")
Log.d(TAG, "language.locale: ${language.locale}")
tts.setLanguage(language.locale)
}
} else {
Log.e(TAG, "TTS initialization failed with status: $status")
Expand Down
Loading