fix: optimize concurrency settings and update documentation for performance improvements#24
Merged
ronibhakta1 merged 1 commit intoJul 20, 2026
Conversation
…rmance improvements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request makes several improvements to CPU resource management, model selection, and logging for the PocketTTS-based synthesizer. The most significant changes are: defaulting to smaller, faster 6-layer models for most languages (except French), improving hardware-aware concurrency configuration, clarifying documentation around model sizes and CPU usage, and enhancing logging with synthesis timing details. These updates ensure better performance, more predictable resource usage, and clearer configuration/setup for users.
Concurrency and resource management improvements:
max_concurrent_synthesesis reduced from 2 to 1 to avoid CPU oversubscription on small hardware; detailed comments clarify that each synthesis uses ~2 cores, andconfigure.shnow derives optimal values from detected hardware. [1] [2] [3] [4]configuration.md) is updated to explain that each synthesis job uses ~2 CPU cores, and that concurrency is now hardware-derived rather than a static default.Model selection and documentation:
_LANG_MODELnow defaults to the 6-layer model for all supported languages except French, which only has a 24-layer model; this is explained in both code comments and documentation. [1] [2] [3] [4] [5]Performance and logging enhancements:
Threading and provider loading:
torch.set_num_threads(1)because PocketTTS already manages this internally to optimize CPU usage.These changes together make the system more efficient, easier to configure for different hardware, and clearer for users and developers.