Closed KJ7LNW closed 1 year ago
Thanks for the contribution, I'd prefer to make verbose an integer.
--verbose=0
(default) never print any text (Recording / Suspending / Resuming ... nothing).--verbose=1
print "Model Loaded", "Recording starting" ... etc, the kinds of messages used for verbose in this PR.--verbose=2
print additional information (useful for developers or anyone debugging nerd-dictation).... 3 could be used to print noisy information each time a chunk of data that's handled - for e.g. but that could be added later.
Prefer --verbose is an integer so different levels can be set.
Good idea. It is somehow inconsistent with the existing variable verbose
that is passed to functions like main under suspend:
def main_suspend(
*,
path_to_cookie: str = "",
suspend: bool,
verbose: bool, # <<<<<
) -> None:
import signal
if not path_to_cookie:
path_to_cookie = os.path.join(tempfile.gettempdir(), TEMP_COOKIE_NAME)
if not os.path.exists(path_to_cookie):
if verbose:
sys.stderr.write("No running nerd-dictation cookie found at: {:s}, abort!\n".format(path_to_cookie))
--verbose
argument?Verbose can be made into an integer everywhere, perhaps renamed to verbose_level
Moved suspend/resume notices to stderr and use --verbose flag
Added Model loading/loaded prints if --verbose is set. This is useful for large datsets because it takes a while to load. Then you can when it is ready to take dictation.
Signed-off-by: Eric Wheeler vosk-git@z.ewheeler.org