You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Transcription locks the language on the first chunk, so a take that opens with silence comes out in the wrong language #1664
The automatic transcription detects the language on a take's first chunk only, then forces every later chunk onto it. When that first chunk holds no speech, whisper resolves room noise to an arbitrary language. The whole transcript then comes out in that language, the real speech included.
Seen on 2.4.0-rc.1, Windows 11, local whisper (whispercpp-vulkan, ggml-small-q8_0):
A 5 min 27 s take, transcribed in four chunks of 91.3 s, 90.9 s, 90.5 s and 54.2 s. Its first 91 s held only room sound; English speech came later.
The take's Transcript panel read Detected language: Korean, and the English speech was written in Korean.
An 11 s voice-over with the same speech, transcribed on its own, was detected as English.
On Linux, a take with no speech at all was detected as French and downloaded the French word aligner.
Steps
Record a take that opens with a minute or more of silence or room noise, then has speech.
Let the background transcription finish, then select the take's card in Media.
Read Detected language and the transcript.
Expected: the transcript is in the language spoken.
Workaround: Media → the take's card → Regenerate as → the right language. That re-run came out correctly, with Detected language: English.
Why
electron/stt/index.ts#L381-L401 pins the language resolved by the first chunk, and #L447-L450 takes it from the first chunk that reports one. The pin exists for a good reason: a later chunk that opens on a name or a pause must not flip the language mid-recording. But it trusts the first chunk even when that chunk had no speech to detect from.
Fix direction
Pin the language only once the detection is confident (whisper's language probability), and keep detecting on the next chunks until then.
Or detect on the first chunk that the VAD finds real speech in.
Activity
perf(stt): detect the language once, before whisper_full
fix(stt): pin the transcription language only on a confident detection
perf(stt): detect the language once, before whisper_full
fix(stt): report the language this request detected, not the last one
fix(stt): do not pin on a detection that reports no probability
fix(stt): pin the transcription language only on a confident detection
perf(stt): detect the language once, before whisper_full
fix(stt): report the language this request detected, not the last one
fix(stt): do not pin on a detection that reports no probability
fix(stt): pin the transcription language only on a confident detection
perf(stt): detect the language once, before whisper_full
fix(stt): report the language this request detected, not the last one
fix(stt): do not pin on a detection that reports no probability