stream : support language auto-detect (#501)

#445  fix Language auto-detect "auto" flag does not work using the stream tool
This commit is contained in:
Ali Alameh 2023-04-14 20:02:18 +03:00 committed by GitHub
parent 674a8e579b
commit 2c4ac2627d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);