fix: refresh recognition.lang before dictation start
After a runtime locale change (setLocale from Settings), the cached recognition object retains its boot-time lang, causing dictation to run in the wrong language. Set lang immediately before .start() at the plain dictation path in _startMicCapture, matching the pattern already used in _ensureSpeechRecognition(). Closes #5483
This commit is contained in:
parent
f38cf44569
commit
fe4e2851f7
1 changed files with 1 additions and 0 deletions
|
|
@ -930,6 +930,7 @@ function _micToastKeyForRecognitionError(error){
|
|||
}
|
||||
if(recognition && !_forceMediaRecorder && !_rawAudioMode){
|
||||
_activeCaptureMode='speech';
|
||||
recognition.lang=(typeof _locale!=='undefined'&&_locale._speech)||'en-US';
|
||||
recognition.start();
|
||||
_setRecording(true);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue