|
|
@ -177,15 +177,14 @@ def main(config, args):
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if __name__ == "__main__":
|
|
|
|
parser = default_argument_parser()
|
|
|
|
parser = default_argument_parser()
|
|
|
|
parser.add_argument("--model_type")
|
|
|
|
parser.add_argument(
|
|
|
|
parser.add_argument("--audio_file")
|
|
|
|
"--model_type", type=str, default='offline', help='offline/online')
|
|
|
|
|
|
|
|
parser.add_argument("--audio_file", type=str, help='audio file path.')
|
|
|
|
# save asr result to
|
|
|
|
# save asr result to
|
|
|
|
parser.add_argument(
|
|
|
|
parser.add_argument(
|
|
|
|
"--result_file", type=str, help="path of save the asr result")
|
|
|
|
"--result_file", type=str, help="path of save the asr result")
|
|
|
|
args = parser.parse_args()
|
|
|
|
args = parser.parse_args()
|
|
|
|
print_arguments(args, globals())
|
|
|
|
print_arguments(args, globals())
|
|
|
|
if args.model_type is None:
|
|
|
|
|
|
|
|
args.model_type = 'offline'
|
|
|
|
|
|
|
|
if not os.path.isfile(args.audio_file):
|
|
|
|
if not os.path.isfile(args.audio_file):
|
|
|
|
print("Please input the audio file path")
|
|
|
|
print("Please input the audio file path")
|
|
|
|
sys.exit(-1)
|
|
|
|
sys.exit(-1)
|
|
|
|