We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b55b1d commit 409413aCopy full SHA for 409413a
1 file changed
shared/src/androidMain/kotlin/com/module/notelycompose/platform/Transcriper.android.kt
@@ -70,9 +70,9 @@ actual class Transcriber(
70
val modelFile = File(modelsPath, modelFileName)
71
whisperContext = WhisperContext.createContextFromFile(modelFile.absolutePath)
72
canTranscribe = true
73
- } catch (e:RuntimeException){
+ } catch (e: OutOfMemoryError) {
74
e.printStackTrace()
75
- } catch (e:Exception){
+ } catch (e: Throwable) {
76
77
}
78
@@ -83,11 +83,11 @@ actual class Transcriber(
83
84
85
actual fun isValidModel(modelFileName: String) : Boolean{
86
- try {
87
- loadBaseModel(modelFileName)
88
- }catch (e:Exception){
+ try {
+ loadBaseModel(modelFileName)
+ } catch (e:Exception){
89
return false
90
- }
+ }
91
return true
92
93
0 commit comments