Skip to content

armgit / piper

Public Imported from GitHub
0

A fast, local neural text to speech system

Add -q/--quiet option to disable logging

Michael Hansen7ec6ddaa31a3
diff --git a/src/cpp/main.cpp b/src/cpp/main.cpp
index 045db78..9022cd3 100644
--- a/src/cpp/main.cpp
+++ b/src/cpp/main.cpp
@@ -436,6 +436,8 @@ void printUsage(char *argv[]) {
<< endl;
cerr << " --debug print DEBUG messages to the console"
<< endl;
+ cerr << " -q --quiet disable logging"
+ << endl;
cerr << endl;
}
@@ -522,6 +524,9 @@ void parseArgs(int argc, char *argv[], RunConfig &runConfig) {
} else if (arg == "--debug") {
// Set DEBUG logging
spdlog::set_level(spdlog::level::debug);
+ } else if (arg == "-q" || arg == "--quiet") {
+ // diable logging
+ spdlog::set_level(spdlog::level::off);
} else if (arg == "-h" || arg == "--help") {
printUsage(argv);
exit(0);