Skip to content

Add a way for the library to download files if needed #41

@emassey0135

Description

@emassey0135

While the library file itself can be included in applications, or distributed in FFI wrappers like a jar file, eSpeak NG uses an espeak-ng-data directory containing voice data, which is about 9 MB compressed and around 18 MB uncompressed I think. The Piper backend will also need voices when it is added, and Piper voices are much bigger than that. It seems bad to leave putting these files in the right place to applications, because it can be a complex task especially if I add Piper or more backends that need downloadable voices. On the other hand, its a bad idea to just download files in the current directory, because while that works in Minecraft mods it certainly won't be a good thing to do in many cases. Therefore, each backend should have have metadata indicating whether it needs to download files before it can be initialized, and each voice should have that too, because sometimes the downloads must occur before the backend is started, and sometimes its fine to wait until before a specific voice is used. There should be a function to start downloading needed files for a backend or voice, taking a directory where to store the files. Also, there should be a way of telling an application when the download is done if the application wants that. The library should also verify all downloads with checksums, and not indicate downloads are needed when the files are already there. Perhaps a directory should just be passed to the main initialize function, and then requested downloads always will go there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions