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

Making Backend trait public #19

Open
saona-raimundo opened this issue Dec 22, 2021 · 1 comment
Open

Making Backend trait public #19

saona-raimundo opened this issue Dec 22, 2021 · 1 comment

Comments

@saona-raimundo
Copy link
Contributor

Hi! I know this could be a major rework and this is not a feature request, but a question if you would be up to review such PR.

I wanted to ask about the possibility of making the Backend trait public.

Pros

People could implement their own backend. So the following things would be possible;

  • If I am not mistaken, espeakng-sys could implement a new backend... or any other ffi to TTS systems.
  • People could implement their own in-house backend (for example: based on a dictionary, play some audio)

Cons

The cost of changing the API?

  • Tts would take anything that implements the trait (for example Box<dyn Backend>), instead of Backends.
@ndarilek
Copy link
Owner

Sorry I haven't gotten to this sooner.

If you could make a PR for it then I'd be willing to review. I'm a bit concerned about the complexity of the various IDs and such. An enum was the easiest way to do those, but it can't be extended to support custom backends. So I guess it'd need to be a trait, or we'd need to rework the callbacks global to accept something that could be extended. It isn't a priority for me since it isn't something I need, so I probably won't get to it for a while or ever. But I'm happy to check someone else's work.

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

No branches or pull requests

2 participants