Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More offline test improvements #153

Merged
merged 4 commits into from
Aug 14, 2024

Conversation

palana
Copy link
Contributor

@palana palana commented Aug 14, 2024

With these changes offline tests (with segments.json saving) now consistently run faster than realtime on my machine; on an internal test file (2.5 gb, ~4.5 hours) with logging changes from https://github.com/palana/obs-localvocal/tree/offline-test-logging I get the following output shortly before processing finishes:

[13:38:26.084] [20:41.538] [INFO] [file location: 263:50.000 elapsed: 20:31.076 rate: 12.9] waited 0 ms

palana added 4 commits August 14, 2024 13:45
Main thread and worker thread output could get interleaved weirdly
without this
This was taking a considerable amount of time, especially for longer
input files, reducing overall utilization
In
```
circlebuf_push_back(
  &gf->input_buffers[c],
  audio[c].data() +
    frames_count * frame_size_bytes,
  frames_size_bytes);
```
`frames_count * frame_size_bytes` would overflow with `int` on
a 4 hour file; using `size_t` (on a 64 bit platform) fixes that
@palana palana force-pushed the more-offline-test-improvements branch from d6aebe3 to 9820c81 Compare August 14, 2024 11:54
@royshil royshil merged commit bdab41c into locaal-ai:master Aug 14, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants