When args.keyword_paths is set, args.keywords remains to its default value containing all porcupine default keywords. So the two arrays are not in sync, leading to incorectly printing the detected keyword in read_audio:
# this will print one of the default keywords, not the one we set!
_LOGGER.info("Detected keyword `%s`", keywords[result])
This small PR fixes this bug by ensuring that args.keyword_paths and args.keywords are in sync with each other (always generating the one from the other).
When
args.keyword_paths
is set,args.keywords
remains to its default value containing all porcupine default keywords. So the two arrays are not in sync, leading to incorectly printing the detected keyword inread_audio
:This small PR fixes this bug by ensuring that
args.keyword_paths
andargs.keywords
are in sync with each other (always generating the one from the other).