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

C-style API #28

Open
Macoron opened this issue Feb 14, 2024 · 1 comment
Open

C-style API #28

Macoron opened this issue Feb 14, 2024 · 1 comment

Comments

@Macoron
Copy link

Macoron commented Feb 14, 2024

Recently, I was working on porting Piper to Unity3d. Unfortunately, current piper-phonemize API can't be marshalled directly in C#, because of std classes like vector or map.

I rewrote it to simpler "C-style" API here. The biggest changes are:

  1. No usage of std C++ classes, only structs and pointers
  2. Storing phonemize internal state and last result with init and destroy functions (to avoid allocating or deallocating memory in managed code)

I believe, this might be useful for other devs creating bindings for managed languages that doesn't support C++ classes. Would you be interested in PR with these changes? Should it be part of piper-phonemize or main piper repo?

@synesthesiam
Copy link
Contributor

Sure, I'd be interested in a PR! Thanks 🙂

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