E_INFO is printing a bunch of logs. I don't know how I can turn that off. I searched E_INFO from all source files in pocket/base sphinx but I was not able to find where it set up the flag.
How do I turn off E_INFO in pocketsphinx?
Configuration option
-logfn /dev/null
Windows
-logfn nul
turns off logging.
If you are using API you can also use
err_set_logfile(char *filename)
Is there a way to turn it off for the pre-built pocketsphinx, ie in Java at runtime? I tried not to make setRawLogDir call - that didn't help. –
Spelling
Sorry, Yevgeniy, I'm not sure what your question is about. If it's about Android, sphinxbase there uses standard android logging through logcat, it's a bit different thing. –
Dg
It does. Isn't this page's issue about that? Either way, do you know of how I could disable these logs without going through Proguard (which will slow down my build process)? I need to remove these message in debug env –
Spelling
Yevgeniy, logcat messages could be just filtered out. If you want to completely remove messages from logcat you can edit pocketsphinx sources. I don't recommend you doing that though you'll met issues debugging your application in the future. –
Dg
This worked.. For windows Users, use pocketsphinx_continuous -logfn NUL –
Geoffrey
If you are using the API, this is what I did:
// turn off pocketsphinx output
err_set_logfp(NULL);
err_set_debug_level(0);
The API given by the accepted answer didn't work for me.
Unfortunately this did not work for me on Windows 10. I can't find an explicit version but comments suggest my source is younger than July 2015. And the accepted answer did not work either. –
Daiseydaisi
i use the API,and add
err_set_logfp(NULL);
before using
ps_init(config);
and it will work without any "INFO"log
In Python:
config = Decoder.default_config()
config.set_string('-logfn','nul')
© 2022 - 2024 — McMap. All rights reserved.