]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
talk-llama : add language auto detect (#1467)
authorJakub Ráček <redacted>
Thu, 9 Nov 2023 17:21:44 +0000 (18:21 +0100)
committerGitHub <redacted>
Thu, 9 Nov 2023 17:21:44 +0000 (19:21 +0200)
* Add '-l auto' to talk-llama example

* Update examples/talk-llama/talk-llama.cpp

---------

Co-authored-by: Georgi Gerganov <redacted>
examples/talk-llama/talk-llama.cpp

index 8c41ef542dc8468a1e94f195c5ff7d1985802186..af971cabdd4ef2ee25656ccc89c7fee575ab3be5 100644 (file)
@@ -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);