Merge pull request #2546 from aayagar001/master

Fixed store_true in --json
This commit is contained in:
lissyx 2019-11-24 16:27:42 +01:00 committed by GitHub
commit 670d24ae03
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))