Skip to content

Remove runtime data dependencies #1

@bplevin36

Description

@bplevin36

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions