문제

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.

도움이 되었습니까?

해결책

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)

다른 팁

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.

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')
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top