From 93c6317a1ee239e895e90f9f80a00b87d99bd6f3 Mon Sep 17 00:00:00 2001 From: ammar ahmed Date: Mon, 8 Dec 2025 01:47:02 +0500 Subject: [PATCH] added - execution time --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index bc51187..4bfe854 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,6 @@ import argparse from helpers.audio_analysis import UrduIntentExtractor +import time def main(): """ @@ -37,12 +38,15 @@ def main(): try: # Initialize extractor extractor = UrduIntentExtractor(model_size=args.model) - + + start_time = time.time() # Process audio file results = extractor.process_audio_file( args.audio_file, verbose=not args.quiet ) + end_time = time.time() + print(f"⏱️ Execution time: {(end_time - start_time) / 60:.2f} minutes, {(end_time - start_time)} seconds") # Save to JSON if requested if args.output: @@ -52,6 +56,7 @@ def main(): print(f"\nResults saved to: {args.output}") except FileNotFoundError as e: + print(f"⏱️ Execution time: {(end_time - start_time) / 60:.2f} minutes, {(end_time - start_time)} seconds") print(f"❌ Error: {e}") except Exception as e: print(f"❌ An error occurred: {str(e)}")