Avoid voice input model closing race condition

This commit is contained in:
Aleksandras Kostarevas 2024-03-21 16:50:06 -05:00
parent 434a751d63
commit 6329878e8e

View File

@ -64,7 +64,7 @@ class WhisperGGML(
}
}
fun close() {
suspend fun close() = withContext(inferenceContext) {
if(handle != 0L) {
closeNative(handle)
}