alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
8.06k stars 1.11k forks source link

how to disable log information? #407

Closed hyansuper closed 3 years ago

hyansuper commented 3 years ago

This could be a stupid question. I am using the python api. How to not show the below log information when a KaldiRecognizer is initialized?

LOG (VoskAPI:ReadDataFiles():vosk/model.cc:192) Decoding params beam=13 max-active=7000 lattice-beam=6
LOG (VoskAPI:ReadDataFiles():vosk/model.cc:195) Silence phones 1:2:3:4:5:6:7:8:9:10:11:12:13:14:15
LOG (VoskAPI:RemoveOrphanNodes():nnet-nnet.cc:948) Removed 1 orphan nodes.
LOG (VoskAPI:RemoveOrphanComponents():nnet-nnet.cc:847) Removing 2 orphan components.
LOG (VoskAPI:Collapse():nnet-utils.cc:1472) Added 1 components, removed 2
LOG (VoskAPI:CompileLooped():nnet-compile-looped.cc:345) Spent 0.03159 seconds in looped compilation.
...
nshmyrev commented 3 years ago

You can call SetLogLevel(-1), see here:

https://github.com/alphacep/vosk-api/issues/80

frankiedrake commented 1 year ago

You can call SetLogLevel(-1), see here:

80

Hope the warning and worse level messages will be still printed?

Dahqx commented 3 months ago

THANKS