ccoreilly / vosk-browser

A speech recognition library running in the browser thanks to a WebAssembly build of Vosk
Apache License 2.0
364 stars 60 forks source link

Console. log #10

Closed lavrenkov-sketch closed 2 years ago

lavrenkov-sketch commented 3 years ago

image Hello, how disable this console.log ?

ccoreilly commented 3 years ago

It is currently not possible, but I'll implement it and publish a new version together with the changes in PR #11

AnSrwn commented 2 years ago

Is there any update to this issue? Can we already disable the console.log?

ccoreilly commented 2 years ago

@AnSrwn I published a new version (0.0.6) in which it is possible to set the log level. The default log level is 0 (info) and can be set either on model creation or during runtime:

const model = new Model('model.tar.gz', -1);
// or
const model = await createModel('model.tar.gz', 3);
// or/and
model.setLogLevel(2);

Levels match those in vosk/kaldi:

-2: Error
-1: Warning
 0: Info
 1: Verbose
 2: More verbose
 3: Debug