Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading vosk_set_log_level documentation #1616

Open
AlexCharlton opened this issue Aug 5, 2024 · 1 comment
Open

Misleading vosk_set_log_level documentation #1616

AlexCharlton opened this issue Aug 5, 2024 · 1 comment

Comments

@AlexCharlton
Copy link

The verbosity of Kaldi's logging are governed by the value passed to SetVerboseLevel, which (to some degree) corresponds to the Severity enum [source]. The values are: -3 (assertion failed), -2 (error), -1 (warning), and 0 (info). Values greater than 0 are used for debug messages, but there does not seem to be any documentation for this.

The vosk_set_log_level docs state:

/** Set log level for Kaldi messages
 *
 *  @param log_level the level
 *     0 - default value to print info and error messages but no debug
 *     less than 0 - don't print info messages
 *     greater than 0 - more verbose mode
 */

It's explicit that this is just controlling Kaldi messages (true, given the implementation), but it does not mention that there are three levels below info. The -1 warn level would be good to call out as separate from the error level.

The Java LogLevel enum is similarly misleading, with no ability to restrict logging to just errors.

My suggestion for resolution: improve the documentation and add ERROR level to the Java enum.

This issue was first reported at the rust bindings project.

@nshmyrev
Copy link
Collaborator

nshmyrev commented Aug 9, 2024

We can change it a bit later, sure. Thanks for the report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants