From 1f1b43a1b4bda2aeca79015125c9fd2b1c4cf8f5 Mon Sep 17 00:00:00 2001 From: Laurent Mazare Date: Tue, 26 Aug 2025 14:31:49 +0200 Subject: [PATCH] Refactor frame callback to remove last_time tracking Removed unnecessary time tracking in the frame callback. --- scripts/tts_pytorch.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/tts_pytorch.py b/scripts/tts_pytorch.py index 5ba58fa..63d4578 100644 --- a/scripts/tts_pytorch.py +++ b/scripts/tts_pytorch.py @@ -117,16 +117,12 @@ def main(): break time.sleep(1) else: - last_time = time.time() - def _on_frame(frame): nonlocal _frames_cnt nonlocal last_time if (frame != -1).all(): _frames_cnt += 1 print(f"generated {_frames_cnt / 12.5:.2f}s", end="\r", flush=True) - print("{}", time.time() - last_time) - last_time = time.time() start_time = time.time() result = tts_model.generate(