Skip to content

Commit

Permalink
stream : support language auto-detect (ggerganov#501)
Browse files Browse the repository at this point in the history
ggerganov#445  fix Language auto-detect "auto" flag does not work using the stream tool
  • Loading branch information
AliAlameh authored Apr 14, 2023
1 parent 674a8e5 commit 2c4ac26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/stream/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2c4ac26

Please sign in to comment.