Update MainScreenViewModel.kt

This commit is contained in:
Ranjit 2025-02-15 12:17:18 +05:30 committed by GitHub
parent 85f7c8f4d9
commit 5ff2a958d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -143,7 +143,7 @@ class MainScreenViewModel(private val application: Application) : ViewModel() {
printMessage("${data.size / (16000 / 1000)} ms\n")
printMessage("Transcribing data...\n")
val start = System.currentTimeMillis()
val text = whisperContext?.transcribeData(data)
val text = whisperContext?.transcribeDataWithParams(data, tokenTimestamps = false, splitOnWord = false, maxLen = 1)
val elapsed = System.currentTimeMillis() - start
printMessage("Done ($elapsed ms): \n$text\n")
} catch (e: Exception) {
@ -222,4 +222,4 @@ private suspend fun Context.copyData(
}
Log.v(LOG_TAG, "Copied $assetPath to $destination")
}
}
}