From 2c4ac2627d9de6d6c792db4c8f8a20a27d31d8f9 Mon Sep 17 00:00:00 2001 From: Ali Alameh Date: Fri, 14 Apr 2023 20:02:18 +0300 Subject: [PATCH] stream : support language auto-detect (#501) #445 fix Language auto-detect "auto" flag does not work using the stream tool --- examples/stream/stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/stream/stream.cpp b/examples/stream/stream.cpp index 258457faafe..e0a53dedaea 100644 --- a/examples/stream/stream.cpp +++ b/examples/stream/stream.cpp @@ -148,7 +148,7 @@ int main(int argc, char ** argv) { // whisper init - 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);