mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 19:06:11 +00:00
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:
+4
-3
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user