diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineViewModel.kt b/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineViewModel.kt index 6ee38c74b..2dfe91631 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineViewModel.kt @@ -18,7 +18,12 @@ import io.legado.app.utils.toastOnUi class SpeakEngineViewModel(application: Application) : BaseViewModel(application) { - val sysEngines: List = TextToSpeech(context, null).engines + val sysEngines: List by lazy { + val tts = TextToSpeech(context, null) + val engines = tts.engines + tts.shutdown() + engines + } fun importDefault() { execute {