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

Keep multiple threads from calling into espeak-ng at the same time #489

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

csukuangfj
Copy link
Collaborator

Turns out espeak-ng is not thread-safe. This PR adds a lock for espeak-ng.

@csukuangfj
Copy link
Collaborator Author

Tested by one user using Python with multi threads and it works fine. Merging.

@csukuangfj csukuangfj merged commit 03ff9db into k2-fsa:master Dec 15, 2023
158 of 164 checks passed
@csukuangfj csukuangfj deleted the lock-for-espeak-ng branch December 15, 2023 09:56
@thewh1teagle
Copy link
Contributor

thewh1teagle commented Jul 13, 2024

Does sherpa c-api is thread safe? Can I consider use it across threads without locks myself?
thewh1teagle/sherpa-rs#6

@csukuangfj
Copy link
Collaborator Author

Yes, all functions in c-api.h are thread-safe.

XiaYucca pushed a commit to XiaYucca/sherpa-onnx that referenced this pull request Jan 9, 2025
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

Successfully merging this pull request may close these issues.

2 participants