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

fix memory leak #1

Closed
jeremyandrews opened this issue Jan 7, 2020 · 2 comments
Closed

fix memory leak #1

jeremyandrews opened this issue Jan 7, 2020 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@jeremyandrews
Copy link
Owner

Currently each time we convert audio to text the kakaia process grows by a few hundred kilobytes. Need to track down where the memory is leaking, and fix.

@jeremyandrews
Copy link
Owner Author

The leak is because we're loading the model into memory each time we convert an audio file to text, where we should only be loading it one time. The logic in src/speech.rs needs to be reworked to only load the models into memory one time and then re-use.

@jeremyandrews
Copy link
Owner Author

Fixed in e5247c9

We now load the deepspeech::Model only one time at launch and share it to all threads with a mutex.

@jeremyandrews jeremyandrews added the bug Something isn't working label Jan 20, 2020
@jeremyandrews jeremyandrews added this to the Phase 1 milestone Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant