Fixed store_true in --json

This commit is contained in:
aayagar001 2019-11-24 20:31:24 +05:30 committed by GitHub
parent abe9583b16
commit 2057305df7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@ def main():
help='Print version and exits')
parser.add_argument('--extended', required=False, action='store_true',
help='Output string from extended metadata')
parser.add_argument('--json', required=False, action='store_false',
parser.add_argument('--json', required=False, action='store_true',
help='Output json from metadata with timestamp of each word')
args = parser.parse_args()
@ -138,7 +138,7 @@ def main():
inference_start = timer()
if args.extended:
print(metadata_to_string(ds.sttWithMetadata(audio)))
if args.json:
elif args.json:
print(metadata_json_output(ds.sttWithMetadata(audio)))
else:
print(ds.stt(audio))