Enable ruff in the pre-commit hooks (#124)

* Enable ruff in the pre-commit hooks.

* Disable the old hooks.

* Install uv in the CI.
This commit is contained in:
Laurent Mazare
2025-08-26 13:48:11 +02:00
committed by GitHub
parent f4016a8844
commit 2d301c9da0
5 changed files with 32 additions and 22 deletions

View File

@@ -117,16 +117,22 @@ 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(
[entries], [condition_attributes], on_frame=_on_frame
)
print(f"\nTotal time: {time.time() - start_time:.2f}s")
with tts_model.mimi.streaming(1), torch.no_grad():
pcms = []
for frame in result.frames[tts_model.delay_steps :]: