Make auto the default speech language and carry what was detected through

New installs start detecting instead of being locked to one language; a stored
value from before this default still wins. The dictation chain asks
transcribe_detected() in auto mode, records the detected code in history as
speech_language, hands it to the cleanup prompt (a detected Turkish recording
gets the Turkish prompt and glossary rule), and reports it on the socket reply.
The stale comment claiming whisper.cpp's -l auto does not detect is corrected.
This commit is contained in:
sudoeren
2026-08-27 21:40:09 +03:00
parent 1bb5c9ebbc
commit 7da871c567
6 changed files with 115 additions and 30 deletions
+4 -3
View File
@@ -967,12 +967,13 @@ def _whisper_args(settings):
binary, "-m", str(model),
"--inference-path", INFERENCE_PATH,
# Whatever language the request does not name. api.py leaves the field
# out when the language is "auto", and the server's own default is
# English rather than detection.
# out when the language is "auto", and the server's own language is
# set here: "auto" makes whisper.cpp detect what it hears.
"-l", "auto",
# Stock phrases invented for near-silence come from non-speech tokens,
# and verbose_json otherwise pays for a language probability sweep
# nothing here reads.
# nobody asked for. A request that wants the detected language switches
# that back on per request.
"-sns", "-nlp",
]
if int(settings["threads"]) > 0: