def main(): # TODO(alessiob): level = logging.INFO once debugged. logging.basicConfig(level=logging.DEBUG) parser = _InstanceArgumentsParser() args = parser.parse_args() _ValidateArguments(args, parser) simulator = simulation.ApmModuleSimulator( test_data_generator_factory=( test_data_generation_factory.TestDataGeneratorFactory( aechen_ir_database_path=args.air_db_path, noise_tracks_path=args.additive_noise_tracks_path, copy_with_identity=args.copy_with_identity_generator)), evaluation_score_factory=eval_scores_factory.EvaluationScoreWorkerFactory( polqa_tool_bin_path=os.path.join(args.polqa_path, _POLQA_BIN_NAME), echo_metric_tool_bin_path=args.echo_metric_tool_bin_path ), ap_wrapper=audioproc_wrapper.AudioProcWrapper(args.apm_sim_path), evaluator=evaluation.ApmModuleEvaluator(), external_vads=external_vad.ExternalVad.ConstructVadDict( args.external_vad_paths, args.external_vad_names)) simulator.Run( config_filepaths=args.config_files, capture_input_filepaths=args.capture_input_files, render_input_filepaths=args.render_input_files, echo_path_simulator_name=args.echo_path_simulator, test_data_generator_names=args.test_data_generators, eval_score_names=args.eval_scores, output_dir=args.output_dir) sys.exit(0)
def main(): # TODO(alessiob): level = logging.INFO once debugged. logging.basicConfig(level=logging.DEBUG) parser = _InstanceArgumentsParser() args = parser.parse_args() if args.capture_input_files and args.render_input_files and (len( args.capture_input_files) != len(args.render_input_files)): parser.error( '--render_input_files and --capture_input_files must be lists ' 'having the same length') sys.exit(1) if args.render_input_files and not args.echo_path_simulator: parser.error( 'when --render_input_files is set, --echo_path_simulator is ' 'also required') sys.exit(1) simulator = simulation.ApmModuleSimulator( aechen_ir_database_path=args.air_db_path, polqa_tool_bin_path=os.path.join(args.polqa_path, _POLQA_BIN_NAME), ap_wrapper=audioproc_wrapper.AudioProcWrapper(args.apm_sim_path), evaluator=evaluation.ApmModuleEvaluator()) simulator.Run(config_filepaths=args.config_files, capture_input_filepaths=args.capture_input_files, render_input_filepaths=args.render_input_files, echo_path_simulator_name=args.echo_path_simulator, test_data_generator_names=args.test_data_generators, eval_score_names=args.eval_scores, output_dir=args.output_dir) sys.exit(0)
def main(): # TODO(alessiob): level = logging.INFO once debugged. logging.basicConfig(level=logging.DEBUG) parser = _InstanceArgumentsParser() args = parser.parse_args() simulator = simulation.ApmModuleSimulator( aechen_ir_database_path=args.air_db_path, polqa_tool_bin_path=os.path.join(args.polqa_path, _POLQA_BIN_NAME), ap_wrapper=audioproc_wrapper.AudioProcWrapper(), evaluator=evaluation.ApmModuleEvaluator()) simulator.Run(config_filepaths=args.config_files, input_filepaths=args.input_files, test_data_generator_names=args.test_data_generators, eval_score_names=args.eval_scores, output_dir=args.output_dir) sys.exit(0)