From: Jakub Ráček Date: Thu, 9 Nov 2023 17:21:44 +0000 (+0100) Subject: talk-llama : add language auto detect (#1467) X-Git-Tag: upstream/1.7.4~1272 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=37947203e6d4866f7055e266aabe69bfd3b4d262;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp 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 --- 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);