mirror of
https://github.com/kyutai-labs/delayed-streams-modeling.git
synced 2025-12-23 03:19:57 +00:00
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:
@@ -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 :]:
|
||||
|
||||
Reference in New Issue
Block a user