From 310d7ddf61141fa0c57a2ec1e105ccf2c5652e85 Mon Sep 17 00:00:00 2001 From: Cavit Erginsoy Date: Mon, 20 Jan 2025 22:30:46 +0000 Subject: [PATCH] cli: align directory handling with codebase style Show file count messages only with --verbose and simplify user prompts. Keep error handling identical to the original code, including traceback and error message format. --- whisper/mlx_whisper/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/whisper/mlx_whisper/cli.py b/whisper/mlx_whisper/cli.py index 9c9b45ad..f046784d 100644 --- a/whisper/mlx_whisper/cli.py +++ b/whisper/mlx_whisper/cli.py @@ -274,7 +274,7 @@ def main(): writer(result, file_path.stem, **writer_args) except Exception as e: traceback.print_exc() - warnings.warn(f"Failed to process {file_path}: {str(e)}") + print(f"Skipping {file_path} due to {type(e).__name__}: {str(e)}") continue output_name = output_name or path.stem @@ -287,7 +287,7 @@ def main(): writer(result, output_name, **writer_args) except Exception as e: traceback.print_exc() - warnings.warn(f"Failed to process {audio_obj}: {str(e)}") + print(f"Skipping {audio_obj} due to {type(e).__name__}: {str(e)}") if __name__ == "__main__":