mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-03 08:25:45 +02:00
Update MainScreenViewModel.kt
This commit is contained in:
parent
85f7c8f4d9
commit
5ff2a958d9
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user