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

Remove runtime data dependencies #1

Open
bplevin36 opened this issue Jun 18, 2021 · 0 comments
Open

Remove runtime data dependencies #1

bplevin36 opened this issue Jun 18, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@bplevin36
Copy link
Member

Currently, we statically link in the espeak-ng code on Linux but we still require espeak-ng-data to be installed system-wide for the voice data etc. In the future, it would ease compatibility if we could bundle those data files into the Python wheel.

The hard part would be getting the espeak-ng to use those files instead of looking in system-wide ones. This is hard because data files bundled into wheels are not guaranteed to have a stable location in the file-system. My idea to do this is:

  • in the Rust lib, define a wrapper for fopen which can override libc's version at link-time.
  • this wrapper calls into a Python util that uses the ResourceManager API to open the data file in the wheel and write it to a tempfile
  • Rust wrapper returns (and probably caches) a libc FILE pointing to that tempfile

I have already spent almost 3 days building this package, though, so this work will have to wait.

@bplevin36 bplevin36 added the enhancement New feature or request label Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant