How do I turn off E_INFO in pocketsphinx?
Asked Answered
D

4

12

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.

Doody answered 24/7, 2013 at 5:25 Comment(0)
D
12

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)
Dg answered 24/7, 2013 at 13:5 Comment(5)
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 envSpelling
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 NULGeoffrey
G
1

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.

Germaun answered 27/12, 2015 at 20:14 Comment(1)
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
A
1

i use the API,and add

err_set_logfp(NULL);

before using

ps_init(config);

and it will work without any "INFO"log

Agronomy answered 1/4, 2019 at 7:29 Comment(0)
M
1

In Python:

config = Decoder.default_config()
config.set_string('-logfn','nul')
Mai answered 18/9, 2020 at 3:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.