From 37947203e6d4866f7055e266aabe69bfd3b4d262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20R=C3=A1=C4=8Dek?= Date: Thu, 9 Nov 2023 18:21:44 +0100 Subject: [PATCH] talk-llama : add language auto detect (#1467) * Add '-l auto' to talk-llama example * Update examples/talk-llama/talk-llama.cpp --------- Co-authored-by: Georgi Gerganov --- examples/talk-llama/talk-llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/talk-llama/talk-llama.cpp b/examples/talk-llama/talk-llama.cpp index 8c41ef54..af971cab 100644 --- a/examples/talk-llama/talk-llama.cpp +++ b/examples/talk-llama/talk-llama.cpp @@ -248,7 +248,7 @@ int main(int argc, char ** argv) { return 1; } - if (whisper_lang_id(params.language.c_str()) == -1) { + if (params.language != "auto" && whisper_lang_id(params.language.c_str()) == -1) { fprintf(stderr, "error: unknown language '%s'\n", params.language.c_str()); whisper_print_usage(argc, argv, params); exit(0);