Android: Voice typing: Fix incorrectly-calculated audio length (#12012)

This commit is contained in:
Henry Heino
2025-03-27 18:57:55 +01:00
committed by GitHub
parent 3e5acfbc09
commit 0cef6cc611
@@ -69,10 +69,10 @@ WhisperSession::transcribe_(const std::vector<float>& audio, size_t transcribeCo
return "";
}
float seconds = static_cast<float>(audio.size()) / WHISPER_SAMPLE_RATE;
if (seconds > 30.0f) {
LOGW("Warning: Audio is longer than 30 seconds. Not all audio will be transcribed");
}
float seconds = static_cast<float>(transcribeCount) / WHISPER_SAMPLE_RATE;
if (seconds > 30.0f) {
LOGW("Warning: Audio is longer than 30 seconds. Not all audio will be transcribed");
}
whisper_full_params params = buildWhisperParams_();